Class Modbus_TCP_Slave
Version 1.1
Modified 07-FEB-2008 16:12:21.21
 Slave object for Modbus TCP I/O.

See also



RtBody attributes pwr_sClass_Modbus_TCP_Slave
String104 Description   Description of slave
URL DataSheet   Datasheet.
Status Status   Status of the slave.
IoProcessMask Process   Process that handles the slave. Plc(1), rt_io_comm(2) or application process(4).
Objid ThreadObject   Plc thread that handles the slave.
String80 Address   IP-address for the remote node.
UInt32 Port   The default port for Modbus TCP is 502. If another port should be
used it is specifiec here.
Modbus_DisableEnum DisableSlave   Disables the slave.
When set to Disable no messages are sent. When Close is activated the
connection is also closed. Note that the value is set to Disable
after a Close is performed.
When set to Passive, communication is disabled when redundancy is
configured and node is passive.
StallActionEnum StallAction   Specifies the action when the errorcounter has reached the error limit.

No no action.
Reset inputs the inputs for the slave are reset.
Emergency break all I/O is stopped.
Boolean ByteOrderingLE   Network format is set to little endian.
The standard network format for Modbus TCP is big endian. Despite
this, slaves despite this uses little endian. Setting byte
ordering to little endian makes it possible to connect to such slaves.
UInt16 ErrorCount   Error count of the slave.
UInt16 ErrorLimit   Error limit of the slave.
UInt16 ReconnectCount   Reconnect count.
UInt16 ReconnectLimit   Reconnect limit.
UInt16 ResponseTime   Response time.
Float32 MaxTimeout   Maximum timeout. I no messages is received within this time the
connection to the slave is closed, and a new connection is opened.
The value should be greater than the TCP retransmit time.
YesNoEnum SingleOp   Single operation.
UInt32 RX_packets   Received number of messages from slave.
UInt32 TX_packets   Sent number of messages to slave.
Array of UInt8 Inputs   Input area.
Array of UInt8 Outputs   Output area.


Template Object
Process 1
ErrorLimit 50
ReconnectLimit 5
ResponseTime 200
MaxTimeout 2.000000e+00


Attributes detail


Description Attribute
Class Attribute
Type String104
Flags
Body RtBody
Description of slave

DataSheet Attribute
Class Attribute
Type URL
Flags
Body RtBody
Link to datasheet for the specific slave type.

Status Attribute
Class Attribute
Type Status
Flags State|Noedit
Body RtBody
Status of the slave. Shows if tcp-link to slave is up or not.

Process Attribute
Class Attribute
Type IoProcessMask
Flags
Body RtBody
Process that handles the card.

1: The slave is read by the plc process, and is handled by a specific
   thread in the plc, which is specified in the ThreadObject attribute.
2: The slave is read by the rt_io_comm process.
4: The slave is handled by an application program.

ThreadObject Attribute
Class Attribute
Type Objid
Flags
Body RtBody
The PlcThread object of the plc thread that handles the slave.
The slave is read with the scantime of the thread.

Address Attribute
Class Attribute
Type String80
Flags
Body RtBody
IP-address for the remote node, or host name.
Dynamic change is not possible.

Port Attribute
Class Attribute
Type UInt32
Flags
Body RtBody
The default port for Modbus TCP is 502. If another port should be
used it is specifiec here.

DisableSlave Attribute
Class Attribute
Type Modbus_DisableEnum
Flags
Body RtBody
Disables the slave.
When set to Disable no messages are sent. When Close is activated the
connection is also closed. Note that the value is set to Disable
after a Close is performed.
When set to Passive, communication is disabled when redundancy is
configured and node is passive.

StallAction Attribute
Class Attribute
Type StallActionEnum
Flags
Body RtBody
Specifies the action when the errorcounter has reached the error limit.

No                no action.
Reset inputs      the inputs for the slave are reset.
Emergency break   all I/O is stopped.

ByteOrderingLE Attribute
Class Attribute
Type Boolean
Flags
Body RtBody
Network format is set to little endian.
The standard network format for Modbus TCP is big endian. Despite
this, slaves despite this uses little endian. Setting byte
ordering to little endian makes it possible to connect to such slaves.

ErrorCount Attribute
Class Attribute
Type UInt16
Flags State|Noedit
Body RtBody
ErrorCount will increase every cycle if status is not MB__NORMAL.
When ErrorCount reaches the ErrorLimit all inputs are reset to zero.

ErrorLimit Attribute
Class Attribute
Type UInt16
Flags
Body RtBody
ErrorCount will increase every cycle if status is not MB__NORMAL.
When ErrorCount reaches the ErrorLimit all inputs are reset to zero.

ReconnectCount Attribute
Class Attribute
Type UInt16
Flags State|Noedit
Body RtBody
If slave is disconnected ProviewR will try to reconnect.
Reconnect attempts are made with a exponential backoff starting at 1 s.
The time is doubled every attempt up to 64 secs and then continues to
try to reconnect at this cylicity.

ReconnectLimit Attribute
Class Attribute
Type UInt16
Flags
Body RtBody
If slave is disconnected ProviewR will try to reconnect to the slave.
Reconnect limit is no more in use, kept for possible future use.

ResponseTime Attribute
Class Attribute
Type UInt16
Flags
Body RtBody
The time in ms as a response from a read or write request is expected.
This is the maximum time we will wait for a response.

MaxTimeout Attribute
Class Attribute
Type Float32
Flags
Body RtBody
Maximum timeout. I no messages is received within this time the
connection to the slave is closed, and a new connection is opened.
The value should be greater than the TCP retransmit time.

SingleOp Attribute
Class Attribute
Type YesNoEnum
Flags
Body RtBody
Depending on the tcp stack used in the slave and also the size of its receive
buffer it may not be possible to send several requests at a time to a slave.
If the slave can only handle one request at a time this attribute should be set
to 'Yes'. The rule is all at once or one request at a time.

RX_packets Attribute
Class Attribute
Type UInt32
Flags State|Noedit
Body RtBody
Received number of messages from slave.

TX_packets Attribute
Class Attribute
Type UInt32
Flags State|Noedit
Body RtBody
Sent number of messages to slave.

Inputs Attribute
Class Attribute
Type Array of UInt8
Flags Array|Noedit|Invisible
Elements 256
Body RtBody
Area where all input data is stored.

Outputs Attribute
Class Attribute
Type Array of UInt8
Flags Array|Noedit|Invisible
Elements 256
Body RtBody
Area where all output data is stored.