![Cedrat Technologies CCBu40 Скачать руководство пользователя страница 22](http://html1.mh-extra.com/html/cedrat-technologies/ccbu40/ccbu40_product-and-warranty-information_2578811022.webp)
22 / 32
CCBU40 COMPACT CONTROLLER BOARD - PRODUCT AND WARRANTY INFORMATION
Version 1.21
XI.2. STANDARD FORMAT
COMMAND FORMAT
The commands consist in a chain of characters that will be interpreted by the electronics before it is applied.
The number of characters in a command is not fixed, but it cannot exceed 20 characters, nor be shorter than 3
characters. The command structure is as follows:
“COMMAND CHA VALUE + EXECUTION CHARACTER”
•
The command always starts with a single command character. The list of command characters and
their use is given in Section 0.
•
The command character is always followed by a parameter value in decimal. In this field, only
numeric characters are allowed, as well as signs (‘+’ or ‘-‘), and decimal separator ‘.’. It is not
authorized to leave this field empty. If unused it can be filled with
‘0’. The parameters to the CCBu40
can be integer of floating values.
•
The command is always ended by the execution character ‘E’ (in capital letter). This character
indicates the end of the command. After this character, the electronic executes the command and
answers or acknowledges. Another command can then be issued.
Warning: Do not use carriage return or “enter” button of the keyboard to send the command, as this
will introduce an invalid character in the chain.
The commands are only executed with ‘E’ character.
ANSWER FORMAT
The format of the CCBu40 answer to the command is the following:
“N x 4 DATA BYTES (OPTIONAL) + ACKNOWLEDGEMENT CHARACTER”
For commands used to request feedback from the electronics, the answer starts with N x 4 data bytes. Each
packet of 4 data bytes represents a 32bits signed integer value. Depending on the request, the CCBu40 will
reply with a different number of data packets before acknowledging. The MSB is sent first, le LSB is sent last.
Thus, those data bytes should not be interpreted as ASCII characters but directly as pure data bytes.
For commands with no feedback, the first field is empty, i.e. no data bytes are transmitted.
The last character of the answer is always the acknowledgement character, which indicates that the command
was received and applied:
•
The acknowledgement character is ‘X’ (0x58) when the command has been properly applied.
•
The acknowledgement character is ‘Y’ (0x59) when an error has been detected in the command. In
that case, the command is not applied. This happens in the following cases:
o
The command is unknown.
o
The command length exceeds 20 characters.
o
The command length is less than 3 characters.
o
The field value contains non digital characters.
o
The field value is empty.
o
The field value is out of range for the corresponding command.