Mitsubishi MELSEC-L series Programming Manual page 109

Hide thumbs Also See for MELSEC-L series:
Table of Contents

Advertisement

[ST]
PLS(X53, Var_Flag_Inst);
IF(Var_Flag_Inst=TRUE)THEN
MOV(TRUE, 1, Var_ControlData[0]);
MOV(TRUE, 2, Var_ControlData[2]);
MOV(TRUE, H1234, D10);
MOV(TRUE, H5678, D11);
RST(TRUE, Var_Flag_Normal);
RST(TRUE, Var_Flag_Error);
SET(TRUE, Var_Flag_Exe);
END_IF;
IF(Var_Flag_Exe=TRUE)THEN
GP_ONDEMAND(TRUE, H0, Var_ControlData, D10, Var_Result);
END_IF;
IF(Var_Result[0]=TRUE)THEN
IF(Var_Result[1]=FALSE)THEN
SET(TRUE, Var_Flag_Normal);
ELSE
SET(TRUE, Var_Flag_Error);
END_IF;
RST(TRUE, Var_Flag_Exe);
END_IF;
1. The communication status can be checked by the SPBUSY instruction.
Section 5.2.6
2. Specify the capacity of the send data (stored in devices from D10 to D11 in the
program example above) and the number of send data within the user-defined
buffer memory range assigned for the on-demand function.
5.2 Serial Communication and Modem Interface Instruction
(* On-demand transmission instruction pulse *)
(* Instruction flag ON *)
(* Sets transmission channel to 1 *)
(* Sets number of send data to 2 words *)
(* Sets send data to D10 to D11 *)
(* Turns normal completion flag OFF *)
(* Turns error completion flag OFF *)
(* Turns execution flag ON *)
(* Execution flag ON *)
(* Performs on-demand function transmission *)
(* Execution finished *)
(* Normal completion *)
(* Turns normal completion flag ON *)
(* Error completion *)
(* Turns error completion flag ON *)
(* Turns execution flag OFF *)
5.2.1 ONDEMAND instruction
G_ONDEMAND
5
5-63

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-q series

Table of Contents