Download IM CW120C-E
Transcript
Chapter 5 PC Link Communication 5.4.7 WRD Reads D registers and I relays on a word-by-word basis. ● Function Reads a sequence of contiguous register information on a word-by-word basis by the specified number of words, starting at the specified register number. • The number of words to be read at a time is 1 to 64. • For the format of response in the event of failure, see subsection 5.1.2. • The command shown below includes the checksum function. When performing communication without the checksum, do not include the 2byte checksum element in the command. ● Command/Response (for normal operation) Number of Bytes Command element Number of Bytes Response element 1 2 2 1 3 5 1 2 2 1 1 STX Address (Station number) CPU number 01 0 WRD Register number Comma or space Number of words (n) Check sum ETX CR 1 2 2 2 4 4 4 2 1 1 STX Address (Station number) CPU number 01 OK dddd1 dddd2 ddddn Check sum ETX CR The response is returned in a 4-digit character string (0000 to FFFF) in a hexadecimal pattern. ddddn: Read data of the specified number of words ddddn = character string in a hexadecimal pattern n = 1 to 64 ● Example: Reading the Integrated power (uint32; lower-order 2 bytes) (D0001) and the Integrated power (uint32; higherorder 2 bytes) (D0002) of the CW120/121 with address number 01. [Command] [STX]01010WRDD0001, 02[ETX][CR] The Integrated power (uint32; lower-order 2 bytes) (D0001) value (03E8(HEX)) and the Integrated power (uint32; higher-order 2 bytes) (D0002) value (00C8 (HEX)) is returned in response to the command above. [Response] [STX]0101OK03E800C8[ETX][CR] 5-12 IM CW120C-E