# SelectSignal() method

Configures timing and control signals to use specific Auxiliary or DAQ Sync connections as a source or destination.

This method is intended for advanced users. Except for the SyncClk input, you can easily configure all the timing and control signals using InstaCal.

Member of the MccBoard class.

Note: SelectSignal() is not supported by all board types. Refer to the board-specific information contained in the Universal Library User's Guide for details.

## Function Prototype

VB .NET

Public Function SelectSignal(ByVal direction As MccDaq.SignalDirection, ByVal signalType As MccDaq.SignalType, ByVal connectionPin As MccDaq.ConnectionPin, ByVal polarity As MccDaq.SignalPolarity) As MccDaq.ErrorInfo

C# .NET

public MccDaq.ErrorInfo SelectSignal(MccDaq.SignalDirection direction, MccDaq.SignalType signal, MccDaq.ConnectionPin connectionPin,MccDaq.SignalPolarity polarity)

## Parameters

direction

Direction of the specified signal type to be assigned a connector pin. For most signal types, this should be either SignalIn or SignalOut.

For the SyncClk, AdcTbSrc and DacTbSrc signals, the external source can also be disabled by specifying Disabled(=0), such that it is neither input nor output.

Set it in conjunction with the signalType, connectionPin, and polarity parameters. Refer to the "direction, connectionPin, and polarity parameter values" section below.

signalType

Signal type to be associated with a connector pin. Set it to one of the constants in the "signalType parameter values" section below.

connectionPin

Designates the connector pin to associate the signal type and direction. Since individual pin selection is not allowed for the DAQ-Sync connectors, all DAQ-Sync pin connections are referred to as DsConnector. The MccDaq.ConnectionPin.AuxIn and MccDaq.ConnectionPin.AuxOut settings match their corresponding hardware pin names.

polarity

AdcTbSrc and DacTbSrc input signals (direction = MccDaq.SignalDirection.SignalIn) can be set for either rising edge (MccDaq.SignalPolarity.PositiveEdge) or falling edge (MccDaq.SignalPolarity.NegativeEdge) signals. The AuxOut connections can be set to MccDaq.SignalPolarity.Inverted or MccDaq.SignalPolarity.NonInverted from their internal polarity.

## Returns

- An ErrorInfo object that indicates the status of the operation.

### signalType parameter values

All of the signalType settings are MccDaq.SignalType enumerated constants. To set a variable to one of these constants, you must refer to the MccDaq object and the SignalType enumeration (variable = MccDaq.SignalType.AdcConvert, variable = MccDaq.SignalType.AdcGate, etc.).

Signal | Connection
AdcConvert | A/D conversion pulse or clock.
AdcGate | External gate for A/D conversions.
AdcScanClk | A/D channel scan signal.
AdcScanStop | A/D scan completion signal.
ADC_SSH | A/D simultaneous sample and hold signal.
AdcStartScan | Start of A/D channel-scan sequence signal.
AdcStartTrig | A/D scan start trigger.
AdcStopTrig | A/D stop- or pre- trigger.
AdcTbSrc | A/D pacer timebase source.
Ctr1Clk | CTR1 clock source.
Ctr2Clk | CTR2 clock source.
DacStartTrig | D/A start trigger.
DacTbSrc | D/A pacer timebase source.
DacUpdate | D/A update signal.
DGnd | Digital ground.
SyncClk | STC timebase signal.

### direction, connectionPin, and polarity parameter values

- All of the direction settings are MccDaq.SignalDirection enumerated constants. To set a variable to one of these constants, you must refer to the MccDaq object and the SignalDirection enumeration (variable = MccDaq.SignalDirection.SignalIn, variable = MccDaq. SignalDirection.SignalOut, etc.).
- All of the connectionPin settings are MccDaq.ConnectionPin enumerated constants. To set a variable to one of these constants, you must refer to the MccDaq object and the ConnectionPin enumeration (variable = MccDaq.ConnectionPin.AuxIn0, variable = MccDaq.ConnectionPin.DsConnector, etc.).
- All of the polarity settings are MccDaq.SignalPolarity enumerated constants. To set a variable to one of these constants, you must refer to the MccDaq object and the SignalPolarity enumeration (variable = MccDaq.SignalPolarity.PositiveEdge, variable = MccDaq.ConnectionPin.Negative, etc.).

