Omron CQM1H-SCB41 Computer Hardware User Manual


 
Appendix BCompoWay/F Master Protocol
145
Example: The following example illustrates reading the present value from a K3Nj-series Intelligent Signal Proc-
essor.
CS1-series PC
CompoWay/F response
Read data = present value
CompoWay/F command
VARIABLE AREA READ
Command code: 01 01
First read address
Intelligent Signal Processor
K3Nj-jjjj-FLK1/2/3/4/5/6
Sequence No. 600 (Send with ASCII Conversion, with Response) is used. The specified data beginning with the
command code is converted ASCII and sent to the Intelligent Signal Processor with the specified node number.
The response is converted to hexadecimal and stored starting at the specified word.
The command frame for reading the present value for a K3Nj-jjjj-FLK1/2/3/4/5/6 Intelligent Signal Proces-
sor (command code 01 01) is shown below. The following data is specified in the operands for PMCR(260).
Rightmost byte of S+1: Node number (2 digits BCD)
S+2: Command code: MRC + SRC = 0101
S+4 on: Send data = Variable type + first read address + 00 + number of elements.
STX Node No. Subad- SID
Command code Send data
ETX BCC
dress
MRC SRC Variable
type
First read
address
(Note)
Always
00
No. of
elements
(02Hex) (×10
1
) (×10
1
) 00 0 01 01 C0 0000 00 0001 (03Hex)
Data in shaded portions is specified in the PMCR(260) instruction.
Note A first read address of 0000 specifies the present value. An address of 0001 specifies the maximum value;
0002, the minimum value; and 0003, the status.
The response frame is shown below. The response code and receive data are stored according to the operands for
PMCR(260) as follows:
D+1: Response code
D+2 and on: Receive data
STX Node No. Subad-
dress
End
code
Command code Response code Receive
data
ETX BCC
MRC SRC Note 1 Read data
(Note 2)
(02 Hex) (×10
1
) (×10
1
) 01 01 00 00 0000 (03 Hex)
Data in shaded portions is stored at the location specified by the operand in the PMCR(260) instruction.
Note 1. Response Codes
Response code Meaning
0000 Normal end
1001 Command too long
1002 Command too short
1100 Parameter error
1101 Area type error
1103 First address range error
2203 Operating error
2. The read data is returned as 4-digit hexadecimal as follows: F0019999 to 00099999 Hex.