![background image](http://html.mh-extra.com/html/omron/v400-r2-series/v400-r2-series_connection-manual_741434051.webp)
9. Program
48
9.4. Variables
The variables used in this program are listed below.
9.4.1. List of user-defined variables
The following tables list the data type, external variables (user-defined global variables/device
variable for CJ-series Unit/system-defined variable) and internal variables that are used in this
program.
●
Data type (Structure)
[Communications processing status flags]
Name
Data type
Explanation
sStatus
STRUCT
Structure of communications processing status flags
Busy BOOL
Communications processing in progress flag
TRUE: Processing is in progress. / FALSE: Processing is
not in progress
Done BOOL
Communications processing normal end flag
TRUE: Normal end / FALSE: Other than normal end
Error BOOL
Communications processing error end flag
TRUE: Error end / FALSE: Other than error end
●
External variables
[User-defined global variables]
Variable name
Data type
Explanation
Input_Start BOOL
Communication start switch
The program starts when this flag changes from FALSE to
TRUE
Input_SendData
ARRAY[0..249]
OF WORD
Send data storage area (500 bytes (WORD))
AT
Output_RecvData
ARRAY[0..249]
OF WORD
Receive data storage area (500 bytes (WORD))
An area that stores DstDat[ ] of the ExecPMCR
instruction
%5500
(*)
Output_RecvMessage STRING[498]
An area that stores the receive data after converted into a
string. (498 characters)
Output_PmrErrorID WORD
An area that stores an error code of the ExecPMCR
instruction
Normal end: 16#0000
Output_PmrErrorIDEx DWORD
An area that stores an expansion error code of the
ExecPMCR instruction
Normal end: 16#00000000
Output_PmrStaErrCode WORD
An area that stores a protocol macro error code
Normal end: 16#0000
Output_TransErrCode WORD
An area that stores the transmission error status flag
Storage area of
J01_P2_TransErrSta
Normal end: 16#0000
*You need to use an AT specification for the area that stores DstDat[ ] of the ExecPMCR instruction to specify
an address in the memory used for CJ-series Units.