Download Machine Controller MP2000 Series USER`S MANUAL for Motion
Transcript
8 Command Reference 8.4.4 Selective Execution (SFORK, JOINTO, SJOINT) (2) Format 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 2: Process 2 JOINTO Label 3: Process 3 JOINTO Label 4: Process 4 JOINTO Label X Label X Label X Label X • • Label n: Process n JOINTO Label X Label X: SJOINT The conditional expressions that can be used for selective execution command (SFORK) are as follows. (a) Bit Type Data Comparison Format Operations in Conditional Expressions Syntax Error Examples 8-96 • 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 • &, ⏐, 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 • 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