57
Signametrics
Example
SCANTestConfigRelay(0, BtoA); // test the BtoA relay
SCANTrigAutoScan
H/W access Command
Polled Command
Description
Set Scanner for Triggered Auto Scan operation.
#include “SMX4032.H”
int
SCANTrigAutoScan
(
int iScan, int iPoints)
Remarks
This is the externally triggered version of
SCANAutoScan
operation. Following
acceptance of this command, the Scanner enters a wait state, whereby it waits for a
trigger edge to start an Auto Scan operation. Trigger edge is whatever was previously
selected using the
SCANTriggerOutState
. Being a polled operation, it requires
SCANReady
to return TRUE as indication of completion. Do not issue new command
util
SCANReady
returns TRUE. An exception is the
SCANAbort,
which terminates this
operation. Keep in mind that the last channel selected is left closed. See
SCANAutoScan
for details.
Parameter Type/Description
iScan
int
Identifies the Scanner being addressed.
iPoints
int
Indicates the number of points in the scan.
Return Value
The return value is one of the following constants.
Value Meaning
SCAN_OKAY
Function succeeded.
Negative Value
Error code
Example
SCANTriggerOutState(0,ENABLED, POSITIVE); //positive edge
CANTrigAutoScan(0, 20); // set off 20 point scan.
SCANTriggerInState
H/W access Command
Polled Command
Description
S
et trigger input state
.
#include “SMX4032.H”
#include “ScanUser.H”
int
SCANTriggerInStete
(
int iScan, int iState, int iEdge)
Remarks
This function sets the scanner’s trigger input state and active edge. Default is
DISABLED and POSITIVE. If
iState
is set to ENABLED, the trigger input line is
enabled. If
iEdge
is set to POSITIVE, Positive Edge will activate operations. See
definitions in ScanUser.H file.
Parameter Type/Description
iScan
int
Identifies the Scanner being addressed.