Omron CQM1H-SCB41 Computer Hardware User Manual


 
135
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)
Send data
First word of
send data
Number of send data words+0
+1
+2
+3
+4
(Undefined)
Node number
(Undefined)
SRC
Number of send bytes
Offset Contents (data format) Data
S+0 Number of send data words
(4 digits BCD)
0005 to 0128 BCD
S+1 (Undefined) Node No. (2 digits
BCD)
00 to 99
S+2 MRC
(2 digits Hex)
SRC
(2 digits Hex)
Set the command code for the required
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
on
Send data (4-digit Hex) The data specified in hexadecimal here will
be converted to ASCII and the number of
bytes specified in S+3 will be sent.