Volume OtherIO | |
Attributes: Runtime | Development | System | Template | Detail C Binding: Struct | Class  ClassTree | INDEX NO INDEX |
Class Modbus_TCP_Slave![]() |
||
---|---|---|
Version | 1.1 | |
Modified | 07-FEB-2008 16:12:21.21 |
RtBody attributes pwr_sClass_Modbus_TCP_Slave | |||
---|---|---|---|
String80 | 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. |
|
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 |
Description Attribute | ||
---|---|---|
Klass | Attribute | |
Typ | String80 | |
Flags | ||
Kropp | RtBody |
Description of slave
DataSheet Attribute | ||
---|---|---|
Klass | Attribute | |
Typ | URL | |
Flags | ||
Kropp | RtBody |
Link to datasheet for the specific slave type.
Status Attribute | ||
---|---|---|
Klass | Attribute | |
Typ | Status | |
Flags | State|Noedit | |
Kropp | RtBody |
Status of the slave. Shows if tcp-link to slave is up or not.
Process Attribute | ||
---|---|---|
Klass | Attribute | |
Typ | IoProcessMask | |
Flags | ||
Kropp | 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 | ||
---|---|---|
Klass | Attribute | |
Typ | Objid | |
Flags | ||
Kropp | RtBody |
The PlcThread object of the plc thread that handles the slave. The slave is read with the scantime of the thread.
Address Attribute | ||
---|---|---|
Klass | Attribute | |
Typ | String80 | |
Flags | ||
Kropp | RtBody |
IP-address for the remote node, or host name. Dynamic change is not possible.
Port Attribute | ||
---|---|---|
Klass | Attribute | |
Typ | UInt32 | |
Flags | ||
Kropp | RtBody |
The default port for Modbus TCP is 502. If another port should be used it is specifiec here.
DisableSlave Attribute | ||
---|---|---|
Klass | Attribute | |
Typ | Modbus_DisableEnum | |
Flags | ||
Kropp | 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.
StallAction Attribute | ||
---|---|---|
Klass | Attribute | |
Typ | StallActionEnum | |
Flags | ||
Kropp | 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 | ||
---|---|---|
Klass | Attribute | |
Typ | Boolean | |
Flags | ||
Kropp | 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 | ||
---|---|---|
Klass | Attribute | |
Typ | UInt16 | |
Flags | State|Noedit | |
Kropp | 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 | ||
---|---|---|
Klass | Attribute | |
Typ | UInt16 | |
Flags | ||
Kropp | 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 | ||
---|---|---|
Klass | Attribute | |
Typ | UInt16 | |
Flags | State|Noedit | |
Kropp | 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 | ||
---|---|---|
Klass | Attribute | |
Typ | UInt16 | |
Flags | ||
Kropp | 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 | ||
---|---|---|
Klass | Attribute | |
Typ | UInt16 | |
Flags | ||
Kropp | 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 | ||
---|---|---|
Klass | Attribute | |
Typ | Float32 | |
Flags | ||
Kropp | 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 | ||
---|---|---|
Klass | Attribute | |
Typ | YesNoEnum | |
Flags | ||
Kropp | 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 | ||
---|---|---|
Klass | Attribute | |
Typ | UInt32 | |
Flags | State|Noedit | |
Kropp | RtBody |
Received number of messages from slave.
TX_packets Attribute | ||
---|---|---|
Klass | Attribute | |
Typ | UInt32 | |
Flags | State|Noedit | |
Kropp | RtBody |
Sent number of messages to slave.
Inputs Attribute | ||
---|---|---|
Klass | Attribute | |
Typ | Array of UInt8 | |
Flags | Array|Noedit|Invisible | |
Elements | 256 | |
Kropp | RtBody |
Area where all input data is stored.
Outputs Attribute | ||
---|---|---|
Klass | Attribute | |
Typ | Array of UInt8 | |
Flags | Array|Noedit|Invisible | |
Elements | 256 | |
Kropp | RtBody |
Area where all output data is stored.