
34
5 MODULE DEDICATED INSTRUCTION
5.1 Analog Instruction
Program example
• The following program converts the mode of the A/D converter module mounted on the I/O numbers from X/Y00 to X/Y0F
to the offset/gain setting mode when Var_Flag turns ON, and gets it back to the normal mode when Var_Flag turns OFF.
[Structured ladder/FBD]
[ST]
(* Convert to the offset/gain setting mode *)
IF(Var_Flag=TRUE)THEN (* Var_Flag ON *)
MOVP(TRUE,1,Var_ControlData); (* Sets mode *)
G_OFFGAN(TRUE,H00,Var_ControlData); (* Converts mode *)
END_IF;
IF(X0A=TRUE)THEN
END_IF;
(* Convert to the normal mode *)
IF(Var_Flag=FALSE)THEN (* Var_Flag OFF *)
MOVP(TRUE,0,Var_ControlData); (* Sets mode *)
G_OFFGAN(TRUE,H00,Var_ControlData); (* Converts mode *)
END_IF;
IF(X0A=FALSE)THEN
END_IF;
Sets mode
when Var_Flag
turns ON
Converts mode
Sets mode
when Var_Flag
turns OFF
Converts mode
Process in offset/gain setting mode
Process in normal mode
(* Process in offset/gain setting mode *)
(* Process in normal mode *)
Содержание MELSEC System Q
Страница 1: ...MELSEC Q L Structured Programming Manual Special Instructions ...
Страница 2: ......
Страница 307: ...10 SFC CONTROL INSTRUCTION 10 2 SFC Transition Condition Comment Read 305 10 MEMO ...
Страница 309: ...I 307 MEMO ...
Страница 315: ......