Operator`s manual

Signametrics 46
Value Meaning
SCAN_OKAY
Operation successfully completed.
Negative Value
Error code
Example
SCANSelectChannel(0, 3); // Select a channel
DMMRead(0, @val); // measure input at Channel 3
SCANSelectChannelCmd
H/W access Command ; Polled Command ;
Description Polled select channel command.
#include “SM4040.H”
int SCANSel
ectChannel
Cmd(int iScan, int iChan)
Remarks This is th
e polled version of the SCANSelectChannel function. It opens all channels in a
group, then closes channel number iChan. This is a polled function. It sends a command
to the Scanner but unlike SCANSelectChannel, it does not wait for completion of the
selection operation. SCANReady must be used in order to verify the selected channel
was closed and the scanner is ready for a new command. It is necessary for SCANReady
to return TRUE once for proper operation. For instance, if the actuation time is set to
10ms, and a wait of 100ms it taken following the execution of the
SCANSelectChannelCmd, it should not be assumed the scanner is ready. SCANReady
must be used and return TRUE to proceed. SCANReady not only checks for readiness,
but it also clears some registers in preparations for the next command. It is important to
note that the SCANSelectChannelCmd is context sensitive and depending on the
current configuration will function differently. See SCANSelectChannel command for
details. This command is limited to the following configurations: TwoWire, FourWire,
SixWire, TwoGroups and FourGroups.
Parameter
Type/Description
iScan
int Identifies the Scanner. Num
bered starting with zero.
iChan
int Channel num
ber Range: 1 to 40 depending on Scanner type and
set configuration
Return Value Inte
ger code.
Value
Meaning
SCAN_OKAY
Operation successfully completed.
Negative Value
Error code
Example
SCANSelectChannelCmd(0, 3); // Select a channel.
DMMSetRange(0,300mV) //Set DMM to appropriate range
DMMRead(0, &Val); //Flush a reading or two
While( ! SCANReady(0)); // Wait for Scanner to be ready
DMMRead(0, &reading); // Read input
SCANSetActuationTime
H/W access Command ; Polled Command