App 2-2
Appendix 2. Communication Commands
IM CW120-E
1.
Commands
1.1
Messages
Messages
Communication between the CW120 clamp-on
power meter and a personal computer is carried
out in blocks of data called messages.
Messages sent by the personal computer to the
CW120 are called program messages, and
messages received by the personal computer
from the CW120 are called response
messages.
If a received program message contains a
query command (a command which requests a
response), the CW120 returns a response
message. A single response message is
always returned in response to a single
program message.
Program Messages
As explained above, program messages are
sent from the personal computer to the CW120.
The format of a program message is shown
below.
<Program message unit>;<program message unit>;
... ;<program message unit><PMT>
<Program message unit>
A program message is a train of zero or more
program message units; each unit corresponds
to one command. The CW120 executes the
commands in the order that they are received.
Each program unit is separated by a semicolon
(;).
<PMT>
PMT is a terminator used to terminate each
program message. For the CW120, the
terminator is a string of CR (ASCII-code "0DH")
and LF (ASCII-code "0AH") characters.
●
Format of Program Message Unit
The format of a program message unit is shown
below.
<Program header> space <program data>
<Program header>
The program header contains the command
type.
<Program data>
If there are certain conditions for executing a
command, they are appended as program data.
The program data follows the program header
and is separated from the program header by a
space (ASCII-code "20H"). If there are multiple
data, they are separated by a comma (,).
Response Messages
As explained earlier, response messages are
sent by the CW120 to the personal computer.
The format of a response message is shown
below.
<Response message>;<response message>;
... ;<response message><RMT>
<Response message unit>
A response message is a train of one or more
response message units; each response
message unit corresponds to one response.
Each response unit is separated by a semicolon
(;).
<RMT>
RMT is a terminator used to terminate each
response message. For the CW120, the
terminator is a string of CR (ASCII-code "0DH")
and LF (ASCII-code "0AH") characters.
●
Format of Response Message Unit
The format of a response message unit is
shown below.
<Response header> space <response data>