5 MODULE DEDICATED INSTRUCTION
5.3 Serial Communication Instruction
71
5
[ST]
PLS(X50, Var_Flag_Inst); (* Transmission instruction pulse *)
IF((Var_Flag_Inst=TRUE) & (X9E=TRUE) & (X9F=FALSE))THEN
MOV(TRUE, 4, Var_TransData[0]); (* Sets number of send data *)
MOV(TRUE, H1234, Var_TransData[1]); (* Sets desired send data *)
MOV(TRUE, H56AB, Var_TransData[2]);
TO(TRUE, Var_TransData[0], H8, H400, 3); (* Sets send data to buffer memory *)
MOV(TRUE, H3F2, Var_Frame[0]); (* Sets user frame 0 *)
MOV(TRUE, H3F3, Var_Frame[1]); (* Sets user frame 1 *)
MOV(TRUE, H8001,Var_Frame[2]); (* Sets user frame 2 *)
MOV(TRUE, H8000,Var_Frame[3]); (* Sets user frame 3 *)
MOV(TRUE, H41B, Var_Frame[4]); (* Sets user frame 4 *)
MOV(TRUE, 0, Var_Frame[5]); (* Sets user frame 5 *)
TO(TRUE, Var_Frame[0], H8, H0BA, 6); (* Sets user frames to buffer memory *)
END_IF;
IF(Var_Flag_Inst=TRUE)THEN
MOV(TRUE, 1, Var_ControlData[0]); (* Sets transmission channel to 1 *)
MOV(TRUE, 0, Var_ControlData[1]); (* Clears transmission result *)
MOV(TRUE, H0, Var_ControlData[2]); (* Sets CR/LF to 'CR/LF not added' *)
MOV(TRUE, H1, Var_ControlData[3]); (* Sets transmission pointer *)
MOV(TRUE, H5, Var_ControlData[4]); (* Sets number of send data *)
GP_PRR(TRUE, H08, Var_ControlData, Var_Result); * Performs user frame transmission *)
END_IF;
IF(Var_Result[0]=TRUE)THEN (* Execution finished *)
IF(Var_Result[1]=FALSE)THEN (* Normal completion *)
SET(TRUE, Var_Flag_Normal); (* Turns normal completion flag ON *)
ELSE (* Error completion *)
SET(TRUE, Var_Flag_Error); (* Turns error completion flag ON *)
END_IF;
END_IF;
Содержание 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: ......