Appendix A

Introduction

Appendices B to N provide information on the standard system protocols provided with the CX-Protocol, the Serial Communications Boards. Refer to 5-7 Using Protocol Macros for details on using PMCR(––).

Using Standard System Protocols

Standard system protocols can be executed merely by specifying the sequences number to be executed in the second operand of PMCR(––) and settings the data described in the appendices in the proper format starting at the word specified with the third operand of PMCR(––). The data received as a response to executing the se- quence will be automatically stored starting at the word specified with the fourth operand of PMCR(––).

Procedure

1, 2, 3... 1. Set the port number (1 or 2) and the sequence number as BCD values in the first operand of PMCR(––).

2.Specify the address of the first word containing the data required for the sequence as the second operand (S: First word of send data) of PMCR(––).

3.Specify the address of the first word where respond data is to be stored as the third operand (D: First receive data storage word) of PMCR(––). Unless there is a reason to specify otherwise, set 0000 Hex in D at the initial value.

Example

The following data would be used to execute sequence number 600 in the CompoWay/F Master Protocol for a transmission with ASCII conversion.

PMCR(––)

1600

S

D

Communications port: 1 (BCD) Communications sequence number: 600 (BCD)

S: Send Data Word Allocation (3rd Operand)

First word of

+0

Number of send data words

send data

 

 

 

+1

(Undefined)

Node number

 

 

 

 

 

 

+2

(Undefined)

SRC

 

 

 

 

 

+3

Number of send bytes

 

+4

Send data

 

 

 

 

Offset

Contents (data format)

Data

 

 

 

 

S+0

Number of send data words

0005 to 0128 BCD

 

(4 digits BCD)

 

 

 

 

 

 

S+1

(Undefined)

Node No. (2 digits

00 to 99

 

 

BCD)

 

 

 

 

 

S+2

MRC

SRC

Set the command code for the required

 

(2 digits Hex)

(2 digits Hex)

service

 

 

 

 

S+3

Number of send bytes (4 digits BCD)

Number of data bytes from the next byte

 

 

 

after the command code until the byte just

 

 

 

before the ETX. 0000 to 0492

 

 

 

S+4

Send data (4-digit Hex)

The data specified in hexadecimal here will

on

 

 

be converted to ASCII and the number of

 

 

 

bytes specified in S+3 will be sent.

 

 

 

 

135

Page 142
Image 142
Omron CQM1H-SCB41 Introduction, Using Standard System Protocols, Procedure, Example, Send Data Word Allocation 3rd Operand