Instruction Manual

Table 6-1. PCS Modbus Master Commands
Function
Code
Data
Type
Title Description
16 L and
C
Preset [Write] Multiple
Registers
This command places specific binary values
into a series of consecutive holding registers.
It can also be used to write L-and C-values
together to the PLC. The L- and C-values are
first written to the PLC holding register memory
segment. The L-values are written in first at
the top of the holding register memory
segment, followed by the C-values. The user
must then move the L-values from the holding
register memory segment to the appropriate L-
value memory segment.
6.4.13 PCS MODBUS MASTER DIAGNOSTIC COMMAND
The Diagnostic command (Function Code 8) provides access to device diagnostic information and
a loopback test that can be used to check the Modbus communications system. The command has
sub-functions called Diagnostic Codes that specify the various types of diagnostic information be-
ing accessed, counters that are being cleared, or the loopback test. The appropriate Modbus docu-
mentation should be referenced to implement the various Diagnostic Codes of the Diagnostic
command. It should also be referenced to determine the significance of the diagnostic information
returned, as it might be register bit defined by PLC type (e.g., bit 9 set in the 484 Controller diag-
nostic register means ROM chip 0000-07FF failed the memory test). The Diagnostic codes are
listed as follows:
Diagnostic Code Sub-Function Diagnostic Code Sub-Function
High Low High Low
00 00 Return Query Data 00 13 Return Bus Exception
Error Count
00 01 Restart Communications
Option
00 14 Return Slave Message
Count
00 02 Return Diagnostic Register 00 15 Return Slave No
Response Count
00 03 Change Input Delimiter
Character
00 16 Return Slave NAK Count
00 04 Force Slave to Listen Only
Mode (LOM)
00 17 Return Slave Busy Count
00 10 Clear Counters and
Diagnostic Register
00 18 Return Bus Character
Overrun Count
00 11 Return Bus Message Count 00 19 Return Overrun Error Count
00 12 Return Bus CRC Error
Count
00 20 Clear Overrun Error Count
and Flag
2 of 2
Section 6. MODBUS RTU Mode
MODBUS2
6-7