Tag of Setpoint

<< Click to Display Table of Contents >>

Navigation:  Modbus Universal MasterOPC Server > Quick Start > Example2 - Device Connection via Modbus RTU >

Tag of Setpoint

Now create a tag supporting writing. Such a tag is created the same way, but we should set in it Access Type = ReadWrite.

Two moments must be taken into account when creating tags with writing:

1. Only the regions Holding Registers and Coils support writing. Writing to the regions Input Registers and Discrete Inputs is inadmissible (you never set the Access Type setting of those regions to ReadWrite or WriteOnly).

2. There are single writing and group writing. As for Holding Registers, the function 0x10 makes group writing, an the function 0x06 makes single writing. As for Coils, the function 0x0F, makes group writing, and the function 0x05 makes single writing. A type of writing supported is defined by a device specification, but, as a rule, all modern devices support group writing (some devices support both group and single writing).

In the OPC server, the following device parameters define a mode of writing (group or single).

teg_ustavki

Group writing is the default mode.

The device documentation inform us that the functions 0x06 and 0x10 can be used to write to registers (see Tag of Analog Input), that is, the device supports both group and single writing, therefore we can leave the setting unchanged.

Refer to the page 23 of the device documentation.

teg_ustavki1

As we see, there are two setpoints with addresses 0x3100 and 0x3102.  Add a tag, and name it Set Point 1. Set the address required, and set Access Type = ReadWrite.

teg_ustavki2

We have 2 setpoints, therefore we can create 2 tags simultaneously. To do this, set the flag Multiply on, and specify 2 as number of tags.

teg_ustavki3

Click OK to add the tags to the tree. Look at the tag icon.

teg_ustavki4

The Set Point 2 tag has the same parameters as the Set Point 1 tag but its address is 0x3102 (according to the data type of the Set Point 1 tag, the OPC server automatically defines an address of the next tag).

teg_ustavki5

Creation of tags is complete. Save the configuration.

teg_ustavki6