132
S : the destination Pointer of the Conditional Jump instruction
When the CJ instruction executes Jump action, every device of the skipped segment will as follows:
The action of every device in the related segment during the Jump is executed
P
S
By a numeric pointer or an user-dened 16 English characters pointer
X20
X20
CJ
The A segment in program
S
CJ
FNC
00
C J P
S
1
2
M
3
○ ○ ○○
Operand
Devices
Conditional Jump
Numeric pointer: P0~P1023
The total amount of Mark / Branch and numeric pointers is 1024.
SKIP_ A
SKIP_ B
SKIP_A
SKIP_B
The B segment in program
When the conditional contact for the CJ instruction is “OFF” ( CJ is
not active), the segment in the program between the CJ instruction
and its pointer will execute normally.
When the conditional contact for the CJ instruction is “ON” ( CJ is
active), the system will execute the Jump action to the destination
point of CJ, then executes the following program after the pointer.
When X20=“OFF”, the “CJ SKIP_B” instruction will execute the
Jump action, then the B segment will not be executed.
When X20=“ON”, the “CJ SKIP_A” instruction will execute the Jump
action then the A segment will not be executed.
If the CJ instruction is not executed, the program segment enclosed
will be executed as normal programs.
The status of Y, M and S will remain as same as before the Jump.
The 10 ms. or 100 ms. timer will pause counting time.
The 1 ms. timer will continue to count time, but its output contact will not function normally until the
Jump nishes.
T192~T199 will continue to count time and its output contact will also effective.
High Speed Counter will continue to count and its output contact will also effective.
A normal counter will stop counting.
If the Reset instruction for a Retentive timer or counter is driven before Jump, the device will still be reset during
the Jump.
Applied instruction will not be executed.
Using the CJ instruction can skip unnecessary program segment directly, so the program Scan Time can be saved.
The CJ instruction can be used to solve the problem of double coil outputs.
A numeric pointer or the name of a pointer can only appear once in a program; If the Pointer is specied more than
once, errors will be incurred.
As the Pointer P63 or P255 is equal to the END address in the program, to execute the “CJ P63” or “CJ P255” is
equal to jump to the END of program.