Start code and terminal code, Communic ation – IDEC High Performance Series User Manual
Page 169
WindO/I-NV2 User’s Manual
3-67
5 User Communication
3
Communic
ation
●
Start Code and Terminal Code
A start code starts data reception and a terminal code judges the terminal of data reception. A start code and a
terminal code can be configured for either Constant (Character) or Constant (Hexadecimal) settings for receive
command. The first 1 byte of the constant is recognized as the start code and the last 1 byte as the terminal code.
Code 00h to 7Fh can be set when Data Length under Interface Settings is 7 bits, and 00h to FFh when the data
length is 8 bits. Data Length is configured under the Communication Interface tab on the Project Settings dialog
box.
The procedure for terminal of data reception varies whether or not the receive data contains a start code and a
terminal code, and whether the Variable check box for Device for receive command data is selected.
In the following description, With Variable indicates that the Variable check box for Device for receive command
data is selected and Without Variable indicates that the Variable check box is not selected. Also, when there are
multiple Device set for receive command data, and at least 1 command has the Variable check box selected, this
corresponds to With Variable.
Start code Terminal
code
Variable
Description of the procedure for terminal of data reception
Set
Set
Set
Not set
Reception is started with the start code and terminated with the terminal code.
When the terminal code is followed by BCC, the data including the number of bytes of
BCC is received.
Set
Not set
Set
Reception is started with the start code and the data is received according to the
maximum command length.
Reception is terminated when the Receiving Character Time Out occurs.
Not set
Reception is started with the start code and the data is received according to the length of
the command.
'02' '31' '32' '33' <[LDR0100] N 2 2 U>
Receive data:
Constant (HEX)
'34' '35' '0d'
Constant (HEX)
Device
Command settings:
Start code 02h
Terminal code 0dh
'02' '31' '32' '33' <[LDR0100] N 2 2 U>
Receive data:
'34' '35' '0d'
Device
Receive
Constant (HEX)
Constant (HEX)
Command settings:
Start code 02h
Terminal code 0dh
'02' '31' '32' '33' <[LDR0100] N 2 2 U>
Receive data:
'34' '35' '0d'
BCC(1 0 XOR N 1)
BCC
Device
Receive
Constant (HEX)
Constant (HEX)
Command settings:
Start code 02h
Terminal code 0dh
'02' '31' '32' <[LDR0100] N 2V 2 U>
Receive data:
Constant (HEX)
<<1:”AB” 2:”CD” [LDR0200]>>
Registering Constant (HEX)
Device With Variable
Maximum command length
Receive
Command settings:
Start code 02h
Terminal code: None
'02' '31' '32' <[LDR0100] N 2V 2 U>
Receive data:
Constant (HEX)
'03'
<<1:”AB” 2:”CD” [LDR0200]>>
Constant (HEX)
Registering Constant (HEX)
Device With Variable
Receive
Command settings:
Start code 02h
Terminal code: None
Receiving character
time out occurs.
'02' '31' '32'
<[LDR0100] N 2 2 U>
Receive data:
Constant (HEX)
<<1:”AB” 2:”CD” [LDR0200]>>
Registering Constant (HEX)
Device Without Variable
Command length
Receive
Command settings:
Start code 02h
Terminal code: None