
Programming S900–II Level 1
Version 2.2 |–>
IV – Programming instructions
40
01T01527_2
25.5.00
IV – 2. 4. IF test instruction
This instruction evaluates the variable it contains. Depending on the result, the instruction will or will
not execute the next instruction (IF instruction must never be used alone).
After an IF, all the instructions are valid APART FROM : L, R, MASTER and SLA.
You are offered two choices, once you have selected a variable :
IF : if the condition evaluated is TRUE, the next instruction is executed.
IF/ : if the condition evaluated is FALSE, the next instruction is executed (or if the
condition is true, the next instruction is not executed).
Note that these instructions will condition the execution of any subroutine. Complex conditions can
be calculated in the PLC and tested in the main program in IF Bit... or IF/Bit... form, followed by the
call instruction of the desired subroutine.
The following variables can be checked :
OUT CNT BIT or TIM WORD
IN WWORD
For the CNT, WORD and WWORD, the IF instruction enables you to carry out the following
comparisons : =, >= and <=.
Step 3
IF IN 14
Release part 1
If input 14 = 1 (True), the Release part 1 action will be executed.
Release part 1
IN14 = 1
?
no
yes
Part O.K. ?
Bit 100
no
0
1
Put into bin
SP5
yes
Place on belt
SP3
Step 3
IF BIT 100
SP3 L0
SP5 L4
Step 5
....
Operator validation
button ? IN 42
no
0
1
yes
Take part
L3
SP7
Step 4
L3
Step 5
IF / IN 42
SP0 L3
Step 6
SP7 L0
Kommentare zu diesen Handbüchern