beautypg.com

6 application instructions api 00-49 – Delta Electronics Programmable Logic Controller DVP-PLC User Manual

Page 213

background image

6 Application Instructions API 00-49

DVP-PLC Application Manual

6-1

API Mnemonic

Operands

Function

00

CJ P

Conditional Jump

Controllers

ES/EX/SS SA/SX/SC EH/SV

OP Range

Program

Steps

P0~P255

CJ, CJP: 3 steps

PULSE 16-bit 32-bit

ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV

Operands:

S

: The destination pointer of conditional jump

Explanations:

1. Operand

S

can designate P

2.

P can be modified by index register E, F

3.

In ES/EX/SS series models: Operand S can designate P0 ~ P63

4.

In SA/SX/SC/EH/EH2/SV series models: Operand S can designate P0 ~ P255

5.

When the user does not wish a particular part of PLC program in order to shorten the scan time and execute

dual outputs, CJ instruction or CJP instruction can be adopted.

6.

When the program designated by pointer P is prior to CJ instruction, WDT timeout will occur and PLC will stop

running. Please use it carefully.

7.

CJ instruction can designate the same pointer P repeatedly. However, CJ and CALL cannot designate the same

pointer P; otherwise an error will occur.

8.

Actions of all devices while conditional jumping is being executed.

a) Y, M and S remain their previous status before the conditional jump takes place.

b) Timer 10ms and 100ms that is executing stops.

c) Timer T192 ~ T199 that execute the subroutine program will continue and the output contact executes normally.

d) The high-speed counter that is executing the counting continues counting and the output contact executes

normally.

e) The ordinary counters stop executing.

f) If the “reset instruction” of the timer is executed before the conditional jump, the device will still be in the reset

status while conditional jumping is being executed.

g) Ordinary application instructions are not executed.

h) The application instructions that are being executed, i.e. API 53 DHSCS, API 54 DHSCR, API 55 DHSZ, API 56

SPD, API 57 PLSY, API 58 PWM, API 59 PLSR, API 157 PLSV, API 158 DRVI, API 159 DRVA, continue being

executed.

Program Example 1:

1.

When X0 = On, the program automatically jumps from address 0 to N (the designated label P1) and keeps its

execution. The addresses between 0 and N will not be executed.

2.

When X0 = Off, as an ordinary program, the program keeps on executing from address 0. CJ instruction will not

be executed at this time.