Skip to main content

Bidirectional communication

OT Jobs are an easy way to make the Zerynth agents interact with PLCs using the Zerynth Cloud. OT Jobs are functions that are triggered from the Zerynth cloud and executed on the respective device, which will write the received value on the target register of the PLC that it is controlling. From the operator's point of view, you can manage PLCs at scale, while issuing jobs and executing functions in a schedulable manner for a large fleet of devices. On the Zerynth Cloud side, the interface is pretty simple and adjustable.

Command setup

In order to set up the bidirectional channel the user must provide the list of PLC command names and the associated nodes. The names are used as symbolic reference for the command, while the nodes reference are used as to write values into the PLC. See the Zerynth Configurator which provides a graphical interface to define the OT commands.

Once the user defines at least one command with the Zerynth Configurator, on the cloud side new jobs are available with the names like <OT>.command, where <OT> is the specific protocol used to talk with the PLC (e.g.: opcua, modbus, s7, etc.). By using the cloud dashboard, the user can send such jobs to the device specifying the command name and the relevant value.

OPC-UA example

  • Insert an OPC-UA Node into the advanced graph editor

  • Set a command with:

    Command operation

    Namespace 1

    Identifier 1000

    Type String

and save the changes. That defines the operation command associated with ns=1;i-1000 node.

  • Deploy the graph
  • From the cloud dashboard the Job named opcua.command is now available. The operator can run such job specifying {"operation":"sn12345"} as job value.

Once the job has successfully completed, the PLC set the "sn12345" value into ns=1;i=1000 node.