Mitsubishi Electric MELSEC-L Special Instructions Manual page 38

Melsec-q/l structured programming manual
Hide thumbs Also See for MELSEC-L:
Table of Contents

Advertisement

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 *)
MOV(TRUE,0,Var_ControlData[2]); (* Specifies voltage *)
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 *)
(* Process on error completion *)
END_IF;
END_IF;
END_IF;
5 MODULE DEDICATED INSTRUCTION
36
5.1 Analog Instruction
Process on error completion
Specifies voltage
when instruction
flag turns ON
Turns execution flag ON
Performs readout
Normal completion
Turns execution flag OFF
Error completion

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-q

Table of Contents