17
Updating using ASCII values
The <CV> Cyclic Variable command is used to update each variable individually by sending the numeric value as a
simple ASCII string.
The syntax is <CV
n
,
string
> where n represents the input variable to be updated (= 1 to 8) and string is the numeric
value to be displayed. For example, the command <CV1,123.456> will set the input variable 1 to a value of “123.456”.
The string is converted to a numeric value and appears on the standard screens, drawing a bargraph if appropriate. The
value can be updated when necessary by simply sending the same command with the new value.
Note that there is no mechanism to set the data
GOOD
or
BAD
– all data is assumed to be
GOOD
.
Updating using Binary Data
The <CD> Cyclic Data command is used to update all eight variables at the same time. Instead of an ASCII string, the
values are sent as IEEE floating point numbers. In addition, the status of each value can be set
GOOD
or
BAD
. The data
format is a single status byte followed by 4-byte float for each variable. The status byte for each value should be set to
zero to mark that value as
BAD
, or any value between 1 and 255 to mark it as
GOOD
.
The command <CD> is issued with any additional bytes (checksum, CRC etc) as required by the current operational
mode. The command is acknowledged if correctly received.
A binary download (from the host to the display) of the input values is then expected. The length must be (1+4)x8 = 40
bytes and if not an error response is returned.
After the data has been downloaded the <CI>, <CCn>, or <CRnn> command must be sent as per the current operational
mode, the check byte(s) being calculated from all 40 bytes of the input data.
The download is acknowledged if it was correctly received (including checksum or CRC checks) and the values are
displayed.
There is a 2 second timeout for the download operation, during which time if no bytes are received the download is
aborted and an error response is returned. Of course, the actual total download time depends on the speed of the serial
link.
Data Timeout
If valid data is not regularly sent to each input variable then there is a risk that an operator might take some
inappropriate action in response to stale data. A mechanism has been built into the display that indicates when the data
is older than a predetermined timeout value. The data is displayed as
BAD
if the timeout value has been exceeded, but
the “Status” remains unchanged. Sending valid data once again to the input variable will display the value normally,
marked
GOOD
or
BAD
according to the “Status”.
As the acceptable timeout value is totally dependant on the application and the host capabilities, it is adjustable from 10
Seconds to 40 Minutes. For simple applications the timeout value can be set to 0 which disables the facility.
The <CT
n
> Cyclic-data Timeout command is used to set the acceptable timeout value for all eight variables. The
duration is set by the value “
n
” which is multiplied by 10 Seconds to give the actual time period.