2) format, 96 (2) format – Yaskawa MP2000 Series: User's Manual for Motion Programming User Manual

Page 203

Advertising
background image

8 Command Reference

8.4.4 Selective Execution (SFORK, JOINTO, SJOINT)

8-96

(2) Format

The conditional expressions that can be used for selective execution command (SFORK) are as follows.

(a) Bit Type Data Comparison

  

SFORK Conditional expression 1 ? Label1, Conditional expression 2 ? Label 2, Conditional expression 3 ?
Label 3, Conditional expression 4 ? Label 4,
....., DEFAULT? Label n ;

Label 1: Process 1
JOINTO Label X
Label 2: Process 2
JOINTO Label X
Label 3: Process 3
JOINTO Label X
Label 4: Process 4
JOINTO Label X

Label n: Process n
JOINTO Label X
Label X: SJOINT

Format

• Use == (MATCH) command for data comparison.
• Specify a register on the left, and 0 or 1 on the right.

MB000000 == 0? Label "MB000000 = 0
MB000000 == 1? Label "MB000000 = 1

Operations in
Conditional
Expressions

• &,

⏐, and ! (AND, OR, and NOT) can be used.

(MB000000 & MB000001) == 1? Label "MB000000 =1 AND MB000001 = 1
(MB000000 & !MB000001) == 1? Label "MB000000 =1 AND MB000001 = 0
(MB000000 | MB000001) == 1? Label "MB000000 =1 OR MB000001 = 1
(MB000000 | !MB000001) == 1? Label "MB000000 =1 OR MB000001 = 0

Syntax Error
Examples

• When <> (MISMATCH) is used:

MB000000 <> 0? Label => Syntax error

• When a numerical value is specified on the left, or a register is specified on the right:

1 == MB000000? Label => Syntax error
MB000000 == MB000001? Label => Syntax error

• No data comparison command:

MB000000? Label => Syntax error
(0)? Label => Syntax error

• When more than one data comparison command is used:

(MB000000 == 0) & (MB000001 == 1)? Label => Syntax error

Advertising