0408-01 OPC UA Data Exchange
Example Projects > 0408 OPC UA Communication > 0408-01 OPC UA Data Exchange
OPC UA data exchange
This folder contains the source files for the demonstration project on data exchange between two devices over the OPC UA protocol.
Both the server and client stations are implemented in REXYGEN but any of them can be replaced by another device supporting the OPC UA protocol.
- REXYGEN Runtime Core and OpcUaDrv modules must be installed and running on the individual devices to run the examples.
Running the examples
- The *exec.mdl file is the project main file.
- Open it with REXYGEN Studio, compile and download it to the target device.
Server in this example contains four nodes defined by OpcUaServerValue blocks. Each node has a different type of value - string, boolean, double and long, which is defined in OpcUaServerValue blocks with other parameters. This blocks are capable to read actual value (output y) or set new value throught input u. New value is stored when rising edge signal occur on the SET input. In other words, when MP_SET block is pressed.
There is specified Authentication with username and password in this example by default. Connection is encrypted by Basic256ha256. This settings can be changed in *exec.mdl -> OPCUAS block -> Configure. Default values are: Username: rex Password: opc Please, make sure that this settings correspond with settings on the Client side.
This task serves as an example of OPC UA client in the Rexygen and can read and write values to nodes in the Server Task described above. Please check, that settings in *exec.mdl -> OPCUAC block -> Configure -> Edit server correspond with settings on the server side. It is also necessary to update the URL value. IP address 192.168.1.200 is expected as address of the server by default.
The client example contains blocks for reading and setting values to server nodes. The OpcUaReadValue block read actual value of the node until the RUN input has value ON. New value can be stored with OpcUaWriteValue block. This block writes value from input value to the node when RUN input is ON.
- OPC UA driver for REXYGEN
- Function blocks of REXYGEN
- REXYGEN Studio User Guide
- Complete documentation of REXYGEN
- Visit the REXYGEN webpage for more information about the example projects and developing advanced automation and control solutions using REXYGEN.