App index – Yokogawa Button Operated MV2000 User Manual
Page 124
5-5
IM MV1000-17E
Responses
1
2
3
4
5
6
7
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/RS-485 Responses
The following table shows RS-422/RS-485 interface commands and their responses.
Command
Syntax
Description
Response
ESC
Oxx CRLF
Opens a device
• Response from the device with the specified address
ESC Oxx CRLF
• No response if the device with the specified address
does not exist
*
ESC
Cxx CRLF
Closes a device
• Response from the device with the specified address
ESC Cxx CRLF
• No response if the device with the specified address
does not exist
*
* Possible reasons for not finding a device with the specified address are: (1) there is an error in
the command, (2) the specified address does not match the device address, (3) the device is
not turned ON, and (4) the device is not connected via the serial interface.
• The “
xx” in the table indicates the device address. Specify the address that is
assigned to the device in the range of 01 to 99.
• You can only open one device at any given time.
• If a device is opened with the ESC O command, all commands are enabled on the
device.
• If 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 for the terminator in communication
commands. However, the terminator for these commands must be set to CR+LF.
Note
The ASCII code for ESC is 1BH. See appendix 1 for details.
5.1 Response Syntax