Function Block: ModbusTCPSlave
Library: IoDrvModbusTCP
This block is generated for each Modbus Server TCP in the device tree. This function block represents a TCP/IP connection to an individual Modbus TCP Server. The channels defined for this device are processed in the background. The inputs and outputs of this block provide status information to the user and allow the ability to confirm occurring errors (in order to continue processing). The Enable
property is used to start and stop communication.
Note
The Enable
property is available only when the Enable diagnosis for devices option is selected on the PLC Settings tab.
Name | Data Type | Initial Value | Description |
---|---|---|---|
|
|
| The process is continued with a rising edge. |
Name | Data Type | Initial Value | Description |
---|---|---|---|
|
|
| Displays the number of communication servers |
|
|
|
|
|
|
|
|
|
|
|
|
|
| Specifies the current errors as defined in the enumeration | |
|
| Currently configured communication settings | |
|
|
| The process is continued with a rising edge. |
Method: UpdateCommunicationSettings
The communication parameters can be updated only if the server is set to "Stop". The Enable
property is used to stop and start the server.
Name | Data Type | Initial Value | Description |
---|---|---|---|
|
| IP address of the server | |
| UNIT | Port of the server |
Name | Data Type | Initial Value | Description |
---|---|---|---|
|
| Leads to an error (return value != 0) if a TCP connection exists |