iliareshetov / node-opcua-server

Simulation of a PLC server that uses the OPC UA communication protocol to simulate temperature sensor data flow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OPC UA Server

This is an example of how to create an OPCUA server using the node-opcua library. The server exposes a single variable, Temperature, which is updated every 5 seconds.

Usage

  1. Install dependencies:
npm install
  1. Start the server:
npm start
  1. Connect to the server using an OPC UA client with the endpoint URL opc.tcp://localhost:26543

Overview

This code creates a new OPCUAServer instance and initializes it with some basic configuration. It then adds a Temperature variable to the server's address space that returns a sine wave value.

Client

To connect to the server, you can use OPC UA client

About

Simulation of a PLC server that uses the OPC UA communication protocol to simulate temperature sensor data flow


Languages

Language:TypeScript 100.0%