Chapter 6 Applied Instructions When the AS Series PLC reads the data from multiple bit devices (not discrete input devices), the function code sent is 1 (16#01). When AS Series PLC reads the data from multiple bit devices (only discrete input devices), the function code sent is 2 (16#02). When the AS Series PLC reads the data from multiple word devices (not input registers), the function code sent is 3 (16#03). When the AS Series PLC reads the data from multiple word devices (only input registers), the function code sent is 4 (16#04). When the AS Series PLC writes the status to one bit device, the function code sent is 5 (16#05).
When the AS Series PLC writes the data to one word device, the function code sent is 6 (16#06). When the AS Series PLC writes the status to multiple bit devices, the function code sent is 15 (16#0F). When the AS Series PLC writes the data to multiple word devices, the function code sent is 16 (16#10). When the AS Series PLC writes the data to multiple word devices, the function code sent is 23 (16#17). At present, the AS S eries PLC only supports the function codes listed above. 4. The parameters in the instruction are valid only while PLC is running. When PLC is powered back on after being powered off, it takes the settings from the data exchange table by default.
If you need to change some parameters during data exchange, this instruction modifies those parameters. 5. If the specified socket is already communicating, the new parameters become effective after the current communication is complete. 6. When any parameter is not within the valid range, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#200B. 7. The AS Series PLC does not support the Modbus TCP communication instruction or anything similar to the instruction ETHRW DVP series PLC. If you use the PLC program for Ethernet Modbus TCP communication control, enable “Program control” mode in the data exchange table first and use the SM numbers from the following table.
6-739 6 6 _ SM Number Attribute Explanation of Ethernet Data Exchange Parameters SM1167 R/W Flag to enable data exchange SM1168–SM1199 R/W Flag to enable data exchange connections 1–32 SM1200–SM1231 R Success flag for data exchange connections 1–32 SM1232–SM1263 R Error flag for data exchange connections 1–32