Download CTC100 manual - Stanford Research Systems

Transcript
Operation
16
The RS-232 port requires RTS/CTS flow control, which some PC serial ports do not support. If
the CTC100 sometimes drops characters from the RS-232 messages that it receives, try using a
USB-to-RS-232 adapter or use the USB interface instead.
The USB port uses the Linux gadget serial driver, which is a common driver that is already
installed on some PCs. If the PC asks for a driver, follow these instructions:
Install the USB driver for Windows PCs
1. Download the driver from the SRS website at www.thinksrs.com; click Downloads >
Software. Unzip the downloaded file.2. Using a standard USB A–B cable, plug the CTC100
into the PC.
3. The New Hardware Found wizard appears on the PC. Tell the wizard not to search the web
for the driver; choose the option to select the driver from a list or specific location. If asked
to specify the hardware type, select “Ports”. Click “Have disk”, browse to the file that you
downloaded, and select “gserial-Windows7.inf” (for Windows 7) or “gserial.inf” (for older
versions of Windows). You may get a message saying that the driver has not passed
Windows logo testing.
4. Once the installation is complete, the CTC100 should appear as a COM port on your
computer, and your programs can use the USB connection in the same way that they use an
RS-232 connection.
Read data from the CTC100
All RS-232, GPIB, USB, and Ethernet messages sent to the CTC100 must end with a linefeed
(decimal 10 = hex 0x0a = ‘\n’). The CTC100 will not process the message until the linefeed is
received. Instructions are not case-sensitive.
The most recent value (i.e., the value read at the most recent ADC conversion) of a single
channel can be queried by sending the name of the channel, followed by a question mark. Omit any
spaces from the channel’s name. For example, to query the value of channel “Out 1”, send the
command Out1?. The CTC100 replies with a value such as “0.00000”:
Out1?
0.00000
The most recent value of all channels can be retrieved with a single getOutput instruction (the
question mark is optional in this case):
getOutput?
29.98424, 25.86019, 27.49236, NaN, NaN, NaN, 0.000000, 10.04576,
10.04574, 10.04572, NaN, NaN, NaN, 0, 0
Sensors that are disconnected or out of range report a value of “NaN” (not a number). To
determine the order in which the channels are listed, send a getOutputNames query:
getOutputNames?
In 1, In 3, In 2, In 4, Out 1, Out 2, AIO 1, AIO 2, AIO 3, AIO 4,
V1, V2, V3, DIO, Relays
Data can also be read with the getLog instruction, which returns logged data. Logged values are
typically the average of ten ADC conversions and have less noise than the values returned by
getOutput and channel?, both of which return the result from the single most recent ADC
conversion only. In addition, getLog makes it easier to retrieve data at consistent time intervals.
For example, begin by sending this command, which retrieves the last point in channel In 1’s log:
CTC100 Programmable Temperature Controller