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:
Connection
Uses 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
backend
value must be equal toNIDAQ
to 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.constants
module.
- property DaqResourceWarning
Returns the
DaqResourceWarning
class.
- property DaqWarning
Returns the
DaqWarning
class.
- property errors
Returns the
nidaqmx.errors
module.
- property stream_readers
Returns the
nidaqmx.stream_readers
module.
- property stream_writers
Returns the
nidaqmx.stream_writers
module.
- property system
Returns the
nidaqmx.system
module.
- property types
Returns the
nidaqmx.types
module.
- property utils
Returns the
nidaqmx.utils
module.