SMB MAT-LC-C Series User Manual page 57

Plc based motion controller
Table of Contents

Advertisement

Instruction type
Assign
Call a function block and
use the function block
output
RETURN
IF
CASE
FOR
WHILE
REPEAT
EXIT
Empty instruction
Assignment operator
The left side of the assignment symbol is an operand (variable, address), and the right side of the
":=" is the value of the expression assigned to it, for example:
Var1:=Var2*10
After the operation is over, the variable Var1 gets 10 times the value of Var2.
A:=B; CV := CV + 1 ;C:=SIN(X);
CMD_TMR(IN := %IX5, PT := 300) ;
A:=CMD_TMR.Q
RETURN ;
D:=B*B ;
IF D<0.0 THEN
C:=A;
ELSIF D=0.0 THEN
C:=B;
ELSE
C:=D;
END_IF;
CASE INT1 OF
1:BOOL1:= TRUE;
2:BOOL2:= TRUE;
ELSE
BOOL1:= FALSE;
BOOL2:= FALSE;
END_CASE;
J:=101 ;
FOR I:=1 TO 100 BY 2 DO
IF ARR[I] = 70 THEN
J:=I;
EXIT;
END_IF;
END_FOR;
J:=1 ;
WHILE J<= 100 AND ARR[J] <> 70 DO J:
=J+2;
END_WHILE;
J:=-1 ;
REPEAT
J:=J+2;
UNTIL J= 101 OR ARR[J] = 70
END_REPEAT;
EXIT ;
57
Example

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the MAT-LC-C Series and is the answer not in the manual?

This manual is also suitable for:

Mat-lc-c0 seriesMat-lc-c06Mat-lc-c07

Table of Contents