Mitsubishi Electronics MELSEC Q series MELSEC L series Home Theater Server User Manual


 
5.3 Serial Communication
5.3.6 SPBUSY instruction
5-81
G_SPBUSY
5
MODULE DEDICATED
INSTRUCTION
G_SPBUSY
5.3.6 SPBUSY instruction
G_SPBUSY
Function
This instruction reads the data transmission/reception status.
Program Example
The following program reads out the communication status of the target module.
(For the Q series C24 whose I/O signals are X/Y00 to X/Y1F)
[Structured ladder/FBD]
[ST]
G_SPBUSY(Var_Flag, H00, D0); (* Reads communication status *)
G(P)_SPBUSY
P: Executing condition
:
indicates any of the following
instructions.
G_SPBUSY GP_SPBUSY
Input argument EN:
Executing condition :Bit
Un*:
Start I/O number of the module
(00 to FE: Higher two digits when expressing the I/O number in
three digits)
:ANY16
Output argument ENO:
Execution result :Bit
d:
Variable that stores read communication status :ANY32
Setting
data
Internal device
R, ZR
J\
U\G
Zn
Constant
Others
Bit Word Bit Word
Serial
Structured ladder/FBD
ST
EN ENO
dUn*
G_SPBUSY
G_SPBUSY
(EN, Un*, d);ENO:=
d
Reads communication
status