labdrivers.ni¶
-
class
labdrivers.ni.nidaq.
Nidaq
(device='Dev1')[source]¶ Class to interface with a National Instruments DAQ
Built on top of PyDAQmx.
Reference: NI-DAQmx C Reference Help
-
output_current
(channel, output=0)[source]¶ Outputs a current from the NI DAQ.
Parameters: - channel – The name of the channel for output.
- output – The value of the output in Amps
Returns: None
-
output_voltage
(channel, output=0)[source]¶ Outputs a voltage from the NI DAQ.
Parameters: - channel – The name of the channel for output.
- output – The value of the output in Volts
Returns: None
-
read_current
(channel, minVal=-10.0, maxVal=10.0)[source]¶ Read the current input level of channel
Using narrow bounds (with minVal and maxVal) will improve accuracy since the same digital resolution will be applied to a smaller analog range.
Parameters: - channel (str) – the name of the channel to use
- minVal (float) – the minimum value you expect to measure
- maxVal (float) – the maximum value you expect to measure
-
read_voltage
(channel, minVal=-10.0, maxVal=10.0)[source]¶ Read the voltage input level of channel
Using narrow bounds (with minVal and maxVal) will improve accuracy since the same digital resolution will be applied to a smaller analog range.
Parameters: - channel (str) – the name of the channel to use
- minVal (float) – the minimum value you expect to measure
- maxVal (float) – the maximum value you expect to measure
-