Valid input settings (direction = MccDaq.SignalDirection.SignalIn)
signalType | connectionPin | polarity
AdcConvert | AuxIn0..AuxIn5 DsConnector | PositiveEdge or NegativeEdge
AdcGate | AuxIn0..AuxIn5 | See SetTrigger().
AdcStartTrig | AuxIn0..AuxIn5 DsConnector
AdcStopTrig | AuxIn0..AuxIn5 DsConnector
AdcTbSrc | AuxIn0..AuxIn5 | PositiveEdge or NegativeEdge
DacStartTrig | AuxIn0..AuxIn5 DsConnector | Not assigned here.
DscTbSrc | AuxIn0..AuxIn5 | PositiveEdge or NegativeEdge
DacUpdate | AuxIn0..AuxIn5 DsConnector | PositiveEdge or NegativeEdge
SyncClk | DsConnector | Not assigned here.

Valid output settings (direction = MccDaq.SignalDirection.SignalOut)
signalType | connectionPin | polarity
AdcConvert | AuxOut0..AuxOut2 DsConnector | Inverted* or NonInverted
AdcScanClk | AuxOut0..AuxOut2
AdcScanStop | AuxOut0..AuxOut2
AdcSsh | AuxOut0..AuxOut2
AdcStartScan | AuxOut0..AuxOut2
AdcStartTrig | AuxOut0..AuxOut2 DsConnector
AdcStopTrig | AuxOut0..AuxOut2 DsConnector
Ctr1Clk | AuxOut0..AuxOut2
Ctr2Clk | AuxOut0..AuxOut2
DacStartTrig | AuxOut0..AuxOut2 DsConnector
DacUpdate | AuxOut0..AuxOut2 DsConnector
DGND | AuxOut0..AuxOut2 | Not assigned here.
SyncClk | DsConnector | Not assigned here.

* Inverted is only valid for Auxiliary Output (AuxOut) connections.

Valid disabled settings (direction = MccDaq.SignalDirection.Disabled)
signalType | connectionPin | polarity
AdcTbSrc | Not assigned here. | Not assigned here.
DacTbSrc
SyncClk

## Notes

- You can view and edit the above timing and control configuration information from InstaCal. Open InstaCal, click on the board, and press the Configure… button or menu item. If the board supports DAQ Sync and Auxiliary Input/Output signal connections, a Advanced Timing & Control Configuration button appears. Press that button to open a display for viewing and modifying the above timing and control signals.
- Except for the AdcTbSrc, DacTbsSrc and SyncClk signals, selecting an input signal connection does not necessarily activate it. Alternately, assigning an output signal to a connection does activate the signal upon performing the respective operation. For instance, when running an ExtClock AInScan(), AdcConvert SignalIn selects the connection to use as an external clock to pace the A/D conversions; if AInScan() is run without setting the ExtClock option, however, the selected connection is not activated and the signal at that connection is ignored. In both cases, the AdcConvert signal is output the connection(s) selected for the AdcConvert SignalOut. Since there are no scan options for enabling the Timebase Source and the SyncClk, selecting an input for the A/D or D/A Timebase Source, or SyncClk does activate the input source for the next respective operations.
- Multiple input signals can be mapped to the same AuxIn connection by successive calls to SelectSignal(); however, only one connection can be mapped to each input signal. If another connection had already been assigned to an input signal, the former selection is de-assigned and the new connection is assigned.
- Only one output signal can be mapped to the same AuxOutn connection; however, multiple connections can be mapped to the same output signal by successive calls to SelectSignal(). If an output signal had already been assigned to a connection, then the former output signal is de-assigned and the new output signal is assigned to the connection.
- When selecting DsConnector for a signal, only one direction per signal type can be defined at a given time. Attempting to assign both directions of a signal to the DSConnector results in only the latest selection being applied.
- If the signal type had formerly been assigned an input direction from the DSConnector, assigning the output direction for that signal type results in the input signal being reassigned to its default connection.

Default input signal connections | Input signal | Default connection
AdcConvert | AuxIn0
AdcGate | AuxIn5
AdcStartTrig | AuxIn1
AdcStopTrig | AuxIn2
DacUpdate | AuxIn3
DacStartTrig | AuxIn3

- AdcTbSrc and DacTbSrc are intended to synchronize the timebase of the analog input and output pacers across two or more boards. Internal calculations of sampling and update rates assume that the external timebase has the same frequency as its internal clock. Adjust sample rates to compensate for differences in clock frequencies.
- For instance, if the external timebase has a frequency of 10 MHz on a board that has a internal clock frequency of 40 MHz, the scan function samples or updates at a rate of about 1/4 the rate entered. However, while compensating for differences in external timebase and internal clock frequency, if the rate entered results in an invalid pacer count, the method returns a BADRATE error.