Owner manual
4-5
IM 04L41B01-17E
Responses
1
2
3
4
5
6
App
Index
if(odd){
/* When the data length is odd */
union tmp{
/* Pad with a 0, and add to the unsigned short data. */
unsigned short s;
unsigned char c[2];
}tmp;
tmp.c[1]
= 0;
tmp.c[0] = *((unsigned char *)p);
csum += tmp.s;
}
if((csum
= (csum & 0xffff) + ((csum>>16) & 0xffff)) 0xffff)
/* Add the overflowed digits *
csum = csum - 0xffff;
/* If the digit overflows again, add a 1. */
return((~csum) & 0xffff);
/* bit inversion */
}
RS-422/485 Dedicated Responses
The following table shows dedicated commands for the RS-422/RS-485 interface and
their responses.
Command Syntax Meaning Response
ESC Oxx CRLF
Opens the device. • Response from the device with the specified
address
ESC Oxx
CRLF
• No response when the device with the specified
address does not exist*
ESC Cxx
CRLF
Closes the instrument. • Response from the device with the specified
address
ESC Cxx
CRLF
• No response when the device with the specified
address does not exist*
* Some of the possible reasons that cause the condition in which the de
vice with the specified
address cannot be found are a command error, the address not matching that of the device,
the device is not turned ON, and the device not being connected via the serial interface.
• The “
xx
” in the table indicates the device address. Specify the address that is
assigned to the instrument from 01 to 99.
• Only one device can be opened at any given time.
• When a device is opened with the ESC O command, all comm
ands on the device
become active.
• When a device is opened with the ESC O command, any other device that is open
is automatically closed.
• Normally, either CR+LF or LF can be used as a terminator for
communication
commands. However, the terminator for these commands must be set to CR+LF.
Note
• The ASCII code of ESC is 1BH. See appendix 3.
4.1 Response Syntax










