Signametrics
48
SCAN_OKAY
Operation successfully completed.
Negative Value
Error code
Example
SCANSetChannelRelay(0,OPEN,10); // Open channel 10 relay
for(I=1; I<=9; I++) // Close 1,2..,9
SCANSetChannelRelay(0, CLOSE,i);
SCANSetConfig
H/W access Command
;
Polled Command
Description
Set the Scanner configuration to one of the predefined modes.
#include “SM4040.H”
#include “ScanUser.H”
int
SCANSetConfig(int
iScan
, int
iConfiguration)
Remarks
This function sets the Scanner to one of the available configurations. It acts on both, the
configuration relays and tree relays to set the Scanner for
TwoWire, FourWire, SixWire,
TwoGroups, FourGroups, Universal or Disabled
configurations. The
SixWire
and
FourGroups
configuration are only available with the SM4040 and SM4042. All
configuration constants are defined in the ScanUser.H file. It consumes t-Actuation to set
the configuration. Setting configuration to
Universal
or
Disabled
opens all relays.
Parameter
Type/Description
iScan
int
Identifies the Scanner. Numbered starting with zero.
iConfiguration
int
Configuration to set
Return Value
Integer error code.
Value
Meaning
SCAN_OKAY
Operation successfully completed.
Negative Value
Error code
Example
SCANSetConfig(0,
TwoWire
)
// Set scanner to 2-Wire
//configuration
SCANSetConfigRelay
H/W access Command
;
Polled Command
Description
Set one of the configuration relays.
#include “SM4040.H”
#include “ScanUser.H”
int
SCANSetConfigRelay(int
iScan
, int
iState,
int
iRelay)
Remarks
This function opens or closes the selected configuration and tree relays. It is only
available while the Scanner is set to the
Universal
configuration. With
iState
set to
CLOSE
the selected relay is closed, while
OPEN
opens it. The Configuration and Tree
relays are defined in the ScanUser.H file. They include
AtoA, BtoA, BtoB, CtoA, DtoA,
Summary of Contents for SM4020
Page 61: ...Signametrics 60...