Modbus TCP Receiver


Operator Menu Location: Generic Hardware Operators -> Networking -> Modbus TCP


Operator Bitmap: 

Functional Description:
The Modbus TCP Receiver generic hardware operator provides access to a networking channel resource in the physical hardware. When the generic operator is linked to a specific networking hardware resource, it will receive messages broadcast over that channel resource using the Modbus TCP protocol.

The Modbus TCP Receiver operator decodes Modbus messages broadcasted over a network. The operator has one input, Disable Receiver, when true it disables the receiver so no data can be accepted

The operator has four outputs:

Value indicates the value received from the broadcaster counterpart.

Value Out of Range indicates the value is out of range when it is HIGH.

OutputChanged indicates if the value has changed since the last received transmission. In order for the operator to declare a change in value, the magnitude of the value change must exceed a user-defined dead-band parameter. The output is HIGH during the single schema compute cycle in which the signal value change was detected; otherwise it is LOW.

Comm Timeout indicates if the broadcast transmissions are being received regularly (i.e., indicates if the network link is good). It is LOW while transmissions are regularly received, and the output is HIGH if the operator has not received a broadcast in a user-specified time interval (the Broadcast Dead-Time property of the receiver).

User-Defined Properties:

Object Name
A string label that identifies the broadcast signal. It is used to associate this Modbus TCP Broadcast operator in one schema with Modbus TCP Receiver operator(s) in other schemas.

Modbus Type

This specifies the address space array, one of coil, discrete input, holding register or input register. An important concept is that an address for one Modbus Type is completely independent of the same address for a different Modbus Type. For example, Coil Address 15 bears no relationship whatsover to discrete Input address 15. They are completely independent spaces. This is true of all of the Modbus Type values.

Coil - the equivalent of a switch that has only two values, a one or a zero. Coils are both readable and writable.

Discrete Inputs - the equivalent of a switch that has only two values, a one or a zero. Coils are writable only by the module acting as a server, but readable by anyone.

Holding Registers - 16 bit integer values. Holding Registers are both readable and writeable.

Input Registers - 16 bit integer values. Input Registers are writable only by the module acting as a server, but readable by anyone.

Data Type

The Data Type is a configurable property of Holding Registers and Input registers describing how a 16 bit Holding Register or Input Register is to be formatted and interpreted.

Mapped Range - The 16 bit register is divided into 65536 (the number of unique equal value steps that can be expressed in 16 bits) discrete steps. Each step represents the (100% Mapping value minus the 0% Mapping value)/65536. For example, given a %100 Mapping value of 300 and a 0% mapping value of -10, each step has a value of 300-(-10)/65536 = 310/65536 = 0.004730224609, the Units per Step. When the floating point value on Broadcast Holding or Input operators pin is processed, it is first evaluated against the mapping range, in this example, -10 to 300. If it is -10 or less the number of steps is zero. It is clipped at the minimum for the range. If it is 300 or more the number of steps is 65535. It is clipped at the maximum for the range. If it falls within the range, the step count X = (Value - (0% Mapping Value))/Units per Step. For example, use a Value of 67.3. X = (67.3 - (-10))/0.004730224609 = 16341.71871. Because the step values are represented as integers, they are rounded up if the fractional part is 0.5 or greater or rounded down if < 0.5; therefore 16342 will be transmitted. The receiver processes it in reverse, as Value = (Steps * Units Per Steps)+(0% Mapping Value) = (16342 * 0.004730224609) + (-10) = 67.30133057. Note that this is not an error free conversion, the precision of the mapping operation is dictated by the range used; the smaller the range, the smaller the Units per Step value will be and greated the resolution possible. Use a range that is no larger than it need be.

Unsigned 16 bit - The floating point Value is rounded up or down to an integer (no fractional component) as a 16 bit unsigned number between 0 and 65535. A Value above or below this range is clipped to the minimum (0) or maximum (65535).

Signed 16 bit - The floating point Value is rounded up or down to an integer (no fractional component) as a 16 bit signed number between -32768 and 32767. A Value above or below this range is clipped to the minimum (-32768) or maximum (32767).

While not a part of the Modbus TCP standard, 32 bit, floating point and structures are supported between Chameleon nodes and some third party devices. These Data Types require multiple registers to represent each value.

Unsigned 32 bit - The floating point Value is rounded up or down to an integer (no fractional component) as a 32 bit unsigned number between 0 and 4,292,967,295. A Value above or below this range is clipped to the minimum (0) or maximum (4,292,967,295). It consumes two consecutive registers.

Signed 32 bit - The floating point Value is rounded up or down to an integer (no fractional component) as a 16 bit signed number between -2,147,483,648 and 2,147,483,647 . A Value above or below this range is clipped to the minimum (-2,147,483,648) or maximum (2,147,483,647). It consumes two consecutive registers.

Float - the floating point value (IEEE format) is transferred unaltered. It consumes two consecutive registers.

Structure - A structure may be a collection of boolean and floating point values. Each element of the structure, whether boolean or float, consumes two consecutive registers, with boolean structure members converted to and from floats. Structures are not likely to be supported on non-Chameleon hardware.

Reorder

Because the use of multiple registers to represent 32 bit and floating point numbers is not standardized in Modbus TCP, it is left to the manufacturer how the registers should be ordered. To accommodate other manufacturers, a means to alter the register ordering is provided. Normally, the default of HH-HL-LH-LL will work correctly; this will use the first register for the highest order bits and the second register for the lowest order bits. 

0% Mapping and 100% Mapping

The minimum and maximum range values used only when the Data Type (see above) is set to Mapped Range.

Timeout (Svrs>Poll Period)

If the Broadcaster is a server (is queried by a Modbus/TCP receiver located on another device or node) this value, in milliseconds, indicates a timeout period. If the broadcast operator is not regularly queried within the number of milliseconds provided, a timeout is presumed and the timeout pin will be made true until its receiver counterpart has queried it again.

Show Disable Broadcaster Pin

If checked, the pin used to disable broadcasts for this operator is visible.

Show Comm Timeout Pin

If checked, the pin used indicate transmission timeouts for this operator is visible.

Deadband

The amount of change in the value received before the Value Is Changed pin becomes true for one schema loop period.

Deadband Scale

If Absolute, the Value Is Changed pin will be asserted when the received Value changes by Deadband units from it last value. If Percentage, the percentage (0-100) that the value must increase or decrease from its last value before the Value Is Changed pin becomes true for one schema loop period

Show Value is Out of Range Pin

If checked, the pin used to indicate that the value supplied for broadcast exceeds the range for the Data Type selected.

Show Output Changed Pin

If checked, the pin used to indicate that the value has changed is visible. The Output Changed pin will indicate true for one schema loop period if the value received exceeds the deaband (absolute or percentage). If the Deadband is zero, the Output Changed pin will indicate true for one schema loop period each time the a new value is received by the operator, even if the value has not changed.

Reorder
Because the use of multiple registers to represent 32 bit and floating point numbers is not standardized in Modbus TCP, it is left to the manufacturer how the registers should be ordered. To accommodate other manufacturers, a means to alter the register ordering is provided. Normally, the default of HH-HL-LH-LL will work correctly; this will use the first register for the highest order bits and the second register for the lowest order bits.

Comments: None.
See Also:
Modbus TCP Broadcast