![Mitsubishi Electric MELSEC System Q Special Instructions Manual Download Page 38](http://html.mh-extra.com/html/mitsubishi-electric/melsec-system-q/melsec-system-q_special-instructions-manual_239154038.webp)
36
5 MODULE DEDICATED INSTRUCTION
5.1 Analog Instruction
Program example
• The following program reads out the offset/gain value of the A/D converter module mounted on the I/O numbers from X/Y00
to X/Y0F when the flag turns ON.
[Structured ladder/FBD]
[ST]
IF(Var_Flag_Inst=TRUE)THEN (* Instruction flag ON *)
SET(TRUE, Var_Flag_Exe); (* Turns execution flag ON *)
END_IF;
IF(Var_Flag_Exe=TRUE)THEN (* Execution flag ON *)
G_OGLOAD(TRUE, H00, Var_ControlData, Var_Result); (* Performs readout *)
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
RST(TRUE, Var_Flag_Exe); (* Turns execution flag OFF *)
ELSE (* Error completion *)
END_IF;
END_IF;
END_IF;
Specifies voltage
when instruction
flag turns ON
Performs readout
Normal completion
Turns execution flag OFF
Turns execution flag ON
Error completion
Process on error completion
MOV(TRUE,0,Var_ControlData[2]); (* Specifies voltage *)
(* Process on error completion *)
Summary of Contents for MELSEC System Q
Page 1: ...MELSEC Q L Structured Programming Manual Special Instructions ...
Page 2: ......
Page 307: ...10 SFC CONTROL INSTRUCTION 10 2 SFC Transition Condition Comment Read 305 10 MEMO ...
Page 309: ...I 307 MEMO ...
Page 315: ......