LAMBDA 10-3 OPERATION MANUAL – REV. 3.03 (20110829)
58
5.6
5.6
5.6
5.6
Remote Control Command Programming
Remote Control Command Programming
Remote Control Command Programming
Remote Control Command Programming
This section describes some suggested tips and techniques when writing programs on the
remote control computer for communicating with the Lambda 10-3 via either the serial RS-
232 port or the USB (Universal Serial Bus) port. The following paragraphs and the code
examples deal with remote control command programming in a general manner, abstracted
from telecommunications medium. The discussions and examples are applicable to either the
serial RS-232 port or the USB port. The programming specifics for either the serial or USB
ports are covered in the respective chapters, following this chapter. The discussions and
examples are also relatively platform independent. The code samples written in the C
programming language, for example, are written in a relatively primitive form, and thus
should be easily portable to any platform for which C support exists (Windows, UNIX, Linux,
Macintosh OS, etc.). Should another programming language be desired to implement the
examples, the gist of examples should be fairly easy to glean if they are viewed as pseudo code
– the examples should be easy to port to C++, Java, Pascal, BASIC, and other high level
languages, or even various forms of scripting languages.
5.6.1
5.6.1
5.6.1
5.6.1
Preparing the Command Byte
Preparing the Command Byte
Preparing the Command Byte
Preparing the Command Byte
All remote control command codes for the Lambda 10-3 require no more than one byte (8
bits) of storage for each command. If using a programming language that make a distinction
between unsigned and signed bytes, always select unsigned only. “Unsigned” means that
only positive numbers can be stored, whereas “signed” means that either positive or negative
values can be stored. An unsigned byte can hold 256 different positive values (0 through 255).
A signed byte can store only 128 different positive values (0 through 127, and 127 different
negative values (-1 through –127). In the C programming language, an unsigned byte type is
expressed as “unsigned char” followed by the name of the variable, such as:
unsigned char command_byte;
…where “command_byte” is the name the programmer chooses to give the variable.
5.6.1.1
Encoding Filter Commands Into a Single Byte
Filter commands are encoded into specific bit groups of the command byte. As discussed
earlier in this chapter, and as shown in the table titled “Filter Command Structure” (Table
5-4), there are actually three commands stored at the same time in the command byte. The
filter wheel selector is stored in Bit 7 (the most significant bit (MSB)) of the command byte,
allowing 2 values (0 and 1)
¹
. The filter wheel speed is stored in the next lower three bits (Bits
6, 5, and 4), allowing 8 different values (0 through 7). In addition, the filter selector is stored
in the next lower four bits (least significant nibble, Bits 3, 2, 1, and 0). Of the 16 possible
values that can be stored in the least significant nibble, only the first 10 (0 through 9) are
used for the filter selector. Any value above 9 will invalidate the entire command byte as a
“filter command”, making the value stored in the byte as whole as either a shutter, special,
or undefined command.
¹
Note: Bit 7 supports the selection of one of three filter wheels: 0 for Wheel A or C and 1 for Wheel B. When selecting Filter Wheel C, the filter
wheel command byte must be preceded with a byte containing a value of 252 decimal (FC hexadecimal), and Bit 7 in the encoded filter wheel
command byte must be set to 0.
Содержание Lambda 10-3
Страница 12: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 xii This page intentionally blank ...
Страница 46: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 34 This page intentionally blank ...
Страница 72: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 60 This page intentionally blank ...
Страница 84: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 72 This page intentionally blank ...
Страница 96: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 84 This page intentionally blank ...
Страница 102: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 90 This page intentionally blank ...
Страница 106: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 94 This page intentionally blank ...
Страница 108: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 96 This page intentionally blank ...
Страница 112: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 100 This page intentionally blank ...
Страница 128: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 116 This page intentionally blank ...
Страница 132: ...LAMBDA 10 3 OPERATION MANUAL REV 3 03 20110829 120 NOTES NOTES NOTES NOTES ...