Showing posts with label OPCUA. Show all posts
Showing posts with label OPCUA. Show all posts

Monday, August 14, 2023

Minimal OPC UA client that auto generates self signed certificate on startup in C#

Minimal OPC UA client that auto generates self signed certificate on startup in C#

This is minimal OPC UA client in C# that demonstrates self signed certificate auto generation on startup.
Pre-Req

Steps
Full working code can be found here.

Saturday, August 12, 2023

OPC UA Read service using C#

OPC UA Read service using C#

This is a sample bare bones OPC UA C# application performing a Read service.
Pre-Req

Steps
Full working code can be found here.

Saturday, July 15, 2023

Running OPC UA .Net Standard PubSub reference server on Ubuntu 22.04 using dotnet-sdk-6.0

Running OPC UA .Net Standard PubSub reference server on Ubuntu 22.04 using dotnet-sdk-6.0

System info:
OS: Ubuntu 22.04
OPC UA .Net Standard under test: 1.4.371.96

Install MQTT broker

$: sudo apt install mosquitto

Install dotnet-sdk-6.0

$: sudo apt install dotnet-sdk-6.0

Install git as needed

$: sudo apt install git

Clone OPC UA .Net Standard git repo

$: mkdir ~/prj
$: cd ~/prj
$: git clone https://github.com/OPCFoundation/UA-.NETStandard.git
$: cd UA-.NETStandard
$: git checkout refs/tags/1.4.371.96

Run publisher

$: dotnet run --project Applications/ConsoleReferencePublisher/ConsoleReferencePublisher.csproj --framework net6.0

Run subscriber (on another terminal)

$: cd ~/prj/UA-.NETStandard
$: dotnet run --project Applications/ConsoleReferenceSubscriber/ConsoleReferenceSubscriber.csproj --framework net6.0

Running OPC UA .Net Standard PubSub reference server on Ubuntu 20.04 using dotnet-sdk-3.1

Running OPC UA .Net Standard PubSub reference server on Ubuntu 20.04 using dotnet-sdk-3.1

High Level Info:


OPC UA .Net Standard under test: 1.4.371.96
OS: Ubuntu 20.04 (>20.04 not working due to dotnet-sdk-3.1 is not supported)

Install dotnet-sdk-3.1

$: wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
$: sudo dpkg -i packages-microsoft-prod.deb
$: rm packages-microsoft-prod.deb
$: sudo apt update
$: sudo apt install dotnet-sdk-3.1

Clone OPC UA .Net Standard git repo

$: mkdir -p ~/prj
$: git clone -b 1.4.371.96 https://github.com/OPCFoundation/UA-.NETStandard.git

Install MQTT broker Mosquitto and supporting tools

$: sudo apt install mosquitto
$: sudo apt  install mosquitto-clients

Run mqtt sub client to see traffic

$: mosquitto_sub -h localhost -v -t '#'

Run reference PubSub publisher

$: cd ~/prj/UA-.NETStandard/Applications/ConsoleReferencePublisher
$: dotnet run --project ConsoleReferencePublisher.csproj --framework netcoreapp3.1

Run reference PubSub subscriber

$: cd ~/prj/UA-.NETStandard/Applications/ConsoleReferenceSubscriber
$: dotnet run --project ConsoleReferenceSubscriber.csproj --framework netcoreapp3.1
Ref(s):
Install the .NET SDK or the .NET Runtime on Ubuntu

Fedora install screen chronicle

Fedora install screen chronicle Below are links to Fedora installation screens. It is interesting to see how it has evolved over time. Fe...