BS and BSA Bias Supply Series and User Manual, Rev 2.60
www.stahl-electronics.com phone: +49 6242-504882, fax: +49 6242 504884
25
Appendix
User-Defined Remote-Control and List of Commands
Introduction
The device can be controlled using the provided LabVIEW
TM
source code blocks, or by arbitrary self-
written program code. Standard program compilers/interpreters like C++, BASIC or Pascal/Delphi
dialects may be used for this purpose and also generic command-line terminal programs (e.g.
HyperTerminal
TM
) will do. However, the physical line connection to the device (USB-connection 1.0
protocol, but also 2.0 compatible) needs to be established beforehand, like described in section 3.2.1.
USB-drivers for Windows
TM
versions, Mac OS and Linux are readily provided. Please check
eventually the USB-manufacturers homepage (www.ftdichip.com) for latest updates.
Note that the physical communication behaves like a traditional RS232 device, communicating with
standard settings (9600 Baud, 8N1 protocol, no handshake) or with faster settings in fast-mode
(115200 Baud, 8N1 protocol, no handshake), in case the device is configured for fast-mode option. If
this faster speed option is installed, the latter is marked with a label at the rear side USB socket. In
self-written code the 115200 Baud rate parameter needs to be set explicitely, 9600 Baud (Windows
standard) otherwise. In Windows
TM
operating systems the device appears on a ‘COM’-port (VCP =
virtual COM port), as soon as connected to the control PC after driver installation. The COM-Port
number is assigned by Windows upon connecting the device by USB cable and may change from time
to time. The COM-Port settings may be checked inside the Windows
TM
system control panel .
Command List
In the table below the abbreviation “DDDDD” represents the name of the device including its serial
number, e.g. “HV099” means a device with serial number “099”. All commands must be terminated
with an CR (‘carriage-return’) symbol “” (13 in ASCII code). After establishing the USB link to the
device and turning it on, the IDN identifier should be sent in order to retrieve the serial number, since
this serial number will be used to address the device correctly during the subsequent commands. See
also examples and more details after the table.
Command
Function
ASCII Strings
sent to device or received
+ CR (‘carriage-return’) at string ends
Observations
and comments
Identify
device
sent IDN
received DDDDD … … …
The device replies with its name, serial number
(DDDDD) and further information. See also
examples below this table.
Set voltage sent
DDDDD CHXX Y.YYYYYY
received (normal mode)
CHXX Y.YYYYYY
received (fast mode)
[ACK-Symbol]
An output voltage is set. XX is the adressed
channel number (01 up to 16), Y.YYYYYY is a
decimal number between 0.000000 and 1.000000
which represents the scaled voltage. I.e. 0.000000
represents the minimum voltage (e.g. -14V),
1.000000 the maximum value (e.g. +14V). 5 or 6
or 7 digits after the decimal point are required.
In normal mode operation the command sent to
the device is reflected (echoed) back.
In fast mode operation the command sent to the
device is not echoed back but only the
acknowledge symbol (ASCII symbol 6) + CR