File MIES_MiesUtilities_Channels.ipf

This file holds MIES utility functions for Channels.

Functions

wave GetADCListFromConfig(wave config)

Return a list of the AD channels from the DAQ config.

wave GetDACListFromConfig(wave config)

Return a list of the DA channels from the DAQ config.

wave GetTTLListFromConfig(wave config)

Return a list of the TTL channels from the DAQ config.

static wave GetChanneListFromDAQConfigWave(wave config, variable channelType)

Return a wave with all active channels.

Todo:

change to return a 0/1 wave with constant size a la DAG_GetChannelState

Parameters:
variable GetNrOfTypedChannels(wave chanTypes, variable type)

Returns the number of given mode channels from channelType wave.

Parameters:
Returns:

number of types present in chanTypes

wave GetTTLTypesFromConfig(wave config)

Return a types of the AD channels from the ITC config.

wave GetADCTypesFromConfig(wave config)

Return a types of the AD channels from the ITC config.

wave GetDACTypesFromConfig(wave config)

Return a types of the DA channels from the ITC config.

static wave GetTypeListFromITCConfig(wave config, variable channelType)

Return a wave with all active channels.

Todo:

change to return a 0/1 wave with constant size a la DAG_GetChannelState

Parameters:
variable GotTPChannelsOnADCs(string device)

Checks if a channel of TP type exists on ADCs.

Parameters:

device – device

Returns:

1 if TP type present, 0 otherwise

variable GetTTLBits(wave numericalValues, variable sweep, variable channel)

Get the TTL bit mask from the labnotebook.

Parameters:
  • numericalValues – Numerical labnotebook values

  • sweep – Sweep number

  • channel – TTL hardware channel

variable GetUsedHWDACFromLNB(wave numericalValues, variable sweep)

Returns the used hardware DAC type from the LNB.

See also

HardwareDACTypeConstants

Parameters:
  • numericalValues – Numerical labnotebook values

  • sweep – Sweep number

Returns:

used hardware dac type

static wave GetActiveChannelsTTL(wave numericalValues, wave textualValues, variable sweep, variable TTLmode)

Return a wave with the requested TTL channel information defined by TTLmode.

Parameters:
  • numericalValues – Numerical labnotebook values

  • textualValues – Text labnotebook values

  • sweep – Sweep number

  • TTLmode – One of ActiveChannelsTTLMode.

wave GetActiveChannels(wave numericalValues, wave textualValues, variable sweepNo, variable channelType, variable TTLmode = defaultValue)

Return a fixed size wave with the the active channels for the given channel type.

The function takes into account unassociated DA/AD channels as well. It returns fixed size waves with the active entries having the same value as their index. This allows users to either remove unused entries and use the wave as active entries list or use the whole wave where not being NaN is active.

With the following DAEphys setup (only the first four channels are shown)

Nr

DA

AD

TTL

0

1

2

3

this function returns the following:

  • DA: {NaN,  1, NaN, NaN, ...}

  • AD: {0, NaN, NaN, NaN, ...}

  • TTL:

    • NI hardware (regardless of TTLmode): {NaN, NaN, 2, 3, ...}

    • ITC hardware with TTLmode, example for two active racks:

      • TTL_DAEPHYS_CHANNEL: {NaN, NaN, 2, 3, NaN, 5, NaN, NaN}

      • TTL_HARDWARE_CHANNEL: {0, NaN, NaN, 3, NaN, NaN, Nan, NaN}

      • TTL_GUITOHW_CHANNEL: returns a 2D wave that allows to index by GUI channel (row) and retrieve hardware channel number and ttlbit number. The columns are %HWCHANNEL and %TTLBITNR. The %TTLBITNR column is only valid for ITC hardware.

      • TTL_HWTOGUI_CHANNEL: returns a 2D wave that allows to index by hardware channel number and TTL bit number and retrieve the GUI channel number. The hardware channel is indexed in the row and the TTL bit number in the column dimension. For NI hardware the TTL bit index should be zero. Inactive hardware channel/ttlbit combinations return NaN.

Parameters: