Agilent Technologies E4375A Video Gaming Accessories User Manual


 
5 - Programming Overview
64
Since calibration can take up to 15 minutes for an Agilent MCCD with 256 channels, calibration
functions do not wait for calibration to complete. They return immediately after starting calibration.
During calibration, the CF_CALIBRATING_STAT bit is true in the status word returned by
cfGetInstStatus(). When calibration is finished, the CF_CALIBRATING_STAT bit goes false, and a
calibration error is indicated by the status bit CF_CAL_ERROR_STAT. This means that you can poll the
instrument status while calibration is running to determine if calibration is complete.
If there are any calibration errors indicated by the CF_CAL_ERROR_STAT bit, then the details of those
errors can be obtained from the test log. To read the test log, use
cfReadTestLog();
The test log retains the calibration error information until another calibration or a selftest command is
given.
Serial port
The instrument has two serial ports, which can be used as pass-through ports from the LAN. These ports
can be used for local peripherals under control of the application program. In pass-through mode, the
functions that are used to read or write a string to either port have no direct effect on the instrument.
There is also a function to set the configuration of the serial ports.
The functions used to access the ports are:
cfReadSerial();
cfWriteSerial();
To set and query the serial port configuration use:
cfSetSerialConfig();
cfGetSerialConfig();
To return the serial port status use:
cfGetSerialStatus();
Serial port B is also used as a configuration port. This is selected with a hardware switch on the
instrument, as described in chapter 3. Also, during calibration, serial port A reconfigured as a dedicated
communications port for an external voltmeter.
Digital port
There is a 16 bit digital I/O port on the instrument. It can be used as general purpose I/O, or bits can be
configured to have specific purposes. Each pin can be a chassis referenced input or output, or pairs of
pins can be defined as one isolated output. See cfSetDigitalConfig() in chapter 6 for more information.
In addition to using the API functions, digital I/O configuration can be set using the Agilent MCCD
Configuration Screens or the Agilent MCCD User Interface. See chapters 2 and 4 for more information.
To set or query the configuration use:
cfSetDigitalConfig();
cfGetDigitalConfig();
To read and write the lines directly use:
cfSetDigitalPort();
cfGetDigitalPort();