![background image](http://html1.mh-extra.com/html/omron/cj2-cpu-series/cj2-cpu-series_connection-manual_740797053.webp)
9
.
Program
48
9.5. Ladder program
9.5.1. Functional Components of the Ladder Program
The functional components of this program are shown below.
Major classification
Minor classification
Description
1.Initialization
processing
1.1. Response code clear
1.2. Control word setting for
CMND instruction
1.3. Send/Receive symbol
setting
The area of use is cleared and the
initialization setting is performed as a
preparation for communications.
2.CMND instruction
execution
management
2.1. CMND instruction
executing
2.2. CMND instruction
execution processing
2.3. Normal/Error detection
processing.
CMND instruction (Modbus-RTU
communication) is executed. A normal end
or an error end is detected based on the
related flags and receive data.
3.Normal end state
management
3.1. Normal end processing
3.2. Response code setting
The normal completion flag is turned ON.
The response code for a normal end is set.
4.Error end state
management
4.1. Error end processing
4.2. Response code setting
The error end flag is turned ON.
The response code corresponding to an
error cause is set.
9.5.2. Detailed Description of Each Functional Component
The program configured in this document is shown below.
●1. Initialization processing
No.
Outline
Description
1.1.
Response code
clear
The Error code storage area is initialized.
Summary of Contents for CJ2*-CPU Series
Page 63: ...58...
Page 64: ...2015 1115 P641 E1 01...