msl.equipment.connection_nidaq module
Uses NI-DAQ as the backend to communicate with the equipment.
- class msl.equipment.connection_nidaq.ConnectionNIDAQ(record)[source]
Bases:
ConnectionUses NI-DAQ to establish a connection to the equipment.
See the nidaqmx examples for how to use NI-DAQ.
The returned object from the
connect()method is equivalent to importing the NI-DAQ package.For example:
nidaqmx = record.connect() with nidaqmx.Task() as task: task.ai_channels.add_ai_voltage_chan('Dev1/ai0') voltage = task.read()
is equivalent to:
import nidaqmx with nidaqmx.Task() as task: task.ai_channels.add_ai_voltage_chan('Dev1/ai0') voltage = task.read()
The
backendvalue must be equal toNIDAQto use this class for the communication system. This is achieved by setting the value in the Backend field for a connection record in the Connections Database to beNIDAQ.Do not instantiate this class directly. Use the
connect()method to connect to the equipment.- Parameters:
record (
EquipmentRecord) – A record from an Equipment-Register Database.
- property constants
Returns the
nidaqmx.constantsmodule.
- property DaqResourceWarning
Returns the
DaqResourceWarningclass.
- property DaqWarning
Returns the
DaqWarningclass.
- property errors
Returns the
nidaqmx.errorsmodule.
- property stream_readers
Returns the
nidaqmx.stream_readersmodule.
- property stream_writers
Returns the
nidaqmx.stream_writersmodule.
- property system
Returns the
nidaqmx.systemmodule.
- property types
Returns the
nidaqmx.typesmodule.
- property utils
Returns the
nidaqmx.utilsmodule.