Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI Interface for Modbus Ethernet PLC

Output tag configuration

  • Last UpdatedNov 05, 2024
  • 5 minute read

Output tags are used to send commands to a PLC node. A tag is an output tag if function code 5 or 6 is specified in Location3. Commands are sent to the PLC only upon an event. An event is triggered in one of two ways, depending upon the configuration of the output tag.

  • Configuration 1 (recommended): In this configuration, a command is written to the PLC when an event is detected for a SourceTag. A SourceTag is associated with an output tag through the output tag's SourceTag field. The value of the SourceTag is written to the output tag if the command is successful. The PointType of the output tag and SourceTag do not need to be the same.

  • Configuration 2: In this configuration, a command is written to the PLC when an event is detected for the output tag itself. This configuration is enabled if no SourceTag is defined in the output tag's SourceTag field.

  • When do "events" occur?: An event occurs whenever a value reaches the snapshot of the SourceTag (configuration 1) or the output tag (configuration 2). The actual value of the snapshot does not need to change to trigger an event.

  • What commands are sent to the PLC?: The command is determined by the Location3 value of the output tag. For example, if Location3 is set to 105, then the command to the PLC will be to force a single coil either on or off. The coil is turned on if the trigger value that is sent to the SourceTag (configuration 1) or to the output tag (configuration 2) is greater than zero. The coil is turned off if the trigger value that is sent to the SourceTag (configuration 1) or output tag (configuration 2) is equal to zero. If Location3 is set to 106, then the command is to modify the contents of a holding register. The value that is sent to the holding register is determined by the value that is sent to the SourceTag (configuration 1) or output tag (configuration 2).

  • Digital state messages sent to the output tag: Informative digital state messages are sent to the output tag only for configuration 1, which is why configuration 1 is recommended. If there is trouble sending a command to the PLC, then an appropriate digital state is written to the output tag. The use of output tags is demonstrated below by examples.

Example 1

Configure an output tag and a source tag to force coil number 131 on or off (function code 5). The source tag should be configured so that the on/off status of the coil can be changed using manual inputs. Assume that the interface number is 2, that the PLC node is 77, and that the PointSource for the interface is M.

Solution

Part 1, Configure the Output Tag:

Call the output tag c131out. The output tag is used to specify the interface number (Location1), the PLC node (Location2), the data type and a function code (Location3), and the coil number to be changed (Location5). The Location4 parameter is ignored when the SourceTag field is specified. The PointSource for the output tag corresponds to the ModbusE interface, which is M in this example. The PointType of the output tag and the SourceTag are configured to be the same. The CompDev and ExcDev are set to zero for the output tag because the source tag is to be configured as a manual input point (lab data) for which the CompDev and ExcDev should also be zero. Generally, compression and exception should be turned off for manually entered points. The zero and span are set to correspond to the source tag. A TypicalValue and a SquareRoot code are configured below. We can specify any value for these parameters (and other parameters) since no restrictions were posed in the problem statement. For a PI3 home node, the user may additionally wish to set Step=1.

Output Tag Configuration - Example 1

PI3 Home Node

Tag

c131out

PointType

int16

Zero

0

Span

1

TypicalValue

1

PointSource

M

Location1

2

Location2

77

Location3

105

Location5

131

SquareRoot

0

SourceTag

c131src

CompDev

0

ExcDev

0

Part 2, Configure the Source Tag:

No restrictions are placed on the PointSource, but Pointsource Lab is appropriate for the manual inputs required in this example. The CompDev and ExcDev are set to zero, which is appropriate for manually entered points. Since the SourceTag does not receive values from an interface (in this example) the Location parameters are ignored if specified. When the source tag is set to 0, coil 131 will be turned off. When the source tag is set to any positive value, coil 131 will be turned on. The zero is set to 0 and the Span is set to 1, which is the minimum range required to turn the coil off and on.

Source Tag Configuration - Example 1

PI3 Home node

Tag

c131src

PointType

int16

Zero

0

Span

1

TypicalValue

1

PointSource

Lab

CompDev

0

ExcDev

0

Example 2

Configure an output tag to force coil number 131 on or off (function code 5). Do not configure a source tag. Since no source tag is to be used, the values for the output tag must be entered manually. Assume that the interface number is 2, that the PLC node is 77, and that the PointSource for the interface is M.

Solution:

The configuration is the same as in example 1 except that no source tag is specified in the configuration. When the output tag is set to 0, coil 131 will be turned off. When the output tag is set to any positive value, coil 131 will be turned on. The zero is set to 0 and the Span is set to 1, which is the minimum range required to turn the coil off and on. The PointSource must be M.

Output Tag Configuration - Example 2

PI3 Home node

Tag

c131out

PointType

int16

Zero

0

Span

1

TypicalValue

1

PointSource

M

Location1

2

Location2

77

Location3

105

Location5

131

SquareRoot

0

CompDev

0

ExcDev

0

Optimization

Due to the nature of the Modbus application protocol, a single write request may contain data for up to 1,968 output tags. To optimize performance the interface will place tags into groups based on common key attributes so that the maximum number of output tags can be updated by a single response. The methodology for optimized output tag configuration can be found in Appendix C. Tag optimization.

In This Topic
TitleResults for “How to create a CRG?”Also Available in