Using Protocol MacrosSection 5-7

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

Not executed

 

The sequence number specified by the

 

 

PMCR(––) instruction does not exist in the

 

 

Board.

 

 

 

 

3

Receive Data/Write Area Exceeded Error

Execution stops after

 

When data is written or read to the CPU Unit, the

the error occurs.

 

 

 

specified area range was exceeded.

 

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

Execution stops after

 

Initialization

the error occurs.

 

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).

 

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

1500

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)

First Send Data Word: S S specifies the first word of the words containing the data required for sending.

S

S+1

:

:

S+n

15

00

 

 

Number of send words

 

 

 

Total number of words including S

 

 

 

 

 

 

 

 

Send data

 

 

 

 

 

 

 

 

 

:

 

 

 

 

:

 

 

 

 

 

 

 

 

 

85

Page 96
Image 96
Omron CQM1H-SCB41 Using Protocol Macros, Executing Communications Sequences, PMCR-- Instruction Specifications