Tag as a Gateway

Introduction

Hello and welcome to a new guide on how to best use Movicon.NExTâ„¢.
In this technote, we are going to show you how a Movicon.NExTâ„¢ project tag can be used as a gateway to propagate its value to two or more communication drivers and, therefore, to two or more devices.

Tag as Gateway

When a tag is assigned two or more communication addresses, therefore, when it is associated to two or more different communication drivers simultaneously, it assumes the function of a gateway.
In this scenario, the change of the tag's value will be propagated to both the drivers.
Or if a driver associated to the tag changes the tag's value, the change will be propagated to all the addresses associated to the tag and, therefore, to all the devices associated to it.
There are no connection type restrictions, therefore, each I/O address can be only read, only write or read/write.
The latter type, or rather in the read/write scenario, you will need to pay attention because the value read on anyone of the drivers associated to the tag will be reported to the others and it will be the last reading that establishes the tag's value, and as a consequence drivers cannot be prioritized.
In addition, you cannot import the same tag using the import method of two different drivers because the second one will overwrite the first and therefore the tag's dynamic link will also be overwritten.

Example

We will now use an example to show you how the tag functions as a gateway.

Simulators

To do this, we will use the ModRS_Sim simulator for communications using the Modbus TCP-IP driver and the Prosys OPC UA simulator for communications using the OPC UA Client driver.
Start both simulators.
Check that the Constant item in the Prosys OPC UA simulator is Int32 type. To do this, after the simulator has been opened and started  up:

The Movicon.NExT project

After having opened the Movicon.NExT developer enviornment and loaded a project, or created a new one:

To configure the Modbus TCP-IP:

To configure the OPC UA Client:

Now that the drivers have been configured, we will create a tag. To do this:

Now configure the communication address:

Save the project by clicking on the Save All icon on the Movicon.NExT editor's toolbar.

Runtime Test

Now that the project has been configured, you can startup the project's Server side only by clicking the Start Server icon.
Once the Server has started up with the OPC UA Browser window open, select the Tags folder and change the value of the GatewayTag tag.
Once the tag value has been changed, it will be reported to both simulators.
First change the value on the Modbus simulator and then on the OPC UA simulator. If no errors occur, the value will be reported to Movicon.NExT and the OPC UA Server and Movicon.NExT and the Modbus simulator respectively.