9
.
Program
44
9.3. Error Detection Processing
In this program, the error detection processing is performed by means of dividing the errors
into the following areas (1) to (3).
For details on error codes, refer to
9.7. Error Processing
.
(1)Errors when executing the CMND instruction (CMND instruction error)
Errors such as the Unit error, the command format error, and the parameter error at the
execution of the CMND instruction are detected as CMND instruction errors. An error is
detected with Communications Port Error Flags (A219.07) of related auxiliary area when
using the CMND instruction.
(2)Transmission errors when communicating with Destination Device (Communications error)
Errors occurred in communications with Destination Device, such as character corruption
and transmission errors caused by unmatched baud rate settings, are detected in CMND
instruction errors. Although the error is detected with (1), the allocated CIO area of SCU
''TransmissionErrorStatus (1508)'' is stored in the output area for the communication error
check.
(3)Errors in Destination Device (Destination Device errors)
Destination Device errors include function code error, register address error, data error, and
execution failure in Destination Device. An error is detected with the response data which is
returned from Destination Device. If an error occurs in Destination Device, a function code
that is obtained by adding #80 in the transmitted function code is returned (in this program,
#83 is returned when #03 is sent). This program detects an error based on the difference
between the send/receive function codes.
Send message
01
03
10
16
00
02
Slave
address
Function
code
Register address
Number of read
words
CRC16
Receive
message
(at error)
01
83
**
Slave
address
Function
code + #80
Error
code
CRC16
Additional Information
For information on the CIO area allocated to SCU, refer to
9.4.2 List of Fixed Allocations
.
Serial cable
CJ2M-CPU12
CJ1W-SCU42
Destination Device
(1)
(2)
(3)
Summary of Contents for CJ2*-CPU Series
Page 63: ...58...
Page 64: ...2015 1115 P641 E1 01...