NIDAQ Device

Available on macOS

Description

Interface to a National Instruments data acquisition (DAQ) device

Signature

iodevice/nidaq

Required Parameters

name

Example

Dev1

Device name.

Run /Applications/National Instruments/NI-DAQmx Base/lsdaq.app to detect available devices and determine their assigned names.

update_interval

Example

3ms

MWorks will poll the device for new input data every update_interval microseconds

analog_input_data_interval

Example

1ms

Interval between acquired samples on analog input channels (microseconds)

analog_output_data_interval

Example

1ms

Interval between generated samples on analog output channels (microseconds)

Optional Parameters

analog_read_timeout

Example

3ms

Maximum time to wait for a single update’s worth of analog input samples (microseconds). If the samples are not received in the allotted time, issue an error message.

If omitted, defaults to update_interval.

analog_output_enabled

Default

YES

Controls whether the device performs output on configured analog output voltage and voltage waveform channels.

If this parameter is set to a variable name, then setting the variable to NO while the experiment is running will stop analog output, and subsequently setting the variable to YES will restart analog output. Hence, it provides a means to start and stop analog output independently of other input and output tasks.

assume_multiplexed_adc

Default

YES

If YES, MWorks assumes that all analog input channels share a single analog-to-digital converter (ADC) and adjusts sample timestamps accordingly. If NO, MWorks assumes that each analog input channel has its own ADC and that samples for all channels are acquired simultaneously.

autostart

Default

NO

If YES, the device will start I/O automatically (as if by an implicit Start IO Device action) when the experiment starts running.

Note: Device I/O will always stop automatically when the experiment stops running, irrespective of this setting.

alt

Alternative device to use if this one fails to initialize (e.g. because the required hardware is not available). If #allowAltFailover is set to 0 or false, this parameter is ignored.

Placement

Allowed at top level:

Yes

Allowed parent:

Folder

Allowed children:

NIDAQ Analog Input Voltage Channel, NIDAQ Analog Output Voltage Channel, NIDAQ Analog Output Voltage Waveform Channel, NIDAQ Counter Input Count Edges Channel, NIDAQ Digital Input Channel, NIDAQ Digital Output Channel