6
CVS4 Component Video Switch
and the Error Response is always the string:
!ERR<CR><LF>
By parsing only the prefix characters ‘+’ and ‘!’, a programmer can chose to ignore the error
codes and simply look at the first characters of the response strings and use them as a pass /
fail indicator when issuing a command.
All response strings always end with a
<CR><LF>
.
A Query Response string always starts with the ‘=’ characters and is followed by a command
string indicating the parameter being returned. This is better explained in an example.
Here’s an example of a querying a device for its light intensity settings:
LI?<CR>
Sent: Light Intensity Query command
+<CR><LF>
Received: Acknowledgement of command
=LI 2,13<CR><LF>
Received: Light Intensity Query Response
Note that a “
+<CR><LF>
” followed the command string. A command string is
always
followed
by either an Acknowledgment (as in this case) or an Error Response. This consistancy allows a
driver to use a single routine to issue a command and check for an Acknowlegement or an Error
Response String, whether or not the command queries for a response.
An example of an error response:
IL?<CR>
Sent: Command characters transposed, no such command
!2<CR><LF>
Received: Error Response indicating unknown command
In this case the Error Response string “
!2<CR><LF>
” was issued instead of the acknowledg-
ment string since the command was not recognized.
Response String Checksums and CRC-8 Checkcodes
Response strings can be programmed to have checksums or CRC-8 checkcodes appended to
them, the syntax is identical to the Command Structure’s checksum and CRC-8 handling.
Checksum and CRC-8 are turned on and off by issuing the proper command. On most devices
this is the
“Control Settings”
command.
Only the Error Response and The Query Response strings will have checksum and CRC-
8 checkcodes appended to them. The Acknowledgment Response will always consist of
“+<CR><LF>”. Anything else must be assumed to be a communication error.
An example with checksumming enabled, while querying for LED intensities is:
LI?<CR>
+<CR><LF>
=LI 2,13;239<CR><LF>
K.I.S.S.™
(Continued)
Содержание CVS4
Страница 25: ...23 CVS4 Component Video Switch CVS4 Command Reference Cont d ...
Страница 30: ...28 CVS4 Component Video Switch This page left intentionaly nearly blank ...
Страница 31: ...29 CVS4 Component Video Switch This page left intentionaly nearly blank ...
Страница 32: ...Z E K T O R Z E K T O R 12675 Danielson Ct Suite 401 Poway CA 92064 858 748 8250 www zektor com ...