hardware - National Instruments
NIDAQmx object
- class pymodaq_plugins_daqmx.hardware.national_instruments.daqmxni.NIDAQmx[source]
Bases:
objectWrapper around the NIDAQmx package giving an easy-to-use object to instantiate channels and tasks
- configuration_sequence(viewer, current_device)[source]
Configure each / modules / channels as giver by the user in the configuration file
Read the .toml file to get the desired hardware configuration, and send the nidaqmx a sequence which set up each channel.
- classmethod get_NIDAQ_channels(devices=None, source_type=None)[source]
Get the list of available channels for all NiDAq connected devices
Parameters
- devices: list
list of strings, each one being a connected device
- source_type: str
Channels possible types
Returns
List of str containing device and channel names
NIDAQmx Base module
- class pymodaq_plugins_daqmx.hardware.national_instruments.NIDAQmx_base.DAQ_NIDAQmx_base[source]
Bases:
objectBase NIDAQmx class for using DAQmx objects from daqmxni.py in the DAQ_NIDAQmx_Move & DAQ_NIDAQmx_Viewer
- commit_settings(param: Parameter)[source]
Activate the parameters changes in the hardware.
Parameters
Type
Description
param
instance of pyqtgraph.parameter
the parameter to activate
See Also
update_NIDAQ_channels, update_task, DAQ_NIDAQ_source, refresh_hardware
- class pymodaq_plugins_daqmx.hardware.national_instruments.NIDAQmx_base.ScalableGroupAI(**opts)[source]
Bases:
GroupParameterGeneric parameter items holding Analog Input parameters
- __init__(**opts)[source]
Initialize a Parameter object. Although it is rare to directly create a Parameter instance, the options available to this method are also allowed by most Parameter subclasses.
Keyword Arguments:
name
The name to give this Parameter. This is the name that will appear in the left-most column of a ParameterTree for this Parameter.
value
The value to initially assign to this Parameter.
default
The default value for this Parameter (most Parameters provide an option to ‘reset to default’).
children
A list of children for this Parameter. Children may be given either as a Parameter instance or as a dictionary to pass to Parameter.create(). In this way, it is possible to specify complex hierarchies of Parameters from a single nested data structure.
readonly
If True, the user will not be allowed to edit this Parameter. (default=False)
enabled
If False, any widget(s) for this parameter will appear disabled. (default=True)
visible
If False, the Parameter will not appear when displayed in a ParameterTree. (default=True)
renamable
If True, the user may rename this Parameter. (default=False)
removable
If True, the user may remove this Parameter. (default=False)
expanded
If True, the Parameter will initially be expanded in ParameterTrees: Its children will be visible. (default=True)
syncExpanded
If True, the expanded state of this Parameter is synchronized with all ParameterTrees it is displayed in. (default=False)
title
(str or None) If specified, then the parameter will be displayed to the user using this string as its name. However, the parameter will still be referred to internally using the name specified above. Note that this option is not compatible with renamable=True. (default=None; added in version 0.9.9)
- class pymodaq_plugins_daqmx.hardware.national_instruments.NIDAQmx_base.ScalableGroupAO(**opts)[source]
Bases:
GroupParameterGeneric parameter items holding Analog Output parameters
- __init__(**opts)[source]
Initialize a Parameter object. Although it is rare to directly create a Parameter instance, the options available to this method are also allowed by most Parameter subclasses.
Keyword Arguments:
name
The name to give this Parameter. This is the name that will appear in the left-most column of a ParameterTree for this Parameter.
value
The value to initially assign to this Parameter.
default
The default value for this Parameter (most Parameters provide an option to ‘reset to default’).
children
A list of children for this Parameter. Children may be given either as a Parameter instance or as a dictionary to pass to Parameter.create(). In this way, it is possible to specify complex hierarchies of Parameters from a single nested data structure.
readonly
If True, the user will not be allowed to edit this Parameter. (default=False)
enabled
If False, any widget(s) for this parameter will appear disabled. (default=True)
visible
If False, the Parameter will not appear when displayed in a ParameterTree. (default=True)
renamable
If True, the user may rename this Parameter. (default=False)
removable
If True, the user may remove this Parameter. (default=False)
expanded
If True, the Parameter will initially be expanded in ParameterTrees: Its children will be visible. (default=True)
syncExpanded
If True, the expanded state of this Parameter is synchronized with all ParameterTrees it is displayed in. (default=False)
title
(str or None) If specified, then the parameter will be displayed to the user using this string as its name. However, the parameter will still be referred to internally using the name specified above. Note that this option is not compatible with renamable=True. (default=None; added in version 0.9.9)
- class pymodaq_plugins_daqmx.hardware.national_instruments.NIDAQmx_base.ScalableGroupCounter(**opts)[source]
Bases:
GroupParameterGeneric parameter items holding Counter parameters
- __init__(**opts)[source]
Initialize a Parameter object. Although it is rare to directly create a Parameter instance, the options available to this method are also allowed by most Parameter subclasses.
Keyword Arguments:
name
The name to give this Parameter. This is the name that will appear in the left-most column of a ParameterTree for this Parameter.
value
The value to initially assign to this Parameter.
default
The default value for this Parameter (most Parameters provide an option to ‘reset to default’).
children
A list of children for this Parameter. Children may be given either as a Parameter instance or as a dictionary to pass to Parameter.create(). In this way, it is possible to specify complex hierarchies of Parameters from a single nested data structure.
readonly
If True, the user will not be allowed to edit this Parameter. (default=False)
enabled
If False, any widget(s) for this parameter will appear disabled. (default=True)
visible
If False, the Parameter will not appear when displayed in a ParameterTree. (default=True)
renamable
If True, the user may rename this Parameter. (default=False)
removable
If True, the user may remove this Parameter. (default=False)
expanded
If True, the Parameter will initially be expanded in ParameterTrees: Its children will be visible. (default=True)
syncExpanded
If True, the expanded state of this Parameter is synchronized with all ParameterTrees it is displayed in. (default=False)
title
(str or None) If specified, then the parameter will be displayed to the user using this string as its name. However, the parameter will still be referred to internally using the name specified above. Note that this option is not compatible with renamable=True. (default=None; added in version 0.9.9)
- class pymodaq_plugins_daqmx.hardware.national_instruments.NIDAQmx_base.ScalableGroupDI(**opts)[source]
Bases:
GroupParameterGeneric parameter items holding Digital Input parameters
- __init__(**opts)[source]
Initialize a Parameter object. Although it is rare to directly create a Parameter instance, the options available to this method are also allowed by most Parameter subclasses.
Keyword Arguments:
name
The name to give this Parameter. This is the name that will appear in the left-most column of a ParameterTree for this Parameter.
value
The value to initially assign to this Parameter.
default
The default value for this Parameter (most Parameters provide an option to ‘reset to default’).
children
A list of children for this Parameter. Children may be given either as a Parameter instance or as a dictionary to pass to Parameter.create(). In this way, it is possible to specify complex hierarchies of Parameters from a single nested data structure.
readonly
If True, the user will not be allowed to edit this Parameter. (default=False)
enabled
If False, any widget(s) for this parameter will appear disabled. (default=True)
visible
If False, the Parameter will not appear when displayed in a ParameterTree. (default=True)
renamable
If True, the user may rename this Parameter. (default=False)
removable
If True, the user may remove this Parameter. (default=False)
expanded
If True, the Parameter will initially be expanded in ParameterTrees: Its children will be visible. (default=True)
syncExpanded
If True, the expanded state of this Parameter is synchronized with all ParameterTrees it is displayed in. (default=False)
title
(str or None) If specified, then the parameter will be displayed to the user using this string as its name. However, the parameter will still be referred to internally using the name specified above. Note that this option is not compatible with renamable=True. (default=None; added in version 0.9.9)
- class pymodaq_plugins_daqmx.hardware.national_instruments.NIDAQmx_base.ScalableGroupDO(**opts)[source]
Bases:
GroupParameterGeneric parameter items holding Digital Output parameters
- __init__(**opts)[source]
Initialize a Parameter object. Although it is rare to directly create a Parameter instance, the options available to this method are also allowed by most Parameter subclasses.
Keyword Arguments:
name
The name to give this Parameter. This is the name that will appear in the left-most column of a ParameterTree for this Parameter.
value
The value to initially assign to this Parameter.
default
The default value for this Parameter (most Parameters provide an option to ‘reset to default’).
children
A list of children for this Parameter. Children may be given either as a Parameter instance or as a dictionary to pass to Parameter.create(). In this way, it is possible to specify complex hierarchies of Parameters from a single nested data structure.
readonly
If True, the user will not be allowed to edit this Parameter. (default=False)
enabled
If False, any widget(s) for this parameter will appear disabled. (default=True)
visible
If False, the Parameter will not appear when displayed in a ParameterTree. (default=True)
renamable
If True, the user may rename this Parameter. (default=False)
removable
If True, the user may remove this Parameter. (default=False)
expanded
If True, the Parameter will initially be expanded in ParameterTrees: Its children will be visible. (default=True)
syncExpanded
If True, the expanded state of this Parameter is synchronized with all ParameterTrees it is displayed in. (default=False)
title
(str or None) If specified, then the parameter will be displayed to the user using this string as its name. However, the parameter will still be referred to internally using the name specified above. Note that this option is not compatible with renamable=True. (default=None; added in version 0.9.9)
NIDAQmx Actuator module
- class pymodaq_plugins_daqmx.hardware.national_instruments.NIDAQmx_Move.DAQ_NIDAQmx_Actuator(parent=None, params_state=None, control_type='Actuator')[source]
Bases:
DAQ_Move_base,DAQ_NIDAQmx_baseWrapper object to access the Mock fonctionnalities, similar wrapper for all controllers.
Attributes
Type
params
dictionnary
- commit_settings(param)[source]
- Activate any parameter changes on the PI_GCS2 hardware.Called after a param_tree_changed signal from DAQ_Move_main.
- get_actuator_value() DataActuator[source]
Get the current position from the hardware with scaling conversion.
Returns
float: The position obtained after scaling conversion.
- ini_stage(controller=None)[source]
Actuator communication initialization
Parameters
controller: (object) custom object of a PyMoDAQ plugin (Slave case). None if only one actuator by controller (Master case)
Returns
- self.status (edict): with initialization status: three fields:
info (str)
controller (object) initialized controller
initialized: (bool): False if initialization failed otherwise True
- move_Abs(position)[source]
Move the actuator to the absolute target defined by position
Parameters
position: (flaot) value of the absolute target positioning
NIDAQmx Viewer module
- class pymodaq_plugins_daqmx.hardware.national_instruments.NIDAQmx_Viewer.DAQ_NIDAQmx_Viewer(parent=None, params_state=None, control_type='0D')[source]
Bases:
DAQ_Viewer_base,DAQ_NIDAQmx_baseAttributes
Type
data_grabed_signal
instance of Signal
params
dictionary list
task
See Also
refresh_hardware
- commit_settings(param)[source]
Activate the parameters changes in the hardware.
Parameters
Type
Description
param
instance of pyqtgraph.parameter
the parameter to activate
See Also
update_NIDAQ_channels, update_task, refresh_hardware
- get_max_frequency()[source]
Get the maximum frequency according to the material’s limits and display the information. This method is destined to be removed once set_max_frequency will work correctly.
- ini_detector(controller=None)[source]
Initialisation procedure of the detector.
See Also
daq_utils.ThreadCommand