5-7SectionUsing Protocol Macros
85
Error Codes
The contents of the error codes are shown in the following table.
Code Error contents Protocol macro
execution
0 No error Executed
2 Sequence Number Error
The sequence number specified by the
PMCR(––) instruction does not exist in the
Board.
Not executed
3 Receive Data/Write Area Exceeded Error
When data is written or read to the CPU Unit, the
specified area range was exceeded.
Execution stops after
the error occurs.
4 Protocol Data Syntax Error
A code that cannot be executed occurs while the
protocol macro was executed. (Example: A
header occurs after a terminator.)
5 Protocol Macro Execution Error During Port
Initialization
This error occurs when the PMCR instruction is
executed while the port is being initialized (i.e.,
while the serial communications port is being
restarted or while the serial communications
mode in the PC Setup of the Serial
Communications Board is being modified using
the STUP instruction or the Programming
Device).
Execution stops after
the error occurs.
5-7 Using Protocol Macros
5-7-1 Executing Communications Sequences
Use the PMCR(––) instruction to execute communications sequences.
PMCR(––) Instruction Specifications
Control data
First send word
First receive data storage word
Control Data: C
C:
Digits 2 to 4 (bits 00 to 11):
Communications sequence number (000 to 999)
Digit 1 (bits 12 to 15): Port specifier
1: Port 1 (RS-232C)
2: Port 2 (RS-422A/485)
15 00
S specifies the first word of the words containing the data required for sending.
Number of send words
Total number of words including S
Send data
15 00
:
:
:
:
S
S+1
S+n
First Send Data Word: S