Communication Functions on Controllers
This topic describes management and operations of the controllers’ communication functions. The functions facilitate communications between specific devices. Most of the functions are dedicated to Modbus exchanges. One function (SEND_RECV_MSG) is used by an ASCII manager to manage the exchange of data between devices operating on other protocols than Modbus.
NOTE: Communication functions are processed asynchronously regarding the application task that called the function.
NOTE: Do not use function blocks of the PLCCommunication library on a serial line with a Modbus IOScanner configured. This disrupts the Modbus IOScanner exchange.
NOTE: Before you use the function blocks of this library for communication via an Ethernet port, make sure that the status of the Ethernet port provided by the variable ETH_R.i_wPortAIpStatus is DATA_EXCHANGE. For further information, refer to the description of the ETH_R_PORT_IP_STATUS enumeration data type in the PLCSystem Library Guide of your controller.
This table describes the communication function blocks available to controllers:
Function |
Description |
---|---|
This function takes the destination address of an external device and converts its string representation to an ADDRESS structure. |
|
This function reads standard bits or registers from a Modbus device. |
|
This function writes standard bits or registers to a Modbus device. |
|
This function reads and writes standard bits or registers on Modbus devices. |
|
This function writes a single register to an external device. |
|
This function sends and receives user-defined messages on selected media, for example, a serial line. |