Mitsubishi Electric MELSEC-L Special Instructions Manual page 111

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

Advertisement

[ST]
IF((Var_Flag_Inst=TRUE) (* Read request ON *)
&(Var_Flag_Exe=FALSE) (* Execution flag *)
&(SW83.E=FALSE))THEN (* Data link status of station number 63 *)
(* Sets control data *)
MOV(TRUE, 63, Var_ControlData[1]); (* Sets station number *)
MOV(TRUE,H4, Var_ControlData[2]); (* Sets access code and attribute code *)
MOV(TRUE, H400, Var_ControlData[3]); (* Sets buffer memory address *)
MOV(TRUE, 11, Var_ControlData[4]); (* Sets number of read points *)
(* Sets interlock signal storage device *)
MOV(TRUE, H2, Var_InterlockData[0]); (* Sets request device *)
MOV(TRUE, H202, Var_InterlockData[1]); (* Sets completion device and error code storage area *)
MOV(TRUE, H1, Var_InterlockData[2]); (* Sets completion mode *)
G_RIRCV(TRUE, H00, Var_ControlData, Var_InterlockData,D40, Var_Result); (* Performs readout *)
END_IF;
IF(MEP((Var_Flag_Inst=TRUE) & (SW83.E=FALSE)))THEN (* Read request is ON and data link status of station number 63 is OFF (rising pulse) *)
SET(TRUE, Var_Flag_Exe); (* Turns execution flag ON *)
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
(* Process on normal completion *)
ELSE (* Error completion *)
(* Process on error completion *)
END_IF;
RST(TRUE, Var_Flag_Inst); (* Turns read request OFF *)
RST(TRUE, Var_Flag_Exe); (* Turns execution flag OFF *)
END_IF;
5 MODULE DEDICATED INSTRUCTION
5.4 Network Dedicated Instruction
5
109

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-q

Table of Contents