9. Program
9.3. Error Detection Processing
This section explains the error detection processing of this program.
9.3.1. Error Detection in the Program
This program detects and handles errors of the following items (1) to (4). For information
on error codes, refer to
9.7. Error Process.
(1)Communications errors in TCP socket communications using socket service instructions
Errors occurred in the program during TCP socket communications such as command
format error and parameter error are detected as communications errors. An error is
detected with the socket service instruction argument
ErrorID
.
(2)Timeout errors during communication with the destination device
When the connect processing, send processing, receive processing, or close processing is
not normally performed and cannot be completed within the monitoring time, it is detected
as a timeout error. An error is detected with the time monitoring function in the program.
For information on the time monitoring function of the timer in the program, refer to
9.3.2.
Time Monitoring Function
.
(3)Errors in the destination device (Destination device error)
The destination device errors include a command error, a parameter error, and an
execution failure in the destination device. An error is detected with the response code,
which is returned from the destination device when an error occurs. For information on the
send/Receive messages, refer to
9.2. Destination Device Command
.
Ethernet cable
Controller
Destination device
(1)(2)
(3)
(4)
‘GETR’
‘0000’
*…*
16#0A
Receive message
at normal process
Command code
Response
code
Response data
Terminator
‘GETR’
****
16#0A
Receive message
at error process
Command code
Response
code
Terminator
‘ICMD’
****
16#0A
Receive message
at error process for
undefined command
Command code
Response
code
Terminator
37
Summary of Contents for V750 series
Page 51: ...9 Program 2 Initialization processing 48...
Page 52: ...9 Program 49...
Page 53: ...9 Program 3 Connect processing 50...
Page 54: ...9 Program 4 Send processing 51...
Page 55: ...9 Program 5 Receive processing 52...
Page 56: ...9 Program 53...
Page 57: ...9 Program 6 Close processing 54...
Page 58: ...9 Program 7 Processing number error process 55...
Page 60: ...9 Program Program 57...
Page 62: ...9 Program Program 59...
Page 64: ...9 Program Program 61...
Page 78: ...2013 0911 P543 E1 01...