NI Modular Instruments Python Documentation¶
Intro¶
nimi-python is a collection of Python modules that provide an interface to the underlying NI driver. Currently, the following drivers are supported:
- NI-DCPower (Python module: nidcpower)
- NI-DMM (Python module: nidmm)
- NI-FGEN (Python module: nifgen)
- NI-SCOPE (Python module: niscope)
- NI-SWITCH (Python module: niswitch)
- NI-ModInst (Python module: nimodinst)
nimi-python supports all the Operating Systems supported by the underlying driver.
nimi-python supports Python 2.7, 3.4 and later using CPython or PyPy.
Installation¶
Driver specific installation instructions can be found on Read The Docs:
Contributing¶
We welcome contributions! You can clone the project repository, build it, and install it by following these instructions.
Support / Feedback¶
The packages included in nimi-python package are supported by NI. For support, open a request through the NI support portal at ni.com.
Bugs / Feature Requests¶
To report a bug or submit a feature request, please use the GitHub issues page.
Information to Include When Asking for Help¶
Please include all of the following information when opening an issue:
Detailed steps on how to reproduce the problem and full traceback, if applicable. Code samples are encouraged!
The python version used:
$ python -c "import sys; print(sys.version)"
The module (i.e. nidmm) and its version:
$ python -m pip list
The version of the driver used (i.e. NI-DMM 17.1). Follow this KB article to determine the version you have installed.
The operating system, version, and bitness. For example 64-bit Windows 7.
Documentation¶
Documentation is available here.
Additional Documentation¶
Refer to your driver documentation for device-specific information and detailed API documentation.
License¶
nimi-python is licensed under an MIT-style license (see LICENSE). Other incorporated projects may be licensed under different licenses. All licenses allow for non-commercial and commercial use.
nidcpower module¶
Installation¶
As a prerequisite to using the nidcpower module, you must install the NI-DCPower runtime on your system. Visit ni.com/downloads to download the driver runtime for your devices.
The nimi-python modules (i.e. for NI-DCPower) can be installed with pip:
$ python -m pip install nidcpower~=0.8.0
Or easy_install from setuptools:
$ python -m easy_install nidcpower
Usage¶
The following is a basic example of using the nidcpower module to open a session to a Source Meter Unit and measure voltage and current.
import nidcpower
# Configure the session.
with nidcpower.Session('dev1') as session:
session.measure_record_length = 20
session.measure_record_length_is_finite = True
session.measure_when = nidcpower.MeasureWhen.AUTOMATICALLY_AFTER_SOURCE_COMPLETE
session.voltage_level = 5.0
session.commit()
print('Effective measurement rate: {0} S/s'.format(session.measure_record_delta_time / 1))
samples_acquired = 0
print(' # Voltage Current In Compliance')
row_format = '{0:3d}: {1:8.6f} {2:8.6f} {3}'
with session.initiate():
while samples_acquired < 20:
measurements = session.fetch_multiple(count=session.fetch_backlog)
samples_acquired += len(measurements)
for i in range(len(measurements)):
print(row_format.format(i, measurements[i].voltage, measurements[i].current, measurements[i].in_compliance))
Additional examples for NI-DCPower are located in src/nidcpower/examples/ directory.
API Reference¶
nidcpower.Session¶
-
class
nidcpower.
Session
(self, resource_name, channels=None, reset=False, options={})¶ Creates and returns a new NI-DCPower session to the power supply or SMU specified in resource name to be used in all subsequent NI-DCPower method calls. With this method, you can optionally set the initial state of the following session properties:
After calling this method, the session will be in the Uncommitted state. Refer to the Programming States topic for details about specific software states.
To place the device in a known start-up state when creating a new session, set reset to True. This action is equivalent to using the
nidcpower.Session.reset()
method immediately after initializing the session.To open a session and leave the device in its existing configuration without passing through a transitional output state, set reset to False. Then configure the device as in the previous session, changing only the desired settings, and then call the
nidcpower.Session.initiate()
method.Related Topics:
Parameters: - resource_name (str) – Specifies the resourceName assigned by Measurement & Automation Explorer (MAX), for example “PXI1Slot3” where “PXI1Slot3” is an instrument’s resourceName. resourceName can also be a logical IVI name.
- channels (str) – Specifies which output channel(s) to include in a new session. Specify multiple channels by using a channel list or a channel range. A channel list is a comma (,) separated sequence of channel names (for example, 0,2 specifies channels 0 and 2). A channel range is a lower bound channel followed by a hyphen (-) or colon (:) followed by an upper bound channel (for example, 0-2 specifies channels 0, 1, and 2). In the Running state, multiple output channel configurations are performed sequentially based on the order specified in this parameter. If you do not specify any channels, by default all channels on the device are included in the session.
- reset (bool) – Specifies whether to reset the device during the initialization procedure.
- options (str) –
Specifies the initial value of certain properties for the session. The syntax for options is a dictionary of properties with an assigned value. For example:
{ ‘simulate’: False }
You do not have to specify a value for all the properties. If you do not specify a value for a property, the default value is used.
Advanced Example: { ‘simulate’: True, ‘driver_setup’: { ‘Model’: ‘<model number>’, ‘BoardType’: ‘<type>’ } }
Property Default range_check True query_instrument_status False cache True simulate False record_value_coersions False driver_setup {}
Properties
Public methods
Properties¶
aperture_time¶
nidcpower.Session.
aperture_time
¶Specifies the measurement aperture time for the channel configuration. Aperture time is specified in the units set by the
nidcpower.Session.aperture_time_units
property. for information about supported devices. Refer to the Aperture Time topic in the NI DC Power Supplies and SMUs Help for more information about how to configure your measurements and for information about valid values. Default Value: 0.01666666 secondsNote
This property is not supported by all devices. Refer to Supported Properties by Device topic
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the aperture_time.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an aperture_time.Session instance, and calling set/get value on the result.:
session['0,1'].aperture_time = var var = session['0,1'].aperture_timeThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Measurement:Aperture Time
- C Attribute: NIDCPOWER_ATTR_APERTURE_TIME
aperture_time_units¶
nidcpower.Session.
aperture_time_units
¶Specifies the units of the
nidcpower.Session.aperture_time
property for the channel configuration. for information about supported devices. Refer to the Aperture Time topic in the NI DC Power Supplies and SMUs Help for more information about how to configure your measurements and for information about valid values. Default Value:SECONDS
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the aperture_time_units.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an aperture_time_units.Session instance, and calling set/get value on the result.:
session['0,1'].aperture_time_units = var var = session['0,1'].aperture_time_unitsThe following table lists the characteristics of this property.
Characteristic Value Datatype enums.ApertureTimeUnits Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Measurement:Aperture Time Units
- C Attribute: NIDCPOWER_ATTR_APERTURE_TIME_UNITS
auto_zero¶
nidcpower.Session.
auto_zero
¶Specifies the auto-zero method to use on the device. Refer to the NI PXI-4132 Measurement Configuration and Timing and Auto Zero topics for more information about how to configure your measurements. Default Value: The default value for the NI PXI-4132 is
ON
. The default value for all other devices isOFF
, which is the only supported value for these devices.Tip
This property can use repeated capabilities (usually channels). If set or get directly on the auto_zero.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an auto_zero.Session instance, and calling set/get value on the result.:
session['0,1'].auto_zero = var var = session['0,1'].auto_zeroThe following table lists the characteristics of this property.
Characteristic Value Datatype enums.AutoZero Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Measurement:Auto Zero
- C Attribute: NIDCPOWER_ATTR_AUTO_ZERO
auxiliary_power_source_available¶
nidcpower.Session.
auxiliary_power_source_available
¶Indicates whether an auxiliary power source is connected to the device. A value of False may indicate that the auxiliary input fuse has blown. Refer to the Detecting Internal/Auxiliary Power topic in the NI DC Power Supplies and SMUs Help for more information about internal and auxiliary power. power source to generate power. Use the
nidcpower.Session.power_source_in_use
property to retrieve this information.Note
This property does not necessarily indicate if the device is using the auxiliary
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Advanced:Auxiliary Power Source Available
- C Attribute: NIDCPOWER_ATTR_AUXILIARY_POWER_SOURCE_AVAILABLE
channel_count¶
nidcpower.Session.
channel_count
¶Indicates the number of channels that NI-DCPower supports for the instrument that was chosen when the current session was opened. For channel-based properties, the IVI engine maintains a separate cache value for each channel.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Driver Capabilities:Channel Count
- C Attribute: NIDCPOWER_ATTR_CHANNEL_COUNT
compliance_limit_symmetry¶
nidcpower.Session.
compliance_limit_symmetry
¶Specifies whether compliance limits for current generation and voltage generation for the device are applied symmetrically about 0 V and 0 A or asymmetrically with respect to 0 V and 0 A. When set to Symmetric, voltage limits and current limits are set using a single property with a positive value. The resulting range is bounded by this positive value and its opposite. When set to Asymmetric, you must separately set a limit high and a limit low using distinct properties. For asymmetric limits, the range bounded by the limit high and limit low must include zero. Default Value: Symmetric Related Topics: Compliance Ranges Changing Ranges Overranging
Note
Refer to Supported Properties by Device for information about supported devices.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the compliance_limit_symmetry.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an compliance_limit_symmetry.Session instance, and calling set/get value on the result.:
session['0,1'].compliance_limit_symmetry = var var = session['0,1'].compliance_limit_symmetryThe following table lists the characteristics of this property.
Characteristic Value Datatype enums.ComplianceLimitSymmetry Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Advanced:Compliance Limit Symmetry
- C Attribute: NIDCPOWER_ATTR_COMPLIANCE_LIMIT_SYMMETRY
current_compensation_frequency¶
nidcpower.Session.
current_compensation_frequency
¶The frequency at which a pole-zero pair is added to the system when the channel is in Constant Current mode. for information about supported devices. Default Value: Determined by the value of the
NORMAL
setting of thenidcpower.Session.transient_response
property.Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the current_compensation_frequency.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an current_compensation_frequency.Session instance, and calling set/get value on the result.:
session['0,1'].current_compensation_frequency = var var = session['0,1'].current_compensation_frequencyThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Custom Transient Response:Current:Compensation Frequency
- C Attribute: NIDCPOWER_ATTR_CURRENT_COMPENSATION_FREQUENCY
current_gain_bandwidth¶
nidcpower.Session.
current_gain_bandwidth
¶The frequency at which the unloaded loop gain extrapolates to 0 dB in the absence of additional poles and zeroes. This property takes effect when the channel is in Constant Current mode. for information about supported devices. Default Value: Determined by the value of the
NORMAL
setting of thenidcpower.Session.transient_response
property.Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the current_gain_bandwidth.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an current_gain_bandwidth.Session instance, and calling set/get value on the result.:
session['0,1'].current_gain_bandwidth = var var = session['0,1'].current_gain_bandwidthThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Custom Transient Response:Current:Gain Bandwidth
- C Attribute: NIDCPOWER_ATTR_CURRENT_GAIN_BANDWIDTH
current_level¶
nidcpower.Session.
current_level
¶Specifies the current level, in amps, that the device attempts to generate on the specified channel(s). This property is applicable only if the
nidcpower.Session.output_function
property is set toDC_CURRENT
.nidcpower.Session.output_enabled
property for more information about enabling the output channel. Valid Values: The valid values for this property are defined by the values to which thenidcpower.Session.current_level_range
property is set.Note
The channel must be enabled for the specified current level to take effect. Refer to the
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the current_level.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an current_level.Session instance, and calling set/get value on the result.:
session['0,1'].current_level = var var = session['0,1'].current_levelThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:DC Current:Current Level
- C Attribute: NIDCPOWER_ATTR_CURRENT_LEVEL
current_level_autorange¶
nidcpower.Session.
current_level_autorange
¶Specifies whether NI-DCPower automatically selects the current level range based on the desired current level for the specified channels. If you set this property to
ON
, NI-DCPower ignores any changes you make to thenidcpower.Session.current_level_range
property. If you change thenidcpower.Session.current_level_autorange
property fromON
toOFF
, NI-DCPower retains the last value thenidcpower.Session.current_level_range
property was set to (or the default value if the property was never set) and uses that value as the current level range. Query thenidcpower.Session.current_level_range
property by using thenidcpower.Session._get_attribute_vi_int32()
method for information about which range NI-DCPower automatically selects. Thenidcpower.Session.current_level_autorange
property is applicable only if thenidcpower.Session.output_function
property is set toDC_CURRENT
. Default Value:OFF
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the current_level_autorange.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an current_level_autorange.Session instance, and calling set/get value on the result.:
session['0,1'].current_level_autorange = var var = session['0,1'].current_level_autorangeThe following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:DC Current:Current Level Autorange
- C Attribute: NIDCPOWER_ATTR_CURRENT_LEVEL_AUTORANGE
current_level_range¶
nidcpower.Session.
current_level_range
¶Specifies the current level range, in amps, for the specified channel(s). The range defines the valid value to which the current level can be set. Use the
nidcpower.Session.current_level_autorange
property to enable automatic selection of the current level range. Thenidcpower.Session.current_level_range
property is applicable only if thenidcpower.Session.output_function
property is set toDC_CURRENT
.nidcpower.Session.output_enabled
property for more information about enabling the output channel. For valid ranges, refer to the Ranges topic for your device in the NI DC Power Supplies and SMUs Help.Note
The channel must be enabled for the specified current level range to take effect. Refer to the
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the current_level_range.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an current_level_range.Session instance, and calling set/get value on the result.:
session['0,1'].current_level_range = var var = session['0,1'].current_level_rangeThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:DC Current:Current Level Range
- C Attribute: NIDCPOWER_ATTR_CURRENT_LEVEL_RANGE
current_limit¶
nidcpower.Session.
current_limit
¶Specifies the current limit, in amps, that the output cannot exceed when generating the desired voltage level on the specified channel(s). This property is applicable only if the
nidcpower.Session.output_function
property is set toDC_VOLTAGE
and thenidcpower.Session.compliance_limit_symmetry
property is set toNIDCPOWER_VAL_SYMMETRIC
.nidcpower.Session.output_enabled
property for more information about enabling the output channel. Valid Values: The valid values for this property are defined by the values to whichnidcpower.Session.current_limit_range
property is set.Note
The channel must be enabled for the specified current limit to take effect. Refer to the
Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the current_limit.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an current_limit.Session instance, and calling set/get value on the result.:
session['0,1'].current_limit = var var = session['0,1'].current_limitThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:DC Voltage:Current Limit
- C Attribute: NIDCPOWER_ATTR_CURRENT_LIMIT
current_limit_autorange¶
nidcpower.Session.
current_limit_autorange
¶Specifies whether NI-DCPower automatically selects the current limit range based on the desired current limit for the specified channel(s). If you set this property to
ON
, NI-DCPower ignores any changes you make to thenidcpower.Session.current_limit_range
property. If you change this property fromON
toOFF
, NI-DCPower retains the last value thenidcpower.Session.current_limit_range
property was set to (or the default value if the property was never set) and uses that value as the current limit range. Query thenidcpower.Session.current_limit_range
property by using thenidcpower.Session._get_attribute_vi_int32()
method for information about which range NI-DCPower automatically selects. Thenidcpower.Session.current_limit_autorange
property is applicable only if thenidcpower.Session.output_function
property is set toDC_VOLTAGE
. Default Value:OFF
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the current_limit_autorange.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an current_limit_autorange.Session instance, and calling set/get value on the result.:
session['0,1'].current_limit_autorange = var var = session['0,1'].current_limit_autorangeThe following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:DC Voltage:Current Limit Autorange
- C Attribute: NIDCPOWER_ATTR_CURRENT_LIMIT_AUTORANGE
current_limit_high¶
nidcpower.Session.
current_limit_high
¶Specifies the maximum current, in amps, that the output can produce when generating the desired voltage on the specified channel(s). This property is applicable only if the Compliance Limit Symmetry <p:py:meth:`nidcpower.Session.ComplianceLimitSymmetry.html>`__ property is set to Asymmetric and the Output Method <p:py:meth:`nidcpower.Session.OutputFunction.html>`__ property is set to DC Voltage. You must also specify a Current Limit Low <p:py:meth:`nidcpower.Session.CurrentLimitLow.html>`__ to complete the asymmetric range. Valid Values: [1% of Current Limit Range <p:py:meth:`nidcpower.Session.CurrentLimitRange.html>`__, Current Limit Range <p:py:meth:`nidcpower.Session.CurrentLimitRange.html>`__] The range bounded by the limit high and limit low must include zero. Default Value: Refer to Supported Properties by Device for the default value by device. Related Topics: Ranges Changing Ranges Overranging
Note
The limit may be extended beyond the selected limit range if the Overranging Enabled <p:py:meth:`nidcpower.Session.OverrangingEnabled.html>`__ property is set to TRUE.
Note
One or more of the referenced methods are not in the Python API for this driver.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the current_limit_high.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an current_limit_high.Session instance, and calling set/get value on the result.:
session['0,1'].current_limit_high = var var = session['0,1'].current_limit_highThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:DC Voltage:Current Limit High
- C Attribute: NIDCPOWER_ATTR_CURRENT_LIMIT_HIGH
current_limit_low¶
nidcpower.Session.
current_limit_low
¶Specifies the minimum current, in amps, that the output can produce when generating the desired voltage on the specified channel(s). This property is applicable only if the Compliance Limit Symmetry <p:py:meth:`nidcpower.Session.ComplianceLimitSymmetry.html>`__ property is set to Asymmetric and the Output Method <p:py:meth:`nidcpower.Session.OutputFunction.html>`__ property is set to DC Voltage. You must also specify a Current Limit High <p:py:meth:`nidcpower.Session.CurrentLimitHigh.html>`__ to complete the asymmetric range. Valid Values: [-Current Limit Range <p:py:meth:`nidcpower.Session.CurrentLimitRange.html>`__, -1% of Current Limit Range <p:py:meth:`nidcpower.Session.CurrentLimitRange.html>`__] The range bounded by the limit high and limit low must include zero. Default Value: Refer to Supported Properties by Device for the default value by device. Related Topics: Ranges Changing Ranges Overranging
Note
The limit may be extended beyond the selected limit range if the Overranging Enabled <p:py:meth:`nidcpower.Session.OverrangingEnabled.html>`__ property is set to TRUE.
Note
One or more of the referenced methods are not in the Python API for this driver.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the current_limit_low.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an current_limit_low.Session instance, and calling set/get value on the result.:
session['0,1'].current_limit_low = var var = session['0,1'].current_limit_lowThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:DC Voltage:Current Limit Low
- C Attribute: NIDCPOWER_ATTR_CURRENT_LIMIT_LOW
current_limit_range¶
nidcpower.Session.
current_limit_range
¶Specifies the current limit range, in amps, for the specified channel(s). The range defines the valid value to which the current limit can be set. Use the
nidcpower.Session.current_limit_autorange
property to enable automatic selection of the current limit range. Thenidcpower.Session.current_limit_range
property is applicable only if thenidcpower.Session.output_function
property is set toDC_VOLTAGE
.nidcpower.Session.output_enabled
property for more information about enabling the output channel. For valid ranges, refer to the Ranges topic for your device in the NI DC Power Supplies and SMUs Help.Note
The channel must be enabled for the specified current limit to take effect. Refer to the
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the current_limit_range.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an current_limit_range.Session instance, and calling set/get value on the result.:
session['0,1'].current_limit_range = var var = session['0,1'].current_limit_rangeThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:DC Voltage:Current Limit Range
- C Attribute: NIDCPOWER_ATTR_CURRENT_LIMIT_RANGE
current_pole_zero_ratio¶
nidcpower.Session.
current_pole_zero_ratio
¶The ratio of the pole frequency to the zero frequency when the channel is in Constant Current mode. for information about supported devices. Default Value: Determined by the value of the
NORMAL
setting of thenidcpower.Session.transient_response
property.Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the current_pole_zero_ratio.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an current_pole_zero_ratio.Session instance, and calling set/get value on the result.:
session['0,1'].current_pole_zero_ratio = var var = session['0,1'].current_pole_zero_ratioThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Custom Transient Response:Current:Pole-Zero Ratio
- C Attribute: NIDCPOWER_ATTR_CURRENT_POLE_ZERO_RATIO
dc_noise_rejection¶
nidcpower.Session.
dc_noise_rejection
¶Determines the relative weighting of samples in a measurement. Refer to the NI PXIe-4140/4141 DC Noise Rejection, NI PXIe-4142/4143 DC Noise Rejection, or NI PXIe-4144/4145 DC Noise Rejection topic in the NI DC Power Supplies and SMUs Help for more information about noise rejection. for information about supported devices. Default Value:
NORMAL
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.DCNoiseRejection Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Measurement:Advanced:DC Noise Rejection
- C Attribute: NIDCPOWER_ATTR_DC_NOISE_REJECTION
digital_edge_measure_trigger_edge¶
nidcpower.Session.
digital_edge_measure_trigger_edge
¶Specifies whether to configure the Measure trigger to assert on the rising or falling edge.
nidcpower.Session.source_trigger_type
property is set toDIGITAL_EDGE
. for information about supported devices. Default Value:RISING
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.DigitalEdge Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Measure Trigger:Digital Edge:Edge
- C Attribute: NIDCPOWER_ATTR_DIGITAL_EDGE_MEASURE_TRIGGER_EDGE
digital_edge_measure_trigger_input_terminal¶
nidcpower.Session.
digital_edge_measure_trigger_input_terminal
¶Specifies the input terminal for the Measure trigger. This property is used only when the
nidcpower.Session.measure_trigger_type
property is set toDIGITAL_EDGE
. for this property. You can specify any valid input terminal for this property. Valid terminals are listed in Measurement & Automation Explorer under the Device Routes tab. Input terminals can be specified in one of two ways. If the device is named Dev1 and your terminal is PXI_Trig0, you can specify the terminal with the fully qualified terminal name, /Dev1/PXI_Trig0, or with the shortened terminal name, PXI_Trig0. The input terminal can also be a terminal from another device. For example, you can set the input terminal on Dev1 to be /Dev2/SourceCompleteEvent.Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Measure Trigger:Digital Edge:Input Terminal
- C Attribute: NIDCPOWER_ATTR_DIGITAL_EDGE_MEASURE_TRIGGER_INPUT_TERMINAL
digital_edge_pulse_trigger_edge¶
nidcpower.Session.
digital_edge_pulse_trigger_edge
¶Specifies whether to configure the Pulse trigger to assert on the rising or falling edge. Default Value:
RISING
Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.DigitalEdge Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Pulse Trigger:Digital Edge:Edge
- C Attribute: NIDCPOWER_ATTR_DIGITAL_EDGE_PULSE_TRIGGER_EDGE
digital_edge_pulse_trigger_input_terminal¶
nidcpower.Session.
digital_edge_pulse_trigger_input_terminal
¶Specifies the input terminal for the Pulse trigger. This property is used only when the
nidcpower.Session.pulse_trigger_type
property is set to digital edge. You can specify any valid input terminal for this property. Valid terminals are listed in Measurement & Automation Explorer under the Device Routes tab. Input terminals can be specified in one of two ways. If the device is named Dev1 and your terminal is PXI_Trig0, you can specify the terminal with the fully qualified terminal name, /Dev1/PXI_Trig0, or with the shortened terminal name, PXI_Trig0. The input terminal can also be a terminal from another device. For example, you can set the input terminal on Dev1 to be /Dev2/SourceCompleteEvent.Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Pulse Trigger:Digital Edge:Input Terminal
- C Attribute: NIDCPOWER_ATTR_DIGITAL_EDGE_PULSE_TRIGGER_INPUT_TERMINAL
digital_edge_sequence_advance_trigger_edge¶
nidcpower.Session.
digital_edge_sequence_advance_trigger_edge
¶Specifies whether to configure the Sequence Advance trigger to assert on the rising or falling edge. for information about supported devices. Default Value:
RISING
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.DigitalEdge Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Sequence Advance Trigger:Digital Edge:Edge
- C Attribute: NIDCPOWER_ATTR_DIGITAL_EDGE_SEQUENCE_ADVANCE_TRIGGER_EDGE
digital_edge_sequence_advance_trigger_input_terminal¶
nidcpower.Session.
digital_edge_sequence_advance_trigger_input_terminal
¶Specifies the input terminal for the Sequence Advance trigger. Use this property only when the
nidcpower.Session.sequence_advance_trigger_type
property is set toDIGITAL_EDGE
. the NI DC Power Supplies and SMUs Help for information about supported devices. You can specify any valid input terminal for this property. Valid terminals are listed in Measurement & Automation Explorer under the Device Routes tab. Input terminals can be specified in one of two ways. If the device is named Dev1 and your terminal is PXI_Trig0, you can specify the terminal with the fully qualified terminal name, /Dev1/PXI_Trig0, or with the shortened terminal name, PXI_Trig0. The input terminal can also be a terminal from another device. For example, you can set the input terminal on Dev1 to be /Dev2/SourceCompleteEvent.Note
This property is not supported by all devices. Refer to Supported Properties by Device topic in
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Sequence Advance Trigger:Digital Edge:Input Terminal
- C Attribute: NIDCPOWER_ATTR_DIGITAL_EDGE_SEQUENCE_ADVANCE_TRIGGER_INPUT_TERMINAL
digital_edge_source_trigger_edge¶
nidcpower.Session.
digital_edge_source_trigger_edge
¶Specifies whether to configure the Source trigger to assert on the rising or falling edge. for information about supported devices. Default Value:
RISING
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.DigitalEdge Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Source Trigger:Digital Edge:Edge
- C Attribute: NIDCPOWER_ATTR_DIGITAL_EDGE_SOURCE_TRIGGER_EDGE
digital_edge_source_trigger_input_terminal¶
nidcpower.Session.
digital_edge_source_trigger_input_terminal
¶Specifies the input terminal for the Source trigger. Use this property only when the
nidcpower.Session.source_trigger_type
property is set toDIGITAL_EDGE
. for information about supported devices. You can specify any valid input terminal for this property. Valid terminals are listed in Measurement & Automation Explorer under the Device Routes tab. Input terminals can be specified in one of two ways. If the device is named Dev1 and your terminal is PXI_Trig0, you can specify the terminal with the fully qualified terminal name, /Dev1/PXI_Trig0, or with the shortened terminal name, PXI_Trig0. The input terminal can also be a terminal from another device. For example, you can set the input terminal on Dev1 to be /Dev2/SourceCompleteEvent.Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Source Trigger:Digital Edge:Input Terminal
- C Attribute: NIDCPOWER_ATTR_DIGITAL_EDGE_SOURCE_TRIGGER_INPUT_TERMINAL
digital_edge_start_trigger_edge¶
nidcpower.Session.
digital_edge_start_trigger_edge
¶Specifies whether to configure the Start trigger to assert on the rising or falling edge. for information about supported devices. Default Value:
RISING
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.DigitalEdge Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Start Trigger:Digital Edge:Edge
- C Attribute: NIDCPOWER_ATTR_DIGITAL_EDGE_START_TRIGGER_EDGE
digital_edge_start_trigger_input_terminal¶
nidcpower.Session.
digital_edge_start_trigger_input_terminal
¶Specifies the input terminal for the Start trigger. Use this property only when the
nidcpower.Session.start_trigger_type
property is set toDIGITAL_EDGE
. for information about supported devices. You can specify any valid input terminal for this property. Valid terminals are listed in Measurement & Automation Explorer under the Device Routes tab. Input terminals can be specified in one of two ways. If the device is named Dev1 and your terminal is PXI_Trig0, you can specify the terminal with the fully qualified terminal name, /Dev1/PXI_Trig0, or with the shortened terminal name, PXI_Trig0. The input terminal can also be a terminal from another device. For example, you can set the input terminal on Dev1 to be /Dev2/SourceCompleteEvent.Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Start Trigger:Digital Edge:Input Terminal
- C Attribute: NIDCPOWER_ATTR_DIGITAL_EDGE_START_TRIGGER_INPUT_TERMINAL
driver_setup¶
nidcpower.Session.
driver_setup
¶Indicates the Driver Setup string that you specified when initializing the driver. Some cases exist where you must specify the instrument driver options at initialization time. An example of this case is specifying a particular device model from among a family of devices that the driver supports. This property is useful when simulating a device. You can specify the driver-specific options through the DriverSetup keyword in the optionsString parameter in the
nidcpower.Session.__init__()
method or through the IVI Configuration Utility. You can specify driver-specific options through the DriverSetup keyword in the optionsString parameter in thenidcpower.Session.__init__()
method. If you do not specify a Driver Setup string, this property returns an empty string.The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Advanced Session Information:Driver Setup
- C Attribute: NIDCPOWER_ATTR_DRIVER_SETUP
exported_measure_trigger_output_terminal¶
nidcpower.Session.
exported_measure_trigger_output_terminal
¶Specifies the output terminal for exporting the Measure trigger. Refer to the Device Routes tab in Measurement & Automation Explorer for a list of the terminals available on your device. for information about supported devices. Output terminals can be specified in one of two ways. If the device is named Dev1 and your terminal is PXI_Trig0, you can specify the terminal with the fully qualified terminal name, /Dev1/PXI_Trig0, or with the shortened terminal name, PXI_Trig0.
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Measure Trigger:Export Output Terminal
- C Attribute: NIDCPOWER_ATTR_EXPORTED_MEASURE_TRIGGER_OUTPUT_TERMINAL
exported_pulse_trigger_output_terminal¶
nidcpower.Session.
exported_pulse_trigger_output_terminal
¶Specifies the output terminal for exporting the Pulse trigger. Refer to the Device Routes tab in Measurement & Automation Explorer for a list of the terminals available on your device. Output terminals can be specified in one of two ways. If the device is named Dev1 and your terminal is PXI_Trig0, you can specify the terminal with the fully qualified terminal name, /Dev1/PXI_Trig0, or with the shortened terminal name, PXI_Trig0.
Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Pulse Trigger:Export Output Terminal
- C Attribute: NIDCPOWER_ATTR_EXPORTED_PULSE_TRIGGER_OUTPUT_TERMINAL
exported_sequence_advance_trigger_output_terminal¶
nidcpower.Session.
exported_sequence_advance_trigger_output_terminal
¶Specifies the output terminal for exporting the Sequence Advance trigger. Refer to the Device Routes tab in Measurement & Automation Explorer for a list of the terminals available on your device. for information about supported devices. Output terminals can be specified in one of two ways. If the device is named Dev1 and your terminal is PXI_Trig0, you can specify the terminal with the fully qualified terminal name, /Dev1/PXI_Trig0, or with the shortened terminal name, PXI_Trig0.
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Sequence Advance Trigger:Export Output Terminal
- C Attribute: NIDCPOWER_ATTR_EXPORTED_SEQUENCE_ADVANCE_TRIGGER_OUTPUT_TERMINAL
exported_source_trigger_output_terminal¶
nidcpower.Session.
exported_source_trigger_output_terminal
¶Specifies the output terminal for exporting the Source trigger. Refer to the Device Routes tab in MAX for a list of the terminals available on your device. for information about supported devices. Output terminals can be specified in one of two ways. If the device is named Dev1 and your terminal is PXI_Trig0, you can specify the terminal with the fully qualified terminal name, /Dev1/PXI_Trig0, or with the shortened terminal name, PXI_Trig0.
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Source Trigger:Export Output Terminal
- C Attribute: NIDCPOWER_ATTR_EXPORTED_SOURCE_TRIGGER_OUTPUT_TERMINAL
exported_start_trigger_output_terminal¶
nidcpower.Session.
exported_start_trigger_output_terminal
¶Specifies the output terminal for exporting the Start trigger. Refer to the Device Routes tab in Measurement & Automation Explorer (MAX) for a list of the terminals available on your device. Output terminals can be specified in one of two ways. If the device is named Dev1 and your terminal is PXI_Trig0, you can specify the terminal with the fully qualified terminal name, /Dev1/PXI_Trig0, or with the shortened terminal name, PXI_Trig0. for information about supported devices.
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Start Trigger:Export Output Terminal
- C Attribute: NIDCPOWER_ATTR_EXPORTED_START_TRIGGER_OUTPUT_TERMINAL
fetch_backlog¶
nidcpower.Session.
fetch_backlog
¶Returns the number of measurements acquired that have not been fetched yet.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Measurement:Fetch Backlog
- C Attribute: NIDCPOWER_ATTR_FETCH_BACKLOG
instrument_firmware_revision¶
nidcpower.Session.
instrument_firmware_revision
¶Contains the firmware revision information for the device you are currently using.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Instrument Identification:Firmware Revision
- C Attribute: NIDCPOWER_ATTR_INSTRUMENT_FIRMWARE_REVISION
instrument_manufacturer¶
nidcpower.Session.
instrument_manufacturer
¶Contains the name of the manufacturer for the device you are currently using.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Instrument Identification:Manufacturer
- C Attribute: NIDCPOWER_ATTR_INSTRUMENT_MANUFACTURER
instrument_model¶
nidcpower.Session.
instrument_model
¶Contains the model number or name of the device that you are currently using.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Instrument Identification:Model
- C Attribute: NIDCPOWER_ATTR_INSTRUMENT_MODEL
interlock_input_open¶
nidcpower.Session.
interlock_input_open
¶Indicates whether the safety interlock circuit is open. Refer to the Safety Interlock topic in the NI DC Power Supplies and SMUs Help for more information about the safety interlock circuit. about supported devices.
Note
This property is not supported by all devices. Refer to Supported Properties by Device for information
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Advanced:Interlock Input Open
- C Attribute: NIDCPOWER_ATTR_INTERLOCK_INPUT_OPEN
io_resource_descriptor¶
nidcpower.Session.
io_resource_descriptor
¶Indicates the resource descriptor NI-DCPower uses to identify the physical device. If you initialize NI-DCPower with a logical name, this property contains the resource descriptor that corresponds to the entry in the IVI Configuration utility. If you initialize NI-DCPower with the resource descriptor, this property contains that value.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Advanced Session Information:Resource Descriptor
- C Attribute: NIDCPOWER_ATTR_IO_RESOURCE_DESCRIPTOR
logical_name¶
nidcpower.Session.
logical_name
¶Contains the logical name you specified when opening the current IVI session. You can pass a logical name to the
nidcpower.Session.__init__()
method. The IVI Configuration utility must contain an entry for the logical name. The logical name entry refers to a method section in the IVI Configuration file. The method section specifies a physical device and initial user options.The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Advanced Session Information:Logical Name
- C Attribute: NIDCPOWER_ATTR_LOGICAL_NAME
measure_buffer_size¶
nidcpower.Session.
measure_buffer_size
¶Specifies the number of samples that the active channel measurement buffer can hold. The default value is the maximum number of samples that a device is capable of recording in one second. for information about supported devices. Valid Values: 1000 to 2147483647 Default Value: Varies by device. Refer to Supported Properties by Device topic in the NI DC Power Supplies and SMUs Help for more information about default values.
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Measurement:Advanced:Measure Buffer Size
- C Attribute: NIDCPOWER_ATTR_MEASURE_BUFFER_SIZE
measure_complete_event_delay¶
nidcpower.Session.
measure_complete_event_delay
¶Specifies the amount of time to delay the generation of the Measure Complete event, in seconds. for information about supported devices. Valid Values: 0 to 167 seconds Default Value: The NI PXI-4132 and NI PXIe-4140/4141/4142/4143/4144/4145/4154 supports values from 0 seconds to 167 seconds.
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype float in seconds or datetime.timedelta Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Measure Complete Event:Event Delay
- C Attribute: NIDCPOWER_ATTR_MEASURE_COMPLETE_EVENT_DELAY
measure_complete_event_output_terminal¶
nidcpower.Session.
measure_complete_event_output_terminal
¶Specifies the output terminal for exporting the Measure Complete event. for information about supported devices. Output terminals can be specified in one of two ways. If the device is named Dev1 and your terminal is PXI_Trig0, you can specify the terminal with the fully qualified terminal name, /Dev1/PXI_Trig0, or with the shortened terminal name, PXI_Trig0.
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Measure Complete Event:Output Terminal
- C Attribute: NIDCPOWER_ATTR_MEASURE_COMPLETE_EVENT_OUTPUT_TERMINAL
measure_complete_event_pulse_polarity¶
nidcpower.Session.
measure_complete_event_pulse_polarity
¶Specifies the behavior of the Measure Complete event. for information about supported devices. Default Value:
HIGH
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.Polarity Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Measure Complete Event:Pulse:Polarity
- C Attribute: NIDCPOWER_ATTR_MEASURE_COMPLETE_EVENT_PULSE_POLARITY
measure_complete_event_pulse_width¶
nidcpower.Session.
measure_complete_event_pulse_width
¶Specifies the width of the Measure Complete event, in seconds. The minimum event pulse width value for PXI devices is 150 ns, and the minimum event pulse width value for PXI Express devices is 250 ns. The maximum event pulse width value for all devices is 1.6 microseconds. for information about supported devices. Valid Values: 1.5e-7 to 1.6e-6 Default Value: The default value for PXI devices is 150 ns. The default value for PXI Express devices is 250 ns.
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Measure Complete Event:Pulse:Width
- C Attribute: NIDCPOWER_ATTR_MEASURE_COMPLETE_EVENT_PULSE_WIDTH
measure_record_delta_time¶
nidcpower.Session.
measure_record_delta_time
¶Queries the amount of time, in seconds, between between the start of two consecutive measurements in a measure record. Only query this property after the desired measurement settings are committed. for information about supported devices. two measurements and the rest would differ.
Note
This property is not available when Auto Zero is configured to Once because the amount of time between the first
The following table lists the characteristics of this property.
Characteristic Value Datatype float in seconds or datetime.timedelta Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Measurement:Measure Record Delta Time
- C Attribute: NIDCPOWER_ATTR_MEASURE_RECORD_DELTA_TIME
measure_record_length¶
nidcpower.Session.
measure_record_length
¶Specifies how many measurements compose a measure record. When this property is set to a value greater than 1, the
nidcpower.Session.measure_when
property must be set toAUTOMATICALLY_AFTER_SOURCE_COMPLETE
orON_MEASURE_TRIGGER
. for information about supported devices. Valid Values: 1 to 16,777,216 Default Value: 1Note
This property is not available in a session involving multiple channels.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Measurement:Measure Record Length
- C Attribute: NIDCPOWER_ATTR_MEASURE_RECORD_LENGTH
measure_record_length_is_finite¶
nidcpower.Session.
measure_record_length_is_finite
¶Specifies whether to take continuous measurements. Call the
nidcpower.Session.abort()
method to stop continuous measurements. When this property is set to False and thenidcpower.Session.source_mode
property is set toSINGLE_POINT
, thenidcpower.Session.measure_when
property must be set toAUTOMATICALLY_AFTER_SOURCE_COMPLETE
orON_MEASURE_TRIGGER
. When this property is set to False and thenidcpower.Session.source_mode
property is set toSEQUENCE
, thenidcpower.Session.measure_when
property must be set toON_MEASURE_TRIGGER
. for information about supported devices. Default Value: TrueNote
This property is not available in a session involving multiple channels.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Measurement:Measure Record Length Is Finite
- C Attribute: NIDCPOWER_ATTR_MEASURE_RECORD_LENGTH_IS_FINITE
measure_trigger_type¶
nidcpower.Session.
measure_trigger_type
¶Specifies the behavior of the Measure trigger. for information about supported devices. Default Value:
DIGITAL_EDGE
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.TriggerType Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Measure Trigger:Trigger Type
- C Attribute: NIDCPOWER_ATTR_MEASURE_TRIGGER_TYPE
measure_when¶
nidcpower.Session.
measure_when
¶Specifies when the measure unit should acquire measurements. Unless this property is configured to
ON_MEASURE_TRIGGER
, thenidcpower.Session.measure_trigger_type
property is ignored. Refer to the Acquiring Measurements topic in the NI DC Power Supplies and SMUs Help for more information about how to configure your measurements. Default Value: If thenidcpower.Session.source_mode
property is set toSINGLE_POINT
, the default value isON_DEMAND
. This value supports only thenidcpower.Session.measure()
method andnidcpower.Session.measure_multiple()
method. If thenidcpower.Session.source_mode
property is set toSEQUENCE
, the default value isAUTOMATICALLY_AFTER_SOURCE_COMPLETE
. This value supports only thenidcpower.Session.fetch_multiple()
method.The following table lists the characteristics of this property.
Characteristic Value Datatype enums.MeasureWhen Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Measurement:Advanced:Measure When
- C Attribute: NIDCPOWER_ATTR_MEASURE_WHEN
output_capacitance¶
nidcpower.Session.
output_capacitance
¶Specifies whether to use a low or high capacitance on the output for the specified channel(s). for information about supported devices. Refer to the NI PXI-4130 Output Capacitance Selection topic in the NI DC Power Supplies and SMUs Help for more information about capacitance.
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the output_capacitance.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an output_capacitance.Session instance, and calling set/get value on the result.:
session['0,1'].output_capacitance = var var = session['0,1'].output_capacitanceThe following table lists the characteristics of this property.
Characteristic Value Datatype enums.OutputCapacitance Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Advanced:Output Capacitance
- C Attribute: NIDCPOWER_ATTR_OUTPUT_CAPACITANCE
output_connected¶
nidcpower.Session.
output_connected
¶Specifies whether the output relay is connected (closed) or disconnected (open). The
nidcpower.Session.output_enabled
property does not change based on this property; they are independent of each other. about supported devices. Set this property to False to disconnect the output terminal from the output. to the output terminal might discharge unless the relay is disconnected. Excessive connecting and disconnecting of the output can cause premature wear on the relay. Default Value: TrueNote
Only disconnect the output when disconnecting is necessary for your application. For example, a battery connected
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the output_connected.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an output_connected.Session instance, and calling set/get value on the result.:
session['0,1'].output_connected = var var = session['0,1'].output_connectedThe following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Output Connected
- C Attribute: NIDCPOWER_ATTR_OUTPUT_CONNECTED
output_enabled¶
nidcpower.Session.
output_enabled
¶Specifies whether the output is enabled (True) or disabled (False). Depending on the value you specify for the
nidcpower.Session.output_function
property, you also must set the voltage level or current level in addition to enabling the output thenidcpower.Session.initiate()
method. Refer to the Programming States topic in the NI DC Power Supplies and SMUs Help for more information about NI-DCPower programming states. Default Value: The default value is True if you use thenidcpower.Session.__init__()
method to open the session. Otherwise the default value is False, including when you use a calibration session or the deprecated programming model.Note
If the session is in the Committed or Uncommitted states, enabling the output does not take effect until you call
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the output_enabled.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an output_enabled.Session instance, and calling set/get value on the result.:
session['0,1'].output_enabled = var var = session['0,1'].output_enabledThe following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Output Enabled
- C Attribute: NIDCPOWER_ATTR_OUTPUT_ENABLED
output_function¶
nidcpower.Session.
output_function
¶Configures the method to generate on the specified channel(s). When
DC_VOLTAGE
is selected, the device generates the desired voltage level on the output as long as the output current is below the current limit. You can use the following properties to configure the channel whenDC_VOLTAGE
is selected:nidcpower.Session.voltage_level
nidcpower.Session.current_limit
nidcpower.Session.current_limit_high
nidcpower.Session.current_limit_low
nidcpower.Session.voltage_level_range
nidcpower.Session.current_limit_range
WhenDC_CURRENT
is selected, the device generates the desired current level on the output as long as the output voltage is below the voltage limit. You can use the following properties to configure the channel whenDC_CURRENT
is selected:nidcpower.Session.current_level
nidcpower.Session.voltage_limit
nidcpower.Session.voltage_limit_high
nidcpower.Session.voltage_limit_low
nidcpower.Session.current_level_range
nidcpower.Session.voltage_limit_range
Default Value:DC_VOLTAGE
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the output_function.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an output_function.Session instance, and calling set/get value on the result.:
session['0,1'].output_function = var var = session['0,1'].output_functionThe following table lists the characteristics of this property.
Characteristic Value Datatype enums.OutputFunction Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Output Function
- C Attribute: NIDCPOWER_ATTR_OUTPUT_FUNCTION
output_resistance¶
nidcpower.Session.
output_resistance
¶Specifies the output resistance that the device attempts to generate for the specified channel(s). This property is available only when you set the
nidcpower.Session.output_function
property on a support device. Refer to a supported device’s topic about output resistance for more information about selecting an output resistance. about supported devices. Default Value: 0.0Note
This property is not supported by all devices. Refer to Supported Properties by Device topic for information
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the output_resistance.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an output_resistance.Session instance, and calling set/get value on the result.:
session['0,1'].output_resistance = var var = session['0,1'].output_resistanceThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Output Resistance
- C Attribute: NIDCPOWER_ATTR_OUTPUT_RESISTANCE
overranging_enabled¶
nidcpower.Session.
overranging_enabled
¶Specifies whether NI-DCPower allows setting the voltage level, current level, voltage limit and current limit outside the device specification limits. True means that overranging is enabled. Refer to the Ranges topic in the NI DC Power Supplies and SMUs Help for more information about overranging. Default Value: False
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Advanced:Overranging Enabled
- C Attribute: NIDCPOWER_ATTR_OVERRANGING_ENABLED
ovp_enabled¶
nidcpower.Session.
ovp_enabled
¶Enables (True) or disables (False) overvoltage protection (OVP). Refer to the Output Overvoltage Protection topic in the NI DC Power Supplies and SMUs Help for more information about overvoltage protection. for information about supported devices. Default Value: False
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Advanced:OVP Enabled
- C Attribute: NIDCPOWER_ATTR_OVP_ENABLED
ovp_limit¶
nidcpower.Session.
ovp_limit
¶Determines the voltage limit, in volts, beyond which overvoltage protection (OVP) engages. for information about supported devices. Valid Values: 2 V to 210 V Default Value: 210 V
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Advanced:OVP Limit
- C Attribute: NIDCPOWER_ATTR_OVP_LIMIT
power_line_frequency¶
nidcpower.Session.
power_line_frequency
¶Specifies the power line frequency for specified channel(s). NI-DCPower uses this value to select a timebase for setting the
nidcpower.Session.aperture_time
property in power line cycles (PLCs). in the NI DC Power Supplies and SMUs Help for information about supported devices. Default Value:NIDCPOWER_VAL_60_HERTZ
Note
This property is not supported by all devices. Refer to the Supported Properties by Device topic
Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the power_line_frequency.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an power_line_frequency.Session instance, and calling set/get value on the result.:
session['0,1'].power_line_frequency = var var = session['0,1'].power_line_frequencyThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Measurement:Power Line Frequency
- C Attribute: NIDCPOWER_ATTR_POWER_LINE_FREQUENCY
power_source¶
nidcpower.Session.
power_source
¶Specifies the power source to use. NI-DCPower switches the power source used by the device to the specified value. Default Value:
AUTOMATIC
is set toAUTOMATIC
. However, if the session is in the Committed or Uncommitted state when you set this property, the power source selection only occurs after you call thenidcpower.Session.initiate()
method.Note
Automatic selection is not persistent and occurs only at the time this property
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.PowerSource Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Advanced:Power Source
- C Attribute: NIDCPOWER_ATTR_POWER_SOURCE
power_source_in_use¶
nidcpower.Session.
power_source_in_use
¶Indicates whether the device is using the internal or auxiliary power source to generate power.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.PowerSourceInUse Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Advanced:Power Source In Use
- C Attribute: NIDCPOWER_ATTR_POWER_SOURCE_IN_USE
pulse_bias_current_level¶
nidcpower.Session.
pulse_bias_current_level
¶Specifies the pulse bias current level, in amps, that the device attempts to generate on the specified channel(s) during the off phase of a pulse. This property is applicable only if the
nidcpower.Session.output_function
property is set toPULSE_CURRENT
. Valid Values: The valid values for this property are defined by the values you specify for thenidcpower.Session.pulse_current_level_range
property.Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_bias_current_level.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_bias_current_level.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_bias_current_level = var var = session['0,1'].pulse_bias_current_levelThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Pulse Current:Pulse Bias Current Level
- C Attribute: NIDCPOWER_ATTR_PULSE_BIAS_CURRENT_LEVEL
pulse_bias_current_limit¶
nidcpower.Session.
pulse_bias_current_limit
¶Specifies the pulse bias current limit, in amps, that the output cannot exceed when generating the desired pulse bias voltage on the specified channel(s) during the off phase of a pulse. This property is applicable only if the
nidcpower.Session.output_function
property is set toPULSE_VOLTAGE
. Valid Values: The valid values for this property are defined by the values you specify for thenidcpower.Session.pulse_current_limit_range
property.Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_bias_current_limit.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_bias_current_limit.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_bias_current_limit = var var = session['0,1'].pulse_bias_current_limitThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Pulse Voltage:Pulse Bias Current Limit
- C Attribute: NIDCPOWER_ATTR_PULSE_BIAS_CURRENT_LIMIT
pulse_bias_current_limit_high¶
nidcpower.Session.
pulse_bias_current_limit_high
¶Specifies the maximum current, in amps, that the output can produce when generating the desired pulse voltage on the specified channel(s) during the off phase of a pulse. This property is applicable only if the Compliance Limit Symmetry <p:py:meth:`nidcpower.Session.ComplianceLimitSymmetry.html>`__ property is set to Asymmetric and the Output Method <p:py:meth:`nidcpower.Session.OutputFunction.html>`__ property is set to Pulse Voltage. You must also specify a Pulse Bias Current Limit Low <p:py:meth:`nidcpower.Session.PulseBiasCurrentLimitLow.html>`__ to complete the asymmetric range. Valid Values: [1% of Pulse Current Limit Range <p:py:meth:`nidcpower.Session.PulseCurrentLimitRange.html>`__, Pulse Current Limit Range <p:py:meth:`nidcpower.Session.PulseCurrentLimitRange.html>`__] The range bounded by the limit high and limit low must include zero. Default Value: Refer to Supported Properties by Device for the default value by device. Related Topics: Ranges Changing Ranges Overranging
Note
The limit may be extended beyond the selected limit range if the Overranging Enabled <p:py:meth:`nidcpower.Session.OverrangingEnabled.html>`__ property is set to TRUE or if the Output Method <p:py:meth:`nidcpower.Session.OutputFunction.html>`__ property is set to a pulsing method.
Note
One or more of the referenced methods are not in the Python API for this driver.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_bias_current_limit_high.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_bias_current_limit_high.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_bias_current_limit_high = var var = session['0,1'].pulse_bias_current_limit_highThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Pulse Voltage:Pulse Bias Current Limit High
- C Attribute: NIDCPOWER_ATTR_PULSE_BIAS_CURRENT_LIMIT_HIGH
pulse_bias_current_limit_low¶
nidcpower.Session.
pulse_bias_current_limit_low
¶Specifies the minimum current, in amps, that the output can produce when generating the desired pulse voltage on the specified channel(s) during the off phase of a pulse. This property is applicable only if the Compliance Limit Symmetry <p:py:meth:`nidcpower.Session.ComplianceLimitSymmetry.html>`__ property is set to Asymmetric and the Output Method <p:py:meth:`nidcpower.Session.OutputFunction.html>`__ property is set to Pulse Voltage. You must also specify a Pulse Bias Current Limit High <p:py:meth:`nidcpower.Session.PulseBiasCurrentLimitHigh.html>`__ to complete the asymmetric range. Valid Values: [-Pulse Current Limit Range <p:py:meth:`nidcpower.Session.PulseCurrentLimitRange.html>`__, -1% of Pulse Current Limit Range <p:py:meth:`nidcpower.Session.PulseCurrentLimitRange.html>`__] The range bounded by the limit high and limit low must include zero. Default Value: Refer to Supported Properties by Device for the default value by device. Related Topics: Ranges Changing Ranges Overranging
Note
The limit may be extended beyond the selected limit range if the Overranging Enabled <p:py:meth:`nidcpower.Session.OverrangingEnabled.html>`__ property is set to TRUE or if the Output Method <p:py:meth:`nidcpower.Session.OutputFunction.html>`__ property is set to a pulsing method.
Note
One or more of the referenced methods are not in the Python API for this driver.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_bias_current_limit_low.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_bias_current_limit_low.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_bias_current_limit_low = var var = session['0,1'].pulse_bias_current_limit_lowThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Pulse Voltage:Pulse Bias Current Limit Low
- C Attribute: NIDCPOWER_ATTR_PULSE_BIAS_CURRENT_LIMIT_LOW
pulse_bias_delay¶
nidcpower.Session.
pulse_bias_delay
¶Determines when, in seconds, the device generates the Pulse Complete event after generating the off level of a pulse. Valid Values: 0 to 167 seconds Default Value: 16.67 milliseconds
Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_bias_delay.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_bias_delay.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_bias_delay = var var = session['0,1'].pulse_bias_delayThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Advanced:Pulse Bias Delay
- C Attribute: NIDCPOWER_ATTR_PULSE_BIAS_DELAY
pulse_bias_voltage_level¶
nidcpower.Session.
pulse_bias_voltage_level
¶Specifies the pulse bias voltage level, in volts, that the device attempts to generate on the specified channel(s) during the off phase of a pulse. This property is applicable only if the
nidcpower.Session.output_function
property is set toPULSE_VOLTAGE
. Valid Values: The valid values for this property are defined by the values you specify for thenidcpower.Session.pulse_voltage_level_range
property.Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_bias_voltage_level.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_bias_voltage_level.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_bias_voltage_level = var var = session['0,1'].pulse_bias_voltage_levelThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Pulse Voltage:Pulse Bias Voltage Level
- C Attribute: NIDCPOWER_ATTR_PULSE_BIAS_VOLTAGE_LEVEL
pulse_bias_voltage_limit¶
nidcpower.Session.
pulse_bias_voltage_limit
¶Specifies the pulse voltage limit, in volts, that the output cannot exceed when generating the desired current on the specified channel(s) during the off phase of a pulse. This property is applicable only if the
nidcpower.Session.output_function
property is set toPULSE_CURRENT
. Valid Values: The valid values for this property are defined by the values you specify for thenidcpower.Session.pulse_voltage_limit_range
property.Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_bias_voltage_limit.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_bias_voltage_limit.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_bias_voltage_limit = var var = session['0,1'].pulse_bias_voltage_limitThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Pulse Current:Pulse Bias Voltage Limit
- C Attribute: NIDCPOWER_ATTR_PULSE_BIAS_VOLTAGE_LIMIT
pulse_bias_voltage_limit_high¶
nidcpower.Session.
pulse_bias_voltage_limit_high
¶Specifies the maximum voltage, in volts, that the output can produce when generating the desired pulse current on the specified channel(s) during the off phase of a pulse. This property is applicable only if the Compliance Limit Symmetry <p:py:meth:`nidcpower.Session.ComplianceLimitSymmetry.html>`__ property is set to Asymmetric and the Output Method <p:py:meth:`nidcpower.Session.OutputFunction.html>`__ property is set to Pulse Current. You must also specify a Pulse Bias Voltage Limit Low <p:py:meth:`nidcpower.Session.PulseBiasVoltageLimitLow.html>`__ to complete the asymmetric range. Valid Values: [1% of Pulse Voltage Limit Range <p:py:meth:`nidcpower.Session.PulseVoltageLimitRange.html>`__, Pulse Voltage Limit Range <p:py:meth:`nidcpower.Session.PulseVoltageLimitRange.html>`__] The range bounded by the limit high and limit low must include zero. Default Value: Refer to Supported Properties by Device for the default value by device. Related Topics: Ranges Changing Ranges Overranging
Note
The limit may be extended beyond the selected limit range if the Overranging Enabled <p:py:meth:`nidcpower.Session.OverrangingEnabled.html>`__ property is set to TRUE or if the Output Method <p:py:meth:`nidcpower.Session.OutputFunction.html>`__ property is set to a pulsing method.
Note
One or more of the referenced methods are not in the Python API for this driver.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_bias_voltage_limit_high.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_bias_voltage_limit_high.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_bias_voltage_limit_high = var var = session['0,1'].pulse_bias_voltage_limit_highThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Pulse Current:Pulse Bias Voltage Limit High
- C Attribute: NIDCPOWER_ATTR_PULSE_BIAS_VOLTAGE_LIMIT_HIGH
pulse_bias_voltage_limit_low¶
nidcpower.Session.
pulse_bias_voltage_limit_low
¶Specifies the minimum voltage, in volts, that the output can produce when generating the desired pulse current on the specified channel(s) during the off phase of a pulse. This property is applicable only if the Compliance Limit Symmetry <p:py:meth:`nidcpower.Session.ComplianceLimitSymmetry.html>`__ property is set to Asymmetric and the Output Method <p:py:meth:`nidcpower.Session.OutputFunction.html>`__ property is set to Pulse Current. You must also specify a Pulse Bias Voltage Limit High <p:py:meth:`nidcpower.Session.PulseBiasVoltageLimitHigh.html>`__ to complete the asymmetric range. Valid Values: [-Pulse Voltage Limit Range <p:py:meth:`nidcpower.Session.PulseVoltageLimitRange.html>`__, -1% of Pulse Voltage Limit Range <p:py:meth:`nidcpower.Session.PulseVoltageLimitRange.html>`__] The range bounded by the limit high and limit low must include zero. Default Value: Refer to Supported Properties by Device for the default value by device. Related Topics: Ranges Changing Ranges Overranging
Note
The limit may be extended beyond the selected limit range if the Overranging Enabled <p:py:meth:`nidcpower.Session.OverrangingEnabled.html>`__ property is set to TRUE or if the Output Method <p:py:meth:`nidcpower.Session.OutputFunction.html>`__ property is set to a pulsing method.
Note
One or more of the referenced methods are not in the Python API for this driver.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_bias_voltage_limit_low.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_bias_voltage_limit_low.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_bias_voltage_limit_low = var var = session['0,1'].pulse_bias_voltage_limit_lowThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Pulse Current:Pulse Bias Voltage Limit Low
- C Attribute: NIDCPOWER_ATTR_PULSE_BIAS_VOLTAGE_LIMIT_LOW
pulse_complete_event_output_terminal¶
nidcpower.Session.
pulse_complete_event_output_terminal
¶Specifies the output terminal for exporting the Pulse Complete event. Output terminals can be specified in one of two ways. If the device is named Dev1 and your terminal is PXI_Trig0, you can specify the terminal with the fully qualified terminal name, /Dev1/PXI_Trig0, or with the shortened terminal name, PXI_Trig0. Default Value:The default value for PXI Express devices is 250 ns.
Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Pulse Complete Event:Output Terminal
- C Attribute: NIDCPOWER_ATTR_PULSE_COMPLETE_EVENT_OUTPUT_TERMINAL
pulse_complete_event_pulse_polarity¶
nidcpower.Session.
pulse_complete_event_pulse_polarity
¶Specifies the behavior of the Pulse Complete event. Default Value:
HIGH
Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.Polarity Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Pulse Complete Event:Pulse:Polarity
- C Attribute: NIDCPOWER_ATTR_PULSE_COMPLETE_EVENT_PULSE_POLARITY
pulse_complete_event_pulse_width¶
nidcpower.Session.
pulse_complete_event_pulse_width
¶Specifies the width of the Pulse Complete event, in seconds. The minimum event pulse width value for PXI Express devices is 250 ns. The maximum event pulse width value for PXI Express devices is 1.6 microseconds. Default Value: The default value for PXI Express devices is 250 ns.
Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Pulse Complete Event:Pulse:Width
- C Attribute: NIDCPOWER_ATTR_PULSE_COMPLETE_EVENT_PULSE_WIDTH
pulse_current_level¶
nidcpower.Session.
pulse_current_level
¶Specifies the pulse current level, in amps, that the device attempts to generate on the specified channel(s) during the on phase of a pulse. This property is applicable only if the
nidcpower.Session.output_function
property is set toPULSE_CURRENT
. Valid Values: The valid values for this property are defined by the values you specify for thenidcpower.Session.pulse_current_level_range
property.Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_current_level.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_current_level.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_current_level = var var = session['0,1'].pulse_current_levelThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Pulse Current:Pulse Current Level
- C Attribute: NIDCPOWER_ATTR_PULSE_CURRENT_LEVEL
pulse_current_level_range¶
nidcpower.Session.
pulse_current_level_range
¶Specifies the pulse current level range, in amps, for the specified channel(s). The range defines the valid values to which you can set the pulse current level and pulse bias current level. This property is applicable only if the
nidcpower.Session.output_function
property is set toPULSE_CURRENT
. For valid ranges, refer to the ranges topic for your device in the NI DC Power Supplies and SMUs Help.Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_current_level_range.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_current_level_range.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_current_level_range = var var = session['0,1'].pulse_current_level_rangeThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Pulse Current:Pulse Current Level Range
- C Attribute: NIDCPOWER_ATTR_PULSE_CURRENT_LEVEL_RANGE
pulse_current_limit¶
nidcpower.Session.
pulse_current_limit
¶Specifies the pulse current limit, in amps, that the output cannot exceed when generating the desired pulse voltage on the specified channel(s) during the on phase of a pulse. This property is applicable only if the
nidcpower.Session.output_function
property is set toPULSE_VOLTAGE
and thenidcpower.Session.compliance_limit_symmetry
property is set toNIDCPOWER_VAL_SYMMETRIC
. Valid Values: The valid values for this property are defined by the values you specify for thenidcpower.Session.pulse_current_limit_range
property.Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_current_limit.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_current_limit.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_current_limit = var var = session['0,1'].pulse_current_limitThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Pulse Voltage:Pulse Current Limit
- C Attribute: NIDCPOWER_ATTR_PULSE_CURRENT_LIMIT
pulse_current_limit_high¶
nidcpower.Session.
pulse_current_limit_high
¶Specifies the maximum current, in amps, that the output can produce when generating the desired pulse voltage on the specified channel(s) during the on phase of a pulse. This property is applicable only if the Compliance Limit Symmetry <p:py:meth:`nidcpower.Session.ComplianceLimitSymmetry.html>`__ property is set to Asymmetric and the Output Method <p:py:meth:`nidcpower.Session.OutputFunction.html>`__ property is set to Pulse Voltage. You must also specify a Pulse Current Limit Low <p:py:meth:`nidcpower.Session.PulseCurrentLimitLow.html>`__ to complete the asymmetric range. Valid Values: [1% of Pulse Current Limit Range <p:py:meth:`nidcpower.Session.PulseCurrentLimitRange.html>`__, Pulse Current Limit Range <p:py:meth:`nidcpower.Session.PulseCurrentLimitRange.html>`__] The range bounded by the limit high and limit low must include zero. Default Value: Refer to Supported Properties by Device for the default value by device. Related Topics: Ranges Changing Ranges Overranging
Note
The limit may be extended beyond the selected limit range if the Overranging Enabled <p:py:meth:`nidcpower.Session.OverrangingEnabled.html>`__ property is set to TRUE or if the Output Method <p:py:meth:`nidcpower.Session.OutputFunction.html>`__ property is set to a pulsing method.
Note
One or more of the referenced methods are not in the Python API for this driver.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_current_limit_high.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_current_limit_high.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_current_limit_high = var var = session['0,1'].pulse_current_limit_highThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Pulse Voltage:Pulse Current Limit High
- C Attribute: NIDCPOWER_ATTR_PULSE_CURRENT_LIMIT_HIGH
pulse_current_limit_low¶
nidcpower.Session.
pulse_current_limit_low
¶Specifies the minimum current, in amps, that the output can produce when generating the desired pulse voltage on the specified channel(s) during the on phase of a pulse. This property is applicable only if the Compliance Limit Symmetry <p:py:meth:`nidcpower.Session.ComplianceLimitSymmetry.html>`__ property is set to Asymmetric and the Output Method <p:py:meth:`nidcpower.Session.OutputFunction.html>`__ property is set to Pulse Voltage. You must also specify a Pulse Current Limit High <p:py:meth:`nidcpower.Session.PulseCurrentLimitHigh.html>`__ to complete the asymmetric range. Valid Values: [-Pulse Current Limit Range <p:py:meth:`nidcpower.Session.PulseCurrentLimitRange.html>`__, -1% of Pulse Current Limit Range <p:py:meth:`nidcpower.Session.PulseCurrentLimitRange.html>`__] The range bounded by the limit high and limit low must include zero. Default Value: Refer to Supported Properties by Device for the default value by device. Related Topics: Ranges Changing Ranges Overranging
Note
The limit may be extended beyond the selected limit range if the Overranging Enabled <p:py:meth:`nidcpower.Session.OverrangingEnabled.html>`__ property is set to TRUE or if the Output Method <p:py:meth:`nidcpower.Session.OutputFunction.html>`__ property is set to a pulsing method.
Note
One or more of the referenced methods are not in the Python API for this driver.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_current_limit_low.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_current_limit_low.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_current_limit_low = var var = session['0,1'].pulse_current_limit_lowThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Pulse Voltage:Pulse Current Limit Low
- C Attribute: NIDCPOWER_ATTR_PULSE_CURRENT_LIMIT_LOW
pulse_current_limit_range¶
nidcpower.Session.
pulse_current_limit_range
¶Specifies the pulse current limit range, in amps, for the specified channel(s). The range defines the valid values to which you can set the pulse current limit and pulse bias current limit. This property is applicable only if the
nidcpower.Session.output_function
property is set toPULSE_VOLTAGE
. For valid ranges, refer to the ranges topic for your device in the NI DC Power Supplies and SMUs Help.Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_current_limit_range.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_current_limit_range.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_current_limit_range = var var = session['0,1'].pulse_current_limit_rangeThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Pulse Voltage:Pulse Current Limit Range
- C Attribute: NIDCPOWER_ATTR_PULSE_CURRENT_LIMIT_RANGE
pulse_off_time¶
nidcpower.Session.
pulse_off_time
¶Determines the length, in seconds, of the off phase of a pulse. Valid Values: 10 microseconds to 167 seconds Default Value: 34 milliseconds
Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_off_time.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_off_time.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_off_time = var var = session['0,1'].pulse_off_timeThe following table lists the characteristics of this property.
Characteristic Value Datatype float in seconds or datetime.timedelta Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Advanced:Pulse Off Time
- C Attribute: NIDCPOWER_ATTR_PULSE_OFF_TIME
pulse_on_time¶
nidcpower.Session.
pulse_on_time
¶Determines the length, in seconds, of the on phase of a pulse. Valid Values: 10 microseconds to 167 seconds Default Value: 34 milliseconds
Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_on_time.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_on_time.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_on_time = var var = session['0,1'].pulse_on_timeThe following table lists the characteristics of this property.
Characteristic Value Datatype float in seconds or datetime.timedelta Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Advanced:Pulse On Time
- C Attribute: NIDCPOWER_ATTR_PULSE_ON_TIME
pulse_trigger_type¶
nidcpower.Session.
pulse_trigger_type
¶Specifies the behavior of the Pulse trigger. Default Value:
NONE
Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.TriggerType Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Pulse Trigger:Trigger Type
- C Attribute: NIDCPOWER_ATTR_PULSE_TRIGGER_TYPE
pulse_voltage_level¶
nidcpower.Session.
pulse_voltage_level
¶Specifies the pulse current limit, in amps, that the output cannot exceed when generating the desired pulse voltage on the specified channel(s) during the on phase of a pulse. This property is applicable only if the
nidcpower.Session.output_function
property is set toPULSE_VOLTAGE
. Valid Values: The valid values for this property are defined by the values you specify for thenidcpower.Session.pulse_current_limit_range
property.Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_voltage_level.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_voltage_level.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_voltage_level = var var = session['0,1'].pulse_voltage_levelThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Pulse Voltage:Pulse Voltage Level
- C Attribute: NIDCPOWER_ATTR_PULSE_VOLTAGE_LEVEL
pulse_voltage_level_range¶
nidcpower.Session.
pulse_voltage_level_range
¶Specifies the pulse voltage level range, in volts, for the specified channel(s). The range defines the valid values at which you can set the pulse voltage level and pulse bias voltage level. This property is applicable only if the
nidcpower.Session.output_function
property is set toPULSE_VOLTAGE
. For valid ranges, refer to the ranges topic for your device in the NI DC Power Supplies and SMUs Help.Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_voltage_level_range.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_voltage_level_range.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_voltage_level_range = var var = session['0,1'].pulse_voltage_level_rangeThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Pulse Voltage:Pulse Voltage Level Range
- C Attribute: NIDCPOWER_ATTR_PULSE_VOLTAGE_LEVEL_RANGE
pulse_voltage_limit¶
nidcpower.Session.
pulse_voltage_limit
¶Specifies the pulse voltage limit, in volts, that the output cannot exceed when generating the desired pulse current on the specified channel(s) during the on phase of a pulse. This property is applicable only if the
nidcpower.Session.output_function
property is set toPULSE_CURRENT
and thenidcpower.Session.compliance_limit_symmetry
property is set toNIDCPOWER_VAL_SYMMETRIC
. Valid Values: The valid values for this property are defined by the values you specify for thenidcpower.Session.pulse_voltage_limit_range
property.Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_voltage_limit.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_voltage_limit.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_voltage_limit = var var = session['0,1'].pulse_voltage_limitThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Pulse Current:Pulse Voltage Limit
- C Attribute: NIDCPOWER_ATTR_PULSE_VOLTAGE_LIMIT
pulse_voltage_limit_high¶
nidcpower.Session.
pulse_voltage_limit_high
¶Specifies the maximum voltage, in volts, that the output can produce when generating the desired pulse current on the specified channel(s) during the on phase of a pulse. This property is applicable only if the Compliance Limit Symmetry <p:py:meth:`nidcpower.Session.ComplianceLimitSymmetry.html>`__ property is set to Asymmetric and the Output Method <p:py:meth:`nidcpower.Session.OutputFunction.html>`__ property is set to Pulse Current. You must also specify a Pulse Voltage Limit Low <p:py:meth:`nidcpower.Session.PulseVoltageLimitLow.html>`__ to complete the asymmetric range. Valid Values: [1% of Pulse Voltage Limit Range <p:py:meth:`nidcpower.Session.PulseVoltageLimitRange.html>`__, Pulse Voltage Limit Range <p:py:meth:`nidcpower.Session.PulseVoltageLimitRange.html>`__] The range bounded by the limit high and limit low must include zero. Default Value: Refer to Supported Properties by Device for the default value by device. Related Topics: Ranges Changing Ranges Overranging
Note
The limit may be extended beyond the selected limit range if the Overranging Enabled <p:py:meth:`nidcpower.Session.OverrangingEnabled.html>`__ property is set to TRUE or if the Output Method <p:py:meth:`nidcpower.Session.OutputFunction.html>`__ property is set to a pulsing method.
Note
One or more of the referenced methods are not in the Python API for this driver.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_voltage_limit_high.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_voltage_limit_high.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_voltage_limit_high = var var = session['0,1'].pulse_voltage_limit_highThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Pulse Current:Pulse Voltage Limit High
- C Attribute: NIDCPOWER_ATTR_PULSE_VOLTAGE_LIMIT_HIGH
pulse_voltage_limit_low¶
nidcpower.Session.
pulse_voltage_limit_low
¶Specifies the minimum voltage, in volts, that the output can produce when generating the desired pulse current on the specified channel(s) during the on phase of a pulse. This property is applicable only if the Compliance Limit Symmetry <p:py:meth:`nidcpower.Session.ComplianceLimitSymmetry.html>`__ property is set to Asymmetric and the Output Method <p:py:meth:`nidcpower.Session.OutputFunction.html>`__ property is set to Pulse Current. You must also specify a Pulse Voltage Limit High <p:py:meth:`nidcpower.Session.PulseVoltageLimitHigh.html>`__ to complete the asymmetric range. Valid Values: [-Pulse Voltage Limit Range <p:py:meth:`nidcpower.Session.PulseVoltageLimitRange.html>`__, -1% of Pulse Voltage Limit Range <p:py:meth:`nidcpower.Session.PulseVoltageLimitRange.html>`__] The range bounded by the limit high and limit low must include zero. Default Value: Refer to Supported Properties by Device for the default value by device. Related Topics: Ranges Changing Ranges Overranging
Note
The limit may be extended beyond the selected limit range if the Overranging Enabled <p:py:meth:`nidcpower.Session.OverrangingEnabled.html>`__ property is set to TRUE or if the Output Method <p:py:meth:`nidcpower.Session.OutputFunction.html>`__ property is set to a pulsing method.
Note
One or more of the referenced methods are not in the Python API for this driver.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_voltage_limit_low.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_voltage_limit_low.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_voltage_limit_low = var var = session['0,1'].pulse_voltage_limit_lowThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Pulse Current:Pulse Voltage Limit Low
- C Attribute: NIDCPOWER_ATTR_PULSE_VOLTAGE_LIMIT_LOW
pulse_voltage_limit_range¶
nidcpower.Session.
pulse_voltage_limit_range
¶Specifies the pulse voltage limit range, in volts, for the specified channel(s). The range defines the valid values to which you can set the pulse voltage limit and pulse bias voltage limit. This property is applicable only if the
nidcpower.Session.output_function
property is set toPULSE_CURRENT
. For valid ranges, refer to the ranges topic for your device in the NI DC Power Supplies and SMUs Help.Note
The channel must be enabled for the specified current limit to take effect. Refer to the
nidcpower.Session.output_enabled
property for more information about enabling the output channel.Tip
This property can use repeated capabilities (usually channels). If set or get directly on the pulse_voltage_limit_range.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an pulse_voltage_limit_range.Session instance, and calling set/get value on the result.:
session['0,1'].pulse_voltage_limit_range = var var = session['0,1'].pulse_voltage_limit_rangeThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Pulse Current:Pulse Voltage Limit Range
- C Attribute: NIDCPOWER_ATTR_PULSE_VOLTAGE_LIMIT_RANGE
query_instrument_status¶
nidcpower.Session.
query_instrument_status
¶Specifies whether NI-DCPower queries the device status after each operation. Querying the device status is useful for debugging. After you validate your program, you can set this property to False to disable status checking and maximize performance. NI-DCPower ignores status checking for particular properties regardless of the setting of this property. Use the
nidcpower.Session.__init__()
method to override this value. Default Value: TrueThe following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:User Options:Query Instrument Status
- C Attribute: NIDCPOWER_ATTR_QUERY_INSTRUMENT_STATUS
ready_for_pulse_trigger_event_output_terminal¶
nidcpower.Session.
ready_for_pulse_trigger_event_output_terminal
¶Specifies the output terminal for exporting the Ready For Pulse Trigger event. Output terminals can be specified in one of two ways. If the device is named Dev1 and your terminal is PXI_Trig0, you can specify the terminal with the fully qualified terminal name, /Dev1/PXI_Trig0, or with the shortened terminal name, PXI_Trig0.
Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Ready For Pulse Trigger Event:Output Terminal
- C Attribute: NIDCPOWER_ATTR_READY_FOR_PULSE_TRIGGER_EVENT_OUTPUT_TERMINAL
ready_for_pulse_trigger_event_pulse_polarity¶
nidcpower.Session.
ready_for_pulse_trigger_event_pulse_polarity
¶Specifies the behavior of the Ready For Pulse Trigger event. Default Value:
HIGH
Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.Polarity Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Ready For Pulse Trigger Event:Pulse:Polarity
- C Attribute: NIDCPOWER_ATTR_READY_FOR_PULSE_TRIGGER_EVENT_PULSE_POLARITY
ready_for_pulse_trigger_event_pulse_width¶
nidcpower.Session.
ready_for_pulse_trigger_event_pulse_width
¶Specifies the width of the Ready For Pulse Trigger event, in seconds. The minimum event pulse width value for PXI Express devices is 250 ns. The maximum event pulse width value for all devices is 1.6 microseconds. Default Value: The default value for PXI Express devices is 250 ns
Note
This property is not supported by all devices. Refer to Supported Properties by Device for information about supported devices.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Ready For Pulse Trigger Event:Pulse:Width
- C Attribute: NIDCPOWER_ATTR_READY_FOR_PULSE_TRIGGER_EVENT_PULSE_WIDTH
reset_average_before_measurement¶
nidcpower.Session.
reset_average_before_measurement
¶Specifies whether the measurement returned from any measurement call starts with a new measurement call (True) or returns a measurement that has already begun or completed(False). for information about supported devices. When you set the
nidcpower.Session.samples_to_average
property in the Running state, the output channel measurements might move out of synchronization. While NI-DCPower automatically synchronizes measurements upon the initialization of a session, you can force a synchronization in the running state before you run thenidcpower.Session.measure_multiple()
method. To force a synchronization in the running state, set this property to True, and then run thenidcpower.Session.measure_multiple()
method, specifying all channels in the channel name parameter. You can set thenidcpower.Session.reset_average_before_measurement
property to False after thenidcpower.Session.measure_multiple()
method completes. Default Value: TrueNote
This property is not supported by all devices. Refer to Supported Properties by Device topic
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the reset_average_before_measurement.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an reset_average_before_measurement.Session instance, and calling set/get value on the result.:
session['0,1'].reset_average_before_measurement = var var = session['0,1'].reset_average_before_measurementThe following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Measurement:Advanced:Reset Average Before Measurement
- C Attribute: NIDCPOWER_ATTR_RESET_AVERAGE_BEFORE_MEASUREMENT
samples_to_average¶
nidcpower.Session.
samples_to_average
¶Specifies the number of samples to average when you take a measurement. Increasing the number of samples to average decreases measurement noise but increases the time required to take a measurement. Refer to the NI PXI-4110, NI PXI-4130, NI PXI-4132, or NI PXIe-4154 Averaging topic for optional property settings to improve immunity to certain noise types, or refer to the NI PXIe-4140/4141 DC Noise Rejection, NI PXIe-4142/4143 DC Noise Rejection, or NI PXIe-4144/4145 DC Noise Rejection topic for information about improving noise immunity for those devices. Default Value: NI PXI-4110 or NI PXI-4130—10 NI PXI-4132—1 NI PXIe-4112—1 NI PXIe-4113—1 NI PXIe-4140/4141—1 NI PXIe-4142/4143—1 NI PXIe-4144/4145—1 NI PXIe-4154—500
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the samples_to_average.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an samples_to_average.Session instance, and calling set/get value on the result.:
session['0,1'].samples_to_average = var var = session['0,1'].samples_to_averageThe following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Measurement:Samples To Average
- C Attribute: NIDCPOWER_ATTR_SAMPLES_TO_AVERAGE
self_calibration_persistence¶
nidcpower.Session.
self_calibration_persistence
¶Specifies whether the values calculated during self-calibration should be written to hardware to be used until the next self-calibration or only used until the
nidcpower.Session.reset_device()
method is called or the machine is powered down. This property affects the behavior of thenidcpower.Session.self_cal()
method. When set toKEEP_IN_MEMORY
, the values calculated by thenidcpower.Session.self_cal()
method are used in the existing session, as well as in all further sessions until you call thenidcpower.Session.reset_device()
method or restart the machine. When you set this property toWRITE_TO_EEPROM
, the values calculated by thenidcpower.Session.self_cal()
method are written to hardware and used in the existing session and in all subsequent sessions until another call to thenidcpower.Session.self_cal()
method is made. about supported devices. Default Value:KEEP_IN_MEMORY
Note
This property is not supported by all devices. Refer to Supported Properties by Device for information
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.SelfCalibrationPersistence Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Advanced:Self-Calibration Persistence
- C Attribute: NIDCPOWER_ATTR_SELF_CALIBRATION_PERSISTENCE
sense¶
nidcpower.Session.
sense
¶Selects either local or remote sensing of the output voltage for the specified channel(s). Refer to the Local and Remote Sense topic in the NI DC Power Supplies and SMUs Help for more information about sensing voltage on supported channels and about devices that support local and/or remote sensing. Default Value: The default value is
LOCAL
if the device supports local sense. Otherwise, the default and only supported value isREMOTE
.Tip
This property can use repeated capabilities (usually channels). If set or get directly on the sense.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an sense.Session instance, and calling set/get value on the result.:
session['0,1'].sense = var var = session['0,1'].senseThe following table lists the characteristics of this property.
Characteristic Value Datatype enums.Sense Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Measurement:Sense
- C Attribute: NIDCPOWER_ATTR_SENSE
sequence_advance_trigger_type¶
nidcpower.Session.
sequence_advance_trigger_type
¶Specifies the behavior of the Sequence Advance trigger. for information about supported devices. Default Value:
NONE
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.TriggerType Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Sequence Advance Trigger:Trigger Type
- C Attribute: NIDCPOWER_ATTR_SEQUENCE_ADVANCE_TRIGGER_TYPE
sequence_engine_done_event_output_terminal¶
nidcpower.Session.
sequence_engine_done_event_output_terminal
¶Specifies the output terminal for exporting the Sequence Engine Done Complete event. for information about supported devices. Output terminals can be specified in one of two ways. If the device is named Dev1 and your terminal is PXI_Trig0, you can specify the terminal with the fully qualified terminal name, /Dev1/PXI_Trig0, or with the shortened terminal name, PXI_Trig0.
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Sequence Engine Done Event:Output Terminal
- C Attribute: NIDCPOWER_ATTR_SEQUENCE_ENGINE_DONE_EVENT_OUTPUT_TERMINAL
sequence_engine_done_event_pulse_polarity¶
nidcpower.Session.
sequence_engine_done_event_pulse_polarity
¶Specifies the behavior of the Sequence Engine Done event. for information about supported devices. Default Value:
HIGH
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.Polarity Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Sequence Engine Done Event:Pulse:Polarity
- C Attribute: NIDCPOWER_ATTR_SEQUENCE_ENGINE_DONE_EVENT_PULSE_POLARITY
sequence_engine_done_event_pulse_width¶
nidcpower.Session.
sequence_engine_done_event_pulse_width
¶Specifies the width of the Sequence Engine Done event, in seconds. The minimum event pulse width value for PXI devices is 150 ns, and the minimum event pulse width value for PXI Express devices is 250 ns. The maximum event pulse width value for all devices is 1.6 microseconds. for information about supported devices. Valid Values: 1.5e-7 to 1.6e-6 seconds Default Value: The default value for PXI devices is 150 ns. The default value for PXI Express devices is 250 ns.
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Sequence Engine Done Event:Pulse:Width
- C Attribute: NIDCPOWER_ATTR_SEQUENCE_ENGINE_DONE_EVENT_PULSE_WIDTH
sequence_iteration_complete_event_output_terminal¶
nidcpower.Session.
sequence_iteration_complete_event_output_terminal
¶Specifies the output terminal for exporting the Sequence Iteration Complete event. for information about supported devices. Output terminals can be specified in one of two ways. If the device is named Dev1 and your terminal is PXI_Trig0, you can specify the terminal with the fully qualified terminal name, /Dev1/PXI_Trig0, or with the shortened terminal name, PXI_Trig0.
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Sequence Iteration Complete Event:Output Terminal
- C Attribute: NIDCPOWER_ATTR_SEQUENCE_ITERATION_COMPLETE_EVENT_OUTPUT_TERMINAL
sequence_iteration_complete_event_pulse_polarity¶
nidcpower.Session.
sequence_iteration_complete_event_pulse_polarity
¶Specifies the behavior of the Sequence Iteration Complete event. for information about supported devices. Default Value:
HIGH
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.Polarity Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Sequence Iteration Complete Event:Pulse:Polarity
- C Attribute: NIDCPOWER_ATTR_SEQUENCE_ITERATION_COMPLETE_EVENT_PULSE_POLARITY
sequence_iteration_complete_event_pulse_width¶
nidcpower.Session.
sequence_iteration_complete_event_pulse_width
¶Specifies the width of the Sequence Iteration Complete event, in seconds. The minimum event pulse width value for PXI devices is 150 ns, and the minimum event pulse width value for PXI Express devices is 250 ns. The maximum event pulse width value for all devices is 1.6 microseconds. the NI DC Power Supplies and SMUs Help for information about supported devices. Valid Values: 1.5e-7 to 1.6e-6 seconds Default Value: The default value for PXI devices is 150 ns. The default value for PXI Express devices is 250 ns.
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic in
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Sequence Iteration Complete Event:Pulse:Width
- C Attribute: NIDCPOWER_ATTR_SEQUENCE_ITERATION_COMPLETE_EVENT_PULSE_WIDTH
sequence_loop_count¶
nidcpower.Session.
sequence_loop_count
¶Specifies the number of times a sequence is run after initiation. Refer to the Sequence Source Mode topic in the NI DC Power Supplies and SMUs Help for more information about the sequence loop count. for information about supported devices. When the
nidcpower.Session.sequence_loop_count_is_finite
property is set to False, thenidcpower.Session.sequence_loop_count
property is ignored. Valid Range: 1 to 134217727 Default Value: 1Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Advanced:Sequence Loop Count
- C Attribute: NIDCPOWER_ATTR_SEQUENCE_LOOP_COUNT
sequence_loop_count_is_finite¶
nidcpower.Session.
sequence_loop_count_is_finite
¶Specifies whether a sequence should repeat indefinitely. Refer to the Sequence Source Mode topic in the NI DC Power Supplies and SMUs Help for more information about infinite sequencing.
nidcpower.Session.sequence_loop_count_is_finite
property is set to False, thenidcpower.Session.sequence_loop_count
property is ignored. Default Value: TrueNote
This property is not supported by all devices. When the
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Advanced:Sequence Loop Count Is Finite
- C Attribute: NIDCPOWER_ATTR_SEQUENCE_LOOP_COUNT_IS_FINITE
simulate¶
nidcpower.Session.
simulate
¶Specifies whether to simulate NI-DCPower I/O operations. True specifies that operation is simulated. Default Value: False
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:User Options:Simulate
- C Attribute: NIDCPOWER_ATTR_SIMULATE
source_complete_event_output_terminal¶
nidcpower.Session.
source_complete_event_output_terminal
¶Specifies the output terminal for exporting the Source Complete event. for information about supported devices. Output terminals can be specified in one of two ways. If the device is named Dev1 and your terminal is PXI_Trig0, you can specify the terminal with the fully qualified terminal name, /Dev1/PXI_Trig0, or with the shortened terminal name, PXI_Trig0.
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Source Complete Event:Output Terminal
- C Attribute: NIDCPOWER_ATTR_SOURCE_COMPLETE_EVENT_OUTPUT_TERMINAL
source_complete_event_pulse_polarity¶
nidcpower.Session.
source_complete_event_pulse_polarity
¶Specifies the behavior of the Source Complete event. for information about supported devices. Default Value:
HIGH
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.Polarity Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Source Complete Event:Pulse:Polarity
- C Attribute: NIDCPOWER_ATTR_SOURCE_COMPLETE_EVENT_PULSE_POLARITY
source_complete_event_pulse_width¶
nidcpower.Session.
source_complete_event_pulse_width
¶Specifies the width of the Source Complete event, in seconds. for information about supported devices. The minimum event pulse width value for PXI devices is 150 ns, and the minimum event pulse width value for PXI Express devices is 250 ns. The maximum event pulse width value for all devices is 1.6 microseconds Valid Values: 1.5e-7 to 1.6e-6 seconds Default Value: The default value for PXI devices is 150 ns. The default value for PXI Express devices is 250 ns.
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Source Complete Event:Pulse:Width
- C Attribute: NIDCPOWER_ATTR_SOURCE_COMPLETE_EVENT_PULSE_WIDTH
source_delay¶
nidcpower.Session.
source_delay
¶Determines when, in seconds, the device generates the Source Complete event, potentially starting a measurement if the
nidcpower.Session.measure_when
property is set toAUTOMATICALLY_AFTER_SOURCE_COMPLETE
. Refer to the Single Point Source Mode and Sequence Source Mode topics for more information. Valid Values: 0 to 167 seconds Default Value: 0.01667 secondsNote
Refer to Supported Properties by Device for information about supported devices.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the source_delay.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an source_delay.Session instance, and calling set/get value on the result.:
session['0,1'].source_delay = var var = session['0,1'].source_delayThe following table lists the characteristics of this property.
Characteristic Value Datatype float in seconds or datetime.timedelta Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Advanced:Source Delay
- C Attribute: NIDCPOWER_ATTR_SOURCE_DELAY
source_mode¶
nidcpower.Session.
source_mode
¶Specifies whether to run a single output point or a sequence. Refer to the Single Point Source Mode and Sequence Source Mode topics in the NI DC Power Supplies and SMUs Help for more information about source modes. Default value:
SINGLE_POINT
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.SourceMode Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Source Mode
- C Attribute: NIDCPOWER_ATTR_SOURCE_MODE
source_trigger_type¶
nidcpower.Session.
source_trigger_type
¶Specifies the behavior of the Source trigger. for information about supported devices. Default Value:
NONE
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.TriggerType Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Source Trigger:Trigger Type
- C Attribute: NIDCPOWER_ATTR_SOURCE_TRIGGER_TYPE
specific_driver_description¶
nidcpower.Session.
specific_driver_description
¶Contains a brief description of the specific driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Driver Identification:Description
- C Attribute: NIDCPOWER_ATTR_SPECIFIC_DRIVER_DESCRIPTION
specific_driver_prefix¶
nidcpower.Session.
specific_driver_prefix
¶Contains the prefix for NI-DCPower. The name of each user-callable method in NI-DCPower begins with this prefix.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Driver Identification:Driver Prefix
- C Attribute: NIDCPOWER_ATTR_SPECIFIC_DRIVER_PREFIX
specific_driver_revision¶
nidcpower.Session.
specific_driver_revision
¶Contains additional version information about NI-DCPower.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Driver Identification:Revision
- C Attribute: NIDCPOWER_ATTR_SPECIFIC_DRIVER_REVISION
specific_driver_vendor¶
nidcpower.Session.
specific_driver_vendor
¶Contains the name of the vendor that supplies NI-DCPower.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Driver Identification:Driver Vendor
- C Attribute: NIDCPOWER_ATTR_SPECIFIC_DRIVER_VENDOR
start_trigger_type¶
nidcpower.Session.
start_trigger_type
¶Specifies the behavior of the Start trigger. for information about supported devices. Default Value:
NONE
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.TriggerType Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Start Trigger:Trigger Type
- C Attribute: NIDCPOWER_ATTR_START_TRIGGER_TYPE
supported_instrument_models¶
nidcpower.Session.
supported_instrument_models
¶Contains a comma-separated (,) list of supported NI-DCPower device models.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Driver Capabilities:Supported Instrument Models
- C Attribute: NIDCPOWER_ATTR_SUPPORTED_INSTRUMENT_MODELS
transient_response¶
nidcpower.Session.
transient_response
¶Specifies the transient response. Refer to the Transient Response topic in the NI DC Power Supplies and SMUs Help for more information about transient response. for information about supported devices. Default Value:
NORMAL
Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the transient_response.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an transient_response.Session instance, and calling set/get value on the result.:
session['0,1'].transient_response = var var = session['0,1'].transient_responseThe following table lists the characteristics of this property.
Characteristic Value Datatype enums.TransientResponse Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Transient Response
- C Attribute: NIDCPOWER_ATTR_TRANSIENT_RESPONSE
voltage_compensation_frequency¶
nidcpower.Session.
voltage_compensation_frequency
¶The frequency at which a pole-zero pair is added to the system when the channel is in Constant Voltage mode. for information about supported devices. Default value: Determined by the value of the
NORMAL
setting of thenidcpower.Session.transient_response
property.Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the voltage_compensation_frequency.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an voltage_compensation_frequency.Session instance, and calling set/get value on the result.:
session['0,1'].voltage_compensation_frequency = var var = session['0,1'].voltage_compensation_frequencyThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Custom Transient Response:Voltage:Compensation Frequency
- C Attribute: NIDCPOWER_ATTR_VOLTAGE_COMPENSATION_FREQUENCY
voltage_gain_bandwidth¶
nidcpower.Session.
voltage_gain_bandwidth
¶The frequency at which the unloaded loop gain extrapolates to 0 dB in the absence of additional poles and zeroes. This property takes effect when the channel is in Constant Voltage mode. for information about supported devices. Default Value: Determined by the value of the
NORMAL
setting of thenidcpower.Session.transient_response
property.Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the voltage_gain_bandwidth.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an voltage_gain_bandwidth.Session instance, and calling set/get value on the result.:
session['0,1'].voltage_gain_bandwidth = var var = session['0,1'].voltage_gain_bandwidthThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Custom Transient Response:Voltage:Gain Bandwidth
- C Attribute: NIDCPOWER_ATTR_VOLTAGE_GAIN_BANDWIDTH
voltage_level¶
nidcpower.Session.
voltage_level
¶Specifies the voltage level, in volts, that the device attempts to generate on the specified channel(s). This property is applicable only if the
nidcpower.Session.output_function
property is set toDC_VOLTAGE
.nidcpower.Session.output_enabled
property for more information about enabling the output channel. Valid Values: The valid values for this property are defined by the values you specify for thenidcpower.Session.voltage_level_range
property.Note
The channel must be enabled for the specified voltage level to take effect. Refer to the
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the voltage_level.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an voltage_level.Session instance, and calling set/get value on the result.:
session['0,1'].voltage_level = var var = session['0,1'].voltage_levelThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:DC Voltage:Voltage Level
- C Attribute: NIDCPOWER_ATTR_VOLTAGE_LEVEL
voltage_level_autorange¶
nidcpower.Session.
voltage_level_autorange
¶Specifies whether NI-DCPower automatically selects the voltage level range based on the desired voltage level for the specified channel(s). If you set this property to
ON
, NI-DCPower ignores any changes you make to thenidcpower.Session.voltage_level_range
property. If you change thenidcpower.Session.voltage_level_autorange
property fromON
toOFF
, NI-DCPower retains the last value thenidcpower.Session.voltage_level_range
property was set to (or the default value if the property was never set) and uses that value as the voltage level range. Query thenidcpower.Session.voltage_level_range
property by using thenidcpower.Session._get_attribute_vi_int32()
method for information about which range NI-DCPower automatically selects. Thenidcpower.Session.voltage_level_autorange
property is applicable only if thenidcpower.Session.output_function
property is set toDC_VOLTAGE
. Default Value:OFF
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the voltage_level_autorange.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an voltage_level_autorange.Session instance, and calling set/get value on the result.:
session['0,1'].voltage_level_autorange = var var = session['0,1'].voltage_level_autorangeThe following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:DC Voltage:Voltage Level Autorange
- C Attribute: NIDCPOWER_ATTR_VOLTAGE_LEVEL_AUTORANGE
voltage_level_range¶
nidcpower.Session.
voltage_level_range
¶Specifies the voltage level range, in volts, for the specified channel(s). The range defines the valid values to which the voltage level can be set. Use the
nidcpower.Session.voltage_level_autorange
property to enable automatic selection of the voltage level range. Thenidcpower.Session.voltage_level_range
property is applicable only if thenidcpower.Session.output_function
property is set toDC_VOLTAGE
.nidcpower.Session.output_enabled
property for more information about enabling the output channel. For valid ranges, refer to the Ranges topic for your device in the NI DC Power Supplies and SMUs Help.Note
The channel must be enabled for the specified voltage level range to take effect. Refer to the
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the voltage_level_range.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an voltage_level_range.Session instance, and calling set/get value on the result.:
session['0,1'].voltage_level_range = var var = session['0,1'].voltage_level_rangeThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:DC Voltage:Voltage Level Range
- C Attribute: NIDCPOWER_ATTR_VOLTAGE_LEVEL_RANGE
voltage_limit¶
nidcpower.Session.
voltage_limit
¶Specifies the voltage limit, in volts, that the output cannot exceed when generating the desired current level on the specified channels. This property is applicable only if the
nidcpower.Session.output_function
property is set toDC_CURRENT
and thenidcpower.Session.compliance_limit_symmetry
property is set toNIDCPOWER_VAL_SYMMETRIC
.nidcpower.Session.output_enabled
property for more information about enabling the output channel. Valid Values: The valid values for this property are defined by the values to which thenidcpower.Session.voltage_limit_range
property is set.Note
The channel must be enabled for the specified current level to take effect. Refer to the
Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the voltage_limit.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an voltage_limit.Session instance, and calling set/get value on the result.:
session['0,1'].voltage_limit = var var = session['0,1'].voltage_limitThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:DC Current:Voltage Limit
- C Attribute: NIDCPOWER_ATTR_VOLTAGE_LIMIT
voltage_limit_autorange¶
nidcpower.Session.
voltage_limit_autorange
¶Specifies whether NI-DCPower automatically selects the voltage limit range based on the desired voltage limit for the specified channel(s). If this property is set to
ON
, NI-DCPower ignores any changes you make to thenidcpower.Session.voltage_limit_range
property. If you change thenidcpower.Session.voltage_limit_autorange
property fromON
toOFF
, NI-DCPower retains the last value thenidcpower.Session.voltage_limit_range
property was set to (or the default value if the property was never set) and uses that value as the voltage limit range. Query thenidcpower.Session.voltage_limit_range
property by using thenidcpower.Session._get_attribute_vi_int32()
method to find out which range NI-DCPower automatically selects. Thenidcpower.Session.voltage_limit_autorange
property is applicable only if thenidcpower.Session.output_function
property is set toDC_CURRENT
. Default Value:OFF
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the voltage_limit_autorange.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an voltage_limit_autorange.Session instance, and calling set/get value on the result.:
session['0,1'].voltage_limit_autorange = var var = session['0,1'].voltage_limit_autorangeThe following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:DC Current:Voltage Limit Autorange
- C Attribute: NIDCPOWER_ATTR_VOLTAGE_LIMIT_AUTORANGE
voltage_limit_high¶
nidcpower.Session.
voltage_limit_high
¶Specifies the maximum voltage, in volts, that the output can produce when generating the desired current on the specified channel(s). This property is applicable only if the Compliance Limit Symmetry <p:py:meth:`nidcpower.Session.ComplianceLimitSymmetry.html>`__ property is set to Asymmetric and the Output Method <p:py:meth:`nidcpower.Session.OutputFunction.html>`__ property is set to DC Current. You must also specify a Voltage Limit Low <p:py:meth:`nidcpower.Session.VoltageLimitLow.html>`__ to complete the asymmetric range. Valid Values: [1% of Voltage Limit Range <p:py:meth:`nidcpower.Session.VoltageLimitRange.html>`__, Voltage Limit Range <p:py:meth:`nidcpower.Session.VoltageLimitRange.html>`__] The range bounded by the limit high and limit low must include zero. Default Value: Refer to Supported Properties by Device for the default value by device. Related Topics: Ranges Changing Ranges Overranging
Note
The limit may be extended beyond the selected limit range if the Overranging Enabled <p:py:meth:`nidcpower.Session.OverrangingEnabled.html>`__ property is set to TRUE.
Note
One or more of the referenced methods are not in the Python API for this driver.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the voltage_limit_high.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an voltage_limit_high.Session instance, and calling set/get value on the result.:
session['0,1'].voltage_limit_high = var var = session['0,1'].voltage_limit_highThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:DC Current:Voltage Limit High
- C Attribute: NIDCPOWER_ATTR_VOLTAGE_LIMIT_HIGH
voltage_limit_low¶
nidcpower.Session.
voltage_limit_low
¶Specifies the minimum voltage, in volts, that the output can produce when generating the desired current on the specified channel(s). This property is applicable only if the Compliance Limit Symmetry <p:py:meth:`nidcpower.Session.ComplianceLimitSymmetry.html>`__ property is set to Asymmetric and the Output Method <p:py:meth:`nidcpower.Session.OutputFunction.html>`__ property is set to DC Current. You must also specify a Voltage Limit High <p:py:meth:`nidcpower.Session.VoltageLimitHigh.html>`__ to complete the asymmetric range. Valid Values: [-Voltage Limit Range <p:py:meth:`nidcpower.Session.VoltageLimitRange.html>`__, -1% of Voltage Limit Range <p:py:meth:`nidcpower.Session.VoltageLimitRange.html>`__] The range bounded by the limit high and limit low must include zero. Default Value: Refer to Supported Properties by Device for the default value by device. Related Topics: Ranges Changing Ranges Overranging
Note
The limit may be extended beyond the selected limit range if the Overranging Enabled <p:py:meth:`nidcpower.Session.OverrangingEnabled.html>`__ property is set to TRUE.
Note
One or more of the referenced methods are not in the Python API for this driver.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the voltage_limit_low.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an voltage_limit_low.Session instance, and calling set/get value on the result.:
session['0,1'].voltage_limit_low = var var = session['0,1'].voltage_limit_lowThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:DC Current:Voltage Limit Low
- C Attribute: NIDCPOWER_ATTR_VOLTAGE_LIMIT_LOW
voltage_limit_range¶
nidcpower.Session.
voltage_limit_range
¶Specifies the voltage limit range, in volts, for the specified channel(s). The range defines the valid values to which the voltage limit can be set. Use the
nidcpower.Session.voltage_limit_autorange
property to enable automatic selection of the voltage limit range. Thenidcpower.Session.voltage_limit_range
property is applicable only if thenidcpower.Session.output_function
property is set toDC_CURRENT
.nidcpower.Session.output_enabled
property for more information about enabling the output channel. For valid ranges, refer to the Ranges topic for your device in the NI DC Power Supplies and SMUs Help.Note
The channel must be enabled for the specified voltage limit range to take effect. Refer to the
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the voltage_limit_range.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an voltage_limit_range.Session instance, and calling set/get value on the result.:
session['0,1'].voltage_limit_range = var var = session['0,1'].voltage_limit_rangeThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:DC Current:Voltage Limit Range
- C Attribute: NIDCPOWER_ATTR_VOLTAGE_LIMIT_RANGE
voltage_pole_zero_ratio¶
nidcpower.Session.
voltage_pole_zero_ratio
¶The ratio of the pole frequency to the zero frequency when the channel is in Constant Voltage mode. for information about supported devices. Default value: Determined by the value of the
NORMAL
setting of thenidcpower.Session.transient_response
property.Note
This property is not supported by all devices. Refer to Supported Properties by Device topic
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the voltage_pole_zero_ratio.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an voltage_pole_zero_ratio.Session instance, and calling set/get value on the result.:
session['0,1'].voltage_pole_zero_ratio = var var = session['0,1'].voltage_pole_zero_ratioThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Source:Custom Transient Response:Voltage:Pole-Zero Ratio
- C Attribute: NIDCPOWER_ATTR_VOLTAGE_POLE_ZERO_RATIO
Methods¶
abort¶
nidcpower.Session.
abort
()¶Transitions the NI-DCPower session from the Running state to the Committed state. If a sequence is running, it is stopped. Any configuration methods called after this method are not applied until the
nidcpower.Session.initiate()
method is called. If power output is enabled when you call thenidcpower.Session.abort()
method, the output channels remain in their current state and continue providing power.Use the
nidcpower.Session.ConfigureOutputEnabled()
method to disable power output on a per channel basis. Use thenidcpower.Session.reset()
method to disable output on all channels.Refer to the Programming States topic in the NI DC Power Supplies and SMUs Help for information about the specific NI-DCPower software states.
Related Topics:
Note
One or more of the referenced methods are not in the Python API for this driver.
commit¶
nidcpower.Session.
commit
()¶Applies previously configured settings to the device. Calling this method moves the NI-DCPower session from the Uncommitted state into the Committed state. After calling this method, modifying any property reverts the NI-DCPower session to the Uncommitted state. Use the
nidcpower.Session.initiate()
method to transition to the Running state. Refer to the Programming States topic in the NI DC Power Supplies and SMUs Help for details about the specific NI-DCPower software states.Related Topics:
configure_aperture_time¶
nidcpower.Session.
configure_aperture_time
(aperture_time, units=nidcpower.ApertureTimeUnits.SECONDS)¶Configures the aperture time on the specified channel(s).
The supported values depend on the units. Refer to the Aperture Time topic for your device in the NI DC Power Supplies and SMUs Help for more information. In general, devices support discrete apertureTime values, and if you configure apertureTime to some unsupported value, NI-DCPower coerces it up to the next supported value.
Refer to the Measurement Configuration and Timing or DC Noise Rejection topic for your device in the NI DC Power Supplies and SMUs Help for more information about how to configure your measurements.
Related Topics:
Note
This method is not supported on all devices. Refer to Supported Methods by Device for more information about supported devices.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nidcpower.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nidcpower.Session instance, and calling this method on the result.:
session.channels['0,1'].configure_aperture_time(aperture_time, units=nidcpower.ApertureTimeUnits.SECONDS)
Parameters:
- aperture_time (float) – Specifies the aperture time. Refer to the Aperture Time topic for your device in the NI DC Power Supplies and SMUs Help for more information.
- units (
nidcpower.ApertureTimeUnits
) –Specifies the units for apertureTime. Defined Values:
SECONDS
(1028)Specifies seconds. POWER_LINE_CYCLES
(1029)Specifies Power Line Cycles.
configure_digital_edge_measure_trigger¶
nidcpower.Session.
configure_digital_edge_measure_trigger
(input_terminal, edge=nidcpower.DigitalEdge.RISING)¶Configures the Measure trigger for digital edge triggering.
Note
This method is not supported on all devices. Refer to Supported Methods by Device for more information about supported devices.
Parameters:
- input_terminal (str) –
Specifies the input terminal for the digital edge Measure trigger.
You can specify any valid input terminal for this method. Valid terminals are listed in MAX under the Device Routes tab. For PXIe-4162/4163, refer to the Signal Routing topic for the device to determine which routes are available. This information is not available on a Device Routes tab in MAX.
Input terminals can be specified in one of two ways. If the device is named Dev1 and your terminal is PXI_Trig0, you can specify the terminal with the fully qualified terminal name, /Dev1/PXI_Trig0, or with the shortened terminal name, PXI_Trig0. The input terminal can also be a terminal from another device. For example, you can set the input terminal on Dev1 to be /Dev2/SourceCompleteEvent.
- edge (
nidcpower.DigitalEdge
) –Specifies whether to configure the Measure trigger to assert on the rising or falling edge. Defined Values:
RISING
(1016)Asserts the trigger on the rising edge of the digital signal. FALLING
(1017)Asserts the trigger on the falling edge of the digital signal.
configure_digital_edge_pulse_trigger¶
nidcpower.Session.
configure_digital_edge_pulse_trigger
(input_terminal, edge=nidcpower.DigitalEdge.RISING)¶Configures the Pulse trigger for digital edge triggering.
Note
This method is not supported on all devices. Refer to Supported Methods by Device for more information about supported devices.
Parameters:
- input_terminal (str) –
Specifies the input terminal for the digital edge Pulse trigger.
You can specify any valid input terminal for this method. Valid terminals are listed in MAX under the Device Routes tab.
Input terminals can be specified in one of two ways. If the device is named Dev1 and your terminal is PXI_Trig0, you can specify the terminal with the fully qualified terminal name, /Dev1/PXI_Trig0, or with the shortened terminal name, PXI_Trig0. The input terminal can also be a terminal from another device. For example, you can set the input terminal on Dev1 to be /Dev2/SourceCompleteEvent.
- edge (
nidcpower.DigitalEdge
) –Specifies whether to configure the Pulse trigger to assert on the rising or falling edge. Defined Values:
RISING
(1016)Asserts the trigger on the rising edge of the digital signal. FALLING
(1017)Asserts the trigger on the falling edge of the digital signal.
configure_digital_edge_sequence_advance_trigger¶
nidcpower.Session.
configure_digital_edge_sequence_advance_trigger
(input_terminal, edge=nidcpower.DigitalEdge.RISING)¶Configures the Sequence Advance trigger for digital edge triggering.
Note
This method is not supported on all devices. Refer to Supported Methods by Device for more information about supported devices.
Parameters:
- input_terminal (str) –
Specifies the input terminal for the digital edge Sequence Advance trigger.
You can specify any valid input terminal for this method. Valid terminals are listed in MAX under the Device Routes tab. For PXIe-4162/4163, refer to the Signal Routing topic for the device to determine which routes are available. This information is not available on a Device Routes tab in MAX.
Input terminals can be specified in one of two ways. If the device is named Dev1 and your terminal is PXI_Trig0, you can specify the terminal with the fully qualified terminal name, /Dev1/PXI_Trig0, or with the shortened terminal name, PXI_Trig0. The input terminal can also be a terminal from another device. For example, you can set the input terminal on Dev1 to be /Dev2/SourceCompleteEvent.
- edge (
nidcpower.DigitalEdge
) –Specifies whether to configure the Sequence Advance trigger to assert on the rising or falling edge. Defined Values:
RISING
(1016)Asserts the trigger on the rising edge of the digital signal. FALLING
(1017)Asserts the trigger on the falling edge of the digital signal.
configure_digital_edge_source_trigger¶
nidcpower.Session.
configure_digital_edge_source_trigger
(input_terminal, edge=nidcpower.DigitalEdge.RISING)¶Configures the Source trigger for digital edge triggering.
Note
This method is not supported on all devices. Refer to Supported Methods by Device for more information about supported devices.
Parameters:
- input_terminal (str) –
Specifies the input terminal for the digital edge Source trigger.
You can specify any valid input terminal for this method. Valid terminals are listed in MAX under the Device Routes tab. For PXIe-4162/4163, refer to the Signal Routing topic for the device to determine which routes are available. This information is not available on a Device Routes tab in MAX.
Input terminals can be specified in one of two ways. If the device is named Dev1 and your terminal is PXI_Trig0, you can specify the terminal with the fully qualified terminal name, /Dev1/PXI_Trig0, or with the shortened terminal name, PXI_Trig0. The input terminal can also be a terminal from another device. For example, you can set the input terminal on Dev1 to be /Dev2/SourceCompleteEvent.
- edge (
nidcpower.DigitalEdge
) –Specifies whether to configure the Source trigger to assert on the rising or falling edge. Defined Values:
RISING
(1016)Asserts the trigger on the rising edge of the digital signal. FALLING
(1017)Asserts the trigger on the falling edge of the digital signal.
configure_digital_edge_start_trigger¶
nidcpower.Session.
configure_digital_edge_start_trigger
(input_terminal, edge=nidcpower.DigitalEdge.RISING)¶Configures the Start trigger for digital edge triggering.
Note
This method is not supported on all devices. Refer to Supported Methods by Device for more information about supported devices.
Parameters:
- input_terminal (str) –
Specifies the input terminal for the digital edge Start trigger.
You can specify any valid input terminal for this method. Valid terminals are listed in MAX under the Device Routes tab. For PXIe-4162/4163, refer to the Signal Routing topic for the device to determine which routes are available. This information is not available on a Device Routes tab in MAX.
Input terminals can be specified in one of two ways. If the device is named Dev1 and your terminal is PXI_Trig0, you can specify the terminal with the fully qualified terminal name, /Dev1/PXI_Trig0, or with the shortened terminal name, PXI_Trig0. The input terminal can also be a terminal from another device. For example, you can set the input terminal on Dev1 to be /Dev2/SourceCompleteEvent.
- edge (
nidcpower.DigitalEdge
) –Specifies whether to configure the Start trigger to assert on the rising or falling edge. Defined Values:
RISING
(1016)Asserts the trigger on the rising edge of the digital signal. FALLING
(1017)Asserts the trigger on the falling edge of the digital signal.
disable¶
nidcpower.Session.
disable
()¶This method performs the same actions as the
nidcpower.Session.reset()
method, except that this method also immediately sets thenidcpower.Session.output_enabled
property to False.This method opens the output relay on devices that have an output relay.
fetch_multiple¶
nidcpower.Session.
fetch_multiple
(count, timeout=datetime.timedelta(seconds=1.0))¶Returns a list of named tuples (Measurement) that were previously taken and are stored in the NI-DCPower buffer. This method should not be used when the
nidcpower.Session.measure_when
property is set toON_DEMAND
. You must first callnidcpower.Session.initiate()
before calling this method.Fields in Measurement:
- voltage (float)
- current (float)
- in_compliance (bool)
Note
This method is not supported on all devices. Refer to Supported Methods by Device for more information about supported devices.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nidcpower.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nidcpower.Session instance, and calling this method on the result.:
session.channels['0,1'].fetch_multiple(count, timeout=datetime.timedelta(seconds=1.0))
Parameters:
- count (int) – Specifies the number of measurements to fetch.
- timeout (float in seconds or datetime.timedelta) –
Specifies the maximum time allowed for this method to complete. If the method does not complete within this time interval, NI-DCPower returns an error.
Note
When setting the timeout interval, ensure you take into account any triggers so that the timeout interval is long enough for your application.
Return type: list of Measurement
Returns: List of named tuples with fields:
- voltage (float)
- current (float)
- in_compliance (bool)
get_channel_name¶
nidcpower.Session.
get_channel_name
(index)¶Retrieves the output channelName that corresponds to the requested index. Use the
nidcpower.Session.channel_count
property to determine the upper bound of valid values for index.Tip
This method requires repeated capabilities (usually channels). If called directly on the nidcpower.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nidcpower.Session instance, and calling this method on the result.:
session.channels['0,1'].get_channel_name(index)
Parameters: index (int) – Specifies which output channel name to return. The index values begin at 1.
get_ext_cal_last_date_and_time¶
nidcpower.Session.
get_ext_cal_last_date_and_time
()¶Returns the date and time of the last successful calibration.
Return type: datetime.datetime Returns: Indicates date and time of the last calibration.
get_ext_cal_last_temp¶
nidcpower.Session.
get_ext_cal_last_temp
()¶Returns the onboard temperature of the device, in degrees Celsius, during the last successful external calibration.
Return type: float Returns: Returns the onboard temperature of the device, in degrees Celsius, during the last successful external calibration.
get_ext_cal_recommended_interval¶
nidcpower.Session.
get_ext_cal_recommended_interval
()¶Returns the recommended maximum interval, in months, between external calibrations.
Return type: datetime.timedelta Returns: Specifies the recommended maximum interval, in months, between external calibrations.
get_self_cal_last_date_and_time¶
nidcpower.Session.
get_self_cal_last_date_and_time
()¶Returns the date and time of the oldest successful self-calibration from among the channels in the session.
Note
This method is not supported on all devices.
Return type: datetime.datetime Returns: Returns the date and time the device was last calibrated.
get_self_cal_last_temp¶
nidcpower.Session.
get_self_cal_last_temp
()¶Returns the onboard temperature of the device, in degrees Celsius, during the oldest successful self-calibration from among the channels in the session.
For example, if you have a session using channels 1 and 2, and you perform a self-calibration on channel 1 with a device temperature of 25 degrees Celsius at 2:00, and a self-calibration was performed on channel 2 at 27 degrees Celsius at 3:00 on the same day, this method returns 25 for the temperature parameter.
Note
This method is not supported on all devices. Refer to Supported Methods by Device for more information about supported devices.
Return type: float Returns: Returns the onboard temperature of the device, in degrees Celsius, during the oldest successful calibration.
measure¶
nidcpower.Session.
measure
(measurement_type)¶Returns the measured value of either the voltage or current on the specified output channel. Each call to this method blocks other method calls until the hardware returns the measurement. To measure multiple output channels, use the
nidcpower.Session.measure_multiple()
method.Tip
This method requires repeated capabilities (usually channels). If called directly on the nidcpower.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nidcpower.Session instance, and calling this method on the result.:
session.channels['0,1'].measure(measurement_type)
Parameters: measurement_type ( nidcpower.MeasurementTypes
) –Specifies whether a voltage or current value is measured. Defined Values:
VOLTAGE
(1)The device measures voltage. CURRENT
(0)The device measures current. Return type: float Returns: Returns the value of the measurement, either in volts for voltage or amps for current.
measure_multiple¶
nidcpower.Session.
measure_multiple
()¶Returns a list of named tuples (Measurement) containing the measured voltage and current values on the specified output channel(s). Each call to this method blocks other method calls until the measurements are returned from the device. The order of the measurements returned in the array corresponds to the order on the specified output channel(s).
Fields in Measurement:
- voltage (float)
- current (float)
- in_compliance (bool) - Always None
Note
This method is not supported on all devices. Refer to Supported Methods by Device for more information about supported devices.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nidcpower.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nidcpower.Session instance, and calling this method on the result.:
session.channels['0,1'].measure_multiple()
Return type: list of Measurement Returns: List of named tuples with fields:
- voltage (float)
- current (float)
- in_compliance (bool) - Always None
query_in_compliance¶
nidcpower.Session.
query_in_compliance
()¶Queries the specified output device to determine if it is operating at the compliance limit.
The compliance limit is the current limit when the output method is set to
DC_VOLTAGE
. If the output is operating at the compliance limit, the output reaches the current limit before the desired voltage level. Refer to thenidcpower.Session.ConfigureOutputFunction()
method and thenidcpower.Session.ConfigureCurrentLimit()
method for more information about output method and current limit, respectively.The compliance limit is the voltage limit when the output method is set to
DC_CURRENT
. If the output is operating at the compliance limit, the output reaches the voltage limit before the desired current level. Refer to thenidcpower.Session.ConfigureOutputFunction()
method and thenidcpower.Session.ConfigureVoltageLimit()
method for more information about output method and voltage limit, respectively.Related Topics:
Note
One or more of the referenced methods are not in the Python API for this driver.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nidcpower.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nidcpower.Session instance, and calling this method on the result.:
session.channels['0,1'].query_in_compliance()
Return type: bool Returns: Returns whether the device output channel is in compliance.
query_max_current_limit¶
nidcpower.Session.
query_max_current_limit
(voltage_level)¶Queries the maximum current limit on an output channel if the output channel is set to the specified voltageLevel.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nidcpower.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nidcpower.Session instance, and calling this method on the result.:
session.channels['0,1'].query_max_current_limit(voltage_level)
Parameters: voltage_level (float) – Specifies the voltage level to use when calculating the maxCurrentLimit. Return type: float Returns: Returns the maximum current limit that can be set with the specified voltageLevel.
query_max_voltage_level¶
nidcpower.Session.
query_max_voltage_level
(current_limit)¶Queries the maximum voltage level on an output channel if the output channel is set to the specified currentLimit.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nidcpower.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nidcpower.Session instance, and calling this method on the result.:
session.channels['0,1'].query_max_voltage_level(current_limit)
Parameters: current_limit (float) – Specifies the current limit to use when calculating the maxVoltageLevel. Return type: float Returns: Returns the maximum voltage level that can be set on an output channel with the specified currentLimit.
query_min_current_limit¶
nidcpower.Session.
query_min_current_limit
(voltage_level)¶Queries the minimum current limit on an output channel if the output channel is set to the specified voltageLevel.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nidcpower.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nidcpower.Session instance, and calling this method on the result.:
session.channels['0,1'].query_min_current_limit(voltage_level)
Parameters: voltage_level (float) – Specifies the voltage level to use when calculating the minCurrentLimit. Return type: float Returns: Returns the minimum current limit that can be set on an output channel with the specified voltageLevel.
query_output_state¶
nidcpower.Session.
query_output_state
(output_state)¶Queries the specified output channel to determine if the output channel is currently in the state specified by outputState.
Related Topics:
Tip
This method requires repeated capabilities (usually channels). If called directly on the nidcpower.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nidcpower.Session instance, and calling this method on the result.:
session.channels['0,1'].query_output_state(output_state)
Parameters: output_state ( nidcpower.OutputStates
) –Specifies the output state of the output channel that is being queried. Defined Values:
VOLTAGE
(0)The device maintains a constant voltage by adjusting the current. CURRENT
(1)The device maintains a constant current by adjusting the voltage. Return type: bool Returns: Returns whether the device output channel is in the specified output state.
read_current_temperature¶
reset¶
nidcpower.Session.
reset
()¶Resets the device to a known state. This method disables power generation, resets session properties to their default values, commits the session properties, and leaves the session in the Uncommitted state. Refer to the Programming States topic for more information about NI-DCPower software states.
reset_device¶
nidcpower.Session.
reset_device
()¶Resets the device to a known state. The method disables power generation, resets session properties to their default values, clears errors such as overtemperature and unexpected loss of auxiliary power, commits the session properties, and leaves the session in the Uncommitted state. This method also performs a hard reset on the device and driver software. This method has the same functionality as using reset in Measurement & Automation Explorer. Refer to the Programming States topic for more information about NI-DCPower software states.
This will also open the output relay on devices that have an output relay.
reset_with_defaults¶
nidcpower.Session.
reset_with_defaults
()¶Resets the device to a known state. This method disables power generation, resets session properties to their default values, commits the session properties, and leaves the session in the Running state. In addition to exhibiting the behavior of the
nidcpower.Session.reset()
method, this method can assign user-defined default values for configurable properties from the IVI configuration.
self_cal¶
nidcpower.Session.
self_cal
()¶Performs a self-calibration upon the specified channel(s).
This method disables the output, performs several internal calculations, and updates calibration values. The updated calibration values are written to the device hardware if the
nidcpower.Session.self_calibration_persistence
property is set toWRITE_TO_EEPROM
. Refer to thenidcpower.Session.self_calibration_persistence
property topic for more information about the settings for this property.When calling
nidcpower.Session.self_cal()
with the PXIe-4162/4163, specify all channels of your PXIe-4162/4163 with the channelName input. You cannot self-calibrate a subset of PXIe-4162/4163 channels.Refer to the Self-Calibration topic for more information about this method.
Related Topics:
Note
This method is not supported on all devices. Refer to Supported Methods by Device for more information about supported devices.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nidcpower.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nidcpower.Session instance, and calling this method on the result.:
session.channels['0,1'].self_cal()
self_test¶
nidcpower.Session.
self_test
()¶Performs the device self-test routine and returns the test result(s). Calling this method implicitly calls the
nidcpower.Session.reset()
method.When calling
nidcpower.Session.self_test()
with the PXIe-4162/4163, specify all channels of your PXIe-4162/4163 with the channels input ofnidcpower.Session.__init__()
. You cannot self test a subset of PXIe-4162/4163 channels.Raises SelfTestError on self test failure. Properties on exception object:
- code - failure code from driver
- message - status message from driver
Self-Test Code Description 0 Self test passed. 1 Self test failed.
send_software_edge_trigger¶
nidcpower.Session.
send_software_edge_trigger
(trigger)¶Asserts the specified trigger. This method can override an external edge trigger.
Related Topics:
Note
This method is not supported on all devices. Refer to Supported Methods by Device for more information about supported devices.
Parameters: trigger ( nidcpower.SendSoftwareEdgeTriggerType
) –Specifies which trigger to assert. Defined Values:
NIDCPOWER_VAL_START_TRIGGER
(1034)Asserts the Start trigger. NIDCPOWER_VAL_SOURCE_TRIGGER
(1035)Asserts the Source trigger. NIDCPOWER_VAL_MEASURE_TRIGGER
(1036)Asserts the Measure trigger. NIDCPOWER_VAL_SEQUENCE_ADVANCE_TRIGGER
(1037)Asserts the Sequence Advance trigger. NIDCPOWER_VAL_PULSE_TRIGGER
(1053Asserts the Pulse trigger. Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
set_sequence¶
nidcpower.Session.
set_sequence
(values, source_delays)¶Configures a series of voltage or current outputs and corresponding source delays. The source mode must be set to Sequence for this method to take effect.
Refer to the Configuring the Source Unit topic in the NI DC Power Supplies and SMUs Help for more information about how to configure your device.
Use this method in the Uncommitted or Committed programming states. Refer to the Programming States topic in the NI DC Power Supplies and SMUs Help for more information about NI-DCPower programming states.
Note
This method is not supported on all devices. Refer to Supported Methods by Device for more information about supported devices.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nidcpower.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nidcpower.Session instance, and calling this method on the result.:
session.channels['0,1'].set_sequence(values, source_delays)
Parameters:
- values (list of float) – Specifies the series of voltage levels or current levels, depending on the configured output method. Valid values: The valid values for this parameter are defined by the voltage level range or current level range.
- source_delays (list of float) – Specifies the source delay that follows the configuration of each value in the sequence. Valid Values: The valid values are between 0 and 167 seconds.
wait_for_event¶
nidcpower.Session.
wait_for_event
(event_id, timeout=datetime.timedelta(seconds=10.0))¶Waits until the device has generated the specified event.
The session monitors whether each type of event has occurred at least once since the last time this method or the
nidcpower.Session.initiate()
method were called. If an event has only been generated once and you call this method successively, the method times out. Individual events must be generated between separate calls of this method.Note
Refer to Supported Methods by Device for more information about supported devices.
Parameters:
- event_id (
nidcpower.Event
) –Specifies which event to wait for. Defined Values:
NIDCPOWER_VAL_SOURCE_COMPLETE_EVENT
(1030)Waits for the Source Complete event. NIDCPOWER_VAL_MEASURE_COMPLETE_EVENT
(1031)Waits for the Measure Complete event. NIDCPOWER_VAL_SEQUENCE_ITERATION_COMPLETE_EVENT
(1032)Waits for the Sequence Iteration Complete event. NIDCPOWER_VAL_SEQUENCE_ENGINE_DONE_EVENT
(1033)Waits for the Sequence Engine Done event. NIDCPOWER_VAL_PULSE_COMPLETE_EVENT
(1051 )Waits for the Pulse Complete event. NIDCPOWER_VAL_READY_FOR_PULSE_TRIGGER_EVENT
(1052)Waits for the Ready for Pulse Trigger event. Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
- timeout (float in seconds or datetime.timedelta) –
Specifies the maximum time allowed for this method to complete, in seconds. If the method does not complete within this time interval, NI-DCPower returns an error.
Note
When setting the timeout interval, ensure you take into account any triggers so that the timeout interval is long enough for your application.
Properties¶
Methods¶
Enums¶
Enums used in NI-DCPower
ApertureTimeUnits¶
AutoZero¶
-
class
nidcpower.
AutoZero
¶ -
OFF
¶ Disables auto zero.
-
ON
¶ Makes zero conversions for every measurement.
-
ONCE
¶ Makes zero conversions following the first measurement after initiating the device. The device uses these zero conversions for the preceding measurement and future measurements until the device is reinitiated.
-
ComplianceLimitSymmetry¶
DCNoiseRejection¶
DigitalEdge¶
Event¶
MeasureWhen¶
-
class
nidcpower.
MeasureWhen
¶ -
AUTOMATICALLY_AFTER_SOURCE_COMPLETE
¶ Acquires a measurement after each Source Complete event completes.
-
ON_DEMAND
¶ Acquires a measurement when the
nidcpower.Session.measure()
method ornidcpower.Session.measure_multiple()
method is called.
-
ON_MEASURE_TRIGGER
¶ Acquires a measurement when a Measure trigger is received.
-
MeasurementTypes¶
OutputCapacitance¶
OutputFunction¶
OutputStates¶
Polarity¶
PowerSource¶
PowerSourceInUse¶
-
class
nidcpower.
PowerSourceInUse
¶ -
INTERNAL
¶ Uses the PXI chassis power source.
-
AUXILIARY
¶ Uses the auxiliary power source connected to the device. Only the NI PXI-4110, NI PXIe-4112, NI PXIe-4113, and NI PXI-4130 support this value. This is the only supported value for the NI PXIe-4112 and NI PXIe-4113.
-
SelfCalibrationPersistence¶
SendSoftwareEdgeTriggerType¶
SourceMode¶
TransientResponse¶
Exceptions and Warnings¶
UnsupportedConfigurationError¶
- exception
nidcpower.
UnsupportedConfigurationError
¶An error due to using this module in an usupported platform.
DriverNotInstalledError¶
- exception
nidcpower.
DriverNotInstalledError
¶An error due to using this module without the driver runtime installed.
Examples¶
nidcpower_measure_record.py¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | #!/usr/bin/python
import argparse
import nidcpower
import sys
def example(resource_name, channels, options, voltage, length):
with nidcpower.Session(resource_name=resource_name, channels=channels, options=options) as session:
# Configure the session.
session.measure_record_length = length
session.measure_record_length_is_finite = True
session.measure_when = nidcpower.MeasureWhen.AUTOMATICALLY_AFTER_SOURCE_COMPLETE
session.voltage_level = voltage
session.commit()
print('Effective measurement rate: {0} S/s'.format(session.measure_record_delta_time / 1))
samples_acquired = 0
print(' # Voltage Current In Compliance')
row_format = '{0:3d}: {1:8.6f} {2:8.6f} {3}'
with session.initiate():
while samples_acquired < length:
measurements = session.fetch_multiple(count=session.fetch_backlog)
samples_acquired += len(measurements)
for i in range(len(measurements)):
print(row_format.format(i, measurements[i].voltage, measurements[i].current, measurements[i].in_compliance))
def _main(argsv):
parser = argparse.ArgumentParser(description='Outputs the specified voltage, then takes the specified number of voltage and current readings.', formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('-n', '--resource-name', default='PXI1Slot2', help='Resource name of a National Instruments SMU')
parser.add_argument('-c', '--channels', default='0', help='Channel(s) to use')
parser.add_argument('-l', '--length', default='20', type=int, help='Measure record length')
parser.add_argument('-v', '--voltage', default=5.0, type=float, help='Voltage level (V)')
parser.add_argument('-op', '--option-string', default='', type=str, help='Option string')
args = parser.parse_args(argsv)
example(args.resource_name, args.channels, args.option_string, args.voltage, args.length)
def main():
_main(sys.argv[1:])
def test_example():
options = {'simulate': True, 'driver_setup': {'Model': '4162', 'BoardType': 'PXIe', }, }
example('PXI1Slot2', '0', options, 5.0, 20)
def test_main():
cmd_line = ['--option-string', 'Simulate=1, DriverSetup=Model:4162; BoardType:PXIe', ]
_main(cmd_line)
if __name__ == '__main__':
main()
|
nidcpower_source_delay_measure.py¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | #!/usr/bin/python
import argparse
import datetime
import nidcpower
import sys
def print_fetched_measurements(measurements):
print(' Voltage : {:f} V'.format(measurements[0].voltage))
print(' Current: {:f} A'.format(measurements[0].current))
print(' In compliance: {0}'.format(measurements[0].in_compliance))
def example(resource_name, channels, options, voltage1, voltage2, delay):
timeout = datetime.timedelta(seconds=(delay + 1.0))
with nidcpower.Session(resource_name=resource_name, channels=channels, options=options) as session:
# Configure the session.
session.source_mode = nidcpower.SourceMode.SINGLE_POINT
session.output_function = nidcpower.OutputFunction.DC_VOLTAGE
session.current_limit = .06
session.voltage_level_range = 5.0
session.current_limit_range = .06
session.source_delay = datetime.timedelta(seconds=delay)
session.measure_when = nidcpower.MeasureWhen.AUTOMATICALLY_AFTER_SOURCE_COMPLETE
session.voltage_level = voltage1
with session.initiate():
print('Voltage 1:')
print_fetched_measurements(session.fetch_multiple(count=1, timeout=timeout))
session.voltage_level = voltage2 # on-the-fly set
print('Voltage 2:')
print_fetched_measurements(session.fetch_multiple(count=1, timeout=timeout))
session.output_enabled = False
def _main(argsv):
parser = argparse.ArgumentParser(description='Outputs voltage 1, waits for source delay, and then takes a measurement. Then orepeat with voltage 2.', formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('-n', '--resource-name', default='PXI1Slot2', help='Resource name of a National Instruments SMU')
parser.add_argument('-c', '--channels', default='0', help='Channel(s) to use')
parser.add_argument('-v1', '--voltage1', default=1.0, type=float, help='Voltage level 1 (V)')
parser.add_argument('-v2', '--voltage2', default=2.0, type=float, help='Voltage level 2 (V)')
parser.add_argument('-d', '--delay', default=0.05, type=float, help='Source delay (s)')
parser.add_argument('-op', '--option-string', default='', type=str, help='Option string')
args = parser.parse_args(argsv)
example(args.resource_name, args.channels, args.option_string, args.voltage1, args.voltage2, args.delay)
def main():
_main(sys.argv[1:])
def test_main():
cmd_line = ['--option-string', 'Simulate=1, DriverSetup=Model:4162; BoardType:PXIe', ]
_main(cmd_line)
def test_example():
options = {'simulate': True, 'driver_setup': {'Model': '4162', 'BoardType': 'PXIe', }, }
example('PXI1Slot2', '0', options, 1.0, 2.0, 0.05)
if __name__ == '__main__':
main()
|
nidmm module¶
Installation¶
As a prerequisite to using the nidmm module, you must install the NI-DMM runtime on your system. Visit ni.com/downloads to download the driver runtime for your devices.
The nimi-python modules (i.e. for NI-DMM) can be installed with pip:
$ python -m pip install nidmm~=0.8.0
Or easy_install from setuptools:
$ python -m easy_install nidmm
Usage¶
The following is a basic example of using the nidmm module to open a session to a DMM and perform a 5.5 digits of resolution voltage measurement in the 10 V range.
import nidmm
with nidmm.Session("Dev1") as session:
session.configureMeasurementDigits(nidmm.Function.DC_VOLTS, 10, 5.5)
print("Measurement: " + str(session.read()))
Additional examples for NI-DMM are located in src/nidmm/examples/ directory.
API Reference¶
nidmm.Session¶
-
class
nidmm.
Session
(self, resource_name, id_query=False, reset_device=False, options={})¶ This method completes the following tasks:
- Creates a new IVI instrument driver session and, optionally, sets the
initial state of the following session properties:
nidmm.Session.range_check
,nidmm.Session.QUERY_INSTR_STATUS
,nidmm.Session.cache
,nidmm.Session.simulate
,nidmm.Session.record_coercions
. - Opens a session to the device you specify for the Resource_Name parameter. If the ID_Query parameter is set to True, this method queries the instrument ID and checks that it is valid for this instrument driver.
- If the Reset_Device parameter is set to True, this method resets the instrument to a known state. Sends initialization commands to set the instrument to the state necessary for the operation of the instrument driver.
- Returns a ViSession handle that you use to identify the instrument in all subsequent instrument driver method calls.
Note
One or more of the referenced properties are not in the Python API for this driver.
Parameters: - resource_name (str) –
Caution
All IVI names for the Resource_Name, such as logical names or virtual names, are case-sensitive. If you use logical names, driver session names, or virtual names in your program, you must make sure that the name you use matches the name in the IVI Configuration Store file exactly, without any variations in the case of the characters in the name.
Contains the resource_name of the device to initialize. The resource_name is assigned in Measurement & Automation Explorer (MAX). Refer to Related Documentation for the NI Digital Multimeters Getting Started Guide for more information about configuring and testing the DMM in MAX.Valid Syntax:- NI-DAQmx name
- DAQ::NI-DAQmx name[::INSTR]
- DAQ::Traditional NI-DAQ device number[::INSTR]
- IVI logical name
- id_query (bool) –
Verifies that the device you initialize is one that the driver supports. NI-DMM automatically performs this query, so setting this parameter is not necessary. Defined Values:
True (default) 1 Perform ID Query False 0 Skip ID Query - reset_device (bool) –
Specifies whether to reset the instrument during the initialization procedure. Defined Values:
True (default) 1 Reset Device False 0 Don’t Reset - options (str) –
Specifies the initial value of certain properties for the session. The syntax for options is a dictionary of properties with an assigned value. For example:
{ ‘simulate’: False }
You do not have to specify a value for all the properties. If you do not specify a value for a property, the default value is used.
Advanced Example: { ‘simulate’: True, ‘driver_setup’: { ‘Model’: ‘<model number>’, ‘BoardType’: ‘<type>’ } }
Property Default range_check True query_instrument_status False cache True simulate False record_value_coersions False driver_setup {}
Properties
Public methods
- Creates a new IVI instrument driver session and, optionally, sets the
initial state of the following session properties:
Properties¶
ac_max_freq¶
nidmm.Session.
ac_max_freq
¶Specifies the maximum frequency component of the input signal for AC measurements. This property is used only for error checking and verifies that the value of this parameter is less than the maximum frequency of the device. This property affects the DMM only when you set the
nidmm.Session.method
property to AC measurements. The valid range is 1 Hz-300 kHz for the NI 4070/4071/4072, 10 Hz-100 kHz for the NI 4065, and 20 Hz-25 kHz for the NI 4050 and NI 4060.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Max Frequency
- C Attribute: NIDMM_ATTR_AC_MAX_FREQ
ac_min_freq¶
nidmm.Session.
ac_min_freq
¶Specifies the minimum frequency component of the input signal for AC measurements. This property affects the DMM only when you set the
nidmm.Session.method
property to AC measurements. The valid range is 1 Hz-300 kHz for the NI 4070/4071/4072, 10 Hz-100 kHz for the NI 4065, and 20 Hz-25 kHz for the NI 4050 and NI 4060.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Min Frequency
- C Attribute: NIDMM_ATTR_AC_MIN_FREQ
adc_calibration¶
nidmm.Session.
adc_calibration
¶For the NI 4070/4071/4072 only, specifies the ADC calibration mode.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.ADCCalibration Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:ADC Calibration
- C Attribute: NIDMM_ATTR_ADC_CALIBRATION
aperture_time¶
nidmm.Session.
aperture_time
¶Specifies the measurement aperture time for the current configuration. Aperture time is specified in units set by
nidmm.Session.aperture_time_units
. To override the default aperture, set this property to the desired aperture time after callingnidmm.Session.ConfigureMeasurement()
. To return to the default, set this property toNIDMM_VAL_APERTURE_TIME_AUTO
(-1). On the NI 4070/4071/4072, the minimum aperture time is 8.89 usec, and the maximum aperture time is 149 sec. Any number of powerline cycles (PLCs) within the minimum and maximum ranges is allowed on the NI 4070/4071/4072. On the NI 4065 the minimum aperture time is 333 µs, and the maximum aperture time is 78.2 s. If setting the number of averages directly, the total measurement time is aperture time X the number of averages, which must be less than 72.8 s. The aperture times allowed are 333 µs, 667 µs, or multiples of 1.11 ms-for example 1.11 ms, 2.22 ms, 3.33 ms, and so on. If you set an aperture time other than 333 µs, 667 µs, or multiples of 1.11 ms, the value will be coerced up to the next supported aperture time. On the NI 4060, when the powerline frequency is 60 Hz, the PLCs allowed are 1 PLC, 6 PLC, 12 PLC, and 120 PLC. When the powerline frequency is 50 Hz, the PLCs allowed are 1 PLC, 5 PLC, 10 PLC, and 100 PLC.Note
One or more of the referenced methods are not in the Python API for this driver.
Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Advanced:Aperture Time
- C Attribute: NIDMM_ATTR_APERTURE_TIME
aperture_time_units¶
nidmm.Session.
aperture_time_units
¶Specifies the units of aperture time for the current configuration. The NI 4060 does not support an aperture time set in seconds.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.ApertureTimeUnits Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Advanced:Aperture Time Units
- C Attribute: NIDMM_ATTR_APERTURE_TIME_UNITS
auto_range_value¶
nidmm.Session.
auto_range_value
¶Specifies the value of the range. If auto ranging, shows the actual value of the active range. The value of this property is set during a read operation.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Auto Range Value
- C Attribute: NIDMM_ATTR_AUTO_RANGE_VALUE
auto_zero¶
nidmm.Session.
auto_zero
¶Specifies the AutoZero mode. The NI 4050 is not supported.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.AutoZero Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Auto Zero
- C Attribute: NIDMM_ATTR_AUTO_ZERO
buffer_size¶
nidmm.Session.
buffer_size
¶Size in samples of the internal data buffer. Maximum is 134,217,727 (OX7FFFFFF) samples. When set to
NIDMM_VAL_BUFFER_SIZE_AUTO
(-1), NI-DMM chooses the buffer size.Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Multi Point Acquisition:Advanced:Buffer Size
- C Attribute: NIDMM_ATTR_BUFFER_SIZE
cable_comp_type¶
nidmm.Session.
cable_comp_type
¶For the NI 4072 only, the type of cable compensation that is applied to the current capacitance or inductance measurement for the current range. Changing the method or the range through this property or through
nidmm.Session.configure_measurement_digits()
resets the value of this property to the default value.The following table lists the characteristics of this property.
Characteristic Value Datatype enums.CableCompensationType Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Capacitance and Inductance:Cable Compensation Type
- C Attribute: NIDMM_ATTR_CABLE_COMP_TYPE
channel_count¶
nidmm.Session.
channel_count
¶Indicates the number of channels that the specific instrument driver supports. For each property for which the IVI_VAL_MULTI_CHANNEL flag property is set, the IVI engine maintains a separate cache value for each channel.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Instrument Capabilities:Channel Count
- C Attribute: NIDMM_ATTR_CHANNEL_COUNT
current_source¶
nidmm.Session.
current_source
¶Specifies the current source provided during diode measurements. The NI 4050 and NI 4060 are not supported.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Current Source
- C Attribute: NIDMM_ATTR_CURRENT_SOURCE
dc_bias¶
nidmm.Session.
dc_bias
¶For the NI 4072 only, controls the available DC bias for capacitance measurements.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Capacitance and Inductance:Advanced:DC Bias
- C Attribute: NIDMM_ATTR_DC_BIAS
dc_noise_rejection¶
nidmm.Session.
dc_noise_rejection
¶Specifies the DC noise rejection mode. The NI 4050 and NI 4060 are not supported.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.DCNoiseRejection Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:DC Noise Rejection
- C Attribute: NIDMM_ATTR_DC_NOISE_REJECTION
driver_setup¶
nidmm.Session.
driver_setup
¶This property indicates the Driver Setup string that the user specified when initializing the driver. Some cases exist where the end-user must specify instrument driver options at initialization time. An example of this is specifying a particular instrument model from among a family of instruments that the driver supports. This is useful when using simulation. The end-user can specify driver-specific options through the DriverSetup keyword in the optionsString parameter to the niDMM Init With Options.vi. If the user does not specify a Driver Setup string, this property returns an empty string.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:User Options:Driver Setup
- C Attribute: NIDMM_ATTR_DRIVER_SETUP
freq_voltage_autorange¶
nidmm.Session.
freq_voltage_autorange
¶For the NI 4070/4071/4072 only, specifies the value of the frequency voltage range. If Auto Ranging, shows the actual value of the active frequency voltage range. If not Auto Ranging, the value of this property is the same as that of
nidmm.Session.freq_voltage_range
.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Frequency Voltage Auto Range Value
- C Attribute: NIDMM_ATTR_FREQ_VOLTAGE_AUTORANGE
freq_voltage_range¶
nidmm.Session.
freq_voltage_range
¶Specifies the maximum amplitude of the input signal for frequency measurements.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Frequency Voltage Range
- C Attribute: NIDMM_ATTR_FREQ_VOLTAGE_RANGE
function¶
nidmm.Session.
function
¶Specifies the measurement method. Refer to the
nidmm.Session.method
topic in the NI Digital Multimeters Help for device-specific information. If you are setting this property directly, you must also set thenidmm.Session.operation_mode
property, which controls whether the DMM takes standard single or multipoint measurements, or acquires a waveform. If you are programming properties directly, you must set thenidmm.Session.operation_mode
property before setting other configuration properties. If thenidmm.Session.operation_mode
property is set toWAVEFORM
, the only valid method types areWAVEFORM_VOLTAGE
andWAVEFORM_CURRENT
. Set thenidmm.Session.operation_mode
property toIVIDMM
to set all other method values.The following table lists the characteristics of this property.
Characteristic Value Datatype enums.Function Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Function
- C Attribute: NIDMM_ATTR_FUNCTION
input_resistance¶
nidmm.Session.
input_resistance
¶Specifies the input resistance of the instrument. The NI 4050 and NI 4060 are not supported.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Input Resistance
- C Attribute: NIDMM_ATTR_INPUT_RESISTANCE
instrument_firmware_revision¶
nidmm.Session.
instrument_firmware_revision
¶A string containing the instrument firmware revision number.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Instrument Identification:Instrument Firmware Revision
- C Attribute: NIDMM_ATTR_INSTRUMENT_FIRMWARE_REVISION
instrument_manufacturer¶
nidmm.Session.
instrument_manufacturer
¶A string containing the manufacturer of the instrument.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Instrument Identification:Instrument Manufacturer
- C Attribute: NIDMM_ATTR_INSTRUMENT_MANUFACTURER
instrument_model¶
nidmm.Session.
instrument_model
¶A string containing the instrument model.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Instrument Identification:Instrument Model
- C Attribute: NIDMM_ATTR_INSTRUMENT_MODEL
instrument_product_id¶
nidmm.Session.
instrument_product_id
¶The PCI product ID.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Instrument Identification:Instrument Product ID
- C Attribute: NIDMM_ATTR_INSTRUMENT_PRODUCT_ID
io_resource_descriptor¶
nidmm.Session.
io_resource_descriptor
¶A string containing the resource descriptor of the instrument.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Advanced Session Information:I/O Resource Descriptor
- C Attribute: NIDMM_ATTR_IO_RESOURCE_DESCRIPTOR
latency¶
nidmm.Session.
latency
¶Specifies the number of measurements transferred at a time from the instrument to an internal buffer. When set to
NIDMM_VAL_LATENCY_AUTO
(-1), NI-DMM chooses the transfer size.Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Multi Point Acquisition:Advanced:Latency
- C Attribute: NIDMM_ATTR_LATENCY
lc_calculation_model¶
nidmm.Session.
lc_calculation_model
¶For the NI 4072 only, specifies the type of algorithm that the measurement processing uses for capacitance and inductance measurements.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.LCCalculationModel Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Capacitance and Inductance:Advanced:Calculation Model
- C Attribute: NIDMM_ATTR_LC_CALCULATION_MODEL
lc_number_meas_to_average¶
nidmm.Session.
lc_number_meas_to_average
¶For the NI 4072 only, specifies the number of LC measurements that are averaged to produce one reading.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Capacitance and Inductance:Number of LC Measurements To Average
- C Attribute: NIDMM_ATTR_LC_NUMBER_MEAS_TO_AVERAGE
logical_name¶
nidmm.Session.
logical_name
¶A string containing the logical name of the instrument.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Advanced Session Information:Logical Name
- C Attribute: NIDMM_ATTR_LOGICAL_NAME
meas_complete_dest¶
nidmm.Session.
meas_complete_dest
¶Specifies the destination of the measurement complete (MC) signal. The NI 4050 is not supported. To determine which values are supported by each device, refer to the LabWindows/CVI Trigger Routing section in the NI Digital Multimeters Help.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.MeasurementCompleteDest Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Trigger:Measurement Complete Dest
- C Attribute: NIDMM_ATTR_MEAS_COMPLETE_DEST
meas_dest_slope¶
nidmm.Session.
meas_dest_slope
¶Specifies the polarity of the generated measurement complete signal.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.MeasurementDestinationSlope Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Trigger:Measurement Destination Slope
- C Attribute: NIDMM_ATTR_MEAS_DEST_SLOPE
number_of_averages¶
nidmm.Session.
number_of_averages
¶Specifies the number of averages to perform in a measurement. For the NI 4070/4071/4072, applies only when the aperture time is not set to AUTO and Auto Zero is ON. The default is 1. The NI 4050 and NI 4060 are not supported.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Advanced:Number Of Averages
- C Attribute: NIDMM_ATTR_NUMBER_OF_AVERAGES
offset_comp_ohms¶
nidmm.Session.
offset_comp_ohms
¶For the NI 4070/4071/4072 only, enables or disables offset compensated ohms.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Offset Compensated Ohms
- C Attribute: NIDMM_ATTR_OFFSET_COMP_OHMS
open_cable_comp_conductance¶
nidmm.Session.
open_cable_comp_conductance
¶For the NI 4072 only, specifies the active part (conductance) of the open cable compensation. The valid range is any real number greater than 0. The default value (-1.0) indicates that compensation has not taken place. Changing the method or the range through this property or through
nidmm.Session.configure_measurement_digits()
resets the value of this property to the default value.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Capacitance and Inductance:Open Cable Compensation Values:Conductance
- C Attribute: NIDMM_ATTR_OPEN_CABLE_COMP_CONDUCTANCE
open_cable_comp_susceptance¶
nidmm.Session.
open_cable_comp_susceptance
¶For the NI 4072 only, specifies the reactive part (susceptance) of the open cable compensation. The valid range is any real number greater than 0. The default value (-1.0) indicates that compensation has not taken place. Changing the method or the range through this property or through
nidmm.Session.configure_measurement_digits()
resets the value of this property to the default value.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Capacitance and Inductance:Open Cable Compensation Values:Susceptance
- C Attribute: NIDMM_ATTR_OPEN_CABLE_COMP_SUSCEPTANCE
operation_mode¶
nidmm.Session.
operation_mode
¶Specifies how the NI 4065 and NI 4070/4071/4072 acquire data. When you call
nidmm.Session.configure_measurement_digits()
, NI-DMM sets this property toIVIDMM
. When you callnidmm.Session.configure_waveform_acquisition()
, NI-DMM sets this property toWAVEFORM
. If you are programming properties directly, you must set this property before setting other configuration properties.The following table lists the characteristics of this property.
Characteristic Value Datatype enums.OperationMode Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Advanced:Operation Mode
- C Attribute: NIDMM_ATTR_OPERATION_MODE
powerline_freq¶
nidmm.Session.
powerline_freq
¶Specifies the powerline frequency. The NI 4050 and NI 4060 use this value to select an aperture time to reject powerline noise by selecting the appropriate internal sample clock and filter. The NI 4065 and NI 4070/4071/4072 use this value to select a timebase for setting the
nidmm.Session.aperture_time
property in powerline cycles (PLCs). After configuring powerline frequency, set thenidmm.Session.aperture_time_units
property to PLCs. When setting thenidmm.Session.aperture_time
property, select the number of PLCs for the powerline frequency. For example, if powerline frequency = 50 Hz (or 20ms) and aperture time in PLCs = 5, then aperture time in Seconds = 20ms * 5 PLCs = 100 ms. Similarly, if powerline frequency = 60 Hz (or 16.667 ms) and aperture time in PLCs = 6, then aperture time in Seconds = 16.667 ms * 6 PLCs = 100 ms.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Powerline Frequency
- C Attribute: NIDMM_ATTR_POWERLINE_FREQ
range¶
nidmm.Session.
range
¶Specifies the measurement range. Use positive values to represent the absolute value of the maximum expected measurement. The value is in units appropriate for the current value of the
nidmm.Session.method
property. For example, ifnidmm.Session.method
is set toNIDMM_VAL_VOLTS
, the units are volts. The NI 4050 and NI 4060 only support Auto Range when the trigger and sample trigger is set to IMMEDIATE.NIDMM_VAL_AUTO_RANGE_ON
-1.0 NI-DMM performs an Auto Range before acquiring the measurement.NIDMM_VAL_AUTO_RANGE_OFF
-2.0 NI-DMM sets the Range to the currentnidmm.Session.auto_range_value
and uses this range for all subsequent measurements until the measurement configuration is changed.NIDMM_VAL_AUTO_RANGE_ONCE
-3.0 NI-DMM performs an Auto Range before acquiring the next measurement. Thenidmm.Session.auto_range_value
is stored and used for all subsequent measurements until the measurement configuration is changed.Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Range
- C Attribute: NIDMM_ATTR_RANGE
resolution_absolute¶
nidmm.Session.
resolution_absolute
¶Specifies the measurement resolution in absolute units. Setting this property to higher values increases the measurement accuracy. Setting this property to lower values increases the measurement speed. NI-DMM ignores this property for capacitance and inductance measurements on the NI 4072. To achieve better resolution for such measurements, use the
nidmm.Session.lc_number_meas_to_average
property.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Absolute Resolution
- C Attribute: NIDMM_ATTR_RESOLUTION_ABSOLUTE
resolution_digits¶
nidmm.Session.
resolution_digits
¶Specifies the measurement resolution in digits. Setting this property to higher values increases the measurement accuracy. Setting this property to lower values increases the measurement speed. NI-DMM ignores this property for capacitance and inductance measurements on the NI 4072. To achieve better resolution for such measurements, use the
nidmm.Session.lc_number_meas_to_average
property.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Digits Resolution
- C Attribute: NIDMM_ATTR_RESOLUTION_DIGITS
sample_count¶
nidmm.Session.
sample_count
¶Specifies the number of measurements the DMM takes each time it receives a trigger in a multiple point acquisition.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Multi Point Acquisition:Sample Count
- C Attribute: NIDMM_ATTR_SAMPLE_COUNT
sample_interval¶
nidmm.Session.
sample_interval
¶Specifies the amount of time in seconds the DMM waits between measurement cycles. This property only applies when the
nidmm.Session.sample_trigger
property is set to INTERVAL. On the NI 4060, the value for this property is used as the settling time. When this property is set to 0, the NI 4060 does not settle between measurement cycles. The onboard timing resolution is 1 µs on the NI 4060. The NI 4065 and NI 4070/4071/4072 use the value specified in this property as additional delay. On the NI 4065 and NI 4070/4071/4072, the onboard timing resolution is 34.72 ns and the valid range is 0-149 s. Only positive values are valid when setting the sample interval. The NI 4050 is not supported.The following table lists the characteristics of this property.
Characteristic Value Datatype float in seconds or datetime.timedelta Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Multi Point Acquisition:Sample Interval
- C Attribute: NIDMM_ATTR_SAMPLE_INTERVAL
sample_trigger¶
nidmm.Session.
sample_trigger
¶Specifies the sample trigger source. To determine which values are supported by each device, refer to the LabWindows/CVI Trigger Routing section in the NI Digital Multimeters Help.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.SampleTrigger Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Multi Point Acquisition:Sample Trigger
- C Attribute: NIDMM_ATTR_SAMPLE_TRIGGER
sample_trigger_slope¶
nidmm.Session.
sample_trigger_slope
¶Specifies the edge of the signal from the specified sample trigger source on which the DMM is triggered.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.SampleTrigSlope Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Multi Point Acquisition:Sample Trig Slope
- C Attribute: NIDMM_ATTR_SAMPLE_TRIGGER_SLOPE
serial_number¶
nidmm.Session.
serial_number
¶A string containing the serial number of the instrument. This property corresponds to the serial number label that is attached to most products.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Instrument Identification:Instrument Serial Number
- C Attribute: NIDMM_ATTR_SERIAL_NUMBER
settle_time¶
nidmm.Session.
settle_time
¶Specifies the settling time in seconds. To override the default settling time, set this property. To return to the default, set this property to
NIDMM_VAL_SETTLE_TIME_AUTO
(-1). The NI 4050 and NI 4060 are not supported.Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
The following table lists the characteristics of this property.
Characteristic Value Datatype float in seconds or datetime.timedelta Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Advanced:Settle Time
- C Attribute: NIDMM_ATTR_SETTLE_TIME
short_cable_comp_reactance¶
nidmm.Session.
short_cable_comp_reactance
¶For the NI 4072 only, represents the reactive part (reactance) of the short cable compensation. The valid range is any real number greater than 0. The default value (-1) indicates that compensation has not taken place. Changing the method or the range through this property or through
nidmm.Session.configure_measurement_digits()
resets the value of this property to the default value.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Capacitance and Inductance:Short Cable Compensation Values:Reactance
- C Attribute: NIDMM_ATTR_SHORT_CABLE_COMP_REACTANCE
short_cable_comp_resistance¶
nidmm.Session.
short_cable_comp_resistance
¶For the NI 4072 only, represents the active part (resistance) of the short cable compensation. The valid range is any real number greater than 0. The default value (-1) indicates that compensation has not taken place. Changing the method or the range through this property or through
nidmm.Session.configure_measurement_digits()
resets the value of this property to the default value.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Capacitance and Inductance:Short Cable Compensation Values:Resistance
- C Attribute: NIDMM_ATTR_SHORT_CABLE_COMP_RESISTANCE
shunt_value¶
nidmm.Session.
shunt_value
¶For the NI 4050 only, specifies the shunt resistance value. The NI 4050 requires an external shunt resistor for current measurements. This property should be set to the value of shunt resistor.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Shunt Value
- C Attribute: NIDMM_ATTR_SHUNT_VALUE
simulate¶
nidmm.Session.
simulate
¶Specifies whether or not to simulate instrument driver I/O operations. If simulation is enabled, instrument driver methods perform range checking and call IVI Get and Set methods, but they do not perform instrument I/O. For output parameters that represent instrument data, the instrument driver methods return calculated values. The default value is False (0). Use the
nidmm.Session.__init__()
method to override this setting. Simulate can only be set within the InitWithOptions method. The property value cannot be changed outside of the method.The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:User Options:Simulate
- C Attribute: NIDMM_ATTR_SIMULATE
specific_driver_description¶
nidmm.Session.
specific_driver_description
¶A string containing a description of the specific driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Specific Driver Identification:Specific Driver Description
- C Attribute: NIDMM_ATTR_SPECIFIC_DRIVER_DESCRIPTION
specific_driver_major_version¶
nidmm.Session.
specific_driver_major_version
¶Returns the major version number of this instrument driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Version Info:Specific Driver Major Version
- C Attribute: NIDMM_ATTR_SPECIFIC_DRIVER_MAJOR_VERSION
specific_driver_minor_version¶
nidmm.Session.
specific_driver_minor_version
¶The minor version number of this instrument driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Version Info:Specific Driver Minor Version
- C Attribute: NIDMM_ATTR_SPECIFIC_DRIVER_MINOR_VERSION
specific_driver_revision¶
nidmm.Session.
specific_driver_revision
¶A string that contains additional version information about this specific instrument driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Version Info:Specific Driver Revision
- C Attribute: NIDMM_ATTR_SPECIFIC_DRIVER_REVISION
specific_driver_vendor¶
nidmm.Session.
specific_driver_vendor
¶A string containing the vendor of the specific driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Specific Driver Identification:Specific Driver Vendor
- C Attribute: NIDMM_ATTR_SPECIFIC_DRIVER_VENDOR
supported_instrument_models¶
nidmm.Session.
supported_instrument_models
¶A string containing the instrument models supported by the specific driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Specific Driver Capabilities:Supported Instrument Models
- C Attribute: NIDMM_ATTR_SUPPORTED_INSTRUMENT_MODELS
temp_rtd_a¶
nidmm.Session.
temp_rtd_a
¶Specifies the Callendar-Van Dusen A coefficient for RTD scaling when the RTD Type property is set to Custom. The default value is 3.9083e-3 (Pt3851).
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Temperature:Resistance Temperature Detector:RTD A
- C Attribute: NIDMM_ATTR_TEMP_RTD_A
temp_rtd_b¶
nidmm.Session.
temp_rtd_b
¶Specifies the Callendar-Van Dusen B coefficient for RTD scaling when the RTD Type property is set to Custom. The default value is -5.775e-7(Pt3851).
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Temperature:Resistance Temperature Detector:RTD B
- C Attribute: NIDMM_ATTR_TEMP_RTD_B
temp_rtd_c¶
nidmm.Session.
temp_rtd_c
¶Specifies the Callendar-Van Dusen C coefficient for RTD scaling when the RTD Type property is set to Custom. The default value is -4.183e-12(Pt3851).
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Temperature:Resistance Temperature Detector:RTD C
- C Attribute: NIDMM_ATTR_TEMP_RTD_C
temp_rtd_res¶
nidmm.Session.
temp_rtd_res
¶Specifies the RTD resistance at 0 degrees Celsius. This applies to all supported RTDs, including custom RTDs. The default value is 100 (?).
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Temperature:Resistance Temperature Detector:RTD Resistance
- C Attribute: NIDMM_ATTR_TEMP_RTD_RES
temp_rtd_type¶
nidmm.Session.
temp_rtd_type
¶Specifies the type of RTD used to measure temperature. The default value is
PT3851
. Refer to thenidmm.Session.temp_rtd_type
topic in the NI Digital Multimeters Help for additional information about defined values.The following table lists the characteristics of this property.
Characteristic Value Datatype enums.RTDType Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Temperature:Resistance Temperature Detector:RTD Type
- C Attribute: NIDMM_ATTR_TEMP_RTD_TYPE
temp_tc_fixed_ref_junc¶
nidmm.Session.
temp_tc_fixed_ref_junc
¶Specifies the reference junction temperature when a fixed reference junction is used to take a thermocouple measurement. The default value is 25.0 (°C).
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Temperature:Thermocouple:Fixed Reference Junction
- C Attribute: NIDMM_ATTR_TEMP_TC_FIXED_REF_JUNC
temp_tc_ref_junc_type¶
nidmm.Session.
temp_tc_ref_junc_type
¶Specifies the type of reference junction to be used in the reference junction compensation of a thermocouple. The only supported value,
NIDMM_VAL_TEMP_REF_JUNC_FIXED
, is fixed.Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.ThermocoupleReferenceJunctionType Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Temperature:Thermocouple:Reference Junction Type
- C Attribute: NIDMM_ATTR_TEMP_TC_REF_JUNC_TYPE
temp_tc_type¶
nidmm.Session.
temp_tc_type
¶Specifies the type of thermocouple used to measure the temperature. The default value is
J
.The following table lists the characteristics of this property.
Characteristic Value Datatype enums.ThermocoupleType Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Temperature:Thermocouple:Thermocouple Type
- C Attribute: NIDMM_ATTR_TEMP_TC_TYPE
temp_thermistor_a¶
nidmm.Session.
temp_thermistor_a
¶Specifies the Steinhart-Hart A coefficient for thermistor scaling when the Thermistor Type property is set to Custom. The default value is 0.0010295 (44006).
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Temperature:Thermistor:Thermistor A
- C Attribute: NIDMM_ATTR_TEMP_THERMISTOR_A
temp_thermistor_b¶
nidmm.Session.
temp_thermistor_b
¶Specifies the Steinhart-Hart B coefficient for thermistor scaling when the Thermistor Type proerty is set to Custom. The default value is 0.0002391 (44006).
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Temperature:Thermistor:Thermistor B
- C Attribute: NIDMM_ATTR_TEMP_THERMISTOR_B
temp_thermistor_c¶
nidmm.Session.
temp_thermistor_c
¶Specifies the Steinhart-Hart C coefficient for thermistor scaling when the Thermistor Type property is set to Custom. The default value is 1.568e-7 (44006).
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Temperature:Thermistor:Thermistor C
- C Attribute: NIDMM_ATTR_TEMP_THERMISTOR_C
temp_thermistor_type¶
nidmm.Session.
temp_thermistor_type
¶Specifies the type of thermistor used to measure the temperature. The default value is
THERMISTOR_44006
. Refer to thenidmm.Session.temp_thermistor_type
topic in the NI Digital Multimeters Help for additional information about defined values.The following table lists the characteristics of this property.
Characteristic Value Datatype enums.ThermistorType Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Temperature:Thermistor:Thermistor Type
- C Attribute: NIDMM_ATTR_TEMP_THERMISTOR_TYPE
temp_transducer_type¶
nidmm.Session.
temp_transducer_type
¶Specifies the type of device used to measure the temperature. The default value is
NIDMM_VAL_4_THERMOCOUPLE
.Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.TransducerType Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Configuration:Measurement Options:Temperature:Transducer Type
- C Attribute: NIDMM_ATTR_TEMP_TRANSDUCER_TYPE
trigger_count¶
nidmm.Session.
trigger_count
¶Specifies the number of triggers the DMM receives before returning to the Idle state. This property can be set to any positive ViInt32 value for the NI 4065 and NI 4070/4071/4072. The NI 4050 and NI 4060 support this property being set to 1. Refer to the Multiple Point Acquisitions section of the NI Digital Multimeters Help for more information.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Multi Point Acquisition:Trigger Count
- C Attribute: NIDMM_ATTR_TRIGGER_COUNT
trigger_delay¶
nidmm.Session.
trigger_delay
¶Specifies the time (in seconds) that the DMM waits after it has received a trigger before taking a measurement. The default value is AUTO DELAY (-1), which means that the DMM waits an appropriate settling time before taking the measurement. (-1) signifies that AUTO DELAY is on, and (-2) signifies that AUTO DELAY is off. The NI 4065 and NI 4070/4071/4072 use the value specified in this property as additional settling time. For the The NI 4065 and NI 4070/4071/4072, the valid range for Trigger Delay is AUTO DELAY (-1) or 0.0-149.0 seconds and the onboard timing resolution is 34.72 ns. On the NI 4060, if this property is set to 0, the DMM does not settle before taking the measurement. On the NI 4060, the valid range for AUTO DELAY (-1) is 0.0-12.0 seconds and the onboard timing resolution is 100 ms. When using the NI 4050, this property must be set to AUTO DELAY (-1). Use positive values to set the trigger delay in seconds. Valid Range:
NIDMM_VAL_AUTO_DELAY
(-1.0), 0.0-12.0 seconds (NI 4060 only) Default Value:NIDMM_VAL_AUTO_DELAY
Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
The following table lists the characteristics of this property.
Characteristic Value Datatype float in seconds or datetime.timedelta Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Trigger:Trigger Delay
- C Attribute: NIDMM_ATTR_TRIGGER_DELAY
trigger_slope¶
nidmm.Session.
trigger_slope
¶Specifies the edge of the signal from the specified trigger source on which the DMM is triggered.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.TriggerSlope Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Trigger:Trigger Slope
- C Attribute: NIDMM_ATTR_TRIGGER_SLOPE
trigger_source¶
nidmm.Session.
trigger_source
¶Specifies the trigger source. When
nidmm.Session._initiate()
is called, the DMM waits for the trigger specified with this property. After it receives the trigger, the DMM waits the length of time specified with thenidmm.Session.trigger_delay
property. The DMM then takes a measurement. This property is not supported on the NI 4050. To determine which values are supported by each device, refer to the LabWindows/CVI Trigger Routing section in the NI Digital Multimeters Help.The following table lists the characteristics of this property.
Characteristic Value Datatype enums.TriggerSource Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Trigger:Trigger Source
- C Attribute: NIDMM_ATTR_TRIGGER_SOURCE
waveform_coupling¶
nidmm.Session.
waveform_coupling
¶For the NI 4070/4071/4072 only, specifies the coupling during a waveform acquisition.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.WaveformCoupling Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Waveform Acquisition:Waveform Coupling
- C Attribute: NIDMM_ATTR_WAVEFORM_COUPLING
waveform_points¶
nidmm.Session.
waveform_points
¶For the NI 4070/4071/4072 only, specifies the number of points to acquire in a waveform acquisition.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Waveform Acquisition:Waveform Points
- C Attribute: NIDMM_ATTR_WAVEFORM_POINTS
waveform_rate¶
nidmm.Session.
waveform_rate
¶For the NI 4070/4071/4072 only, specifies the rate of the waveform acquisition in Samples per second (S/s). The valid Range is 10.0-1,800,000 S/s. Values are coerced to the closest integer divisor of 1,800,000. The default value is 1,800,000.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Waveform Acquisition:Waveform Rate
- C Attribute: NIDMM_ATTR_WAVEFORM_RATE
Methods¶
abort¶
nidmm.Session.
abort
()¶Aborts a previously initiated measurement and returns the DMM to the Idle state.
configure_ac_bandwidth¶
nidmm.Session.
configure_ac_bandwidth
(ac_minimum_frequency_hz, ac_maximum_frequency_hz)¶Configures the
nidmm.Session.ac_min_freq
andnidmm.Session.ac_max_freq
properties, which the DMM uses for AC measurements.
Parameters:
- ac_minimum_frequency_hz (float) – Specifies the minimum expected frequency component of the input signal in hertz. This parameter affects the DMM only when you set the
nidmm.Session.method
property to AC measurements. NI-DMM uses this parameter to calculate the proper aperture for the measurement. The driver sets thenidmm.Session.ac_min_freq
property to this value. The valid range is 1 Hz–300 kHz for the NI 4080/4081/4082 and the NI 4070/4071/4072, 10 Hz–100 Hz for the NI 4065, and 20 Hz–25 kHz for the NI 4050 and NI 4060.- ac_maximum_frequency_hz (float) –
Specifies the maximum expected frequency component of the input signal in hertz within the device limits. This parameter is used only for error checking and verifies that the value of this parameter is less than the maximum frequency of the device.
This parameter affects the DMM only when you set the
nidmm.Session.method
property to AC measurements. The driver sets thenidmm.Session.ac_max_freq
property to this value. The valid range is 1 Hz–300 kHz for the NI 4080/4081/4082 and the NI 4070/4071/4072, 10 Hz–100 Hz for the NI 4065, and 20 Hz–25 kHz for the NI 4050 and NI 4060.
configure_measurement_absolute¶
nidmm.Session.
configure_measurement_absolute
(measurement_function, range, resolution_absolute)¶Configures the common properties of the measurement. These properties include
nidmm.Session.method
,nidmm.Session.range
, andnidmm.Session.resolution_absolute
.
Parameters:
- measurement_function (
nidmm.Function
) – Specifies the measurement_function used to acquire the measurement. The driver setsnidmm.Session.method
to this value.- range (float) –
Specifies the range for the method specified in the Measurement_Function parameter. When frequency is specified in the Measurement_Function parameter, you must supply the minimum frequency expected in the range parameter. For example, you must type in 100 Hz if you are measuring 101 Hz or higher. For all other methods, you must supply a range that exceeds the value that you are measuring. For example, you must type in 10 V if you are measuring 9 V. range values are coerced up to the closest input range. Refer to the Devices Overview for a list of valid ranges. The driver sets
nidmm.Session.range
to this value. The default is 0.02 V.
NIDMM_VAL_AUTO_RANGE_ON
-1.0 NI-DMM performs an Auto Range before acquiring the measurement. NIDMM_VAL_AUTO_RANGE_OFF
-2.0 NI-DMM sets the Range to the current nidmm.Session.auto_range_value
and uses this range for all subsequent measurements until the measurement configuration is changed.NIDMM_VAL_AUTO_RANGE_ONCE
-3.0 NI-DMM performs an Auto Range before acquiring the measurement. The nidmm.Session.auto_range_value
is stored and used for all subsequent measurements until the measurement configuration is changed.Note
The NI 4050, NI 4060, and NI 4065 only support Auto Range when the trigger and sample trigger are set to IMMEDIATE.
Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
- resolution_absolute (float) –
Specifies the absolute resolution for the measurement. NI-DMM sets
nidmm.Session.resolution_absolute
to this value. This parameter is ignored when the Range parameter is set toNIDMM_VAL_AUTO_RANGE_ON
(-1.0) orNIDMM_VAL_AUTO_RANGE_ONCE
(-3.0). The default is 0.001 V.Note
NI-DMM ignores this parameter for capacitance and inductance measurements on the NI 4072. To achieve better resolution for such measurements, use the
nidmm.Session.lc_number_meas_to_average
property.Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
configure_measurement_digits¶
nidmm.Session.
configure_measurement_digits
(measurement_function, range, resolution_digits)¶Configures the common properties of the measurement. These properties include
nidmm.Session.method
,nidmm.Session.range
, andnidmm.Session.resolution_digits
.
Parameters:
- measurement_function (
nidmm.Function
) – Specifies the measurement_function used to acquire the measurement. The driver setsnidmm.Session.method
to this value.- range (float) –
Specifies the range for the method specified in the Measurement_Function parameter. When frequency is specified in the Measurement_Function parameter, you must supply the minimum frequency expected in the range parameter. For example, you must type in 100 Hz if you are measuring 101 Hz or higher. For all other methods, you must supply a range that exceeds the value that you are measuring. For example, you must type in 10 V if you are measuring 9 V. range values are coerced up to the closest input range. Refer to the Devices Overview for a list of valid ranges. The driver sets
nidmm.Session.range
to this value. The default is 0.02 V.
NIDMM_VAL_AUTO_RANGE_ON
-1.0 NI-DMM performs an Auto Range before acquiring the measurement. NIDMM_VAL_AUTO_RANGE_OFF
-2.0 NI-DMM sets the Range to the current nidmm.Session.auto_range_value
and uses this range for all subsequent measurements until the measurement configuration is changed.NIDMM_VAL_AUTO_RANGE_ONCE
-3.0 NI-DMM performs an Auto Range before acquiring the measurement. The nidmm.Session.auto_range_value
is stored and used for all subsequent measurements until the measurement configuration is changed.Note
The NI 4050, NI 4060, and NI 4065 only support Auto Range when the trigger and sample trigger are set to IMMEDIATE.
Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
- resolution_digits (float) –
Specifies the resolution of the measurement in digits. The driver sets the Devices Overview for a list of valid ranges. The driver sets
nidmm.Session.resolution_digits
property to this value. This parameter is ignored when the Range parameter is set toNIDMM_VAL_AUTO_RANGE_ON
(-1.0) orNIDMM_VAL_AUTO_RANGE_ONCE
(-3.0). The default is 5½.Note
NI-DMM ignores this parameter for capacitance and inductance measurements on the NI 4072. To achieve better resolution for such measurements, use the
nidmm.Session.lc_number_meas_to_average
property.Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
configure_multi_point¶
nidmm.Session.
configure_multi_point
(trigger_count, sample_count, sample_trigger=nidmm.SampleTrigger.IMMEDIATE, sample_interval=datetime.timedelta(seconds=-1))¶Configures the properties for multipoint measurements. These properties include
nidmm.Session.trigger_count
,nidmm.Session.sample_count
,nidmm.Session.sample_trigger
, andnidmm.Session.sample_interval
.For continuous acquisitions, set
nidmm.Session.trigger_count
ornidmm.Session.sample_count
to zero. For more information, refer to Multiple Point Acquisitions, Triggering, and Using Switches.
Parameters:
- trigger_count (int) – Sets the number of triggers you want the DMM to receive before returning to the Idle state. The driver sets
nidmm.Session.trigger_count
to this value. The default value is 1.- sample_count (int) – Sets the number of measurements the DMM makes in each measurement sequence initiated by a trigger. The driver sets
nidmm.Session.sample_count
to this value. The default value is 1.- sample_trigger (
nidmm.SampleTrigger
) –Specifies the sample_trigger source you want to use. The driver sets
nidmm.Session.sample_trigger
to this value. The default is Immediate.Note
To determine which values are supported by each device, refer to the LabWindows/CVI Trigger Routing section.
- sample_interval (float in seconds or datetime.timedelta) –
Sets the amount of time in seconds the DMM waits between measurement cycles. The driver sets
nidmm.Session.sample_interval
to this value. Specify a sample interval to add settling time between measurement cycles or to decrease the measurement rate. sample_interval only applies when the Sample_Trigger is set to INTERVAL.On the NI 4060, the sample_interval value is used as the settling time. When sample interval is set to 0, the DMM does not settle between measurement cycles. The NI 4065 and NI 4070/4071/4072 use the value specified in sample_interval as additional delay. The default value (-1) ensures that the DMM settles for a recommended time. This is the same as using an Immediate trigger.
Note
This property is not used on the NI 4080/4081/4082 and the NI 4050.
configure_open_cable_comp_values¶
nidmm.Session.
configure_open_cable_comp_values
(conductance, susceptance)¶For the NI 4082 and NI 4072 only, configures the
nidmm.Session.open_cable_comp_conductance
andnidmm.Session.open_cable_comp_susceptance
properties.
Parameters:
configure_power_line_frequency¶
configure_rtd_custom¶
nidmm.Session.
configure_rtd_custom
(rtd_a, rtd_b, rtd_c)¶Configures the A, B, and C parameters for a custom RTD.
Parameters:
- rtd_a (float) – Specifies the Callendar-Van Dusen A coefficient for RTD scaling when RTD Type parameter is set to Custom in the
nidmm.Session.configure_rtd_type()
method. The default is 3.9083e-3 (Pt3851)- rtd_b (float) – Specifies the Callendar-Van Dusen B coefficient for RTD scaling when RTD Type parameter is set to Custom in the
nidmm.Session.configure_rtd_type()
method. The default is -5.775e-7 (Pt3851).- rtd_c (float) – Specifies the Callendar-Van Dusen C coefficient for RTD scaling when RTD Type parameter is set to Custom in the
nidmm.Session.configure_rtd_type()
method. The default is -4.183e-12 (Pt3851).
configure_rtd_type¶
nidmm.Session.
configure_rtd_type
(rtd_type, rtd_resistance)¶Configures the RTD Type and RTD Resistance parameters for an RTD.
Parameters:
- rtd_type (
nidmm.RTDType
) –Specifies the type of RTD used to measure the temperature resistance. NI-DMM uses this value to set the RTD Type property. The default is
PT3851
.
Enum Standards Material TCR (α) Typical R0 (Ω) Notes Callendar-Van Dusen Coefficient PT3851
IEC-751 DIN 43760 BS 1904 ASTM-E1137 EN-60751 Platinum .003851 100 Ω 1000 Ω A = 3.9083 × 10–3 B = –5.775×10:sup:–7 C = –4.183×10:sup:–12 Most common RTDs PT3750
Low-cost vendor compliant RTD* Platinum .003750 1000 Ω A = 3.81 × 10–3 B = –6.02×10:sup:–7 C = –6.0×10:sup:–12 Low-cost RTD PT3916
JISC 1604 Platinum .003916 100 Ω A = 3.9739 × 10–3 B = –5.870×10:sup:–7 C = –4.4 ×10–12 Used in primarily in Japan PT3920
US Industrial Standard D-100 American Platinum .003920 100 Ω A = 3.9787 × 10–3 B = –5.8686×10:sup:–7 C = –4.167 ×10–12 Low-cost RTD PT3911
US Industrial Standard American Platinum .003911 100 Ω A = 3.9692 × 10–3 B = –5.8495×10:sup:–7 C = –4.233 ×10–12 Low-cost RTD PT3928
ITS-90 Platinum .003928 100 Ω A = 3.9888 × 10–3 B = –5.915×10:sup:–7 C = –3.85 ×10–12 The definition of temperature *No standard. Check the TCR. - rtd_resistance (float) – Specifies the RTD resistance in ohms at 0 °C. NI-DMM uses this value to set the RTD Resistance property. The default is 100 (Ω).
configure_short_cable_comp_values¶
nidmm.Session.
configure_short_cable_comp_values
(resistance, reactance)¶For the NI 4082 and NI 4072 only, configures the
nidmm.Session.short_cable_comp_resistance
andnidmm.Session.short_cable_comp_reactance
properties.
Parameters:
configure_thermistor_custom¶
nidmm.Session.
configure_thermistor_custom
(thermistor_a, thermistor_b, thermistor_c)¶Configures the A, B, and C parameters for a custom thermistor.
Parameters:
- thermistor_a (float) –
Specifies the Steinhart-Hart A coefficient for thermistor scaling when Thermistor Type is set to Custom in the
nidmm.Session.ConfigureThermistorType()
method. The default is 1.0295e-3 (44006).Note
One or more of the referenced methods are not in the Python API for this driver.
- thermistor_b (float) –
Specifies the Steinhart-Hart B coefficient for thermistor scaling when Thermistor Type is set to Custom in the
nidmm.Session.ConfigureThermistorType()
method. The default is 2.391e-4 (44006).Note
One or more of the referenced methods are not in the Python API for this driver.
- thermistor_c (float) –
Specifies the Steinhart-Hart C coefficient for thermistor scaling when Thermistor Type is set to Custom in the
nidmm.Session.ConfigureThermistorType()
method. The default is 1.568e-7 (44006).Note
One or more of the referenced methods are not in the Python API for this driver.
configure_thermocouple¶
nidmm.Session.
configure_thermocouple
(thermocouple_type, reference_junction_type=nidmm.ThermocoupleReferenceJunctionType.FIXED)¶Configures the thermocouple type and reference junction type for a chosen thermocouple.
Parameters:
- thermocouple_type (
nidmm.ThermocoupleType
) –Specifies the type of thermocouple used to measure the temperature. NI-DMM uses this value to set the Thermocouple Type property. The default is
J
.
B
Thermocouple type B E
Thermocouple type E J
Thermocouple type J K
Thermocouple type K N
Thermocouple type N R
Thermocouple type R S
Thermocouple type S T
Thermocouple type T - reference_junction_type (
nidmm.ThermocoupleReferenceJunctionType
) –Specifies the type of reference junction to be used in the reference junction compensation of a thermocouple measurement. NI-DMM uses this value to set the Reference Junction Type property. The only supported value is
NIDMM_VAL_TEMP_REF_JUNC_FIXED
.Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
configure_trigger¶
nidmm.Session.
configure_trigger
(trigger_source, trigger_delay=datetime.timedelta(seconds=-1))¶Configures the DMM Trigger_Source and Trigger_Delay. Refer to Triggering and Using Switches for more information.
Parameters:
- trigger_source (
nidmm.TriggerSource
) –Specifies the trigger_source that initiates the acquisition. The driver sets
nidmm.Session.trigger_source
to this value. Software configures the DMM to wait untilnidmm.Session.send_software_trigger()
is called before triggering the DMM.Note
To determine which values are supported by each device, refer to the LabWindows/CVI Trigger Routing section.
- trigger_delay (float in seconds or datetime.timedelta) –
Specifies the time that the DMM waits after it has received a trigger before taking a measurement. The driver sets the
nidmm.Session.trigger_delay
property to this value. By default, trigger_delay isNIDMM_VAL_AUTO_DELAY
(-1), which means the DMM waits an appropriate settling time before taking the measurement. On the NI 4060, if you set trigger_delay to 0, the DMM does not settle before taking the measurement. The NI 4065 and NI 4070/4071/4072 use the value specified in trigger_delay as additional settling time.Note
When using the NI 4050, Trigger_Delay must be set to
NIDMM_VAL_AUTO_DELAY
(-1).Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
configure_waveform_acquisition¶
nidmm.Session.
configure_waveform_acquisition
(measurement_function, range, rate, waveform_points)¶Configures the DMM for waveform acquisitions. This feature is supported on the NI 4080/4081/4082 and the NI 4070/4071/4072.
Parameters:
- measurement_function (
nidmm.Function
) –Specifies the measurement_function used in a waveform acquisition. The driver sets
nidmm.Session.method
to this value.
WAVEFORM_VOLTAGE
(default)1003 Voltage Waveform WAVEFORM_CURRENT
1004 Current Waveform - range (float) –
Specifies the expected maximum amplitude of the input signal and sets the range for the Measurement_Function. NI-DMM sets
nidmm.Session.range
to this value. range values are coerced up to the closest input range. The default is 10.0.For valid ranges refer to the topics in Devices.
Auto-ranging is not supported during waveform acquisitions.
- rate (float) –
Specifies the rate of the acquisition in samples per second. NI-DMM sets
nidmm.Session.waveform_rate
to this value.The valid Range is 10.0–1,800,000 S/s. rate values are coerced to the closest integer divisor of 1,800,000. The default value is 1,800,000.
- waveform_points (int) –
Specifies the number of points to acquire before the waveform acquisition completes. NI-DMM sets
nidmm.Session.waveform_points
to this value.To calculate the maximum and minimum number of waveform points that you can acquire in one acquisition, refer to the Waveform Acquisition Measurement Cycle.
The default value is 500.
disable¶
nidmm.Session.
disable
()¶Places the instrument in a quiescent state where it has minimal or no impact on the system to which it is connected. If a measurement is in progress when this method is called, the measurement is aborted.
fetch¶
nidmm.Session.
fetch
(maximum_time=datetime.timedelta(milliseconds=-1))¶Returns the value from a previously initiated measurement. You must call
nidmm.Session._initiate()
before calling this method.
Parameters: maximum_time (float in seconds or datetime.timedelta) – Specifies the maximum_time allowed for this method to complete in milliseconds. If the method does not complete within this time interval, the method returns the NIDMM_ERROR_MAX_TIME_EXCEEDED error code. This may happen if an external trigger has not been received, or if the specified timeout is not long enough for the acquisition to complete.
The valid range is 0–86400000. The default value is
NIDMM_VAL_TIME_LIMIT_AUTO
(-1). The DMM calculates the timeout automatically.Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
Return type: float Returns: The measured value returned from the DMM.
fetch_multi_point¶
nidmm.Session.
fetch_multi_point
(array_size, maximum_time=datetime.timedelta(milliseconds=-1))¶Returns an array of values from a previously initiated multipoint measurement. The number of measurements the DMM makes is determined by the values you specify for the Trigger_Count and Sample_Count parameters of
nidmm.Session.configure_multi_point()
. You must first callnidmm.Session._initiate()
to initiate a measurement before calling this method.
Parameters:
- array_size (int) –
Specifies the number of measurements to acquire. The maximum number of measurements for a finite acquisition is the (Trigger Count x Sample Count) parameters in
nidmm.Session.configure_multi_point()
.For continuous acquisitions, up to 100,000 points can be returned at once. The number of measurements can be a subset. The valid range is any positive ViInt32. The default value is 1.
- maximum_time (float in seconds or datetime.timedelta) –
Specifies the maximum_time allowed for this method to complete in milliseconds. If the method does not complete within this time interval, the method returns the NIDMM_ERROR_MAX_TIME_EXCEEDED error code. This may happen if an external trigger has not been received, or if the specified timeout is not long enough for the acquisition to complete.
The valid range is 0–86400000. The default value is
NIDMM_VAL_TIME_LIMIT_AUTO
(-1). The DMM calculates the timeout automatically.Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
Return type: tuple (reading_array, actual_number_of_points)
WHERE
reading_array (array.array(“d”)):
An array of measurement values.
Note
The size of the Reading_Array must be at least the size that you specify for the Array_Size parameter.
actual_number_of_points (int):
Indicates the number of measured values actually retrieved from the DMM.
fetch_waveform¶
nidmm.Session.
fetch_waveform
(array_size, maximum_time=datetime.timedelta(milliseconds=-1))¶For the NI 4080/4081/4082 and the NI 4070/4071/4072, returns an array of values from a previously initiated waveform acquisition. You must call
nidmm.Session._initiate()
before calling this method.
Parameters:
- array_size (int) – Specifies the number of waveform points to return. You specify the total number of points that the DMM acquires in the Waveform Points parameter of
nidmm.Session.configure_waveform_acquisition()
. The default value is 1.- maximum_time (float in seconds or datetime.timedelta) –
Specifies the maximum_time allowed for this method to complete in milliseconds. If the method does not complete within this time interval, the method returns the NIDMM_ERROR_MAX_TIME_EXCEEDED error code. This may happen if an external trigger has not been received, or if the specified timeout is not long enough for the acquisition to complete.
The valid range is 0–86400000. The default value is
NIDMM_VAL_TIME_LIMIT_AUTO
(-1). The DMM calculates the timeout automatically.Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
Return type: tuple (waveform_array, actual_number_of_points)
WHERE
waveform_array (array.array(“d”)):
Waveform Array is an array of measurement values stored in waveform data type.
actual_number_of_points (int):
Indicates the number of measured values actually retrieved from the DMM.
fetch_waveform_into¶
nidmm.Session.
fetch_waveform_into
(array_size, maximum_time=datetime.timedelta(milliseconds=-1))¶For the NI 4080/4081/4082 and the NI 4070/4071/4072, returns an array of values from a previously initiated waveform acquisition. You must call
nidmm.Session._initiate()
before calling this method.
Parameters:
- waveform_array (numpy.array(dtype=numpy.float64)) – Waveform Array is an array of measurement values stored in waveform data type.
- maximum_time (float in seconds or datetime.timedelta) –
Specifies the maximum_time allowed for this method to complete in milliseconds. If the method does not complete within this time interval, the method returns the NIDMM_ERROR_MAX_TIME_EXCEEDED error code. This may happen if an external trigger has not been received, or if the specified timeout is not long enough for the acquisition to complete.
The valid range is 0–86400000. The default value is
NIDMM_VAL_TIME_LIMIT_AUTO
(-1). The DMM calculates the timeout automatically.Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
Return type: tuple (waveform_array, actual_number_of_points)
WHERE
waveform_array (numpy.array(dtype=numpy.float64)):
Waveform Array is an array of measurement values stored in waveform data type.
actual_number_of_points (int):
Indicates the number of measured values actually retrieved from the DMM.
get_aperture_time_info¶
nidmm.Session.
get_aperture_time_info
()¶Returns the DMM Aperture_Time and Aperture_Time_Units.
Return type: tuple (aperture_time, aperture_time_units) WHERE
aperture_time (float):
Specifies the amount of time the DMM digitizes the input signal for a single measurement. This parameter does not include settling time. Returns the value of thenidmm.Session.aperture_time
property. The units of this property depend on the value of thenidmm.Session.aperture_time_units
property. On the NI 4070/4071/4072, the minimum aperture time is 8.89 µs, and the maximum aperture time is 149 s. Any number of powerline cycles (PLCs) within the minimum and maximum ranges is allowed on the NI 4070/4071/4072. On the NI 4065 the minimum aperture time is 333 µs, and the maximum aperture time is 78.2 s. If setting the number of averages directly, the total measurement time is aperture time X the number of averages, which must be less than 72.8 s. The aperture times allowed are 333 µs, 667 µs, or multiples of 1.11 ms—for example 1.11 ms, 2.22 ms, 3.33 ms, and so on. If you set an aperture time other than 333 µs, 667 µs, or multiples of 1.11 ms, the value will be coerced up to the next supported aperture time. On the NI 4060, when the powerline frequency is 60, the PLCs allowed are 1 PLC, 6 PLC, 12 PLC, and 120 PLC. When the powerline frequency is 50, the PLCs allowed are 1 PLC, 5 PLC, 10 PLC, and 100 PLC.aperture_time_units (
nidmm.ApertureTimeUnits
):Indicates the units of aperture time as powerline cycles (PLCs) or seconds. Returns the value of thenidmm.Session.aperture_time_units
property.
SECONDS
0 Seconds POWER_LINE_CYCLES
1 Powerline Cycles
get_auto_range_value¶
nidmm.Session.
get_auto_range_value
()¶Returns the Actual_Range that the DMM is using, even when Auto Range is off.
Return type: float Returns: Indicates the actual_range the DMM is using. Returns the value of the nidmm.Session.auto_range_value
property. The units of the returned value depend on the method.
get_cal_date_and_time¶
nidmm.Session.
get_cal_date_and_time
(cal_type)¶Returns the date and time of the last calibration performed.
Note
The NI 4050 and NI 4060 are not supported.
Parameters: cal_type (int) – Specifies the type of calibration performed (external or self-calibration).
NIDMM_VAL_INTERNAL_AREA
(default)0 Self-Calibration NIDMM_VAL_EXTERNAL_AREA
1 External Calibration Note
The NI 4065 does not support self-calibration.
Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
Return type: datetime.datetime Returns: Indicates date and time of the last calibration.
get_dev_temp¶
get_ext_cal_recommended_interval¶
nidmm.Session.
get_ext_cal_recommended_interval
()¶Returns the recommended interval between external recalibration in Months.
Note
The NI 4050 and NI 4060 are not supported.
Return type: datetime.timedelta Returns: Returns the recommended number of months between external calibrations.
get_last_cal_temp¶
nidmm.Session.
get_last_cal_temp
(cal_type)¶Returns the Temperature during the last calibration procedure.
Note
The NI 4050 and NI 4060 are not supported.
Parameters: cal_type (int) – Specifies the type of calibration performed (external or self-calibration).
NIDMM_VAL_INTERNAL_AREA
(default)0 Self-Calibration NIDMM_VAL_EXTERNAL_AREA
1 External Calibration Note
The NI 4065 does not support self-calibration.
Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
Return type: float Returns: Returns the temperature during the last calibration.
get_measurement_period¶
nidmm.Session.
get_measurement_period
()¶Returns the measurement Period, which is the amount of time it takes to complete one measurement with the current configuration. Use this method right before you begin acquiring data—after you have completely configured the measurement and after all configuration methods have been called.
Return type: float Returns: Returns the number of seconds it takes to make one measurement. The first measurement in a multipoint acquisition requires additional settling time. This method does not include this additional time or any
nidmm.Session.trigger_delay
associated with the first measurement. Time required for internal measurements, such asnidmm.Session.auto_zero
, is included.
get_self_cal_supported¶
nidmm.Session.
get_self_cal_supported
()¶Returns a Boolean value that expresses whether or not the DMM that you are using can perform self-calibration.
Return type: bool Returns: Returns whether Self Cal is supported for the device specified by the given session.
True 1 The DMM that you are using can perform self-calibration. False 0 The DMM that you are using cannot perform self-calibration.
perform_open_cable_comp¶
nidmm.Session.
perform_open_cable_comp
()¶For the NI 4082 and NI 4072 only, performs the open cable compensation measurements for the current capacitance/inductance range, and returns open cable compensation Conductance and Susceptance values. You can use the return values of this method as inputs to
nidmm.Session.configure_open_cable_comp_values()
.This method returns an error if the value of the
nidmm.Session.method
property is not set toCAPACITANCE
(1005) orINDUCTANCE
(1006).
Return type: tuple (conductance, susceptance) WHERE
conductance (float):
conductance is the measured value of open cable compensation conductance.susceptance (float):
susceptance is the measured value of open cable compensation susceptance.
perform_short_cable_comp¶
nidmm.Session.
perform_short_cable_comp
()¶Performs the short cable compensation measurements for the current capacitance/inductance range, and returns short cable compensation Resistance and Reactance values. You can use the return values of this method as inputs to
nidmm.Session.configure_short_cable_comp_values()
.This method returns an error if the value of the
nidmm.Session.method
property is not set toCAPACITANCE
(1005) orINDUCTANCE
(1006).
Return type: tuple (resistance, reactance) WHERE
resistance (float):
resistance is the measured value of short cable compensation resistance.reactance (float):
reactance is the measured value of short cable compensation reactance.
read¶
nidmm.Session.
read
(maximum_time=datetime.timedelta(milliseconds=-1))¶Acquires a single measurement and returns the measured value.
Parameters: maximum_time (float in seconds or datetime.timedelta) – Specifies the maximum_time allowed for this method to complete in milliseconds. If the method does not complete within this time interval, the method returns the NIDMM_ERROR_MAX_TIME_EXCEEDED error code. This may happen if an external trigger has not been received, or if the specified timeout is not long enough for the acquisition to complete.
The valid range is 0–86400000. The default value is
NIDMM_VAL_TIME_LIMIT_AUTO
(-1). The DMM calculates the timeout automatically.Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
Return type: float Returns: The measured value returned from the DMM.
read_multi_point¶
nidmm.Session.
read_multi_point
(array_size, maximum_time=datetime.timedelta(milliseconds=-1))¶Acquires multiple measurements and returns an array of measured values. The number of measurements the DMM makes is determined by the values you specify for the Trigger_Count and Sample_Count parameters in
nidmm.Session.configure_multi_point()
.
Parameters:
- array_size (int) –
Specifies the number of measurements to acquire. The maximum number of measurements for a finite acquisition is the (Trigger Count x Sample Count) parameters in
nidmm.Session.configure_multi_point()
.For continuous acquisitions, up to 100,000 points can be returned at once. The number of measurements can be a subset. The valid range is any positive ViInt32. The default value is 1.
- maximum_time (float in seconds or datetime.timedelta) –
Specifies the maximum_time allowed for this method to complete in milliseconds. If the method does not complete within this time interval, the method returns the NIDMM_ERROR_MAX_TIME_EXCEEDED error code. This may happen if an external trigger has not been received, or if the specified timeout is not long enough for the acquisition to complete.
The valid range is 0–86400000. The default value is
NIDMM_VAL_TIME_LIMIT_AUTO
(-1). The DMM calculates the timeout automatically.Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
Return type: tuple (reading_array, actual_number_of_points)
WHERE
reading_array (array.array(“d”)):
An array of measurement values.
Note
The size of the Reading_Array must be at least the size that you specify for the Array_Size parameter.
actual_number_of_points (int):
Indicates the number of measured values actually retrieved from the DMM.
read_status¶
nidmm.Session.
read_status
()¶Returns measurement backlog and acquisition status. Use this method to determine how many measurements are available before calling
nidmm.Session.fetch()
,nidmm.Session.fetch_multi_point()
, ornidmm.Session.fetch_waveform()
.Note
The NI 4050 is not supported.
Return type: tuple (acquisition_backlog, acquisition_status) WHERE
acquisition_backlog (int):
The number of measurements available to be read. If the backlog continues to increase, data is eventually overwritten, resulting in an error.Note
On the NI 4060, the Backlog does not increase when autoranging. On the NI 4065, the Backlog does not increase when Range is set to AUTO RANGE ON (-1), or before the first point is fetched when Range is set to AUTO RANGE ONCE (-3). These behaviors are due to the autorange model of the devices.
acquisition_status (
nidmm.AcquisitionStatus
):Indicates status of the acquisition. The following table shows the acquisition states:
0 Running 1 Finished with backlog 2 Finished with no backlog 3 Paused 4 No acquisition in progress
read_waveform¶
nidmm.Session.
read_waveform
(array_size, maximum_time=datetime.timedelta(milliseconds=-1))¶For the NI 4080/4081/4082 and the NI 4070/4071/4072, acquires a waveform and returns data as an array of values or as a waveform data type. The number of elements in the Waveform_Array is determined by the values you specify for the Waveform_Points parameter in
nidmm.Session.configure_waveform_acquisition()
.
Parameters:
- array_size (int) – Specifies the number of waveform points to return. You specify the total number of points that the DMM acquires in the Waveform Points parameter of
nidmm.Session.configure_waveform_acquisition()
. The default value is 1.- maximum_time (float in seconds or datetime.timedelta) –
Specifies the maximum_time allowed for this method to complete in milliseconds. If the method does not complete within this time interval, the method returns the NIDMM_ERROR_MAX_TIME_EXCEEDED error code. This may happen if an external trigger has not been received, or if the specified timeout is not long enough for the acquisition to complete.
The valid range is 0–86400000. The default value is
NIDMM_VAL_TIME_LIMIT_AUTO
(-1). The DMM calculates the timeout automatically.Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
Return type: tuple (waveform_array, actual_number_of_points)
WHERE
waveform_array (array.array(“d”)):
An array of measurement values.
Note
The size of the Waveform_Array must be at least the size that you specify for the Array_Size parameter.
actual_number_of_points (int):
Indicates the number of measured values actually retrieved from the DMM.
reset¶
nidmm.Session.
reset
()¶Resets the instrument to a known state and sends initialization commands to the instrument. The initialization commands set instrument settings to the state necessary for the operation of the instrument driver.
reset_with_defaults¶
nidmm.Session.
reset_with_defaults
()¶Resets the instrument to a known state and sends initialization commands to the DMM. The initialization commands set the DMM settings to the state necessary for the operation of NI-DMM. All user-defined default values associated with a logical name are applied after setting the DMM.
self_cal¶
nidmm.Session.
self_cal
()¶For the NI 4080/4081/4082 and the NI 4070/4071/4072, executes the self-calibration routine to maintain measurement accuracy.
Note
This method calls
nidmm.Session.reset()
, and any configurations previous to the call will be lost. All properties will be set to their default values after the call returns.
self_test¶
nidmm.Session.
self_test
()¶Performs a self-test on the DMM to ensure that the DMM is functioning properly. Self-test does not calibrate the DMM. Zero indicates success.
On the NI 4080/4082 and NI 4070/4072, the error code 1013 indicates that you should check the fuse and replace it, if necessary.
Raises SelfTestError on self test failure. Properties on exception object:
- code - failure code from driver
- message - status message from driver
Note
Self-test does not check the fuse on the NI 4065, NI 4071, and NI 4081. Hence, even if the fuse is blown on the device, self-test does not return error code 1013.
Note
This method calls
nidmm.Session.reset()
, and any configurations previous to the call will be lost. All properties will be set to their default values after the call returns.
send_software_trigger¶
nidmm.Session.
send_software_trigger
()¶Sends a command to trigger the DMM. Call this method if you have configured either the
nidmm.Session.trigger_source
ornidmm.Session.sample_trigger
properties. If thenidmm.Session.trigger_source
and/ornidmm.Session.sample_trigger
properties are set toNIDMM_VAL_EXTERNAL
orNIDMM_VAL_TTL
n, you can use this method to override the trigger source that you configured and trigger the device. The NI 4050 and NI 4060 are not supported.Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
Properties¶
Methods¶
Enums¶
Enums used in NI-DMM
ADCCalibration¶
AcquisitionStatus¶
ApertureTimeUnits¶
AutoZero¶
-
class
nidmm.
AutoZero
¶ -
AUTO
¶ The drivers chooses the AutoZero setting based on the configured method and resolution.
-
OFF
¶ Disables AutoZero.
-
ON
¶ The DMM internally disconnects the input signal following each measurement and takes a zero reading. It then subtracts the zero reading from the preceding reading.
-
ONCE
¶ The DMM internally disconnects the input signal for the first measurement and takes a zero reading. It then subtracts the zero reading from the first reading and the following readings.
-
CableCompensationType¶
DCNoiseRejection¶
-
class
nidmm.
DCNoiseRejection
¶ -
AUTO
¶ The driver chooses the DC noise rejection setting based on the configured method and resolution.
-
NORMAL
¶ NI-DMM weighs all samples equally.
-
SECOND_ORDER
¶ NI-DMM weighs the samples taken in the middle of the aperture time more than samples taken at the beginning and the end of the measurement using a triangular weighing method.
-
HIGH_ORDER
¶ NI-DMM weighs the samples taken in the middle of the aperture time more than samples taken at the beginning and the end of the measurement using a bell-curve weighing method.
-
Function¶
-
class
nidmm.
Function
¶ -
DC_VOLTS
¶ DC Voltage
-
AC_VOLTS
¶ AC Voltage
-
DC_CURRENT
¶ DC Current
-
AC_CURRENT
¶ AC Current
-
TWO_WIRE_RES
¶ 2-Wire Resistance
-
FOUR_WIRE_RES
¶ 4-Wire Resistance
-
FREQ
¶ Frequency
-
PERIOD
¶ Period
-
TEMPERATURE
¶ NI 4065, and NI 4070/4071/4072 supported.
-
AC_VOLTS_DC_COUPLED
¶ AC Voltage with DC Coupling
-
DIODE
¶ Diode
-
WAVEFORM_VOLTAGE
¶ Waveform voltage
-
WAVEFORM_CURRENT
¶ Waveform current
-
CAPACITANCE
¶ Capacitance
-
INDUCTANCE
¶ Inductance
-
LCCalculationModel¶
MeasurementCompleteDest¶
-
class
nidmm.
MeasurementCompleteDest
¶ -
NONE
¶ No Trigger
-
EXTERNAL
¶ AUX I/O Connector
-
PXI_TRIG0
¶ PXI Trigger Line 0
-
PXI_TRIG1
¶ PXI Trigger Line 1
-
PXI_TRIG2
¶ PXI Trigger Line 2
-
PXI_TRIG3
¶ PXI Trigger Line 3
-
PXI_TRIG4
¶ PXI Trigger Line 4
-
PXI_TRIG5
¶ PXI Trigger Line 5
-
PXI_TRIG6
¶ PXI Trigger Line 6
-
PXI_TRIG7
¶ PXI Trigger Line 7
-
LBR_TRIG0
¶ Internal Trigger Line of a PXI/SCXI Combination Chassis
-
MeasurementDestinationSlope¶
RTDType¶
-
class
nidmm.
RTDType
¶ -
CUSTOM
¶ Performs Callendar-Van Dusen RTD scaling with the user-specified A, B, and C coefficients.
-
PT3750
¶ Performs scaling for a Pt 3750 RTD.
-
PT3851
¶ Performs scaling for a Pt 3851 RTD.
-
PT3911
¶ Performs scaling for a Pt 3911 RTD.
-
PT3916
¶ Performs scaling for a Pt 3916 RTD.
-
PT3920
¶ Performs scaling for a Pt 3920 RTD.
-
PT3928
¶ Performs scaling for a Pt 3928 RTD.
-
SampleTrigger¶
-
class
nidmm.
SampleTrigger
¶ -
IMMEDIATE
¶ No Trigger
-
EXTERNAL
¶ AUX I/O Connector Trigger Line 0
-
SOFTWARE_TRIG
¶ Software Trigger
-
INTERVAL
¶ Interval Trigger
-
PXI_TRIG0
¶ PXI Trigger Line 0
-
PXI_TRIG1
¶ PXI Trigger Line 1
-
PXI_TRIG2
¶ PXI Trigger Line 2
-
PXI_TRIG3
¶ PXI Trigger Line 3
-
PXI_TRIG4
¶ PXI Trigger Line 4
-
PXI_TRIG5
¶ PXI Trigger Line 5
-
PXI_TRIG6
¶ PXI Trigger Line 6
-
PXI_TRIG7
¶ PXI Trigger Line 7
-
PXI_STAR
¶ PXI Star Trigger Line
-
AUX_TRIG1
¶ AUX I/0 Connector Trigger Line 1
-
LBR_TRIG1
¶ Internal Trigger Line of a PXI/SCXI Combination Chassis
-
ThermistorType¶
ThermocoupleReferenceJunctionType¶
ThermocoupleType¶
TransducerType¶
TriggerSource¶
-
class
nidmm.
TriggerSource
¶ -
IMMEDIATE
¶ No Trigger
-
EXTERNAL
¶ AUX I/O Connector Trigger Line 0
-
SOFTWARE_TRIG
¶ Software Trigger
-
PXI_TRIG0
¶ PXI Trigger Line 0
-
PXI_TRIG1
¶ PXI Trigger Line 1
-
PXI_TRIG2
¶ PXI Trigger Line 2
-
PXI_TRIG3
¶ PXI Trigger Line 3
-
PXI_TRIG4
¶ PXI Trigger Line 4
-
PXI_TRIG5
¶ PXI Trigger Line 5
-
PXI_TRIG6
¶ PXI Trigger Line 6
-
PXI_TRIG7
¶ PXI Trigger Line 7
-
PXI_STAR
¶ PXI Star Trigger Line
-
AUX_TRIG1
¶ AUX I/O Connector Trigger Line 1
-
LBR_TRIG1
¶ Internal Trigger Line of a PXI/SCXI Combination Chassis
-
Exceptions and Warnings¶
UnsupportedConfigurationError¶
- exception
nidmm.
UnsupportedConfigurationError
¶An error due to using this module in an usupported platform.
DriverNotInstalledError¶
- exception
nidmm.
DriverNotInstalledError
¶An error due to using this module without the driver runtime installed.
Examples¶
nidmm_fetch_waveform.py¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | #!/usr/bin/python
import argparse
import nidmm
import sys
import time
def example(resource_name, options, function, range, points, rate):
with nidmm.Session(resource_name=resource_name, options=options) as session:
session.configure_waveform_acquisition(measurement_function=nidmm.Function[function], range=range, rate=rate, waveform_points=points)
with session.initiate():
while True:
time.sleep(0.1)
backlog, acquisition_state = session.read_status()
if acquisition_state == nidmm.AcquisitionStatus.FINISHED_WITH_NO_BACKLOG:
break
measurements = session.fetch_waveform(array_size=backlog)
print(measurements)
def _main(argsv):
parser = argparse.ArgumentParser(description='Performs a waveform acquisition using the NI-DMM API.', formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('-n', '--resource-name', default='PXI1Slot2', help='Resource name of a National Instruments Digital Multimeter.')
parser.add_argument('-f', '--function', default='WAVEFORM_VOLTAGE', choices=nidmm.Function.__members__.keys(), type=str.upper, help='Measurement function.')
parser.add_argument('-r', '--range', default=10, type=float, help='Measurement range.')
parser.add_argument('-p', '--points', default=10, type=int, help='Specifies the number of points to acquire before the waveform acquisition completes.')
parser.add_argument('-s', '--rate', default=1000, type=int, help='Specifies the rate of the acquisition in samples per second.')
parser.add_argument('-op', '--option-string', default='', type=str, help='Option string')
args = parser.parse_args(argsv)
example(args.resource_name, args.option_string, args.function, args.range, args.points, args.rate)
def main():
_main(sys.argv[1:])
def test_example():
options = {'simulate': True, 'driver_setup': {'Model': '4082', 'BoardType': 'PXIe', }, }
example('PXI1Slot2', options, 'WAVEFORM_VOLTAGE', 10, 10, 1000)
def test_main():
cmd_line = ['--option-string', 'Simulate=1, DriverSetup=Model:4082; BoardType:PXIe', ]
_main(cmd_line)
if __name__ == '__main__':
main()
|
nidmm_measurement.py¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #!/usr/bin/python
import argparse
import nidmm
import sys
def example(resource_name, option_string, function, range, digits):
with nidmm.Session(resource_name=resource_name, options=option_string) as session:
session.configure_measurement_digits(measurement_function=nidmm.Function[function], range=range, resolution_digits=digits)
print(session.read())
def _main(argsv):
supported_functions = list(nidmm.Function.__members__.keys())
parser = argparse.ArgumentParser(description='Performs a single measurement using the NI-DMM API.', formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('-n', '--resource-name', default='PXI1Slot2', help='Resource name of a National Instruments Digital Multimeter.')
parser.add_argument('-f', '--function', default=supported_functions[0], choices=supported_functions, type=str.upper, help='Measurement function.')
parser.add_argument('-r', '--range', default=10, type=float, help='Measurement range.')
parser.add_argument('-d', '--digits', default=6.5, type=float, help='Digits of resolution for the measurement.')
parser.add_argument('-op', '--option-string', default='', type=str, help='Option string')
args = parser.parse_args(argsv)
example(args.resource_name, args.option_string, args.function, args.range, args.digits)
def main():
_main(sys.argv[1:])
def test_example():
options = {'simulate': True, 'driver_setup': {'Model': '4082', 'BoardType': 'PXIe', }, }
example('PXI1Slot2', options, 'DC_VOLTS', 10, 6.5)
def test_main():
cmd_line = ['--option-string', 'Simulate=1, DriverSetup=Model:4082; BoardType:PXIe', ]
_main(cmd_line)
if __name__ == '__main__':
main()
|
nidmm_multi_point_measurement.py¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | #!/usr/bin/python
import argparse
import nidmm
import sys
def example(resource_name, options, function, range, digits, samples, triggers):
with nidmm.Session(resource_name=resource_name, options=options) as session:
session.configure_measurement_digits(measurement_function=nidmm.Function[function], range=range, resolution_digits=digits)
session.configure_multi_point(trigger_count=triggers, sample_count=samples)
measurements = session.read_multi_point(array_size=samples)
print('Measurements: ', measurements)
def _main(argsv):
parser = argparse.ArgumentParser(description='Performs a multipoint measurement using the NI-DMM API.', formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('-n', '--resource-name', default='PXI1Slot2', help='Resource name of a National Instruments Digital Multimeter.')
parser.add_argument('-f', '--function', default='DC_VOLTS', choices=nidmm.Function.__members__.keys(), type=str.upper, help='Measurement function.')
parser.add_argument('-r', '--range', default=10, type=float, help='Measurement range.')
parser.add_argument('-d', '--digits', default=6.5, type=float, help='Digits of resolution for the measurement.')
parser.add_argument('-s', '--samples', default=10, type=int, help='The number of measurements the DMM makes.')
parser.add_argument('-t', '--triggers', default=1, type=int, help='Sets the number of triggers you want the DMM to receive before returning to the Idle state.')
parser.add_argument('-op', '--option-string', default='', type=str, help='Option string')
args = parser.parse_args(argsv)
example(args.resource_name, args.option_string, args.function, args.range, args.digits, args.samples, args.triggers)
def main():
_main(sys.argv[1:])
def test_example():
options = {'simulate': True, 'driver_setup': {'Model': '4082', 'BoardType': 'PXIe', }, }
example('PXI1Slot2', options, 'DC_VOLTS', 10, 6.5, 10, 1)
def test_main():
cmd_line = ['--option-string', 'Simulate=1, DriverSetup=Model:4082; BoardType:PXIe', ]
_main(cmd_line)
if __name__ == '__main__':
main()
|
nifgen module¶
Installation¶
As a prerequisite to using the nifgen module, you must install the NI-FGEN runtime on your system. Visit ni.com/downloads to download the driver runtime for your devices.
The nimi-python modules (i.e. for NI-FGEN) can be installed with pip:
$ python -m pip install nifgen~=0.8.0
Or easy_install from setuptools:
$ python -m easy_install nifgen
Usage¶
The following is a basic example of using the nifgen module to open a session to a Function Generator and generate a sine wave for 5 seconds.
import nifgen
import time
with nifgen.Session("Dev1") as session:
session.output_mode = nifgen.OutputMode.FUNC
session.configure_standard_waveform(waveform=nifgen.Waveform.SINE, amplitude=1.0, frequency=10000000, dc_offset=0.0, start_phase=0.0)
with session.initiate():
time.sleep(5)
Additional examples for NI-FGEN are located in src/nifgen/examples/ directory.
API Reference¶
nifgen.Session¶
-
class
nifgen.
Session
(self, resource_name, channel_name=None, reset_device=False, options={})¶ Creates and returns a new NI-FGEN session to the specified channel of a waveform generator that is used in all subsequent NI-FGEN method calls.
Parameters: - resource_name (str) –
Caution
Traditional NI-DAQ and NI-DAQmx device names are not case-sensitive. However, all IVI names, such as logical names, are case-sensitive. If you use logical names, driver session names, or virtual names in your program, you must ensure that the name you use matches the name in the IVI Configuration Store file exactly, without any variations in the case of the characters.
Specifies the resource name of the device to initialize.For Traditional NI-DAQ devices, the syntax is DAQ::n, where n is the device number assigned by MAX, as shown in Example 1.
For NI-DAQmx devices, the syntax is just the device name specified in MAX, as shown in Example 2. Typical default names for NI-DAQmx devices in MAX are Dev1 or PXI1Slot1. You can rename an NI-DAQmx device by right-clicking on the name in MAX and entering a new name.
An alternate syntax for NI-DAQmx devices consists of DAQ::NI-DAQmx device name, as shown in Example 3. This naming convention allows for the use of an NI-DAQmx device in an application that was originally designed for a Traditional NI-DAQ device. For example, if the application expects DAQ::1, you can rename the NI-DAQmx device to 1 in MAX and pass in DAQ::1 for the resource name, as shown in Example 4.
If you use the DAQ::n syntax and an NI-DAQmx device name already exists with that same name, the NI-DAQmx device is matched first.
You can also pass in the name of an IVI logical name or an IVI virtual name configured with the IVI Configuration utility, as shown in Example 5. A logical name identifies a particular virtual instrument. A virtual name identifies a specific device and specifies the initial settings for the session.
Example # Device Type Syntax Variable 1 Traditional NI-DAQ device DAQ::1 (1 = device number) 2 NI-DAQmx device myDAQmxDevice (myDAQmxDevice = device name) 3 NI-DAQmx device DAQ::myDAQmxDevice (myDAQmxDevice = device name) 4 NI-DAQmx device DAQ::2 (2 = device name) 5 IVI logical name or IVI virtual name myLogicalName (myLogicalName = name) - channel_name (str) –
Specifies the channel that this VI uses.
Default Value: “0”
- reset_device (bool) –
Specifies whether you want to reset the device during the initialization procedure. True specifies that the device is reset and performs the same method as the nifgen_Reset method.
**Defined Values**
Default Value: False
True Reset device False Do not reset device - options (str) –
Specifies the initial value of certain properties for the session. The syntax for options is a dictionary of properties with an assigned value. For example:
{ ‘simulate’: False }
You do not have to specify a value for all the properties. If you do not specify a value for a property, the default value is used.
Advanced Example: { ‘simulate’: True, ‘driver_setup’: { ‘Model’: ‘<model number>’, ‘BoardType’: ‘<type>’ } }
Property Default range_check True query_instrument_status False cache True simulate False record_value_coersions False driver_setup {}
Properties
Public methods
- resource_name (str) –
Properties¶
all_marker_events_latched_status¶
nifgen.Session.
all_marker_events_latched_status
¶Returns a bit field of the latched status of all Marker Events. Write 0 to this property to clear the latched status of all Marker Events.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Marker:Advanced:All Marker Events Latched Status
- C Attribute: NIFGEN_ATTR_ALL_MARKER_EVENTS_LATCHED_STATUS
all_marker_events_live_status¶
nifgen.Session.
all_marker_events_live_status
¶Returns a bit field of the live status of all Marker Events.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Marker:Advanced:All Marker Events Live Status
- C Attribute: NIFGEN_ATTR_ALL_MARKER_EVENTS_LIVE_STATUS
analog_data_mask¶
nifgen.Session.
analog_data_mask
¶Specifies the mask to apply to the analog output. The masked data is replaced with the data in
nifgen.Session.analog_static_value
.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Data Mask:Analog Data Mask
- C Attribute: NIFGEN_ATTR_ANALOG_DATA_MASK
analog_filter_enabled¶
nifgen.Session.
analog_filter_enabled
¶Controls whether the signal generator applies to an analog filter to the output signal. This property is valid in arbitrary waveform, arbitrary sequence, and script modes. This property can also be used in standard method and frequency list modes for user-defined waveforms.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Filters:Analog Filter Enabled
- C Attribute: NIFGEN_ATTR_ANALOG_FILTER_ENABLED
analog_path¶
nifgen.Session.
analog_path
¶Specifies the analog signal path that should be used. The main path allows you to configure gain, offset, analog filter status, output impedance, and output enable. The main path has two amplifier options, high- and low-gain. The direct path presents a much smaller gain range, and you cannot adjust offset or the filter status. The direct path also provides a smaller output range but also lower distortion. NI-FGEN normally chooses the amplifier based on the user-specified gain.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.AnalogPath Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Analog Path
- C Attribute: NIFGEN_ATTR_ANALOG_PATH
analog_static_value¶
nifgen.Session.
analog_static_value
¶Specifies the static value that replaces data masked by
nifgen.Session.analog_data_mask
.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Data Mask:Analog Static Value
- C Attribute: NIFGEN_ATTR_ANALOG_STATIC_VALUE
arb_gain¶
nifgen.Session.
arb_gain
¶Specifies the factor by which the signal generator scales the arbitrary waveform data. When you create arbitrary waveforms, you must first normalize the data points to the range -1.0 to +1.0. Use this property to scale the arbitrary waveform to other ranges. For example, when you set this property to 2.0, the output signal ranges from -2.0 V to +2.0 V. Use this property when
nifgen.Session.output_mode
is set toARB
orSEQ
.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Gain
- C Attribute: NIFGEN_ATTR_ARB_GAIN
arb_marker_position¶
nifgen.Session.
arb_marker_position
¶Specifies the position for a marker to be asserted in the arbitrary waveform. This property defaults to -1 when no marker position is specified. Use this property when
nifgen.Session.output_mode
is set toARB
. Usenifgen.Session.ExportSignal()
to export the marker signal.Note
One or more of the referenced methods are not in the Python API for this driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Arbitrary Waveform Mode:Marker Position
- C Attribute: NIFGEN_ATTR_ARB_MARKER_POSITION
arb_offset¶
nifgen.Session.
arb_offset
¶Specifies the value that the signal generator adds to the arbitrary waveform data. When you create arbitrary waveforms, you must first normalize the data points to the range -1.0 to +1.0. Use this property to shift the arbitrary waveform range. For example, when you set this property to 1.0, the output signal ranges from 2.0 V to 0.0 V. Use this property when
nifgen.Session.output_mode
is set toARB
orSEQ
. Units: VoltsThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Offset
- C Attribute: NIFGEN_ATTR_ARB_OFFSET
arb_repeat_count¶
nifgen.Session.
arb_repeat_count
¶Specifies number of times to repeat the arbitrary waveform when the triggerMode parameter of nifgen_ConfigureTriggerMode is set to
SINGLE
orSTEPPED
. This property is ignored if the triggerMode parameter is set toCONTINUOUS
orBURST
. Use this property whennifgen.Session.output_mode
is set toARB
. When used during streaming, this property specifies the number of times to repeat the streaming waveform (the onboard memory allocated for streaming). For more information about streaming, refer to the Streaming topic.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Arbitrary Waveform Mode:Repeat Count
- C Attribute: NIFGEN_ATTR_ARB_REPEAT_COUNT
arb_sample_rate¶
nifgen.Session.
arb_sample_rate
¶Specifies the rate at which the signal generator outputs the points in arbitrary waveforms. Use this property when
nifgen.Session.output_mode
is set toARB
orSEQ
. Units: Samples/sThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocks:Sample Clock:Rate
- C Attribute: NIFGEN_ATTR_ARB_SAMPLE_RATE
arb_sequence_handle¶
nifgen.Session.
arb_sequence_handle
¶This channel-based property identifies which sequence the signal generator produces. You can create multiple sequences using
nifgen.Session.create_arb_sequence()
.nifgen.Session.create_arb_sequence()
returns a handle that you can use to identify the particular sequence. To configure the signal generator to produce a particular sequence, set this property to the sequence handle. Use this property only whennifgen.Session.output_mode
is set toSEQ
.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Arbitrary Sequence Mode:Arbitrary Sequence Handle
- C Attribute: NIFGEN_ATTR_ARB_SEQUENCE_HANDLE
arb_waveform_handle¶
nifgen.Session.
arb_waveform_handle
¶Selects which arbitrary waveform the signal generator produces. You can create multiple arbitrary waveforms using one of the following niFgen Create Waveform methods:
nifgen.Session.create_waveform()
nifgen.Session.create_waveform()
nifgen.Session.create_waveform_from_file_i16()
nifgen.Session.create_waveform_from_file_f64()
nifgen.Session.CreateWaveformFromFileHWS()
These methods return a handle that you can use to identify the particular waveform. To configure the signal generator to produce a particular waveform, set this property to the waveform handle. Use this property only whennifgen.Session.output_mode
is set toARB
.Note
One or more of the referenced methods are not in the Python API for this driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Arbitrary Waveform Mode:Arbitrary Waveform Handle
- C Attribute: NIFGEN_ATTR_ARB_WAVEFORM_HANDLE
aux_power_enabled¶
nifgen.Session.
aux_power_enabled
¶Controls the specified auxiliary power pin. Setting this property to TRUE energizes the auxiliary power when the session is committed. When this property is FALSE, the power pin of the connector outputs no power.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Advanced:AUX Power Enabled
- C Attribute: NIFGEN_ATTR_AUX_POWER_ENABLED
bus_type¶
nifgen.Session.
bus_type
¶The bus type of the signal generator.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.BusType Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Bus Type
- C Attribute: NIFGEN_ATTR_BUS_TYPE
channel_delay¶
nifgen.Session.
channel_delay
¶Specifies, in seconds, the delay to apply to the analog output of the channel specified by the channel string. You can use the channel delay to configure the timing relationship between channels on a multichannel device. Values for this property can be zero or positive. A value of zero indicates that the channels are aligned. A positive value delays the analog output by the specified number of seconds.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Channel Delay
- C Attribute: NIFGEN_ATTR_CHANNEL_DELAY
clock_mode¶
nifgen.Session.
clock_mode
¶Controls which clock mode is used for the signal generator. For signal generators that support it, this property allows switching the sample clock to High-Resolution mode. When in Divide-Down mode, the sample rate can only be set to certain frequences, based on dividing down the update clock. However, in High-Resolution mode, the sample rate may be set to any value.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.ClockMode Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocks:Sample Clock:Mode
- C Attribute: NIFGEN_ATTR_CLOCK_MODE
common_mode_offset¶
nifgen.Session.
common_mode_offset
¶Specifies, in volts, the value the signal generator adds to or subtracts from the arbitrary waveform data. This property applies only when you set the
nifgen.Session.terminal_configuration
property toDIFFERENTIAL
. Common mode offset is applied to the signals generated at each differential output terminal.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Common Mode Offset
- C Attribute: NIFGEN_ATTR_COMMON_MODE_OFFSET
data_marker_events_count¶
nifgen.Session.
data_marker_events_count
¶Returns the number of Data Marker Events supported by the device.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Data Marker Events Count
- C Attribute: NIFGEN_ATTR_DATA_MARKER_EVENTS_COUNT
data_marker_event_data_bit_number¶
nifgen.Session.
data_marker_event_data_bit_number
¶Specifies the bit number to assign to the Data Marker Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Data Marker:Data Bit Number
- C Attribute: NIFGEN_ATTR_DATA_MARKER_EVENT_DATA_BIT_NUMBER
data_marker_event_level_polarity¶
nifgen.Session.
data_marker_event_level_polarity
¶Specifies the output polarity of the Data marker event.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.DataMarkerEventLevelPolarity Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Data Marker:Level:Active Level
- C Attribute: NIFGEN_ATTR_DATA_MARKER_EVENT_LEVEL_POLARITY
data_marker_event_output_terminal¶
nifgen.Session.
data_marker_event_output_terminal
¶Specifies the destination terminal for the Data Marker Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Data Marker:Output Terminal
- C Attribute: NIFGEN_ATTR_DATA_MARKER_EVENT_OUTPUT_TERMINAL
data_transfer_block_size¶
nifgen.Session.
data_transfer_block_size
¶The number of samples at a time to download to onboard memory. Useful when the total data to be transferred to onboard memory is large.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Data Transfer:Data Transfer Block Size
- C Attribute: NIFGEN_ATTR_DATA_TRANSFER_BLOCK_SIZE
data_transfer_maximum_bandwidth¶
nifgen.Session.
data_transfer_maximum_bandwidth
¶Specifies the maximum amount of bus bandwidth (in bytes per second) to use for data transfers. The signal generator limits data transfer speeds on the PCIe bus to the value you specify for this property. Set this property to optimize bus bandwidth usage for multi-device streaming applications by preventing the signal generator from consuming all of the available bandwidth on a PCI express link when waveforms are being written to the onboard memory of the device.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Data Transfer:Maximum Bandwidth
- C Attribute: NIFGEN_ATTR_DATA_TRANSFER_MAXIMUM_BANDWIDTH
data_transfer_maximum_in_flight_reads¶
nifgen.Session.
data_transfer_maximum_in_flight_reads
¶Specifies the maximum number of concurrent PCI Express read requests the signal generator can issue. When transferring data from computer memory to device onboard memory across the PCI Express bus, the signal generator can issue multiple memory reads at the same time. In general, the larger the number of read requests, the more efficiently the device uses the bus because the multiple read requests keep the data flowing, even in a PCI Express topology that has high latency due to PCI Express switches in the data path. Most NI devices can issue a large number of read requests (typically 8 or 16). By default, this property is set to the highest value the signal generator supports. If other devices in your system cannot tolerate long data latencies, it may be helpful to decrease the number of in-flight read requests the NI signal generator issues. This helps to reduce the amount of data the signal generator reads at one time.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Data Transfer:Advanced:Maximum In-Flight Read Requests
- C Attribute: NIFGEN_ATTR_DATA_TRANSFER_MAXIMUM_IN_FLIGHT_READS
data_transfer_preferred_packet_size¶
nifgen.Session.
data_transfer_preferred_packet_size
¶Specifies the preferred size of the data field in a PCI Express read request packet. In general, the larger the packet size, the more efficiently the device uses the bus. By default, NI signal generators use the largest packet size allowed by the system. However, due to different system implementations, some systems may perform better with smaller packet sizes. Recommended values for this property are powers of two between 64 and 512. In some cases, the signal generator generates packets smaller than the preferred size you set with this property. You cannot change this property while the device is generating a waveform. If you want to change the device configuration, call the
nifgen.Session.abort()
method or wait for the generation to complete.Note
:
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Data Transfer:Advanced:Preferred Packet Size
- C Attribute: NIFGEN_ATTR_DATA_TRANSFER_PREFERRED_PACKET_SIZE
digital_data_mask¶
nifgen.Session.
digital_data_mask
¶Specifies the mask to apply to the output on the digital connector. The masked data is replaced with the data in
nifgen.Session.digital_static_value
.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Data Mask:Digital Data Mask
- C Attribute: NIFGEN_ATTR_DIGITAL_DATA_MASK
digital_edge_script_trigger_edge¶
nifgen.Session.
digital_edge_script_trigger_edge
¶Specifies the active edge for the Script trigger. This property is used when
nifgen.Session.script_trigger_type
is set to Digital Edge.The following table lists the characteristics of this property.
Characteristic Value Datatype enums.ScriptTriggerDigitalEdgeEdge Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Script:Digital Edge:Edge
- C Attribute: NIFGEN_ATTR_DIGITAL_EDGE_SCRIPT_TRIGGER_EDGE
digital_edge_script_trigger_source¶
nifgen.Session.
digital_edge_script_trigger_source
¶Specifies the source terminal for the Script trigger. This property is used when
nifgen.Session.script_trigger_type
is set to Digital Edge.The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Script:Digital Edge:Source
- C Attribute: NIFGEN_ATTR_DIGITAL_EDGE_SCRIPT_TRIGGER_SOURCE
digital_edge_start_trigger_edge¶
nifgen.Session.
digital_edge_start_trigger_edge
¶Specifies the active edge for the Start trigger. This property is used only when
nifgen.Session.start_trigger_type
is set to Digital Edge.The following table lists the characteristics of this property.
Characteristic Value Datatype enums.StartTriggerDigitalEdgeEdge Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Start:Digital Edge:Edge
- C Attribute: NIFGEN_ATTR_DIGITAL_EDGE_START_TRIGGER_EDGE
digital_edge_start_trigger_source¶
nifgen.Session.
digital_edge_start_trigger_source
¶Specifies the source terminal for the Start trigger. This property is used only when
nifgen.Session.start_trigger_type
is set to Digital Edge.The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Start:Digital Edge:Source
- C Attribute: NIFGEN_ATTR_DIGITAL_EDGE_START_TRIGGER_SOURCE
digital_filter_enabled¶
nifgen.Session.
digital_filter_enabled
¶Controls whether the signal generator applies a digital filter to the output signal. This property is valid in arbitrary waveform, arbitrary sequence, and script modes. This property can also be used in standard method and frequency list modes for user-defined waveforms.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Filters:Digital Filter Enabled
- C Attribute: NIFGEN_ATTR_DIGITAL_FILTER_ENABLED
digital_filter_interpolation_factor¶
nifgen.Session.
digital_filter_interpolation_factor
¶This property only affects the device when
nifgen.Session.digital_filter_enabled
is set to True. If you do not set this property directly, NI-FGEN automatically selects the maximum interpolation factor allowed for the current sample rate. Valid values are 2, 4, and 8.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Filters:Digital Filter Interpolation Factor
- C Attribute: NIFGEN_ATTR_DIGITAL_FILTER_INTERPOLATION_FACTOR
digital_gain¶
nifgen.Session.
digital_gain
¶Specifies a factor by which the signal generator digitally multiplies generated data before converting it to an analog signal in the DAC. For a digital gain greater than 1.0, the product of digital gain times the generated data must be inside the range plus or minus 1.0 (assuming floating point data). If the product exceeds these limits, the signal generator clips the output signal, and an error results. Some signal generators support both digital gain and an analog gain (analog gain is specified with the
nifgen.Session.func_amplitude
property or thenifgen.Session.arb_gain
property). Digital gain can be changed during generation without the glitches that may occur when changing analog gains, due to relay switching. However, the DAC output resolution is a method of analog gain, so only analog gain makes full use of the resolution of the DAC.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Digital Gain
- C Attribute: NIFGEN_ATTR_DIGITAL_GAIN
digital_level_script_trigger_active_level¶
nifgen.Session.
digital_level_script_trigger_active_level
¶Specifies the active level for the Script trigger. This property is used when
nifgen.Session.script_trigger_type
is set to Digital Level.The following table lists the characteristics of this property.
Characteristic Value Datatype enums.ScriptTriggerDigitalLevelActiveLevel Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Script:Digital Level:Active Level
- C Attribute: NIFGEN_ATTR_DIGITAL_LEVEL_SCRIPT_TRIGGER_ACTIVE_LEVEL
digital_level_script_trigger_source¶
nifgen.Session.
digital_level_script_trigger_source
¶Specifies the source terminal for the Script trigger. This property is used when
nifgen.Session.script_trigger_type
is set to Digital Level.The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Script:Digital Level:Source
- C Attribute: NIFGEN_ATTR_DIGITAL_LEVEL_SCRIPT_TRIGGER_SOURCE
digital_pattern_enabled¶
nifgen.Session.
digital_pattern_enabled
¶Controls whether the signal generator generates a digital pattern of the output signal.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Advanced:Digital Pattern Enabled
- C Attribute: NIFGEN_ATTR_DIGITAL_PATTERN_ENABLED
digital_static_value¶
nifgen.Session.
digital_static_value
¶Specifies the static value that replaces data masked by
nifgen.Session.digital_data_mask
.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Data Mask:Digital Static Value
- C Attribute: NIFGEN_ATTR_DIGITAL_STATIC_VALUE
direct_dma_enabled¶
nifgen.Session.
direct_dma_enabled
¶Enable the device for Direct DMA writes. When enabled, all Create Waveform and Write Waveform method calls that are given a data address in the Direct DMA Window will download data residing on the Direct DMA device to the instrument’s onboard memory.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Data Transfer:Direct DMA:Direct DMA Enabled
- C Attribute: NIFGEN_ATTR_DIRECT_DMA_ENABLED
direct_dma_window_address¶
nifgen.Session.
direct_dma_window_address
¶Specifies the window address (beginning of window) of the waveform data source. This window address is specified by your Direct DMA-compatible data source.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Data Transfer:Direct DMA:Window Address
- C Attribute: NIFGEN_ATTR_DIRECT_DMA_WINDOW_ADDRESS
direct_dma_window_size¶
nifgen.Session.
direct_dma_window_size
¶Specifies the size of the memory window in bytes (not samples) provided by your Direct DMA-compatible data source.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Data Transfer:Direct DMA:Window Size in Bytes
- C Attribute: NIFGEN_ATTR_DIRECT_DMA_WINDOW_SIZE
done_event_delay¶
nifgen.Session.
done_event_delay
¶Specifies the amount of delay applied to a Done Event with respect to the analog output of the signal generator. A positive delay value indicates that the Done Event will come out after the analog data, while a negative delay value indicates that the Done Event will come out before the analog data. The default value is zero, which will align the Done Event with the analog output. You can specify the units of the delay value by setting the
nifgen.Session.done_event_delay
property.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Done:Advanced:Delay Value
- C Attribute: NIFGEN_ATTR_DONE_EVENT_DELAY
done_event_delay_units¶
nifgen.Session.
done_event_delay_units
¶Specifies the units applied to the value of the
nifgen.Session.done_event_delay
property. Valid units are seconds and sample clock periods.The following table lists the characteristics of this property.
Characteristic Value Datatype enums.DoneEventDelayUnits Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Done:Advanced:Delay Units
- C Attribute: NIFGEN_ATTR_DONE_EVENT_DELAY_UNITS
done_event_latched_status¶
nifgen.Session.
done_event_latched_status
¶Returns the latched status of the specified Done Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Done:Advanced:Latched Status
- C Attribute: NIFGEN_ATTR_DONE_EVENT_LATCHED_STATUS
done_event_level_active_level¶
nifgen.Session.
done_event_level_active_level
¶Specifies the output polarity of the Done Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.DoneEventActiveLevel Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Done:Level:Active Level
- C Attribute: NIFGEN_ATTR_DONE_EVENT_LEVEL_ACTIVE_LEVEL
done_event_output_behavior¶
nifgen.Session.
done_event_output_behavior
¶Specifies the output behavior for the Done Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.DoneEventOutputBehavior Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Done:Output Behavior
- C Attribute: NIFGEN_ATTR_DONE_EVENT_OUTPUT_BEHAVIOR
done_event_output_terminal¶
nifgen.Session.
done_event_output_terminal
¶Specifies the destination terminal for the Done Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Done:Output Terminal
- C Attribute: NIFGEN_ATTR_DONE_EVENT_OUTPUT_TERMINAL
done_event_pulse_polarity¶
nifgen.Session.
done_event_pulse_polarity
¶Specifies the output polarity of the Done Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.DoneEventPulsePolarity Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Done:Pulse:Polarity
- C Attribute: NIFGEN_ATTR_DONE_EVENT_PULSE_POLARITY
done_event_pulse_width¶
nifgen.Session.
done_event_pulse_width
¶Specifies the pulse width for the Done Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Done:Pulse:Width Value
- C Attribute: NIFGEN_ATTR_DONE_EVENT_PULSE_WIDTH
done_event_pulse_width_units¶
nifgen.Session.
done_event_pulse_width_units
¶Specifies the pulse width units for the Done Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.DoneEventPulseWidthUnits Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Done:Pulse:Width Units
- C Attribute: NIFGEN_ATTR_DONE_EVENT_PULSE_WIDTH_UNITS
driver_setup¶
nifgen.Session.
driver_setup
¶Specifies the driver setup portion of the option string that was passed into the
nifgen.Session.InitWithOptions()
method.Note
One or more of the referenced methods are not in the Python API for this driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based 0 Resettable 0 Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- C Attribute: NIFGEN_ATTR_DRIVER_SETUP
exported_onboard_reference_clock_output_terminal¶
nifgen.Session.
exported_onboard_reference_clock_output_terminal
¶Specifies the terminal to which to export the Onboard Reference Clock.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocks:Reference Clock:Onboard Reference Clock:Export Output Terminal
- C Attribute: NIFGEN_ATTR_EXPORTED_ONBOARD_REFERENCE_CLOCK_OUTPUT_TERMINAL
exported_reference_clock_output_terminal¶
nifgen.Session.
exported_reference_clock_output_terminal
¶Specifies the terminal to which to export the Reference Clock.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocks:Reference Clock:Export Output Terminal
- C Attribute: NIFGEN_ATTR_EXPORTED_REFERENCE_CLOCK_OUTPUT_TERMINAL
exported_sample_clock_divisor¶
nifgen.Session.
exported_sample_clock_divisor
¶Specifies the factor by which to divide the Sample clock, also known as the Update clock, before it is exported. To export the Sample clock, use the
nifgen.Session.ExportSignal()
method or thenifgen.Session.exported_sample_clock_output_terminal
property.Note
One or more of the referenced methods are not in the Python API for this driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocks:Sample Clock:Exported Sample Clock Divisor
- C Attribute: NIFGEN_ATTR_EXPORTED_SAMPLE_CLOCK_DIVISOR
exported_sample_clock_output_terminal¶
nifgen.Session.
exported_sample_clock_output_terminal
¶Specifies the terminal to which to export the Sample Clock.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocks:Sample Clock:Export Output Terminal
- C Attribute: NIFGEN_ATTR_EXPORTED_SAMPLE_CLOCK_OUTPUT_TERMINAL
exported_sample_clock_timebase_divisor¶
nifgen.Session.
exported_sample_clock_timebase_divisor
¶Specifies the factor by which to divide the sample clock timebase (board clock) before it is exported. To export the Sample clock timebase, use the
nifgen.Session.ExportSignal()
method or thenifgen.Session.exported_sample_clock_timebase_output_terminal
property.Note
One or more of the referenced methods are not in the Python API for this driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocks:Sample Clock Timebase:Exported Sample Clock Timebase Divisor
- C Attribute: NIFGEN_ATTR_EXPORTED_SAMPLE_CLOCK_TIMEBASE_DIVISOR
exported_sample_clock_timebase_output_terminal¶
nifgen.Session.
exported_sample_clock_timebase_output_terminal
¶Specifies the terminal to which to export the Sample clock timebase. If you specify a divisor with the
nifgen.Session.exported_sample_clock_timebase_divisor
property, the Sample clock exported with thenifgen.Session.exported_sample_clock_timebase_output_terminal
property is the value of the Sample clock timebase after it is divided-down. For a list of the terminals available on your device, refer to the Device Routes tab in MAX. To change the device configuration, callnifgen.Session.abort()
or wait for the generation to complete.Note
The signal generator must not be in the Generating state when you change this property.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocks:Sample Clock Timebase:Export Output Terminal
- C Attribute: NIFGEN_ATTR_EXPORTED_SAMPLE_CLOCK_TIMEBASE_OUTPUT_TERMINAL
exported_script_trigger_output_terminal¶
nifgen.Session.
exported_script_trigger_output_terminal
¶Specifies the output terminal for the exported Script trigger. Setting this property to an empty string means that when you commit the session, the signal is removed from that terminal and, if possible, the terminal is tristated.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Script:Output Terminal
- C Attribute: NIFGEN_ATTR_EXPORTED_SCRIPT_TRIGGER_OUTPUT_TERMINAL
exported_start_trigger_output_terminal¶
nifgen.Session.
exported_start_trigger_output_terminal
¶Specifies the destination terminal for exporting the Start trigger.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Start:Output Terminal
- C Attribute: NIFGEN_ATTR_EXPORTED_START_TRIGGER_OUTPUT_TERMINAL
external_clock_delay_binary_value¶
nifgen.Session.
external_clock_delay_binary_value
¶Binary value of the external clock delay.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocks:Advanced:External Clock Delay Binary Value
- C Attribute: NIFGEN_ATTR_EXTERNAL_CLOCK_DELAY_BINARY_VALUE
external_sample_clock_multiplier¶
nifgen.Session.
external_sample_clock_multiplier
¶Specifies a multiplication factor to use to obtain a desired sample rate from an external Sample clock. The resulting sample rate is equal to this factor multiplied by the external Sample clock rate. You can use this property to generate samples at a rate higher than your external clock rate. When using this property, you do not need to explicitly set the external clock rate.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocks:Advanced:External Sample Clock Multiplier
- C Attribute: NIFGEN_ATTR_EXTERNAL_SAMPLE_CLOCK_MULTIPLIER
file_transfer_block_size¶
nifgen.Session.
file_transfer_block_size
¶The number of samples at a time to read from the file and download to onboard memory. Used in conjunction with the Create From File and Write From File methods.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Data Transfer:File Transfer Block Size
- C Attribute: NIFGEN_ATTR_FILE_TRANSFER_BLOCK_SIZE
filter_correction_frequency¶
nifgen.Session.
filter_correction_frequency
¶Controls the filter correction frequency of the analog filter. This property corrects for the ripples in the analog filter frequency response at the frequency specified. For standard waveform output, the filter correction frequency should be set to be the same as the frequency of the standard waveform. To have no filter correction, set this property to 0 Hz.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:5401/5411/5431:Filter Correction Frequency
- C Attribute: NIFGEN_ATTR_FILTER_CORRECTION_FREQUENCY
flatness_correction_enabled¶
nifgen.Session.
flatness_correction_enabled
¶When True, the signal generator applies a flatness correction factor to the generated sine wave in order to ensure the same output power level at all frequencies. This property should be set to False when performing Flatness Calibration.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Filters:Flatness Correction Enabled
- C Attribute: NIFGEN_ATTR_FLATNESS_CORRECTION_ENABLED
fpga_bitfile_path¶
nifgen.Session.
fpga_bitfile_path
¶Gets the absolute file path to the bitfile loaded on the FPGA.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:FPGA Bitfile Path
- C Attribute: NIFGEN_ATTR_FPGA_BITFILE_PATH
freq_list_duration_quantum¶
nifgen.Session.
freq_list_duration_quantum
¶Returns the quantum of which all durations must be a multiple in a frequency list.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Standard Function:Frequency List Mode:Frequency List Duration Quantum
- C Attribute: NIFGEN_ATTR_FREQ_LIST_DURATION_QUANTUM
freq_list_handle¶
nifgen.Session.
freq_list_handle
¶Sets which frequency list the signal generator produces. Create a frequency list using
nifgen.Session.create_freq_list()
.nifgen.Session.create_freq_list()
returns a handle that you can use to identify the list.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Standard Function:Frequency List Mode:Frequency List Handle
- C Attribute: NIFGEN_ATTR_FREQ_LIST_HANDLE
func_amplitude¶
nifgen.Session.
func_amplitude
¶Controls the amplitude of the standard waveform that the signal generator produces. This value is the amplitude at the output terminal. For example, to produce a waveform ranging from -5.00 V to +5.00 V, set the amplitude to 10.00 V. set the Waveform parameter to
DC
. Units: Vpk-pkNote
This parameter does not affect signal generator behavior when you
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Standard Function:Amplitude
- C Attribute: NIFGEN_ATTR_FUNC_AMPLITUDE
func_buffer_size¶
nifgen.Session.
func_buffer_size
¶This property contains the number of samples used in the standard method waveform buffer. This property is only valid on devices that implement standard method mode in software, and is read-only for all other devices. implementation of Standard Method Mode on your device.
Note
Refer to the Standard Method Mode topic for more information on the
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Standard Function:Standard Function Mode:Buffer Size
- C Attribute: NIFGEN_ATTR_FUNC_BUFFER_SIZE
func_dc_offset¶
nifgen.Session.
func_dc_offset
¶Controls the DC offset of the standard waveform that the signal generator produces. This value is the offset at the output terminal. The value is the offset from ground to the center of the waveform that you specify with the Waveform parameter. For example, to configure a waveform with an amplitude of 10.00 V to range from 0.00 V to +10.00 V, set DC Offset to 5.00 V. Units: volts
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Standard Function:DC Offset
- C Attribute: NIFGEN_ATTR_FUNC_DC_OFFSET
func_duty_cycle_high¶
nifgen.Session.
func_duty_cycle_high
¶Controls the duty cycle of the square wave the signal generator produces. Specify this property as a percentage of the time the square wave is high in a cycle. set the Waveform parameter to
SQUARE
. Units: Percentage of time the waveform is highNote
This parameter only affects signal generator behavior when you
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Standard Function:Duty Cycle High
- C Attribute: NIFGEN_ATTR_FUNC_DUTY_CYCLE_HIGH
func_frequency¶
nifgen.Session.
func_frequency
¶Controls the frequency of the standard waveform that the signal generator produces. Units: hertz (1) This parameter does not affect signal generator behavior when you set the Waveform parameter of the
nifgen.Session.configure_standard_waveform()
method toDC
. (2) ForSINE
, the range is between 0 MHz and 16 MHz, but the range is between 0 MHz and 1 MHz for all other waveforms.Note
:
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Standard Function:Standard Function Mode:Frequency
- C Attribute: NIFGEN_ATTR_FUNC_FREQUENCY
func_max_buffer_size¶
nifgen.Session.
func_max_buffer_size
¶This property sets the maximum number of samples that can be used in the standard method waveform buffer. Increasing this value may increase the quality of the waveform. This property is only valid on devices that implement standard method mode in software, and is read-only for all other devices. implementation of Standard Method Mode on your device.
Note
Refer to the Standard Method Mode topic for more information on the
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Standard Function:Standard Function Mode:Maximum Buffer Size
- C Attribute: NIFGEN_ATTR_FUNC_MAX_BUFFER_SIZE
func_start_phase¶
nifgen.Session.
func_start_phase
¶Controls horizontal offset of the standard waveform the signal generator produces. Specify this property in degrees of one waveform cycle. A start phase of 180 degrees means output generation begins halfway through the waveform. A start phase of 360 degrees offsets the output by an entire waveform cycle, which is identical to a start phase of 0 degrees. set the Waveform parameter to
DC
. Units: Degrees of one cycleNote
This parameter does not affect signal generator behavior when you
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Standard Function:Start Phase
- C Attribute: NIFGEN_ATTR_FUNC_START_PHASE
func_waveform¶
nifgen.Session.
func_waveform
¶This channel-based property specifies which standard waveform the signal generator produces. Use this property only when
nifgen.Session.output_mode
is set toFUNC
.SINE
- Sinusoid waveformSQUARE
- Square waveformTRIANGLE
- Triangle waveformRAMP_UP
- Positive ramp waveformRAMP_DOWN
- Negative ramp waveformDC
- Constant voltageNOISE
- White noiseUSER
- User-defined waveform as defined withnifgen.Session.define_user_standard_waveform()
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.Waveform Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Standard Function:Waveform
- C Attribute: NIFGEN_ATTR_FUNC_WAVEFORM
gain_dac_value¶
nifgen.Session.
gain_dac_value
¶Specifies the value programmed to the gain DAC. The value should be treated as an unsigned, right-justified number.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Calibration:Gain DAC Value
- C Attribute: NIFGEN_ATTR_GAIN_DAC_VALUE
idle_behavior¶
nifgen.Session.
idle_behavior
¶Specifies the behavior of the output during the Idle state. The output can be configured to hold the last generated voltage before entering the Idle state or jump to the Idle Value.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.IdleBehavior Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Advanced:Idle Behavior
- C Attribute: NIFGEN_ATTR_IDLE_BEHAVIOR
idle_value¶
nifgen.Session.
idle_value
¶Specifies the value to generate in the Idle state. The Idle Behavior must be configured to jump to this value.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Advanced:Idle Value
- C Attribute: NIFGEN_ATTR_IDLE_VALUE
id_query_response¶
nifgen.Session.
id_query_response
¶The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based 0 Resettable 0 Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- C Attribute: NIFGEN_ATTR_ID_QUERY_RESPONSE
instrument_firmware_revision¶
nifgen.Session.
instrument_firmware_revision
¶A string that contains the firmware revision information for the device that you are currently using.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Inherent IVI Attributes:Instrument Identification:Firmware Revision
- C Attribute: NIFGEN_ATTR_INSTRUMENT_FIRMWARE_REVISION
instrument_manufacturer¶
nifgen.Session.
instrument_manufacturer
¶A string that contains the name of the device manufacturer you are currently using.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Inherent IVI Attributes:Instrument Identification:Manufacturer
- C Attribute: NIFGEN_ATTR_INSTRUMENT_MANUFACTURER
instrument_model¶
nifgen.Session.
instrument_model
¶A string that contains the model number or name of the device that you are currently using.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Inherent IVI Attributes:Instrument Identification:Model
- C Attribute: NIFGEN_ATTR_INSTRUMENT_MODEL
io_resource_descriptor¶
nifgen.Session.
io_resource_descriptor
¶Indicates the resource descriptor that NI-FGEN uses to identify the physical device. If you initialize NI-FGEN with a logical name, this property contains the resource descriptor that corresponds to the entry in the IVI Configuration Utility. If you initialize NI-FGEN with the resource descriptor, this property contains that value.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Inherent IVI Attributes:Advanced Session Information:Resource Descriptor
- C Attribute: NIFGEN_ATTR_IO_RESOURCE_DESCRIPTOR
load_impedance¶
nifgen.Session.
load_impedance
¶This channel-based property specifies the load impedance connected to the analog output of the channel. If you set this property to
NIFGEN_VAL_MATCHED_LOAD_IMPEDANCE
(-1.0), NI-FGEN assumes that the load impedance matches the output impedance. NI-FGEN compensates to give the desired peak-to-peak voltage amplitude or arbitrary gain (relative to 1 V).Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Load Impedance
- C Attribute: NIFGEN_ATTR_LOAD_IMPEDANCE
logical_name¶
nifgen.Session.
logical_name
¶A string containing the logical name that you specified when opening the current IVI session. You may pass a logical name to
nifgen.Session.init()
ornifgen.Session.InitWithOptions()
. The IVI Configuration Utility must contain an entry for the logical name. The logical name entry refers to a virtual instrument section in the IVI Configuration file. The virtual instrument section specifies a physical device and initial user options.Note
One or more of the referenced methods are not in the Python API for this driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Inherent IVI Attributes:Advanced Session Information:Logical Name
- C Attribute: NIFGEN_ATTR_LOGICAL_NAME
major_version¶
nifgen.Session.
major_version
¶Returns the major version number of NI-FGEN.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Obsolete:Major Version
- C Attribute: NIFGEN_ATTR_MAJOR_VERSION
marker_events_count¶
nifgen.Session.
marker_events_count
¶Returns the number of markers supported by the device. Use this property when
nifgen.Session.output_mode
is set toSCRIPT
.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Marker Events Count
- C Attribute: NIFGEN_ATTR_MARKER_EVENTS_COUNT
marker_event_delay¶
nifgen.Session.
marker_event_delay
¶Specifies the amount of delay applied to a Marker Event with respect to the analog output of the signal generator. A positive delay value indicates that the Marker Event will come out after the analog data, while a negative delay value indicates that the Marker Event will come out before the analog data. The default value is zero, which will align the Marker Event with the analog output. You can specify the units of the delay value by setting the
nifgen.Session.marker_event_delay
property.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Marker:Advanced:Delay Value
- C Attribute: NIFGEN_ATTR_MARKER_EVENT_DELAY
marker_event_delay_units¶
nifgen.Session.
marker_event_delay_units
¶Specifies the units applied to the value of the
nifgen.Session.marker_event_delay
property. Valid units are seconds and sample clock periods.The following table lists the characteristics of this property.
Characteristic Value Datatype enums.MarkerEventDelayUnits Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Marker:Advanced:Delay Units
- C Attribute: NIFGEN_ATTR_MARKER_EVENT_DELAY_UNITS
marker_event_latched_status¶
nifgen.Session.
marker_event_latched_status
¶Specifies the latched status of the specified Marker Event. Write True to this property to clear the latched status of the Marker Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Marker:Advanced:Latched Status
- C Attribute: NIFGEN_ATTR_MARKER_EVENT_LATCHED_STATUS
marker_event_live_status¶
nifgen.Session.
marker_event_live_status
¶Returns the live status of the specified Marker Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Marker:Advanced:Live Status
- C Attribute: NIFGEN_ATTR_MARKER_EVENT_LIVE_STATUS
marker_event_output_behavior¶
nifgen.Session.
marker_event_output_behavior
¶Specifies the output behavior for the Marker Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.MarkerEventOutputBehavior Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Marker:Output Behavior
- C Attribute: NIFGEN_ATTR_MARKER_EVENT_OUTPUT_BEHAVIOR
marker_event_output_terminal¶
nifgen.Session.
marker_event_output_terminal
¶Specifies the destination terminal for the Marker Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Marker:Output Terminal
- C Attribute: NIFGEN_ATTR_MARKER_EVENT_OUTPUT_TERMINAL
marker_event_pulse_polarity¶
nifgen.Session.
marker_event_pulse_polarity
¶Specifies the output polarity of the Marker Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.MarkerEventPulsePolarity Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Marker:Pulse:Polarity
- C Attribute: NIFGEN_ATTR_MARKER_EVENT_PULSE_POLARITY
marker_event_pulse_width¶
nifgen.Session.
marker_event_pulse_width
¶Specifies the pulse width for the Marker Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Marker:Pulse:Width Value
- C Attribute: NIFGEN_ATTR_MARKER_EVENT_PULSE_WIDTH
marker_event_pulse_width_units¶
nifgen.Session.
marker_event_pulse_width_units
¶Specifies the pulse width units for the Marker Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.MarkerEventPulseWidthUnits Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Marker:Pulse:Width Units
- C Attribute: NIFGEN_ATTR_MARKER_EVENT_PULSE_WIDTH_UNITS
marker_event_toggle_initial_state¶
nifgen.Session.
marker_event_toggle_initial_state
¶Specifies the output polarity of the Marker Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.MarkerEventToggleInitialState Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Marker:Toggle:Initial State
- C Attribute: NIFGEN_ATTR_MARKER_EVENT_TOGGLE_INITIAL_STATE
max_freq_list_duration¶
nifgen.Session.
max_freq_list_duration
¶Returns the maximum duration of any one step in the frequency list.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Standard Function:Frequency List Mode:Maximum Frequency List Duration
- C Attribute: NIFGEN_ATTR_MAX_FREQ_LIST_DURATION
max_freq_list_length¶
nifgen.Session.
max_freq_list_length
¶Returns the maximum number of steps that can be in a frequency list.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Standard Function:Frequency List Mode:Maximum Frequency List Length
- C Attribute: NIFGEN_ATTR_MAX_FREQ_LIST_LENGTH
max_loop_count¶
nifgen.Session.
max_loop_count
¶Returns the maximum number of times that the signal generator can repeat a waveform in a sequence. Typically, this value is constant for the signal generator.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Arbitrary Sequence Mode:Max Loop Count
- C Attribute: NIFGEN_ATTR_MAX_LOOP_COUNT
max_num_freq_lists¶
nifgen.Session.
max_num_freq_lists
¶Returns the maximum number of frequency lists the signal generator allows.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Standard Function:Frequency List Mode:Maximum Number Of Frequency Lists
- C Attribute: NIFGEN_ATTR_MAX_NUM_FREQ_LISTS
max_num_sequences¶
nifgen.Session.
max_num_sequences
¶Returns the maximum number of arbitrary sequences that the signal generator allows. Typically, this value is constant for the signal generator.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Arbitrary Sequence Mode:Max Number of Sequences
- C Attribute: NIFGEN_ATTR_MAX_NUM_SEQUENCES
max_num_waveforms¶
nifgen.Session.
max_num_waveforms
¶Returns the maximum number of arbitrary waveforms that the signal generator allows. Typically, this value is constant for the signal generator.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Capabilities:Max Number of Waveforms
- C Attribute: NIFGEN_ATTR_MAX_NUM_WAVEFORMS
max_sequence_length¶
nifgen.Session.
max_sequence_length
¶Returns the maximum number of arbitrary waveforms that the signal generator allows in a sequence. Typically, this value is constant for the signal generator.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Arbitrary Sequence Mode:Max Sequence Length
- C Attribute: NIFGEN_ATTR_MAX_SEQUENCE_LENGTH
max_waveform_size¶
nifgen.Session.
max_waveform_size
¶Returns the size, in samples, of the largest waveform that can be created. This property reflects the space currently available, taking into account previously allocated waveforms and instructions.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Capabilities:Max Waveform Size
- C Attribute: NIFGEN_ATTR_MAX_WAVEFORM_SIZE
memory_size¶
nifgen.Session.
memory_size
¶The total amount of memory, in bytes, on the signal generator.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Memory Size
- C Attribute: NIFGEN_ATTR_MEMORY_SIZE
minor_version¶
nifgen.Session.
minor_version
¶Returns the minor version number of NI-FGEN.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Obsolete:Minor Version
- C Attribute: NIFGEN_ATTR_MINOR_VERSION
min_freq_list_duration¶
nifgen.Session.
min_freq_list_duration
¶Returns the minimum number of steps that can be in a frequency list.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Standard Function:Frequency List Mode:Minimum Frequency List Duration
- C Attribute: NIFGEN_ATTR_MIN_FREQ_LIST_DURATION
min_freq_list_length¶
nifgen.Session.
min_freq_list_length
¶Returns the minimum number of frequency lists that the signal generator allows.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Standard Function:Frequency List Mode:Minimum Frequency List Length
- C Attribute: NIFGEN_ATTR_MIN_FREQ_LIST_LENGTH
min_sequence_length¶
nifgen.Session.
min_sequence_length
¶Returns the minimum number of arbitrary waveforms that the signal generator allows in a sequence. Typically, this value is constant for the signal generator.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Arbitrary Sequence Mode:Min Sequence Length
- C Attribute: NIFGEN_ATTR_MIN_SEQUENCE_LENGTH
min_waveform_size¶
nifgen.Session.
min_waveform_size
¶Returns the minimum number of points that the signal generator allows in an arbitrary waveform. Typically, this value is constant for the signal generator.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Capabilities:Min Waveform Size
- C Attribute: NIFGEN_ATTR_MIN_WAVEFORM_SIZE
module_revision¶
nifgen.Session.
module_revision
¶A string that contains the module revision for the device that you are currently using.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Inherent IVI Attributes:Instrument Identification:Module Revision
- C Attribute: NIFGEN_ATTR_MODULE_REVISION
num_channels¶
nifgen.Session.
num_channels
¶Indicates the number of channels that the specific instrument driver supports. For each property for which IVI_VAL_MULTI_CHANNEL is set, the IVI Engine maintains a separate cache value for each channel.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Inherent IVI Attributes:Driver Capabilities:Channel Count
- C Attribute: NIFGEN_ATTR_NUM_CHANNELS
offset_dac_value¶
nifgen.Session.
offset_dac_value
¶Specifies the value programmed to the offset DAC. The value should be treated as an unsigned, right-justified number.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Calibration:Offset DAC Value
- C Attribute: NIFGEN_ATTR_OFFSET_DAC_VALUE
oscillator_freq_dac_value¶
nifgen.Session.
oscillator_freq_dac_value
¶Specifies the value programmed to the oscillator frequency DAC. The value should be treated as an unsigned, right-justified number.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Calibration:Oscillator Freq DAC Value
- C Attribute: NIFGEN_ATTR_OSCILLATOR_FREQ_DAC_VALUE
oscillator_phase_dac_value¶
nifgen.Session.
oscillator_phase_dac_value
¶The value of the oscillator phase DAC.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocks:Advanced:Oscillator Phase DAC Value
- C Attribute: NIFGEN_ATTR_OSCILLATOR_PHASE_DAC_VALUE
osp_carrier_enabled¶
nifgen.Session.
osp_carrier_enabled
¶Enables or disables generation of the carrier.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:Carrier Enabled
- C Attribute: NIFGEN_ATTR_OSP_CARRIER_ENABLED
osp_carrier_frequency¶
nifgen.Session.
osp_carrier_frequency
¶The frequency of the generated carrier.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:Carrier Frequency
- C Attribute: NIFGEN_ATTR_OSP_CARRIER_FREQUENCY
osp_carrier_phase_i¶
nifgen.Session.
osp_carrier_phase_i
¶I Carrier Phase in degrees at the first point of the generation.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:IQ Signal Adjustments:Carrier Phase:Carrier Phase I
- C Attribute: NIFGEN_ATTR_OSP_CARRIER_PHASE_I
osp_carrier_phase_q¶
nifgen.Session.
osp_carrier_phase_q
¶Q Carrier Phase in degrees at the first point of the generation. This property is only used when the
nifgen.Session.osp_data_processing_mode
property is set toCOMPLEX
.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:IQ Signal Adjustments:Carrier Phase:Carrier Phase Q
- C Attribute: NIFGEN_ATTR_OSP_CARRIER_PHASE_Q
osp_cic_filter_enabled¶
nifgen.Session.
osp_cic_filter_enabled
¶Enables or disables the CIC filter. The
nifgen.Session.osp_cic_filter_enabled
andnifgen.Session.osp_fir_filter_enabled
properties must have the same enable/disable setting.The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:Advanced:CIC Filter Enabled
- C Attribute: NIFGEN_ATTR_OSP_CIC_FILTER_ENABLED
osp_cic_filter_gain¶
nifgen.Session.
osp_cic_filter_gain
¶Gain applied at the final stage of the CIC filter. Commonly used to compensate for attenuation in the FIR filter. For FIR filter types other than Custom, NI-FGEN calculates the CIC gain in order to achieve unity gain between the FIR and CIC filters. Setting this property overrides the value set by NI-FGEN.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:Advanced:CIC Filter Gain
- C Attribute: NIFGEN_ATTR_OSP_CIC_FILTER_GAIN
osp_cic_filter_interpolation¶
nifgen.Session.
osp_cic_filter_interpolation
¶Interpolation factor for the CIC filter. If you do not set this value, NI-FGEN calculates the appropriate value based on the value of the
nifgen.Session.osp_iq_rate
property.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:Advanced:CIC Interpolation Factor
- C Attribute: NIFGEN_ATTR_OSP_CIC_FILTER_INTERPOLATION
osp_compensate_for_filter_group_delay¶
nifgen.Session.
osp_compensate_for_filter_group_delay
¶Compensate for OSP Filter Group Delay. If this is enabled, the Event Outputs will be aligned with the Analog Output. The Analog output will also be aligned between synchronized devices (using NI-TClk).
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:Advanced:Compensate for Filter Group Delay
- C Attribute: NIFGEN_ATTR_OSP_COMPENSATE_FOR_FILTER_GROUP_DELAY
osp_data_processing_mode¶
nifgen.Session.
osp_data_processing_mode
¶The way in which data is processed by the OSP block.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.DataProcessingMode Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:Data Processing Mode
- C Attribute: NIFGEN_ATTR_OSP_DATA_PROCESSING_MODE
osp_enabled¶
nifgen.Session.
osp_enabled
¶Enables or disables the OSP block of the signal generator. When the OSP block is disabled, all OSP-related properties are disabled and have no effect on the generated signal.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:OSP Enabled
- C Attribute: NIFGEN_ATTR_OSP_ENABLED
osp_fir_filter_enabled¶
nifgen.Session.
osp_fir_filter_enabled
¶Enables or disables the FIR filter. The
nifgen.Session.osp_cic_filter_enabled
andnifgen.Session.osp_fir_filter_enabled
properties must have the same enable/disable setting.The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:Advanced:FIR Filter Enabled
- C Attribute: NIFGEN_ATTR_OSP_FIR_FILTER_ENABLED
osp_fir_filter_flat_passband¶
nifgen.Session.
osp_fir_filter_flat_passband
¶Passband value to use when calculating the FIR filter coefficients. The FIR filter is designed to be flat to passband × IQ rate. This property is used only when the
nifgen.Session.osp_fir_filter_type
property is set toFLAT
.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:FIR Filter:Flat:Passband
- C Attribute: NIFGEN_ATTR_OSP_FIR_FILTER_FLAT_PASSBAND
osp_fir_filter_gaussian_bt¶
nifgen.Session.
osp_fir_filter_gaussian_bt
¶BT value to use when calculating the pulse-shaping FIR filter coefficients. Only used when the
nifgen.Session.osp_fir_filter_type
property is set toGAUSSIAN
.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:FIR Filter:Gaussian:BT
- C Attribute: NIFGEN_ATTR_OSP_FIR_FILTER_GAUSSIAN_BT
osp_fir_filter_interpolation¶
nifgen.Session.
osp_fir_filter_interpolation
¶Interpolation factor for the FIR filter. If you do not set this value, NI-FGEN calculates the appropriate value based on the value of the
nifgen.Session.osp_iq_rate
property.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:Advanced:FIR Interpolation Factor
- C Attribute: NIFGEN_ATTR_OSP_FIR_FILTER_INTERPOLATION
osp_fir_filter_raised_cosine_alpha¶
nifgen.Session.
osp_fir_filter_raised_cosine_alpha
¶Alpha value to use when calculating the pulse shaping FIR filter coefficients. Only used when the
nifgen.Session.osp_fir_filter_type
property is set toRAISED_COSINE
.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:FIR Filter:Raised Cosine:Alpha
- C Attribute: NIFGEN_ATTR_OSP_FIR_FILTER_RAISED_COSINE_ALPHA
osp_fir_filter_root_raised_cosine_alpha¶
nifgen.Session.
osp_fir_filter_root_raised_cosine_alpha
¶Alpha value to use when calculating the pulse-shaping FIR filter coefficients. This property is used only when the
nifgen.Session.osp_fir_filter_type
property is set toROOT_RAISED_COSINE
.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:FIR Filter:Root Raised Cosine:Alpha
- C Attribute: NIFGEN_ATTR_OSP_FIR_FILTER_ROOT_RAISED_COSINE_ALPHA
osp_fir_filter_type¶
nifgen.Session.
osp_fir_filter_type
¶Pulse-shaping filter type for the FIR filter.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.FilterType Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:FIR Filter:Filter Type
- C Attribute: NIFGEN_ATTR_OSP_FIR_FILTER_TYPE
osp_frequency_shift¶
nifgen.Session.
osp_frequency_shift
¶Specifies the amount of frequency shift applied to the baseband signal.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:Frequency Shift
- C Attribute: NIFGEN_ATTR_OSP_FREQUENCY_SHIFT
osp_mode¶
nifgen.Session.
osp_mode
¶Specifies the generation mode of the OSP, which determines the type of data contained in the output signal.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.OSPMode Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:OSP Mode
- C Attribute: NIFGEN_ATTR_OSP_MODE
osp_overflow_error_reporting¶
nifgen.Session.
osp_overflow_error_reporting
¶Configures error reporting when the OSP block detects an overflow in any of its stages. Overflows lead to clipping of the waveform. You can use the
nifgen.Session.osp_overflow_status
property to query for overflow conditions whether or not thenifgen.Session.osp_overflow_error_reporting
property is enabled. The device will continue to generate after an overflow whether or not thenifgen.Session.osp_overflow_error_reporting
property is enabled.The following table lists the characteristics of this property.
Characteristic Value Datatype enums.OSPOverflowErrorReporting Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:Advanced:OSP Overflow Error Reporting
- C Attribute: NIFGEN_ATTR_OSP_OVERFLOW_ERROR_REPORTING
osp_overflow_status¶
nifgen.Session.
osp_overflow_status
¶Returns a bit field of the overflow status in any stage of the OSP block. This property is functional regardless of the value for the
nifgen.Session.osp_overflow_error_reporting
property. Write 0 to this property to clear the currentnifgen.Session.osp_overflow_error_reporting
value.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:Advanced:OSP Overflow Status
- C Attribute: NIFGEN_ATTR_OSP_OVERFLOW_STATUS
osp_pre_filter_gain_i¶
nifgen.Session.
osp_pre_filter_gain_i
¶Digital gain to apply to the I data stream before any filtering by the OSP block.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:IQ Signal Adjustments:Gain:Pre-filter Gain I
- C Attribute: NIFGEN_ATTR_OSP_PRE_FILTER_GAIN_I
osp_pre_filter_gain_q¶
nifgen.Session.
osp_pre_filter_gain_q
¶Digital gain to apply to the Q data stream before any filtering by the OSP block. This property is only used when the
nifgen.Session.osp_data_processing_mode
property is set toCOMPLEX
.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:IQ Signal Adjustments:Gain:Pre-filter Gain Q
- C Attribute: NIFGEN_ATTR_OSP_PRE_FILTER_GAIN_Q
osp_pre_filter_offset_i¶
nifgen.Session.
osp_pre_filter_offset_i
¶Digital offset to apply to the I data stream. This offset is applied after the Pre-Filter Gain and before any filtering.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:IQ Signal Adjustments:Offset:Pre-filter Offset I
- C Attribute: NIFGEN_ATTR_OSP_PRE_FILTER_OFFSET_I
osp_pre_filter_offset_q¶
nifgen.Session.
osp_pre_filter_offset_q
¶Digital offset to apply to the Q data stream. This offset is applied after the Pre-Filter Gain and before any filtering. This property is used only when the
nifgen.Session.osp_data_processing_mode
property is set toCOMPLEX
.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Onboard Signal Processing:IQ Signal Adjustments:Offset:Pre-filter Offset Q
- C Attribute: NIFGEN_ATTR_OSP_PRE_FILTER_OFFSET_Q
output_enabled¶
nifgen.Session.
output_enabled
¶This channel-based property specifies whether the signal that the signal generator produces appears at the output connector.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Output Enabled
- C Attribute: NIFGEN_ATTR_OUTPUT_ENABLED
output_impedance¶
nifgen.Session.
output_impedance
¶This channel-based property specifies the signal generator output impedance at the output connector. NI signal sources modules have an output impedance of 50 ohms and an optional 75 ohms on select modules. If the load impedance matches the output impedance, then the voltage at the signal output connector is at the needed level. The voltage at the signal output connector varies with load output impedance, up to doubling the voltage for a high-impedance load.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Output Impedance
- C Attribute: NIFGEN_ATTR_OUTPUT_IMPEDANCE
output_mode¶
nifgen.Session.
output_mode
¶Sets which output mode the signal generator will use. The value you specify determines which methods and properties you use to configure the waveform the signal generator produces.
Note
The signal generator must not be in the Generating state when you change this property. To change the device configuration, call
nifgen.Session.abort()
or wait for the generation to complete.The following table lists the characteristics of this property.
Characteristic Value Datatype enums.OutputMode Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Output Mode
- C Attribute: NIFGEN_ATTR_OUTPUT_MODE
p2p_endpoint_fullness_start_trigger_level¶
nifgen.Session.
p2p_endpoint_fullness_start_trigger_level
¶Specifies the Endpoint threshold for the Start trigger. This property is used only when
nifgen.Session.start_trigger_type
is set to P2P Endpoint Fullness.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Start:P2P Endpoint Fullness:Level
- C Attribute: NIFGEN_ATTR_P2P_ENDPOINT_FULLNESS_START_TRIGGER_LEVEL
pci_dma_optimizations_enabled¶
nifgen.Session.
pci_dma_optimizations_enabled
¶Controls whether or not NI-FGEN allows performance optimizations for DMA transfers. This property is only valid for PCI and PXI SMC-based devices. This property is enabled (True) by default, and NI recommends leaving it enabled.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Data Transfer:Advanced:PCI DMA Optimizations Enabled
- C Attribute: NIFGEN_ATTR_PCI_DMA_OPTIMIZATIONS_ENABLED
post_amplifier_attenuation¶
nifgen.Session.
post_amplifier_attenuation
¶Specifies the amount of post-amplifier attenuation that should be applied to the signal (in dB).
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Calibration:Post-Amplifier Attenuation
- C Attribute: NIFGEN_ATTR_POST_AMPLIFIER_ATTENUATION
pre_amplifier_attenuation¶
nifgen.Session.
pre_amplifier_attenuation
¶Specifies the amount of pre-amplifier attenuation that should be applied to the signal (in dB).
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Calibration:Pre-Amplifier Attenuation
- C Attribute: NIFGEN_ATTR_PRE_AMPLIFIER_ATTENUATION
ready_for_start_event_level_active_level¶
nifgen.Session.
ready_for_start_event_level_active_level
¶Specifies the output polarity of the Ready for Start Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.ReadyForStartEventActiveLevel Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Ready For Start:Level:Active Level
- C Attribute: NIFGEN_ATTR_READY_FOR_START_EVENT_LEVEL_ACTIVE_LEVEL
ready_for_start_event_live_status¶
nifgen.Session.
ready_for_start_event_live_status
¶Returns the live status of the specified Ready For Start Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Ready For Start:Advanced:Live Status
- C Attribute: NIFGEN_ATTR_READY_FOR_START_EVENT_LIVE_STATUS
ready_for_start_event_output_terminal¶
nifgen.Session.
ready_for_start_event_output_terminal
¶Specifies the destination terminal for the Ready for Start Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Ready For Start:Output Terminal
- C Attribute: NIFGEN_ATTR_READY_FOR_START_EVENT_OUTPUT_TERMINAL
reference_clock_source¶
nifgen.Session.
reference_clock_source
¶Specifies the reference clock source used by the signal generator. The signal generator derives the frequencies and sample rates that it uses to generate waveforms from the source you specify. For example, when you set this property to ClkIn, the signal generator uses the signal it receives at the CLK IN front panel connector as the Reference clock. To change the device configuration, call
nifgen.Session.abort()
or wait for the generation to complete.Note
The signal generator must not be in the Generating state when you change this property.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.ReferenceClockSource Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocks:Reference Clock:Source
- C Attribute: NIFGEN_ATTR_REFERENCE_CLOCK_SOURCE
ref_clock_frequency¶
nifgen.Session.
ref_clock_frequency
¶Sets the frequency of the signal generator reference clock. The signal generator uses the reference clock to derive frequencies and sample rates when generating output.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocks:Reference Clock:Frequency
- C Attribute: NIFGEN_ATTR_REF_CLOCK_FREQUENCY
sample_clock_absolute_delay¶
nifgen.Session.
sample_clock_absolute_delay
¶Specifies the absolute delay adjustment of the sample clock. The sample clock delay adjustment is expressed in seconds. can only be applied when an external sample clock is used.
Note
For the NI 5421, absolute delay
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocks:Advanced:Sample Clock Absolute Delay
- C Attribute: NIFGEN_ATTR_SAMPLE_CLOCK_ABSOLUTE_DELAY
sample_clock_source¶
nifgen.Session.
sample_clock_source
¶Specifies the Sample clock source. If you specify a divisor with the
nifgen.Session.exported_sample_clock_divisor
property, the Sample clock exported with thenifgen.Session.exported_sample_clock_output_terminal
property is the value of the Sample clock after it is divided-down. For a list of the terminals available on your device, refer to the Device Routes tab in MAX. To change the device configuration, callnifgen.Session.abort()
or wait for the generation to complete.Note
The signal generator must not be in the Generating state when you change this property.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.SampleClockSource Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocks:Sample Clock:Source
- C Attribute: NIFGEN_ATTR_SAMPLE_CLOCK_SOURCE
sample_clock_timebase_rate¶
nifgen.Session.
sample_clock_timebase_rate
¶Specifies the Sample clock timebase rate. This property applies only to external Sample clock timebases. To change the device configuration, call
nifgen.Session.abort()
or wait for the generation to complete.Note
The signal generator must not be in the Generating state when you change this property.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocks:Sample Clock Timebase:Rate
- C Attribute: NIFGEN_ATTR_SAMPLE_CLOCK_TIMEBASE_RATE
sample_clock_timebase_source¶
nifgen.Session.
sample_clock_timebase_source
¶Specifies the Sample Clock Timebase source. To change the device configuration, call the
nifgen.Session.abort()
method or wait for the generation to complete.Note
The signal generator must not be in the Generating state when you change this property.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.SampleClockTimebaseSource Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocks:Sample Clock Timebase:Source
- C Attribute: NIFGEN_ATTR_SAMPLE_CLOCK_TIMEBASE_SOURCE
script_to_generate¶
nifgen.Session.
script_to_generate
¶Specifies which script the generator produces. To configure the generator to run a particular script, set this property to the name of the script. Use
nifgen.Session.write_script()
to create multiple scripts. Use this property whennifgen.Session.output_mode
is set toSCRIPT
.Note
The signal generator must not be in the Generating state when you change this property. To change the device configuration, call
nifgen.Session.abort()
or wait for the generation to complete.The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Script Mode:Script to Generate
- C Attribute: NIFGEN_ATTR_SCRIPT_TO_GENERATE
script_triggers_count¶
nifgen.Session.
script_triggers_count
¶Specifies the number of Script triggers supported by the device. Use this property when
nifgen.Session.output_mode
is set toSCRIPT
.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Script Triggers Count
- C Attribute: NIFGEN_ATTR_SCRIPT_TRIGGERS_COUNT
script_trigger_type¶
nifgen.Session.
script_trigger_type
¶Specifies the Script trigger type. Depending upon the value of this property, additional properties may need to be configured to fully configure the trigger.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.ScriptTriggerType Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Script:Trigger Type
- C Attribute: NIFGEN_ATTR_SCRIPT_TRIGGER_TYPE
serial_number¶
nifgen.Session.
serial_number
¶The signal generator’s serial number.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Serial Number
- C Attribute: NIFGEN_ATTR_SERIAL_NUMBER
simulate¶
nifgen.Session.
simulate
¶Specifies whether to simulate NI-FGEN I/O operations. If simulation is enabled, NI-FGEN methods perform range checking and call Ivi_GetAttribute and Ivi_SetAttribute, but they do not perform device I/O. For output parameters that represent device data, NI-FGEN methods return calculated values. Default Value: False Use
nifgen.Session.InitWithOptions()
to override default value.Note
One or more of the referenced methods are not in the Python API for this driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Inherent IVI Attributes:User Options:Simulate
- C Attribute: NIFGEN_ATTR_SIMULATE
specific_driver_description¶
nifgen.Session.
specific_driver_description
¶Returns a brief description of NI-FGEN.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Inherent IVI Attributes:Driver Identification:Description
- C Attribute: NIFGEN_ATTR_SPECIFIC_DRIVER_DESCRIPTION
specific_driver_revision¶
nifgen.Session.
specific_driver_revision
¶A string that contains additional version information about NI-FGEN.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Inherent IVI Attributes:Driver Identification:Revision
- C Attribute: NIFGEN_ATTR_SPECIFIC_DRIVER_REVISION
specific_driver_vendor¶
nifgen.Session.
specific_driver_vendor
¶A string that contains the name of the vendor that supplies NI-FGEN.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Inherent IVI Attributes:Driver Identification:Driver Vendor
- C Attribute: NIFGEN_ATTR_SPECIFIC_DRIVER_VENDOR
started_event_delay¶
nifgen.Session.
started_event_delay
¶Specifies the amount of delay applied to a Started Event with respect to the analog output of the signal generator. A positive delay value specifies that the Started Event occurs after the analog data, and a negative delay value specifies that the Started Event occurs before the analog data. The default value is zero, which will align the Started event with the analog output. You can specify the units of the delay value by setting the
nifgen.Session.started_event_delay
property.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Started:Advanced:Delay Value
- C Attribute: NIFGEN_ATTR_STARTED_EVENT_DELAY
started_event_delay_units¶
nifgen.Session.
started_event_delay_units
¶Specifies the units applied to the value of the
nifgen.Session.started_event_delay
property. Valid units are seconds and sample clock periods.The following table lists the characteristics of this property.
Characteristic Value Datatype enums.StartedEventDelayUnits Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Started:Advanced:Delay Units
- C Attribute: NIFGEN_ATTR_STARTED_EVENT_DELAY_UNITS
started_event_latched_status¶
nifgen.Session.
started_event_latched_status
¶Specifies the latched status of the Started Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Started:Advanced:Latched Status
- C Attribute: NIFGEN_ATTR_STARTED_EVENT_LATCHED_STATUS
started_event_level_active_level¶
nifgen.Session.
started_event_level_active_level
¶Specifies the output polarity of the Started Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.StartedEventActiveLevel Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Started:Level:Active Level
- C Attribute: NIFGEN_ATTR_STARTED_EVENT_LEVEL_ACTIVE_LEVEL
started_event_output_behavior¶
nifgen.Session.
started_event_output_behavior
¶Specifies the output behavior for the Started Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.StartedEventOutputBehavior Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Started:Output Behavior
- C Attribute: NIFGEN_ATTR_STARTED_EVENT_OUTPUT_BEHAVIOR
started_event_output_terminal¶
nifgen.Session.
started_event_output_terminal
¶Specifies the destination terminal for the Started Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Started:Output Terminal
- C Attribute: NIFGEN_ATTR_STARTED_EVENT_OUTPUT_TERMINAL
started_event_pulse_polarity¶
nifgen.Session.
started_event_pulse_polarity
¶Specifies the output polarity of the Started Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.StartedEventPulsePolarity Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Started:Pulse:Polarity
- C Attribute: NIFGEN_ATTR_STARTED_EVENT_PULSE_POLARITY
started_event_pulse_width¶
nifgen.Session.
started_event_pulse_width
¶Specifies the pulse width for the Started Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Started:Pulse:Width Value
- C Attribute: NIFGEN_ATTR_STARTED_EVENT_PULSE_WIDTH
started_event_pulse_width_units¶
nifgen.Session.
started_event_pulse_width_units
¶Specifies the pulse width units for the Started Event.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.StartedEventPulseWidthUnits Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Events:Started:Pulse:Width Units
- C Attribute: NIFGEN_ATTR_STARTED_EVENT_PULSE_WIDTH_UNITS
start_trigger_type¶
nifgen.Session.
start_trigger_type
¶Specifies whether you want the Start trigger to be a Digital Edge, or Software trigger. You can also choose None as the value for this property.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.StartTriggerType Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Start:Trigger Type
- C Attribute: NIFGEN_ATTR_START_TRIGGER_TYPE
streaming_space_available_in_waveform¶
nifgen.Session.
streaming_space_available_in_waveform
¶Indicates the space available (in samples) in the streaming waveform for writing new data. During generation, this available space may be in multiple locations with, for example, part of the available space at the end of the streaming waveform and the rest at the beginning. In this situation, writing a block of waveform data the size of the total space available in the streaming waveform causes NI-FGEN to return an error, as NI-FGEN will not wrap the data from the end of the waveform to the beginning and cannot write data past the end of the waveform buffer. To avoid writing data past the end of the waveform, write new data to the waveform in a fixed size that is an integer divisor of the total size of the streaming waveform. Used in conjunction with the
nifgen.Session.streaming_waveform_handle
ornifgen.Session.streaming_waveform_name
properties.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Data Transfer:Streaming:Space Available in Streaming Waveform
- C Attribute: NIFGEN_ATTR_STREAMING_SPACE_AVAILABLE_IN_WAVEFORM
streaming_waveform_handle¶
nifgen.Session.
streaming_waveform_handle
¶Specifies the waveform handle of the waveform used to continuously stream data during generation. This property defaults to -1 when no streaming waveform is specified. Used in conjunction with
nifgen.Session.streaming_space_available_in_waveform
.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Data Transfer:Streaming:Streaming Waveform Handle
- C Attribute: NIFGEN_ATTR_STREAMING_WAVEFORM_HANDLE
streaming_waveform_name¶
nifgen.Session.
streaming_waveform_name
¶Specifies the name of the waveform used to continuously stream data during generation. This property defaults to // when no streaming waveform is specified. Use in conjunction with
nifgen.Session.streaming_space_available_in_waveform
.The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Data Transfer:Streaming:Streaming Waveform Name
- C Attribute: NIFGEN_ATTR_STREAMING_WAVEFORM_NAME
streaming_write_timeout¶
nifgen.Session.
streaming_write_timeout
¶Specifies the maximum amount of time allowed to complete a streaming write operation.
The following table lists the characteristics of this property.
Characteristic Value Datatype float in seconds or datetime.timedelta Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Data Transfer:Streaming:Streaming Write Timeout
- C Attribute: NIFGEN_ATTR_STREAMING_WRITE_TIMEOUT
supported_instrument_models¶
nifgen.Session.
supported_instrument_models
¶Returns a model code of the device. For NI-FGEN versions that support more than one device, this property contains a comma-separated list of supported device models.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:Inherent IVI Attributes:Driver Capabilities:Supported Instrument Models
- C Attribute: NIFGEN_ATTR_SUPPORTED_INSTRUMENT_MODELS
synchronization¶
nifgen.Session.
synchronization
¶Specify the source of the synchronization signal that you want to use.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.SynchronizationSource Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:5401/5411/5431:Synchronization Source
- C Attribute: NIFGEN_ATTR_SYNCHRONIZATION
sync_duty_cycle_high¶
nifgen.Session.
sync_duty_cycle_high
¶Controls the duty cycle of the square wave the signal generator produces on the SYNC out line. Specify this property as a percentage of the time the square wave is high in each cycle. Units: Percentage of time the waveform is high
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Standard Function:Sync Duty Cycle High
- C Attribute: NIFGEN_ATTR_SYNC_DUTY_CYCLE_HIGH
sync_out_output_terminal¶
nifgen.Session.
sync_out_output_terminal
¶Specifies the terminal to which to export the SYNC OUT signal. This property is not supported for all devices.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Standard Function:Sync Out Output Terminal
- C Attribute: NIFGEN_ATTR_SYNC_OUT_OUTPUT_TERMINAL
terminal_configuration¶
nifgen.Session.
terminal_configuration
¶Specifies whether gain and offset values will be analyzed based on single-ended or differential operation.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.TerminalConfiguration Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Terminal Configuration
- C Attribute: NIFGEN_ATTR_TERMINAL_CONFIGURATION
trigger_mode¶
nifgen.Session.
trigger_mode
¶Controls the trigger mode.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.TriggerMode Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggers:Trigger Mode
- C Attribute: NIFGEN_ATTR_TRIGGER_MODE
trigger_source¶
nifgen.Session.
trigger_source
¶Controls which trigger source the signal generator uses. After you call the
nifgen.Session._initiate_generation()
method, the signal generator waits for the trigger that you specify in the triggerSource parameter. After the signal generator receives a trigger, it produces the number of cycles that you specify in thenifgen.Session.CYCLE_COUNT
property. This property is also the source for the trigger in the other trigger modes as specified by thenifgen.Session.trigger_mode
property.Note
One or more of the referenced properties are not in the Python API for this driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.TriggerSource Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:5401/5411/5431:Trigger Source
- C Attribute: NIFGEN_ATTR_TRIGGER_SOURCE
video_waveform_type¶
nifgen.Session.
video_waveform_type
¶Selects which waveform type that the NI 5431 generates. Setting this property ensures that the crystal is set to the proper frequency.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.VideoWaveformType Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Instrument:5401/5411/5431:Video Waveform Type
- C Attribute: NIFGEN_ATTR_VIDEO_WAVEFORM_TYPE
wait_behavior¶
nifgen.Session.
wait_behavior
¶Specifies the behavior of the output while waiting for a script trigger or during a wait instruction. The output can be configured to hold the last generated voltage before waiting or jump to the Wait Value.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.WaitBehavior Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Advanced:Wait Behavior
- C Attribute: NIFGEN_ATTR_WAIT_BEHAVIOR
wait_value¶
nifgen.Session.
wait_value
¶Specifies the value to generate while waiting. The Wait Behavior must be configured to jump to this value.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Output:Advanced:Wait Value
- C Attribute: NIFGEN_ATTR_WAIT_VALUE
waveform_quantum¶
nifgen.Session.
waveform_quantum
¶The size of each arbitrary waveform must be a multiple of a quantum value. This property returns the quantum value that the signal generator allows. For example, when this property returns a value of 8, all waveform sizes must be a multiple of 8. Typically, this value is constant for the signal generator.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Arbitrary Waveform:Capabilities:Waveform Quantum
- C Attribute: NIFGEN_ATTR_WAVEFORM_QUANTUM
Methods¶
abort¶
nifgen.Session.
abort
()¶Aborts any previously initiated signal generation. Call the nifgen_InitiateGeneration method to cause the signal generator to produce a signal again.
allocate_named_waveform¶
nifgen.Session.
allocate_named_waveform
(waveform_name, waveform_size)¶Specifies the size of a named waveform up front so that it can be allocated in onboard memory before loading the associated data. Data can then be loaded in smaller blocks with the niFgen Write (Binary16) Waveform methods.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nifgen.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nifgen.Session instance, and calling this method on the result.:
session.channels['0,1'].allocate_named_waveform(waveform_name, waveform_size)
Parameters:
allocate_waveform¶
nifgen.Session.
allocate_waveform
(waveform_size)¶Specifies the size of a waveform so that it can be allocated in onboard memory before loading the associated data. Data can then be loaded in smaller blocks with the Write Binary 16 Waveform methods.
Note
The signal generator must not be in the Generating state when you call this method.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nifgen.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nifgen.Session instance, and calling this method on the result.:
session.channels['0,1'].allocate_waveform(waveform_size)
Parameters: waveform_size (int) – Specifies, in samples, the size of the waveform to allocate. Return type: int Returns: The handle that identifies the new waveform. This handle is used later when referring to this waveform.
clear_arb_memory¶
nifgen.Session.
clear_arb_memory
()¶Removes all previously created arbitrary waveforms, sequences, and scripts from the signal generator memory and invalidates all waveform handles, sequence handles, and waveform names.
Note
The signal generator must not be in the Generating state when you call this method.
clear_arb_sequence¶
nifgen.Session.
clear_arb_sequence
(sequence_handle)¶Removes a previously created arbitrary sequence from the signal generator memory and invalidates the sequence handle.
Note
The signal generator must not be in the Generating state when you call this method.
Parameters: sequence_handle (int) – Specifies the handle of the arbitrary sequence that you want the signal generator to remove. You can create an arbitrary sequence using the nifgen_CreateArbSequence or nifgen_CreateAdvancedArbSequence method. These methods return a handle that you use to identify the sequence.
Defined Value:NIFGEN_VAL_ALL_SEQUENCES
—Remove all sequences from the signal generatorDefault Value: None
Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
clear_arb_waveform¶
nifgen.Session.
clear_arb_waveform
(waveform_handle)¶Removes a previously created arbitrary waveform from the signal generator memory and invalidates the waveform handle.
Note
The signal generator must not be in the Generating state when you call this method.
Parameters: waveform_handle (int) – Specifies the handle of the arbitrary waveform that you want the signal generator to remove.
You can create multiple arbitrary waveforms using one of the following niFgen Create Waveform methods:
nifgen.Session.create_waveform()
nifgen.Session.create_waveform()
nifgen.Session.create_waveform_from_file_i16()
nifgen.Session.create_waveform_from_file_f64()
nifgen.Session.CreateWaveformFromFileHWS()
Defined Value:
NIFGEN_VAL_ALL_WAVEFORMS
—Remove all waveforms from the signal generator.Default Value: None
Note
One or more of the referenced methods are not in the Python API for this driver.
Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
clear_freq_list¶
nifgen.Session.
clear_freq_list
(frequency_list_handle)¶Removes a previously created frequency list from the signal generator memory and invalidates the frequency list handle.
Note
The signal generator must not be in the Generating state when you call this method.
Parameters: frequency_list_handle (int) – Specifies the handle of the frequency list you want the signal generator to remove. You create multiple frequency lists using
nifgen.Session.create_freq_list()
.nifgen.Session.create_freq_list()
returns a handle that you use to identify each list. Specify a value of -1 to clear all frequency lists.Defined Value
NIFGEN_VAL_ALL_FLISTS
—Remove all frequency lists from the signal generator.Default Value: None
Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
clear_user_standard_waveform¶
nifgen.Session.
clear_user_standard_waveform
()¶Clears the user-defined waveform created by the nifgen_DefineUserStandardWaveform method.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nifgen.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nifgen.Session instance, and calling this method on the result.:
session.channels['0,1'].clear_user_standard_waveform()
commit¶
nifgen.Session.
commit
()¶Causes a transition to the Committed state. This method verifies property values, reserves the device, and commits the property values to the device. If the property values are all valid, NI-FGEN sets the device hardware configuration to match the session configuration. This method does not support the NI 5401/5404/5411/5431 signal generators.
In the Committed state, you can load waveforms, scripts, and sequences into memory. If any properties are changed, NI-FGEN implicitly transitions back to the Idle state, where you can program all session properties before applying them to the device. This method has no effect if the device is already in the Committed or Generating state and returns a successful status value.
Calling this VI before the niFgen Initiate Generation VI is optional but has the following benefits:
- Routes are committed, so signals are exported or imported.
- Any Reference Clock and external clock circuits are phase-locked.
- A subsequent
nifgen.Session._initiate_generation()
method can run faster because the device is already configured.
configure_arb_sequence¶
nifgen.Session.
configure_arb_sequence
(sequence_handle, gain, offset)¶Configures the signal generator properties that affect arbitrary sequence generation. Sets the
nifgen.Session.arb_sequence_handle
,nifgen.Session.arb_gain
, andnifgen.Session.arb_offset
properties.Note
The signal generator must not be in the Generating state when you call this method.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nifgen.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nifgen.Session instance, and calling this method on the result.:
session.channels['0,1'].configure_arb_sequence(sequence_handle, gain, offset)
Parameters:
- sequence_handle (int) –
Specifies the handle of the arbitrary sequence that you want the signal generator to produce. NI-FGEN sets the
nifgen.Session.arb_sequence_handle
property to this value. You can create an arbitrary sequence using thenifgen.Session.create_arb_sequence()
ornifgen.Session.create_advanced_arb_sequence()
method. These methods return a handle that you use to identify the sequence.Default Value: None
- gain (float) –
Specifies the factor by which the signal generator scales the arbitrary waveforms in the sequence. When you create an arbitrary waveform, you must first normalize the data points to a range of –1.00 to +1.00. You can use this parameter to scale the waveform to other ranges. The gain is applied before the offset is added.
For example, to configure the output signal to range from –2.00 to +2.00 V, set gain to 2.00.
Units: unitless
Default Value: None
- offset (float) –
Specifies the value the signal generator adds to the arbitrary waveform data. When you create arbitrary waveforms, you must first normalize the data points to a range of –1.00 to +1.00 V. You can use this parameter to shift the range of the arbitrary waveform. NI-FGEN sets the
nifgen.Session.arb_offset
property to this value.For example, to configure the output signal to range from 0.00 to 2.00 V instead of –1.00 to 1.00 V, set the offset to 1.00.
Units: volts
Default Value: None
configure_arb_waveform¶
nifgen.Session.
configure_arb_waveform
(waveform_handle, gain, offset)¶Configures the properties of the signal generator that affect arbitrary waveform generation. Sets the
nifgen.Session.arb_waveform_handle
,nifgen.Session.arb_gain
, andnifgen.Session.arb_offset
properties.Note
The signal generator must not be in the Generating state when you call this method.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nifgen.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nifgen.Session instance, and calling this method on the result.:
session.channels['0,1'].configure_arb_waveform(waveform_handle, gain, offset)
Parameters:
- waveform_handle (int) –
Specifies the handle of the arbitrary waveform you want the signal generator to produce. NI-FGEN sets the
nifgen.Session.arb_waveform_handle
property to this value. You can create an arbitrary waveform using one of the following niFgen Create Waveform methods:
nifgen.Session.create_waveform()
nifgen.Session.create_waveform()
nifgen.Session.create_waveform_from_file_i16()
nifgen.Session.create_waveform_from_file_f64()
nifgen.Session.CreateWaveformFromFileHWS()
These methods return a handle that you use to identify the waveform.
Default Value: None
Note
One or more of the referenced methods are not in the Python API for this driver.
- gain (float) –
Specifies the factor by which the signal generator scales the arbitrary waveforms in the sequence. When you create an arbitrary waveform, you must first normalize the data points to a range of –1.00 to +1.00. You can use this parameter to scale the waveform to other ranges. The gain is applied before the offset is added.
For example, to configure the output signal to range from –2.00 to +2.00 V, set gain to 2.00.
Units: unitless
Default Value: None
- offset (float) –
Specifies the value the signal generator adds to the arbitrary waveform data. When you create arbitrary waveforms, you must first normalize the data points to a range of –1.00 to +1.00 V. You can use this parameter to shift the range of the arbitrary waveform. NI-FGEN sets the
nifgen.Session.arb_offset
property to this value.For example, to configure the output signal to range from 0.00 to 2.00 V instead of –1.00 to 1.00 V, set the offset to 1.00.
Units: volts
Default Value: None
configure_custom_fir_filter_coefficients¶
nifgen.Session.
configure_custom_fir_filter_coefficients
(coefficients_array)¶Sets the FIR filter coefficients used by the onboard signal processing block. The values are coerced to the closest settings achievable by the signal generator.
Refer to the FIR Filter topic for your device in the NI Signal Generators Help for more information about FIR filter coefficients. This method is supported only for the NI 5441.
Note
The signal generator must not be in the Generating state when you call this method.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nifgen.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nifgen.Session instance, and calling this method on the result.:
session.channels['0,1'].configure_custom_fir_filter_coefficients(coefficients_array)
Parameters: coefficients_array (list of float) – Specifies the array of data the onboard signal processor uses for the FIR filter coefficients. For the NI 5441, provide a symmetric array of 95 coefficients to this parameter. The array must have at least as many elements as the value that you specify in the numberOfCoefficients parameter in this method. The coefficients should range between –1.00 and +1.00.
configure_digital_edge_script_trigger¶
nifgen.Session.
configure_digital_edge_script_trigger
(source, edge=nifgen.ScriptTriggerDigitalEdgeEdge.RISING)¶Configures the specified Script Trigger for digital edge triggering.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nifgen.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nifgen.Session instance, and calling this method on the result.:
session.channels['0,1'].configure_digital_edge_script_trigger(source, edge=nifgen.ScriptTriggerDigitalEdgeEdge.RISING)
Parameters:
- source (str) –
Specifies which trigger source the signal generator uses.
Defined Values
Default Value: “PFI0”
”PFI0” PFI 0 ”PFI1” PFI 1 ”PFI2” PFI 2 ”PFI3” PFI 3 ”PFI4” PFI 4 ”PFI5” PFI 5 ”PFI6” PFI 6 ”PFI7” PFI 7 ”PXI_Trig0” PXI trigger line 0 or RTSI line 0 ”PXI_Trig1” PXI trigger line 1 or RTSI line 1 ”PXI_Trig2” PXI trigger line 2 or RTSI line 2 ”PXI_Trig3” PXI trigger line 3 or RTSI line 3 ”PXI_Trig4” PXI trigger line 4 or RTSI line 4 ”PXI_Trig5” PXI trigger line 5 or RTSI line 5 ”PXI_Trig6” PXI trigger line 6 or RTSI line 6 ”PXI_Trig7” PXI trigger line 7 or RTSI line 7 ”PXI_Star” PXI star trigger line - edge (
nifgen.ScriptTriggerDigitalEdgeEdge
) –Specifies the edge to detect.
**Defined Values**
**Default Value:**
RISING
RISING
Occurs when the signal transitions from low level to high level. FALLING
Occurs when the signal transitions from high level to low level. Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
configure_digital_edge_start_trigger¶
nifgen.Session.
configure_digital_edge_start_trigger
(source, edge=nifgen.StartTriggerDigitalEdgeEdge.RISING)¶Configures the Start Trigger for digital edge triggering.
Parameters:
- source (str) –
Specifies which trigger source the signal generator uses.
Defined Values
Default Value: “PFI0”
”PFI0” PFI 0 ”PFI1” PFI 1 ”PFI2” PFI 2 ”PFI3” PFI 3 ”PFI4” PFI 4 ”PFI5” PFI 5 ”PFI6” PFI 6 ”PFI7” PFI 7 ”PXI_Trig0” PXI trigger line 0 or RTSI line 0 ”PXI_Trig1” PXI trigger line 1 or RTSI line 1 ”PXI_Trig2” PXI trigger line 2 or RTSI line 2 ”PXI_Trig3” PXI trigger line 3 or RTSI line 3 ”PXI_Trig4” PXI trigger line 4 or RTSI line 4 ”PXI_Trig5” PXI trigger line 5 or RTSI line 5 ”PXI_Trig6” PXI trigger line 6 or RTSI line 6 ”PXI_Trig7” PXI trigger line 7 or RTSI line 7 ”PXI_Star” PXI star trigger line - edge (
nifgen.StartTriggerDigitalEdgeEdge
) –Specifies the edge to detect.
**Defined Values**
**Default Value:**
RISING
RISING
Occurs when the signal transitions from low level to high level. FALLING
Occurs when the signal transitions from high level to low level. Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
configure_digital_level_script_trigger¶
nifgen.Session.
configure_digital_level_script_trigger
(source, trigger_when)¶Configures the specified Script Trigger for digital level triggering.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nifgen.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nifgen.Session instance, and calling this method on the result.:
session.channels['0,1'].configure_digital_level_script_trigger(source, trigger_when)
Parameters:
- source (str) –
Specifies which trigger source the signal generator uses.
Defined Values
Default Value: “PFI0”
”PFI0” PFI 0 ”PFI1” PFI 1 ”PFI2” PFI 2 ”PFI3” PFI 3 ”PFI4” PFI 4 ”PFI5” PFI 5 ”PFI6” PFI 6 ”PFI7” PFI 7 ”PXI_Trig0” PXI trigger line 0 or RTSI line 0 ”PXI_Trig1” PXI trigger line 1 or RTSI line 1 ”PXI_Trig2” PXI trigger line 2 or RTSI line 2 ”PXI_Trig3” PXI trigger line 3 or RTSI line 3 ”PXI_Trig4” PXI trigger line 4 or RTSI line 4 ”PXI_Trig5” PXI trigger line 5 or RTSI line 5 ”PXI_Trig6” PXI trigger line 6 or RTSI line 6 ”PXI_Trig7” PXI trigger line 7 or RTSI line 7 ”PXI_Star” PXI star trigger line - trigger_when (
nifgen.TriggerWhen
) –Specifies whether the Script Trigger asserts on a high or low digital level.
Defined Values
Default Value: “HighLevel”
”HighLevel” Script Trigger asserts on a high digital level. ”LowLevel” Script Trigger asserts on a low digital level.
configure_freq_list¶
nifgen.Session.
configure_freq_list
(frequency_list_handle, amplitude, dc_offset=0.0, start_phase=0.0)¶Configures the properties of the signal generator that affect frequency list generation (the
nifgen.Session.freq_list_handle
,nifgen.Session.func_amplitude
,nifgen.Session.func_dc_offset
, andnifgen.Session.func_start_phase
properties).Note
The signal generator must not be in the Generating state when you call this method.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nifgen.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nifgen.Session instance, and calling this method on the result.:
session.channels['0,1'].configure_freq_list(frequency_list_handle, amplitude, dc_offset=0.0, start_phase=0.0)
Parameters:
- frequency_list_handle (int) – Specifies the handle of the frequency list that you want the signal generator to produce. NI-FGEN sets the
nifgen.Session.freq_list_handle
property to this value. You can create a frequency list using thenifgen.Session.create_freq_list()
method, which returns a handle that you use to identify the list. Default Value: None- amplitude (float) –
Specifies the amplitude of the standard waveform that you want the signal generator to produce. This value is the amplitude at the output terminal. NI-FGEN sets the
nifgen.Session.func_amplitude
property to this value.For example, to produce a waveform ranging from –5.00 V to +5.00 V, set the amplitude to 10.00 V.
Units: peak-to-peak voltage
Default Value: None
Note
This parameter does not affect signal generator behavior when you set the waveform parameter of the
nifgen.Session.configure_standard_waveform()
method toDC
.- dc_offset (float) –
Specifies the DC offset of the standard waveform that you want the signal generator to produce. The value is the offset from ground to the center of the waveform you specify with the waveform parameter, observed at the output terminal. For example, to configure a waveform with an amplitude of 10.00 V to range from 0.00 V to +10.00 V, set the dcOffset to 5.00 V. NI-FGEN sets the
nifgen.Session.func_dc_offset
property to this value.Units: volts
Default Value: None
- start_phase (float) –
Specifies the horizontal offset of the standard waveform you want the signal generator to produce. Specify this property in degrees of one waveform cycle. NI-FGEN sets the
nifgen.Session.func_start_phase
property to this value. A start phase of 180 degrees means output generation begins halfway through the waveform. A start phase of 360 degrees offsets the output by an entire waveform cycle, which is identical to a start phase of 0 degrees.Units: degrees of one cycle
Default Value: None degrees
Note
This parameter does not affect signal generator behavior when you set the waveform parameter to
DC
.
configure_standard_waveform¶
nifgen.Session.
configure_standard_waveform
(waveform, amplitude, frequency, dc_offset=0.0, start_phase=0.0)¶Configures the following properties of the signal generator that affect standard waveform generation:
nifgen.Session.func_waveform
nifgen.Session.func_amplitude
nifgen.Session.func_dc_offset
nifgen.Session.func_frequency
nifgen.Session.func_start_phase
Note
You must call the
nifgen.Session.ConfigureOutputMode()
method with the outputMode parameter set toFUNC
before calling this method.Note
One or more of the referenced methods are not in the Python API for this driver.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nifgen.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nifgen.Session instance, and calling this method on the result.:
session.channels['0,1'].configure_standard_waveform(waveform, amplitude, frequency, dc_offset=0.0, start_phase=0.0)
Parameters:
- waveform (
nifgen.Waveform
) –Specifies the standard waveform that you want the signal generator to produce. NI-FGEN sets the
nifgen.Session.func_waveform
property to this value.**Defined Values**
Default Value:
SINE
SINE
Specifies that the signal generator produces a sinusoid waveform. SQUARE
Specifies that the signal generator produces a square waveform. TRIANGLE
Specifies that the signal generator produces a triangle waveform. RAMP_UP
Specifies that the signal generator produces a positive ramp waveform. RAMP_DOWN
Specifies that the signal generator produces a negative ramp waveform. DC
Specifies that the signal generator produces a constant voltage. NOISE
Specifies that the signal generator produces white noise. USER
Specifies that the signal generator produces a user-defined waveform as defined with the nifgen_DefineUserStandardWaveform method. - amplitude (float) –
Specifies the amplitude of the standard waveform that you want the signal generator to produce. This value is the amplitude at the output terminal. NI-FGEN sets the
nifgen.Session.func_amplitude
property to this value.For example, to produce a waveform ranging from –5.00 V to +5.00 V, set the amplitude to 10.00 V.
Units: peak-to-peak voltage
Default Value: None
Note
This parameter does not affect signal generator behavior when you set the waveform parameter of the
nifgen.Session.configure_standard_waveform()
method toDC
.- frequency (float) –
Specifies the frequency of the standard waveform that you want the signal generator to produce. NI-FGEN sets thenifgen.Session.func_frequency
property to this value.Units: hertz
Default Value: None
Note
This parameter does not affect signal generator behavior when you set the waveform parameter of the
nifgen.Session.configure_standard_waveform()
method toDC
.- dc_offset (float) –
Specifies the DC offset of the standard waveform that you want the signal generator to produce. The value is the offset from ground to the center of the waveform you specify with the waveform parameter, observed at the output terminal. For example, to configure a waveform with an amplitude of 10.00 V to range from 0.00 V to +10.00 V, set the dcOffset to 5.00 V. NI-FGEN sets the
nifgen.Session.func_dc_offset
property to this value.Units: volts
Default Value: None
- start_phase (float) –
Specifies the horizontal offset of the standard waveform that you want the signal generator to produce. Specify this parameter in degrees of one waveform cycle. NI-FGEN sets the
nifgen.Session.func_start_phase
property to this value. A start phase of 180 degrees means output generation begins halfway through the waveform. A start phase of 360 degrees offsets the output by an entire waveform cycle, which is identical to a start phase of 0 degrees.Units: degrees of one cycle
Default Value: 0.00
Note
This parameter does not affect signal generator behavior when you set the waveform parameter to
DC
.
create_advanced_arb_sequence¶
nifgen.Session.
create_advanced_arb_sequence
(waveform_handles_array, loop_counts_array, sample_counts_array=None, marker_location_array=None)¶Creates an arbitrary sequence from an array of waveform handles and an array of corresponding loop counts. This method returns a handle that identifies the sequence. You pass this handle to the
nifgen.Session.configure_arb_sequence()
method to specify what arbitrary sequence you want the signal generator to produce.The
nifgen.Session.create_advanced_arb_sequence()
method extends on thenifgen.Session.create_arb_sequence()
method by adding the ability to set the number of samples in each sequence step and to set marker locations.An arbitrary sequence consists of multiple waveforms. For each waveform, you specify the number of times the signal generator produces the waveform before proceeding to the next waveform. The number of times to repeat a specific waveform is called the loop count.
Note
The signal generator must not be in the Generating state when you call this method. You must call the nifgen_ConfigureOutputMode method to set the outputMode parameter to
SEQ
before calling this method.
Parameters:
- waveform_handles_array (list of int) –
Specifies the array of waveform handles from which you want to create a new arbitrary sequence. The array must have at least as many elements as the value that you specify in sequenceLength. Each waveformHandlesArray element has a corresponding loopCountsArray element that indicates how many times that waveform is repeated. You obtain waveform handles when you create arbitrary waveforms with the nifgen_AllocateWaveform method or one of the following niFgen CreateWaveform methods:
- nifgen_CreateWaveformF64
- nifgen_CreateWaveformI16
- nifgen_CreateWaveformFromFileI16
- nifgen_CreateWaveformFromFileF64
- nifgen_CreateWaveformFromFileHWS
Default Value: None
- loop_counts_array (list of int) –
Specifies the array of loop counts you want to use to create a new arbitrary sequence. The array must have at least as many elements as the value that you specify in the sequenceLength parameter. Each loopCountsArray element corresponds to a waveformHandlesArray element and indicates how many times to repeat that waveform. Each element of the loopCountsArray must be less than or equal to the maximum number of loop counts that the signal generator allows. You can obtain the maximum loop count from maximumLoopCount in the nifgen_QueryArbSeqCapabilities method.
Default Value: None
- sample_counts_array (list of int) –
Specifies the array of sample counts that you want to use to create a new arbitrary sequence. The array must have at least as many elements as the value you specify in the sequenceLength parameter. Each sampleCountsArray element corresponds to a waveformHandlesArray element and indicates the subset, in samples, of the given waveform to generate. Each element of the sampleCountsArray must be larger than the minimum waveform size, a multiple of the waveform quantum and no larger than the number of samples in the corresponding waveform. You can obtain these values by calling the nifgen_QueryArbWfmCapabilities method.
Default Value: None
- marker_location_array (list of int) –
Specifies the array of marker locations to where you want a marker to be generated in the sequence. The array must have at least as many elements as the value you specify in the sequenceLength parameter. Each markerLocationArray element corresponds to a waveformHandlesArray element and indicates where in the waveform a marker is to generate. The marker location must be less than the size of the waveform the marker is in. The markers are coerced to the nearest marker quantum and the coerced values are returned in the coercedMarkersArray parameter.
If you do not want a marker generated for a particular sequence stage, set this parameter to
NIFGEN_VAL_NO_MARKER
.Defined Value:
NIFGEN_VAL_NO_MARKER
Default Value: None
Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
Return type: tuple (coerced_markers_array, sequence_handle)
WHERE
coerced_markers_array (list of int):
Returns an array of all given markers that are coerced (rounded) to the nearest marker quantum. Not all devices coerce markers.
Default Value: None
sequence_handle (int):
Returns the handle that identifies the new arbitrary sequence. You can pass this handle to nifgen_ConfigureArbSequence to generate the arbitrary sequence.
create_arb_sequence¶
nifgen.Session.
create_arb_sequence
(waveform_handles_array, loop_counts_array)¶Creates an arbitrary sequence from an array of waveform handles and an array of corresponding loop counts. This method returns a handle that identifies the sequence. You pass this handle to the nifgen_ConfigureArbSequence method to specify what arbitrary sequence you want the signal generator to produce.
An arbitrary sequence consists of multiple waveforms. For each waveform, you can specify the number of times that the signal generator produces the waveform before proceeding to the next waveform. The number of times to repeat a specific waveform is called the loop count.
Note
You must call the nifgen_ConfigureOutputMode method to set the outputMode parameter to
SEQ
before calling this method.
Parameters:
- waveform_handles_array (list of int) –
Specifies the array of waveform handles from which you want to create a new arbitrary sequence. The array must have at least as many elements as the value that you specify in sequenceLength. Each waveformHandlesArray element has a corresponding loopCountsArray element that indicates how many times that waveform is repeated. You obtain waveform handles when you create arbitrary waveforms with the nifgen_AllocateWaveform method or one of the following niFgen CreateWaveform methods:
- nifgen_CreateWaveformF64
- nifgen_CreateWaveformI16
- nifgen_CreateWaveformFromFileI16
- nifgen_CreateWaveformFromFileF64
- nifgen_CreateWaveformFromFileHWS
Default Value: None
- loop_counts_array (list of int) –
Specifies the array of loop counts you want to use to create a new arbitrary sequence. The array must have at least as many elements as the value that you specify in the sequenceLength parameter. Each loopCountsArray element corresponds to a waveformHandlesArray element and indicates how many times to repeat that waveform. Each element of the loopCountsArray must be less than or equal to the maximum number of loop counts that the signal generator allows. You can obtain the maximum loop count from maximumLoopCount in the nifgen_QueryArbSeqCapabilities method.
Default Value: None
Return type: Returns: Returns the handle that identifies the new arbitrary sequence. You can pass this handle to nifgen_ConfigureArbSequence to generate the arbitrary sequence.
create_freq_list¶
nifgen.Session.
create_freq_list
(waveform, frequency_array, duration_array)¶Creates a frequency list from an array of frequencies (frequencyArray) and an array of durations (durationArray). The two arrays should have the same number of elements, and this value must also be the size of the frequencyListLength. The method returns a handle that identifies the frequency list (the frequencyListHandle). You can pass this handle to nifgen_ConfigureFreqList to specify what frequency list you want the signal generator to produce.
A frequency list consists of a list of frequencies and durations. The signal generator generates each frequency for the given amount of time and then proceeds to the next frequency. When the end of the list is reached, the signal generator starts over at the beginning of the list.
Note
The signal generator must not be in the Generating state when you call this method.
Parameters:
- waveform (
nifgen.Waveform
) –Specifies the standard waveform that you want the signal generator to produce. NI-FGEN sets the
nifgen.Session.func_waveform
property to this value.**Defined Values**
Default Value:
SINE
SINE
Specifies that the signal generator produces a sinusoid waveform. SQUARE
Specifies that the signal generator produces a square waveform. TRIANGLE
Specifies that the signal generator produces a triangle waveform. RAMP_UP
Specifies that the signal generator produces a positive ramp waveform. RAMP_DOWN
Specifies that the signal generator produces a negative ramp waveform. DC
Specifies that the signal generator produces a constant voltage. NOISE
Specifies that the signal generator produces white noise. USER
Specifies that the signal generator produces a user-defined waveform as defined with the nifgen_DefineUserStandardWaveform method. - frequency_array (list of float) –
Specifies the array of frequencies to form the frequency list. The array must have at least as many elements as the value you specify in frequencyListLength. Each frequencyArray element has a corresponding durationArray element that indicates how long that frequency is repeated.
Units: hertz
Default Value: None
- duration_array (list of float) –
Specifies the array of durations to form the frequency list. The array must have at least as many elements as the value that you specify in frequencyListLength. Each durationArray element has a corresponding frequencyArray element and indicates how long in seconds to generate the corresponding frequency.
Units: seconds
Default Value: None
Return type: Returns: Returns the handle that identifies the new frequency list. You can pass this handle to nifgen_ConfigureFreqList to generate the arbitrary sequence.
create_waveform_from_file_f64¶
nifgen.Session.
create_waveform_from_file_f64
(file_name, byte_order)¶This method takes the floating point double (F64) data from the specified file and creates an onboard waveform for use in Arbitrary Waveform or Arbitrary Sequence output mode. The waveformHandle returned by this method can later be used for setting the active waveform, changing the data in the waveform, building sequences of waveforms, or deleting the waveform when it is no longer needed.
Note
The F64 data must be between –1.0 and +1.0 V. Use the
nifgen.Session.digital_gain
property to generate different voltage outputs.Tip
This method requires repeated capabilities (usually channels). If called directly on the nifgen.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nifgen.Session instance, and calling this method on the result.:
session.channels['0,1'].create_waveform_from_file_f64(file_name, byte_order)
Parameters:
- file_name (str) – The full path and name of the file where the waveform data resides.
- byte_order (
nifgen.ByteOrder
) –Specifies the byte order of the data in the file.
**Defined Values**
**Default Value:**LITTLE
LITTLE
Little Endian Data—The least significant bit is stored at the lowest address, followed by the other bits, in order of increasing significance. BIG
Big Endian Data—The most significant bit is stored at the lowest address, followed by the other bits, in order of decreasing significance. Note
Data written by most applications in Windows (including LabWindows™/CVI™) is in Little Endian format. Data written to a file from LabVIEW is in Big Endian format by default on all platforms. Big Endian and Little Endian refer to the way data is stored in memory, which can differ on different processors.
Return type: Returns: The handle that identifies the new waveform. This handle is used later when referring to this waveform.
create_waveform_from_file_i16¶
nifgen.Session.
create_waveform_from_file_i16
(file_name, byte_order)¶Takes the binary 16-bit signed integer (I16) data from the specified file and creates an onboard waveform for use in Arbitrary Waveform or Arbitrary Sequence output mode. The waveformHandle returned by this method can later be used for setting the active waveform, changing the data in the waveform, building sequences of waveforms, or deleting the waveform when it is no longer needed.
Note
The I16 data (values between –32768 and +32767) is assumed to represent –1 to +1 V. Use the
nifgen.Session.digital_gain
property to generate different voltage outputs.Tip
This method requires repeated capabilities (usually channels). If called directly on the nifgen.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nifgen.Session instance, and calling this method on the result.:
session.channels['0,1'].create_waveform_from_file_i16(file_name, byte_order)
Parameters:
- file_name (str) – The full path and name of the file where the waveform data resides.
- byte_order (
nifgen.ByteOrder
) –Specifies the byte order of the data in the file.
**Defined Values**
**Default Value:**LITTLE
LITTLE
Little Endian Data—The least significant bit is stored at the lowest address, followed by the other bits, in order of increasing significance. BIG
Big Endian Data—The most significant bit is stored at the lowest address, followed by the other bits, in order of decreasing significance. Note
Data written by most applications in Windows (including LabWindows™/CVI™) is in Little Endian format. Data written to a file from LabVIEW is in Big Endian format by default on all platforms. Big Endian and Little Endian refer to the way data is stored in memory, which can differ on different processors.
Return type: Returns: The handle that identifies the new waveform. This handle is used later when referring to this waveform.
create_waveform_numpy¶
nifgen.Session.
create_waveform_numpy
(waveform_data_array)¶Creates an onboard waveform for use in Arbitrary Waveform output mode or Arbitrary Sequence output mode.
Note
You must set
nifgen.Session.output_mode
toARB
orSEQ
before calling this method.Tip
This method requires repeated capabilities (usually channels). If called directly on the nifgen.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nifgen.Session instance, and calling this method on the result.:
session.channels['0,1'].create_waveform(waveform_data_array)
Parameters: waveform_data_array (list of float) – Array of data for the new arbitrary waveform. This may be an iterable of float, or for best performance a numpy.ndarray of dtype int16 or float64. Return type: int Returns: The handle that identifies the new waveform. This handle is used in other methods when referring to this waveform.
define_user_standard_waveform¶
nifgen.Session.
define_user_standard_waveform
(waveform_data_array)¶Defines a user waveform for use in either Standard Method or Frequency List output mode.
To select the waveform, set the waveform parameter to
USER
with either the nifgen_ConfigureStandardWaveform or the nifgen_CreateFreqList method.The waveform data must be scaled between –1.0 and 1.0. Use the amplitude parameter in the
nifgen.Session.configure_standard_waveform()
method to generate different output voltages.Note
You must call the nifgen_ConfigureOutputMode method to set the outputMode parameter to
FUNC
orFREQ_LIST
before calling this method.Tip
This method requires repeated capabilities (usually channels). If called directly on the nifgen.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nifgen.Session instance, and calling this method on the result.:
session.channels['0,1'].define_user_standard_waveform(waveform_data_array)
Parameters: waveform_data_array (list of float) – Specifies the array of data you want to use for the new arbitrary waveform. The array must have at least as many elements as the value that you specify in waveformSize.
You must normalize the data points in the array to be between –1.00 and +1.00.
Default Value: None
delete_named_waveform¶
nifgen.Session.
delete_named_waveform
(waveform_name)¶Removes a previously created arbitrary waveform from the signal generator memory and invalidates the waveform handle.
Note
The signal generator must not be in the Generating state when you call this method.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nifgen.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nifgen.Session instance, and calling this method on the result.:
session.channels['0,1'].delete_named_waveform(waveform_name)
Parameters: waveform_name (str) – Specifies the name to associate with the allocated waveform.
delete_script¶
nifgen.Session.
delete_script
(script_name)¶Deletes the specified script from onboard memory.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nifgen.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nifgen.Session instance, and calling this method on the result.:
session.channels['0,1'].delete_script(script_name)
Parameters: script_name (str) – Specifies the name of the script you want to delete. The script name appears in the text of the script following the script keyword.
disable¶
nifgen.Session.
disable
()¶Places the instrument in a quiescent state where it has minimal or no impact on the system to which it is connected. The analog output and all exported signals are disabled.
get_ext_cal_last_date_and_time¶
nifgen.Session.
get_ext_cal_last_date_and_time
()¶Returns the date and time of the last successful external calibration. The time returned is 24-hour (military) local time; for example, if the device was calibrated at 2:30 PM, this method returns 14 for the hour parameter and 30 for the minute parameter.
Return type: datetime.datetime Returns: Indicates date and time of the last calibration.
get_ext_cal_last_temp¶
get_ext_cal_recommended_interval¶
nifgen.Session.
get_ext_cal_recommended_interval
()¶Returns the recommended interval between external calibrations in months.
Return type: datetime.timedelta Returns: Specifies the recommended interval between external calibrations in months.
get_fir_filter_coefficients¶
nifgen.Session.
get_fir_filter_coefficients
()¶ Returns the FIR filter coefficients used by the onboard signal processing block. These coefficients are determined by NI-FGEN and based on the FIR filter type and corresponding property (Alpha, Passband, BT) unless you are using the custom filter. If you are using a custom filter, the coefficients returned are those set with the nifgen_ConfigureCustomFIRFilterCoefficients method coerced to the quantized values used by the device.To use this method, first call an instance of thenifgen.Session.get_fir_filter_coefficients()
method with the coefficientsArray parameter set to VI_NULL. Calling the method in this state returns the current size of the coefficientsArray as the value of the numberOfCoefficientsRead parameter. Create an array of this size, and call thenifgen.Session.get_fir_filter_coefficients()
method a second time, passing the new array as the coefficientsArray parameter and the size as the arraySize parameter. This second method call populates the array with the FIR filter coefficients.Refer to the FIR Filter topic for your device in the NI Signal Generators Help for more information about FIR filter coefficients. This method is supported only for the NI 5441.Default Value: NoneTip
This method requires repeated capabilities (usually channels). If called directly on the nifgen.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nifgen.Session instance, and calling this method on the result.:
session.channels['0,1'].get_fir_filter_coefficients()
Return type: int Returns: Specifies the array of data containing the number of coefficients you want to read.
get_hardware_state¶
nifgen.Session.
get_hardware_state
()¶Returns the current hardware state of the device and, if the device is in the hardware error state, the current hardware error.
Note
Hardware states do not necessarily correspond to NI-FGEN states.
Return type: nifgen.HardwareState
Returns: Returns the hardware state of the signal generator. Defined Values
IDLE
The device is in the Idle state. WAITING_FOR_START_TRIGGER
The device is waiting for Start Trigger. RUNNING
The device is in the Running state. DONE
The generation has completed successfully. HARDWARE_ERROR
There is a hardware error.
get_self_cal_last_date_and_time¶
nifgen.Session.
get_self_cal_last_date_and_time
()¶Returns the date and time of the last successful self-calibration.
Return type: datetime.datetime Returns: Returns the date and time the device was last calibrated.
get_self_cal_last_temp¶
get_self_cal_supported¶
is_done¶
nifgen.Session.
is_done
()¶Determines whether the current generation is complete. This method sets the done parameter to True if the session is in the Idle or Committed states.
Note
NI-FGEN only reports the done parameter as True after the current generation is complete in Single trigger mode.
Return type: bool Returns: Returns information about the completion of waveform generation. Defined Values
True Generation is complete. False Generation is not complete.
query_arb_seq_capabilities¶
nifgen.Session.
query_arb_seq_capabilities
()¶Returns the properties of the signal generator that are related to creating arbitrary sequences (the
nifgen.Session.max_num_sequences
,nifgen.Session.min_sequence_length
,nifgen.Session.max_sequence_length
, andnifgen.Session.max_loop_count
properties).
Return type: tuple (maximum_number_of_sequences, minimum_sequence_length, maximum_sequence_length, maximum_loop_count) WHERE
maximum_number_of_sequences (int):
Returns the maximum number of arbitrary waveform sequences that the signal generator allows. NI-FGEN obtains this value from thenifgen.Session.max_num_sequences
property.minimum_sequence_length (int):
Returns the minimum number of arbitrary waveforms the signal generator allows in a sequence. NI-FGEN obtains this value from thenifgen.Session.min_sequence_length
property.maximum_sequence_length (int):
Returns the maximum number of arbitrary waveforms the signal generator allows in a sequence. NI-FGEN obtains this value from thenifgen.Session.max_sequence_length
property.maximum_loop_count (int):
Returns the maximum number of times the signal generator can repeat an arbitrary waveform in a sequence. NI-FGEN obtains this value from thenifgen.Session.max_loop_count
property.
query_arb_wfm_capabilities¶
nifgen.Session.
query_arb_wfm_capabilities
()¶Returns the properties of the signal generator that are related to creating arbitrary waveforms. These properties are the maximum number of waveforms, waveform quantum, minimum waveform size, and maximum waveform size.
Note
If you do not want to obtain the waveform quantum, pass a value of VI_NULL for this parameter.
Return type: tuple (maximum_number_of_waveforms, waveform_quantum, minimum_waveform_size, maximum_waveform_size) WHERE
maximum_number_of_waveforms (int):
Returns the maximum number of arbitrary waveforms that the signal generator allows. NI-FGEN obtains this value from thenifgen.Session.max_num_waveforms
property.waveform_quantum (int):
The size (number of points) of each waveform must be a multiple of a constant quantum value. This parameter obtains the quantum value that the signal generator uses. NI-FGEN returns this value from thenifgen.Session.waveform_quantum
property.For example, when this property returns a value of 8, all waveform sizes must be a multiple of 8.
minimum_waveform_size (int):
Returns the minimum number of points that the signal generator allows in a waveform. NI-FGEN obtains this value from thenifgen.Session.min_waveform_size
property.maximum_waveform_size (int):
Returns the maximum number of points that the signal generator allows in a waveform. NI-FGEN obtains this value from thenifgen.Session.max_waveform_size
property.
query_freq_list_capabilities¶
nifgen.Session.
query_freq_list_capabilities
()¶Returns the properties of the signal generator that are related to creating frequency lists. These properties are
nifgen.Session.max_num_freq_lists
,nifgen.Session.min_freq_list_length
,nifgen.Session.max_freq_list_length
,nifgen.Session.min_freq_list_duration
,nifgen.Session.max_freq_list_duration
, andnifgen.Session.freq_list_duration_quantum
.
Return type: tuple (maximum_number_of_freq_lists, minimum_frequency_list_length, maximum_frequency_list_length, minimum_frequency_list_duration, maximum_frequency_list_duration, frequency_list_duration_quantum) WHERE
maximum_number_of_freq_lists (int):
Returns the maximum number of frequency lists that the signal generator allows. NI-FGEN obtains this value from thenifgen.Session.max_num_freq_lists
property.minimum_frequency_list_length (int):
Returns the minimum number of steps that the signal generator allows in a frequency list. NI-FGEN obtains this value from thenifgen.Session.min_freq_list_length
property.maximum_frequency_list_length (int):
Returns the maximum number of steps that the signal generator allows in a frequency list. NI-FGEN obtains this value from thenifgen.Session.max_freq_list_length
property.minimum_frequency_list_duration (float):
Returns the minimum duration that the signal generator allows in a step of a frequency list. NI-FGEN obtains this value from thenifgen.Session.min_freq_list_duration
property.maximum_frequency_list_duration (float):
Returns the maximum duration that the signal generator allows in a step of a frequency list. NI-FGEN obtains this value from thenifgen.Session.max_freq_list_duration
property.frequency_list_duration_quantum (float):
Returns the quantum of which all durations must be a multiple in a frequency list. NI-FGEN obtains this value from thenifgen.Session.freq_list_duration_quantum
property.
read_current_temperature¶
reset¶
nifgen.Session.
reset
()¶Resets the instrument to a known state. This method aborts the generation, clears all routes, and resets session properties to the default values. This method does not, however, commit the session properties or configure the device hardware to its default state.
Note
For the NI 5401/5404/5411/5431, this method exhibits the same behavior as the nifgen_ResetDevice method.
reset_device¶
nifgen.Session.
reset_device
()¶Performs a hard reset on the device. Generation is stopped, all routes are released, external bidirectional terminals are tristated, FPGAs are reset, hardware is configured to its default state, and all session properties are reset to their default states.
reset_with_defaults¶
nifgen.Session.
reset_with_defaults
()¶Resets the instrument and reapplies initial user–specified settings from the logical name that was used to initialize the session. If the session was created without a logical name, this method is equivalent to the nifgen_reset method.
self_cal¶
nifgen.Session.
self_cal
()¶Performs a full internal self-calibration on the device. If the calibration is successful, new calibration data and constants are stored in the onboard EEPROM.
self_test¶
nifgen.Session.
self_test
()¶Runs the instrument self-test routine and returns the test result(s).
Raises SelfTestError on self test failure. Properties on exception object:
- code - failure code from driver
- message - status message from driver
Self-Test Code Description 0 Passed self-test 1 Self-test failed Note
When used on some signal generators, the device is reset after the
nifgen.Session.self_test()
method runs. If you use thenifgen.Session.self_test()
method, your device may not be in its previously configured state after the method runs.
send_software_edge_trigger¶
nifgen.Session.
send_software_edge_trigger
(trigger, trigger_id)¶Sends a command to trigger the signal generator. This VI can act as an override for an external edge trigger.
Note
This VI does not override external digital edge triggers of the NI 5401/5411/5431.
Parameters:
- trigger (
nifgen.Trigger
) –Sets the clock mode of the signal generator.
**Defined Values**
DIVIDE_DOWN
HIGH_RESOLUTION
AUTOMATIC
- trigger_id (str) –
set_named_waveform_next_write_position¶
nifgen.Session.
set_named_waveform_next_write_position
(waveform_name, relative_to, offset)¶Sets the position in the waveform to which data is written at the next write. This method allows you to write to arbitrary locations within the waveform. These settings apply only to the next write to the waveform specified by the waveformHandle parameter. Subsequent writes to that waveform begin where the last write left off, unless this method is called again. The waveformHandle passed in must have been created with a call to one of the following methods:
- nifgen_AllocateWaveform
- nifgen_CreateWaveformF64
- nifgen_CreateWaveformI16
- nifgen_CreateWaveformFromFileI16
- nifgen_CreateWaveformFromFileF64
- nifgen_CreateWaveformFromFileHWS
Tip
This method requires repeated capabilities (usually channels). If called directly on the nifgen.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nifgen.Session instance, and calling this method on the result.:
session.channels['0,1'].set_named_waveform_next_write_position(waveform_name, relative_to, offset)
Parameters:
- waveform_name (str) – Specifies the name to associate with the allocated waveform.
- relative_to (
nifgen.RelativeTo
) –Specifies the reference position in the waveform. This position and offset together determine where to start loading data into the waveform.
**Defined Values**
START
(0)Use the start of the waveform as the reference position. CURRENT
(1)Use the current position within the waveform as the reference position. - offset (int) – Specifies the offset from the relativeTo parameter at which to start loading the data into the waveform.
set_waveform_next_write_position¶
nifgen.Session.
set_waveform_next_write_position
(waveform_handle, relative_to, offset)¶Sets the position in the waveform at which the next waveform data is written. This method allows you to write to arbitrary locations within the waveform. These settings apply only to the next write to the waveform specified by the waveformHandle parameter. Subsequent writes to that waveform begin where the last write left off, unless this method is called again. The waveformHandle passed in must have been created by a call to the nifgen_AllocateWaveform method or one of the following niFgen CreateWaveform methods:
- nifgen_CreateWaveformF64
- nifgen_CreateWaveformI16
- nifgen_CreateWaveformFromFileI16
- nifgen_CreateWaveformFromFileF64
- nifgen_CreateWaveformFromFileHWS
Tip
This method requires repeated capabilities (usually channels). If called directly on the nifgen.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nifgen.Session instance, and calling this method on the result.:
session.channels['0,1'].set_waveform_next_write_position(waveform_handle, relative_to, offset)
Parameters:
- waveform_handle (int) – Specifies the handle of the arbitrary waveform previously allocated with the nifgen_AllocateWaveform method.
- relative_to (
nifgen.RelativeTo
) –Specifies the reference position in the waveform. This position and offset together determine where to start loading data into the waveform.
**Defined Values**
START
(0)Use the start of the waveform as the reference position. CURRENT
(1)Use the current position within the waveform as the reference position. - offset (int) – Specifies the offset from relativeTo at which to start loading the data into the waveform.
wait_until_done¶
nifgen.Session.
wait_until_done
(max_time=10000)¶Waits until the device is done generating or until the maximum time has expired.
Parameters: max_time (float in seconds or datetime.timedelta) – Specifies the timeout value in milliseconds.
write_script¶
nifgen.Session.
write_script
(script)¶Writes a string containing one or more scripts that govern the generation of waveforms.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nifgen.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nifgen.Session instance, and calling this method on the result.:
session.channels['0,1'].write_script(script)
Parameters: script (str) – Contains the text of the script you want to use for your generation operation. Refer to scripting Instructions for more information about writing scripts.
write_waveform¶
nifgen.Session.
write_waveform
(waveform_name_or_handle, data)¶Writes data to the waveform in onboard memory.
By default, subsequent calls to this method continue writing data from the position of the last sample written. You can set the write position and offset by calling the nifgen_SetNamedWaveformNextWritePosition nifgen_SetWaveformNextWritePosition method.
Tip
This method requires repeated capabilities (usually channels). If called directly on the nifgen.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an nifgen.Session instance, and calling this method on the result.:
session.channels['0,1'].write_waveform(waveform_name_or_handle, data)
Parameters:
- waveform_name_or_handle (int) – The name (str) or handle (int) of an arbitrary waveform previously allocated with
nifgen.Session.allocate_named_waveform()
ornifgen.Session.allocate_waveform()
.- data (list of float) – Array of data to load into the waveform. This may be an iterable of float, or for best performance a numpy.ndarray of dtype int16 or float64.
Properties¶
Methods¶
Enums¶
Enums used in NI-FGEN
AnalogPath¶
-
class
nifgen.
AnalogPath
¶ -
MAIN
¶ Specifies use of the main path. NI-FGEN chooses the amplifier based on the user-specified gain.
-
DIRECT
¶ Specifies use of the direct path.
-
FIXED_LOW_GAIN
¶ Specifies use of the low-gain amplifier in the main path, no matter what value the user specifies for gain. This setting limits the output range.
-
FIXED_HIGH_GAIN
¶ Specifies use of the high-gain amplifier in the main path.
-
BusType¶
-
class
nifgen.
BusType
¶ -
INVALID
¶ Indicates an invalid bus type.
-
AT
¶ Indicates the signal generator is the AT bus type.
-
PCI
¶ Indicates the signal generator is the PCI bus type.
-
PXI
¶ Indicates the signal generator is the PXI bus type.
-
VXI
¶ Indicates the signal generator is the VXI bus type.
-
PCMCIA
¶ Indicates the signal generator is the PCI-CMA bus type.
-
PXIE
¶ Indicates the signal generator is the PXI Express bus type.
-
ClockMode¶
-
class
nifgen.
ClockMode
¶ -
HIGH_RESOLUTION
¶ High resolution sampling—Sample rate is generated by a high–resolution clock source.
-
DIVIDE_DOWN
¶ Divide down sampling—Sample rates are generated by dividing the source frequency.
-
AUTOMATIC
¶ Automatic Selection—NI-FGEN selects between the divide–down and high–resolution clocking modes.
-
DataMarkerEventLevelPolarity¶
DataProcessingMode¶
DoneEventActiveLevel¶
DoneEventDelayUnits¶
DoneEventOutputBehavior¶
DoneEventPulsePolarity¶
DoneEventPulseWidthUnits¶
FilterType¶
-
class
nifgen.
FilterType
¶ -
FLAT
¶ Applies a flat filter to the data with the passband value specified in the
nifgen.Session.osp_fir_filter_flat_passband
property.
-
RAISED_COSINE
¶ Applies a raised cosine filter to the data with the alpha value specified in the
nifgen.Session.osp_fir_filter_raised_cosine_alpha
property.
-
ROOT_RAISED_COSINE
¶ Applies a root raised cosine filter to the data with the alpha value specified in the
nifgen.Session.osp_fir_filter_root_raised_cosine_alpha
property.
-
GAUSSIAN
¶ Applies a Gaussian filter to the data with the BT value specified in the
nifgen.Session.osp_fir_filter_gaussian_bt
property.
-
CUSTOM
¶ Applies a custom filter to the data. If
CUSTOM
is selected, you must provide a set of FIR filter coefficients with thenifgen.Session.configure_custom_fir_filter_coefficients()
method.
-
HardwareState¶
IdleBehavior¶
MarkerEventDelayUnits¶
MarkerEventOutputBehavior¶
MarkerEventPulsePolarity¶
MarkerEventPulseWidthUnits¶
MarkerEventToggleInitialState¶
OSPMode¶
OSPOverflowErrorReporting¶
OutputMode¶
-
class
nifgen.
OutputMode
¶ -
FUNC
¶ Standard Method mode— Generates standard method waveforms such as sine, square, triangle, and so on.
-
ARB
¶ Arbitrary waveform mode—Generates waveforms from user-created/provided waveform arrays of numeric data.
-
SEQ
¶ Arbitrary sequence mode — Generates downloaded waveforms in an order your specify.
-
FREQ_LIST
¶ Frequency List mode—Generates a standard method using a list of frequencies you define.
-
SCRIPT
¶ Script mode—Allows you to use scripting to link and loop multiple waveforms in complex combinations.
-
ReadyForStartEventActiveLevel¶
ReferenceClockSource¶
-
class
nifgen.
ReferenceClockSource
¶ -
CLOCK_IN
¶ Specifies that the CLK IN input signal from the front panel connector is used as the Reference Clock source.
-
NONE
¶ Specifies that a Reference Clock is not used.
-
ONBOARD_REFERENCE_CLOCK
¶ Specifies that the onboard Reference Clock is used as the Reference Clock source.
-
PXI_CLOCK
¶ Specifies the PXI Clock is used as the Reference Clock source.
-
RTSI_7
¶ Specifies that the RTSI line 7 is used as the Reference Clock source.
-
SampleClockSource¶
-
class
nifgen.
SampleClockSource
¶ -
CLOCK_IN
¶ Specifies that the signal at the CLK IN front panel connector is used as the Sample Clock source.
-
DDC_CLOCK_IN
¶ Specifies that the Sample Clock from DDC connector is used as the Sample Clock source.
-
ONBOARD_CLOCK
¶ Specifies that the onboard clock is used as the Sample Clock source.
-
PXI_STAR_LINE
¶ Specifies that the PXI_STAR trigger line is used as the Sample Clock source.
-
PXI_TRIGGER_LINE_0RTSI_0
¶ Specifies that the PXI or RTSI line 0 is used as the Sample Clock source.
-
PXI_TRIGGER_LINE_1RTSI_1
¶ Specifies that the PXI or RTSI line 1 is used as the Sample Clock source.
-
PXI_TRIGGER_LINE_2RTSI_2
¶ Specifies that the PXI or RTSI line 2 is used as the Sample Clock source.
-
PXI_TRIGGER_LINE_3RTSI_3
¶ Specifies that the PXI or RTSI line 3 is used as the Sample Clock source.
-
PXI_TRIGGER_LINE_4RTSI_4
¶ Specifies that the PXI or RTSI line 4 is used as the Sample Clock source.
-
PXI_TRIGGER_LINE_5RTSI_5
¶ Specifies that the PXI or RTSI line 5 is used as the Sample Clock source.
-
PXI_TRIGGER_LINE_6RTSI_6
¶ Specifies that the PXI or RTSI line 6 is used as the Sample Clock source.
-
PXI_TRIGGER_LINE_7RTSI_7
¶ Specifies that the PXI or RTSI line 7 is used as the Sample Clock source.
-
SampleClockTimebaseSource¶
ScriptTriggerDigitalEdgeEdge¶
ScriptTriggerDigitalLevelActiveLevel¶
ScriptTriggerType¶
-
class
nifgen.
ScriptTriggerType
¶ -
TRIG_NONE
¶ No trigger is configured. Signal generation starts immediately.
-
DIGITAL_EDGE
¶ Trigger is asserted when a digital edge is detected.
-
DIGITAL_LEVEL
¶ Trigger is asserted when a digital level is detected.
-
SOFTWARE_EDGE
¶ Trigger is asserted when a software edge is detected.
-
StartTriggerDigitalEdgeEdge¶
StartTriggerType¶
StartedEventActiveLevel¶
StartedEventDelayUnits¶
StartedEventOutputBehavior¶
StartedEventPulsePolarity¶
StartedEventPulseWidthUnits¶
SynchronizationSource¶
-
class
nifgen.
SynchronizationSource
¶ -
TTL0
¶ PXI TRIG0 or VXI TTL0
-
TTL1
¶ PXI TRIG1 or VXI TTL1
-
TTL2
¶ PXI TRIG2 or VXI TTL2
-
TTL3
¶ PXI TRIG3 or VXI TTL3
-
TTL4
¶ PXI TRIG4 or VXI TTL4
-
TTL5
¶ PXI TRIG5 or VXI TTL5
-
TTL6
¶ PXI TRIG6 or VXI TTL6
-
RTSI_0
¶ RTSI 0
-
RTSI_1
¶ RTSI 1
-
RTSI_2
¶ RTSI 2
-
RTSI_3
¶ RTSI 3
-
RTSI_4
¶ RTSI 4
-
RTSI_5
¶ RTSI 5
-
RTSI_6
¶ RTSI 6
-
NONE
¶ No Synchronization Source
-
TerminalConfiguration¶
TriggerMode¶
-
class
nifgen.
TriggerMode
¶ -
SINGLE
¶ Single Trigger Mode - The waveform you describe in the sequence list is generated only once by going through the entire staging list. Only one trigger is required to start the waveform generation. You can use Single trigger mode with the output mode in any mode. After a trigger is received, the waveform generation starts from the first stage and continues through to the last stage. Then, the last stage generates repeatedly until you stop the waveform generation.
-
CONTINUOUS
¶ Continuous Trigger Mode - The waveform you describe in the staging list generates infinitely by repeatedly cycling through the staging list. After a trigger is received, the waveform generation starts from the first stage and continues through to the last stage. After the last stage completes, the waveform generation loops back to the start of the first stage and continues until it is stopped. Only one trigger is required to start the waveform generation.
-
STEPPED
¶ Stepped Trigger Mode - After a start trigger is received, the waveform described by the first stage generates. Then, the device waits for the next trigger signal. On the next trigger, the waveform described by the second stage generates, and so on. After the staging list completes, the waveform generation returns to the first stage and continues in a cyclic fashion. After any stage has generated completely, the first eight samples of the next stage are repeated continuously until the next trigger is received. trigger mode.
Note
In Frequency List mode, Stepped trigger mode is the same as Burst
-
BURST
¶ Burst Trigger Mode - After a start trigger is received, the waveform described by the first stage generates until another trigger is received. At the next trigger, the buffer of the previous stage completes, and then the waveform described by the second stage generates. After the staging list completes, the waveform generation returns to the first stage and continues in a cyclic fashion. In Frequency List mode, the duration instruction is ignored, and the trigger switches the frequency to the next frequency in the list. trigger mode.
Note
In Frequency List mode, Stepped trigger mode is the same as Burst
-
TriggerSource¶
-
class
nifgen.
TriggerSource
¶ -
IMMEDIATE
¶ Immediate-The signal generator does not wait for a trigger of any kind.
-
EXTERNAL
¶ External-The signal generator waits for a trigger on the external trigger input
-
SOFTWARE_TRIG
¶ Software Trigger-The signal generator waits until you call
nifgen.Session.SendSWTrigger()
.
-
TTL0
¶ PXI TRIG0 or VXI TTL0
-
TTL1
¶ PXI TRIG1 or VXI TTL1
-
TTL2
¶ PXI TRIG2 or VXI TTL2
-
TTL3
¶ PXI TRIG3 or VXI TTL3
-
TTL4
¶ PXI TRIG4 or VXI TTL4
-
TTL5
¶ PXI TRIG5 or VXI TTL5
-
TTL6
¶ PXI TRIG6 or VXI TTL6
-
PXI_STAR
¶ PXI star
-
RTSI_0
¶ RTSI line 0
-
RTSI_1
¶ RTSI line 1
-
RTSI_2
¶ RTSI line 2
-
RTSI_3
¶ RTSI line 3
-
RTSI_4
¶ RTSI line 4
-
RTSI_5
¶ RTSI line 5
-
RTSI_6
¶ RTSI line 6
-
RTSI_7
¶ RTSI line 7
-
PFI_0
¶ PFI 0
-
PFI_1
¶ PFI 1
-
PFI_2
¶ PFI 2
-
PFI_3
¶ PFI 3
-
OTHER_TERMINAL
¶ Specifies that another terminal is used.
-
VideoWaveformType¶
WaitBehavior¶
Waveform¶
-
class
nifgen.
Waveform
¶ -
SINE
¶ Sinusoid waveform
-
SQUARE
¶ Square waveform
-
TRIANGLE
¶ Triange waveform
-
RAMP_UP
¶ Positive ramp waveform
-
RAMP_DOWN
¶ Negative ramp waveform
-
DC
¶ Constant voltage
-
NOISE
¶ White noise
-
USER
¶ User-defined waveform as defined by the
nifgen.Session.define_user_standard_waveform()
method.
-
Exceptions and Warnings¶
UnsupportedConfigurationError¶
- exception
nifgen.
UnsupportedConfigurationError
¶An error due to using this module in an usupported platform.
DriverNotInstalledError¶
- exception
nifgen.
DriverNotInstalledError
¶An error due to using this module without the driver runtime installed.
Examples¶
nifgen_arb_waveform.py¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | #!/usr/bin/python
import argparse
import math
import nifgen
import sys
import time
def create_waveform_data(number_of_samples):
waveform_data = []
angle_per_sample = (2 * math.pi) / number_of_samples
for i in range(number_of_samples):
waveform_data.append(math.sin(i * angle_per_sample) * math.sin(i * angle_per_sample * 20))
return waveform_data
def example(resource_name, options, samples, gain, offset, gen_time):
waveform_data = create_waveform_data(samples)
with nifgen.Session(resource_name=resource_name, options=options) as session:
session.output_mode = nifgen.OutputMode.ARB
waveform = session.create_waveform(waveform_data_array=waveform_data)
session.configure_arb_waveform(waveform_handle=waveform, gain=gain, offset=offset)
with session.initiate():
time.sleep(gen_time)
def _main(argsv):
parser = argparse.ArgumentParser(description='Continuously generates an arbitrary waveform.', formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('-n', '--resource-name', default='PXI1Slot2', help='Resource name of a National Instruments Arbitrary Waveform Generator')
parser.add_argument('-s', '--samples', default=100000, type=int, help='Number of samples')
parser.add_argument('-g', '--gain', default=1.0, type=float, help='Gain')
parser.add_argument('-o', '--offset', default=0.0, type=float, help='DC offset (V)')
parser.add_argument('-t', '--time', default=5.0, type=float, help='Generation time (s)')
parser.add_argument('-op', '--option-string', default='', type=str, help='Option string')
args = parser.parse_args(argsv)
example(args.resource_name, args.option_string, args.samples, args.gain, args.offset, args.time)
def main():
_main(sys.argv[1:])
def test_example():
options = {'simulate': True, 'driver_setup': {'Model': '5433 (2CH)', 'BoardType': 'PXIe', }, }
example('PXI1Slot2', options, 100000, 1.0, 0.0, 5.0)
def test_main():
cmd_line = ['--option-string', 'Simulate=1, DriverSetup=Model:5433 (2CH);BoardType:PXIe', ]
_main(cmd_line)
if __name__ == '__main__':
main()
|
nifgen_standard_function.py¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | #!/usr/bin/python
import argparse
import nifgen
import sys
import time
def example(resource_name, options, waveform, frequency, amplitude, offset, phase, gen_time):
with nifgen.Session(resource_name=resource_name, options=options) as session:
session.output_mode = nifgen.OutputMode.FUNC
session.configure_standard_waveform(waveform=nifgen.Waveform[waveform], amplitude=amplitude, frequency=frequency, dc_offset=offset, start_phase=phase)
with session.initiate():
time.sleep(gen_time)
def _main(argsv):
supported_waveforms = list(nifgen.Waveform.__members__.keys())[:-1] # no support for user-defined waveforms in example
parser = argparse.ArgumentParser(description='Generates the standard function.', formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('-n', '--resource-name', default='PXI1Slot2', help='Resource name of a National Instruments Function Generator')
parser.add_argument('-w', '--waveform', default=supported_waveforms[0], choices=supported_waveforms, type=str.upper, help='Standard waveform')
parser.add_argument('-f', '--frequency', default=1000, type=float, help='Frequency (Hz)')
parser.add_argument('-a', '--amplitude', default=1.0, type=float, help='Amplitude (Vpk-pk)')
parser.add_argument('-o', '--offset', default=0.0, type=float, help='DC offset (V)')
parser.add_argument('-p', '--phase', default=0.0, type=float, help='Start phase (deg)')
parser.add_argument('-t', '--time', default=5.0, type=float, help='Generation time (s)')
parser.add_argument('-op', '--option-string', default='', type=str, help='Option string')
args = parser.parse_args(argsv)
example(args.resource_name, args.option_string, args.waveform, args.frequency, args.amplitude, args.offset, args.phase, args.time)
def main():
_main(sys.argv[1:])
def test_example():
options = {'simulate': True, 'driver_setup': {'Model': '5433 (2CH)', 'BoardType': 'PXIe', }, }
example('PXI1Slot2', options, 'SINE', 1000, 1.0, 0.0, 0.0, 5.0)
def test_main():
cmd_line = ['--option-string', 'Simulate=1, DriverSetup=Model:5433 (2CH);BoardType:PXIe', ]
_main(cmd_line)
if __name__ == '__main__':
main()
|
niscope module¶
Installation¶
As a prerequisite to using the niscope module, you must install the NI-SCOPE runtime on your system. Visit ni.com/downloads to download the driver runtime for your devices.
The nimi-python modules (i.e. for NI-SCOPE) can be installed with pip:
$ python -m pip install niscope~=0.8.0
Or easy_install from setuptools:
$ python -m easy_install niscope
Usage¶
The following is a basic example of using the niscope module to open a session to a High Speed Digitizer and capture a single record of 1000 points.
import niscope
with niscope.Session("Dev1") as session:
session.channels[0].configure_vertical(range=1.0, coupling=niscope.VerticalCoupling.AC)
session.channels[1].configure_vertical(range=10.0, coupling=niscope.VerticalCoupling.DC)
session.configure_horizontal_timing(min_sample_rate=50000000, min_num_pts=1000, ref_position=50.0, num_records=5, enforce_realtime=True)
with session.initiate():
waveforms = session.channels[0,1].fetch(num_records=5)
for wfm in waveforms:
print('Channel {0}, record {1} samples acquired: {2:,}\n'.format(wfm.channel, wfm.record, len(wfm.samples)))
# Find all channel 1 records (Note channel name is always a sting even if integers used in channel[])
chan1 = [wfm for wfm in waveforms if wfm.channel == '0']
# Find all record number 3
rec3 = [wfm for wfm in waveforms if wfm.record == 3]
The waveform returned from fetch is a flat list of Python objects
Attributes:
relative_initial_x (float) the time (in seconds) from the trigger to the first sample in the fetched waveform
absolute_initial_x (float) timestamp (in seconds) of the first fetched sample. This timestamp is comparable between records and acquisitions; devices that do not support this parameter use 0 for this output.
x_increment (float) the time between points in the acquired waveform in seconds
channel (str) channel name this waveform was asquire from
record (int) record number of this waveform
gain (float) the gain factor of the given channel; useful for scaling binary data with the following formula:
\[voltage = binary data * gain factor + offset\]offset (float) the offset factor of the given channel; useful for scaling binary data with the following formula:
\[voltage = binary data * gain factor + offset\]samples (array of float) floating point array of samples. Length will be of the actual samples acquired
Such that all record 0 waveforms are first. For example, with a channel list of 0,1, you would have the following index values:
- index 0 = record 0, channel 0
- index 1 = record 0, channel 1
- index 2 = record 1, channel 0
- index 3 = record 1, channel 1
- etc.
If you need more performance or need to work with SciPy, you can use the fetch_into() method instead of fetch(). This method takes an already allocated numpy array and puts the acquired samples in it. Data types supported:
- numpy.float64
- numpy.int8
- numpy.in16
- numpy.int32
voltage_range = 1.0
record_length = 2000
channels = [0, 1]
num_channels = len(channels)
num_records = 5
wfm = numpy.ndarray(num_channels * record_length, dtype=numpy.int8)
session.configure_vertical(voltage_range, niscope.VerticalCoupling.AC)
session.configure_horizontal_timing(50000000, record_length, 50.0, num_records, True)
with session.initiate():
waveform_infos = session.channels[channels].fetch_into(wfm=wfm, num_records=num_records)
The waveform_infos returned from fetch_into is a 1D list of Python objects
Attributes:
relative_initial_x (float) the time (in seconds) from the trigger to the first sample in the fetched waveform
absolute_initial_x (float) timestamp (in seconds) of the first fetched sample. This timestamp is comparable between records and acquisitions; devices that do not support this parameter use 0 for this output.
x_increment (float) the time between points in the acquired waveform in seconds
channel (str) channel name this waveform was asquire from
record (int) record number of this waveform
gain (float) the gain factor of the given channel; useful for scaling binary data with the following formula:
\[voltage = binary data * gain factor + offset\]offset (float) the offset factor of the given channel; useful for scaling binary data with the following formula:
\[voltage = binary data * gain factor + offset\]samples (numpy array of datatype used) floating point array of samples. Length will be of the actual samples acquired
Note
Python 3 only
Such that all record 0 waveforms are first. For example, with a channel list of 0,1, you would have the following index values:
- index 0 = record 0, channel 0
- index 1 = record 0, channel 1
- index 2 = record 1, channel 0
- index 3 = record 1, channel 1
- etc.
Note
When using Python 2, the waveform_infos objects do not include the waveform for that record. Instead, samples are in the waveform passed into the function using the following layout:
- index 0 = record 0, channel 0
- index x = record 0, channel 1
- index 2x = record 1, channel 0
- index 3x = record 1, channel 1
- etc.
- Where x = the record length
Additional examples for NI-SCOPE are located in src/niscope/examples/ directory.
API Reference¶
niscope.Session¶
-
class
niscope.
Session
(self, resource_name, id_query=False, reset_device=False, options={})¶ Performs the following initialization actions:
- Creates a new IVI instrument driver and optionally sets the initial state of the following session properties: Range Check, Cache, Simulate, Record Value Coercions
- Opens a session to the specified device using the interface and address you specify for the resourceName
- Resets the digitizer to a known state if resetDevice is set to True
- Queries the instrument ID and verifies that it is valid for this instrument driver if the IDQuery is set to True
- Returns an instrument handle that you use to identify the instrument in all subsequent instrument driver method calls
Parameters: - resource_name (str) –
Caution
Traditional NI-DAQ and NI-DAQmx device names are not case-sensitive. However, all IVI names, such as logical names, are case-sensitive. If you use logical names, driver session names, or virtual names in your program, you must make sure that the name you use matches the name in the IVI Configuration Store file exactly, without any variations in the case of the characters.
Specifies the resource name of the device to initializeFor Traditional NI-DAQ devices, the syntax is DAQ::n, where n is the device number assigned by MAX, as shown in Example 1.
For NI-DAQmx devices, the syntax is just the device name specified in MAX, as shown in Example 2. Typical default names for NI-DAQmx devices in MAX are Dev1 or PXI1Slot1. You can rename an NI-DAQmx device by right-clicking on the name in MAX and entering a new name.
An alternate syntax for NI-DAQmx devices consists of DAQ::NI-DAQmx device name, as shown in Example 3. This naming convention allows for the use of an NI-DAQmx device in an application that was originally designed for a Traditional NI-DAQ device. For example, if the application expects DAQ::1, you can rename the NI-DAQmx device to 1 in MAX and pass in DAQ::1 for the resource name, as shown in Example 4.
If you use the DAQ::n syntax and an NI-DAQmx device name already exists with that same name, the NI-DAQmx device is matched first.
You can also pass in the name of an IVI logical name or an IVI virtual name configured with the IVI Configuration utility, as shown in Example 5. A logical name identifies a particular virtual instrument. A virtual name identifies a specific device and specifies the initial settings for the session.
Example Device Type Syntax 1 Traditional NI-DAQ device DAQ::1 (1 = device number) 2 NI-DAQmx device myDAQmxDevice (myDAQmxDevice = device name) 3 NI-DAQmx device DAQ::myDAQmxDevice (myDAQmxDevice = device name) 4 NI-DAQmx device DAQ::2 (2 = device name) 5 IVI logical name or IVI virtual name myLogicalName (myLogicalName = name) - id_query (bool) –
Specify whether to perform an ID query.
When you set this parameter to True, NI-SCOPE verifies that the device you initialize is a type that it supports.
When you set this parameter to False, the method initializes the device without performing an ID query.
Defined Values
True—Perform ID queryFalse—Skip ID queryDefault Value: True
- reset_device (bool) –
Specify whether to reset the device during the initialization process.
Default Value: True
Defined Values
True (1)—Reset device
False (0)—Do not reset device
Note
For the NI 5112, repeatedly resetting the device may cause excessive wear on the electromechanical relays. Refer to NI 5112 Electromechanical Relays for recommended programming practices.
- options (str) –
Specifies the initial value of certain properties for the session. The syntax for options is a dictionary of properties with an assigned value. For example:
{ ‘simulate’: False }
You do not have to specify a value for all the properties. If you do not specify a value for a property, the default value is used.
Advanced Example: { ‘simulate’: True, ‘driver_setup’: { ‘Model’: ‘<model number>’, ‘BoardType’: ‘<type>’ } }
Property Default range_check True query_instrument_status False cache True simulate False record_value_coersions False driver_setup {}
Properties
Public methods
Properties¶
absolute_sample_clock_offset¶
niscope.Session.
absolute_sample_clock_offset
¶Gets or sets the absolute time offset of the sample clock relative to the reference clock in terms of seconds.
Note
Configures the sample clock relationship with respect to the reference clock. This parameter is factored into NI-TClk adjustments and is typically used to improve the repeatability of NI-TClk Synchronization. When this parameter is read, the currently programmed value is returned. The range of the absolute sample clock offset is [-.5 sample clock periods, .5 sample clock periods]. The default absolute sample clock offset is 0s.
The following table lists the characteristics of this property.
Characteristic Value Datatype float in seconds or datetime.timedelta Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocking:Advanced:Absolute Sample Clock Offset
- C Attribute: NISCOPE_ATTR_ABSOLUTE_SAMPLE_CLOCK_OFFSET
accessory_gain¶
niscope.Session.
accessory_gain
¶Returns the calibration gain for the current device configuration. Related topics: NI 5122/5124/5142 Calibration
Note
This property is only supported by the NI PXI-5900 differential amplifier.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the accessory_gain.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an accessory_gain.Session instance, and calling set/get value on the result.:
session['0,1'].accessory_gain = var var = session['0,1'].accessory_gainThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Device:Accessory:Gain
- C Attribute: NISCOPE_ATTR_ACCESSORY_GAIN
accessory_offset¶
niscope.Session.
accessory_offset
¶Returns the calibration offset for the current device configuration. Related topics: NI 5122/5124/5142 Calibration
Note
This property is supported only by the NI PXI-5900 differential amplifier.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the accessory_offset.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an accessory_offset.Session instance, and calling set/get value on the result.:
session['0,1'].accessory_offset = var var = session['0,1'].accessory_offsetThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Device:Accessory:Offset
- C Attribute: NISCOPE_ATTR_ACCESSORY_OFFSET
acquisition_start_time¶
niscope.Session.
acquisition_start_time
¶Specifies the length of time from the trigger event to the first point in the waveform record in seconds. If the value is positive, the first point in the waveform record occurs after the trigger event (same as specifying
niscope.Session.trigger_delay_time
). If the value is negative, the first point in the waveform record occurs before the trigger event (same as specifyingniscope.Session.horz_record_ref_position
).The following table lists the characteristics of this property.
Characteristic Value Datatype float in seconds or datetime.timedelta Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Horizontal:Advanced:Acquisition Start Time
- C Attribute: NISCOPE_ATTR_ACQUISITION_START_TIME
acquisition_type¶
niscope.Session.
acquisition_type
¶Specifies how the digitizer acquires data and fills the waveform record.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.AcquisitionType Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Acquisition:Acquisition Type
- C Attribute: NISCOPE_ATTR_ACQUISITION_TYPE
acq_arm_source¶
niscope.Session.
acq_arm_source
¶Specifies the source the digitizer monitors for a start (acquisition arm) trigger. When the start trigger is received, the digitizer begins acquiring pretrigger samples. Valid Values:
NISCOPE_VAL_IMMEDIATE
(‘VAL_IMMEDIATE’) - Triggers immediatelyNISCOPE_VAL_RTSI_0
(‘VAL_RTSI_0’) - RTSI 0NISCOPE_VAL_RTSI_1
(‘VAL_RTSI_1’) - RTSI 1NISCOPE_VAL_RTSI_2
(‘VAL_RTSI_2’) - RTSI 2NISCOPE_VAL_RTSI_3
(‘VAL_RTSI_3’) - RTSI 3NISCOPE_VAL_RTSI_4
(‘VAL_RTSI_4’) - RTSI 4NISCOPE_VAL_RTSI_5
(‘VAL_RTSI_5’) - RTSI 5NISCOPE_VAL_RTSI_6
(‘VAL_RTSI_6’) - RTSI 6NISCOPE_VAL_PFI_0
(‘VAL_PFI_0’) - PFI 0NISCOPE_VAL_PFI_1
(‘VAL_PFI_1’) - PFI 1NISCOPE_VAL_PFI_2
(‘VAL_PFI_2’) - PFI 2NISCOPE_VAL_PXI_STAR
(‘VAL_PXI_STAR’) - PXI Star TriggerNote
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Synchronization:Start Trigger (Acq. Arm):Source
- C Attribute: NISCOPE_ATTR_ACQ_ARM_SOURCE
adv_trig_src¶
niscope.Session.
adv_trig_src
¶Specifies the source the digitizer monitors for an advance trigger. When the advance trigger is received, the digitizer begins acquiring pretrigger samples.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Synchronization:Advance Trigger:Source
- C Attribute: NISCOPE_ATTR_ADV_TRIG_SRC
allow_more_records_than_memory¶
niscope.Session.
allow_more_records_than_memory
¶Indicates whether more records can be configured with
niscope.Session.configure_horizontal_timing()
than fit in the onboard memory. If this property is set to True, it is necessary to fetch records while the acquisition is in progress. Eventually, some of the records will be overwritten. An error is returned from the fetch method if you attempt to fetch a record that has been overwritten.The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Horizontal:Enable Records > Memory
- C Attribute: NISCOPE_ATTR_ALLOW_MORE_RECORDS_THAN_MEMORY
arm_ref_trig_src¶
niscope.Session.
arm_ref_trig_src
¶Specifies the source the digitizer monitors for an arm reference trigger. When the arm reference trigger is received, the digitizer begins looking for a reference (stop) trigger from the user-configured trigger source.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Synchronization:Arm Reference Trigger:Source
- C Attribute: NISCOPE_ATTR_ARM_REF_TRIG_SRC
backlog¶
niscope.Session.
backlog
¶Returns the number of samples (
niscope.Session.points_done
) that have been acquired but not fetched for the record specified byniscope.Session.fetch_record_number
.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Fetch:Fetch Backlog
- C Attribute: NISCOPE_ATTR_BACKLOG
bandpass_filter_enabled¶
niscope.Session.
bandpass_filter_enabled
¶Enables the bandpass filter on the specificed channel. The default value is FALSE.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the bandpass_filter_enabled.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an bandpass_filter_enabled.Session instance, and calling set/get value on the result.:
session['0,1'].bandpass_filter_enabled = var var = session['0,1'].bandpass_filter_enabledThe following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Vertical:Advanced:Bandpass Filter Enabled
- C Attribute: NISCOPE_ATTR_BANDPASS_FILTER_ENABLED
binary_sample_width¶
niscope.Session.
binary_sample_width
¶Indicates the bit width of the binary data in the acquired waveform. Useful for determining which Binary Fetch method to use. Compare to
niscope.Session.resolution
. To configure the device to store samples with a lower resolution that the native, set this property to the desired binary width. This can be useful for streaming at faster speeds at the cost of resolution. The least significant bits will be lost with this configuration. Valid Values: 8, 16, 32The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Acquisition:Binary Sample Width
- C Attribute: NISCOPE_ATTR_BINARY_SAMPLE_WIDTH
channel_count¶
niscope.Session.
channel_count
¶Indicates the number of channels that the specific instrument driver supports. For channel-based properties, the IVI engine maintains a separate cache value for each channel.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Driver Capabilities:Channel Count
- C Attribute: NISCOPE_ATTR_CHANNEL_COUNT
channel_enabled¶
niscope.Session.
channel_enabled
¶Specifies whether the digitizer acquires a waveform for the channel. Valid Values: True (1) - Acquire data on this channel False (0) - Don’t acquire data on this channel
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the channel_enabled.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an channel_enabled.Session instance, and calling set/get value on the result.:
session['0,1'].channel_enabled = var var = session['0,1'].channel_enabledThe following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Vertical:Channel Enabled
- C Attribute: NISCOPE_ATTR_CHANNEL_ENABLED
channel_terminal_configuration¶
niscope.Session.
channel_terminal_configuration
¶Specifies the terminal configuration for the channel.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the channel_terminal_configuration.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an channel_terminal_configuration.Session instance, and calling set/get value on the result.:
session['0,1'].channel_terminal_configuration = var var = session['0,1'].channel_terminal_configurationThe following table lists the characteristics of this property.
Characteristic Value Datatype enums.TerminalConfiguration Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Vertical:Channel Terminal Configuration
- C Attribute: NISCOPE_ATTR_CHANNEL_TERMINAL_CONFIGURATION
data_transfer_block_size¶
niscope.Session.
data_transfer_block_size
¶Specifies the maximum number of samples to transfer at one time from the device to host memory. Increasing this number should result in better fetching performance because the driver does not need to restart the transfers as often. However, increasing this number may also increase the amount of page-locked memory required from the system.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Fetch:Data Transfer Block Size
- C Attribute: NISCOPE_ATTR_DATA_TRANSFER_BLOCK_SIZE
data_transfer_maximum_bandwidth¶
niscope.Session.
data_transfer_maximum_bandwidth
¶This property specifies the maximum bandwidth that the device is allowed to consume.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Fetch:Advanced:Maximum Bandwidth
- C Attribute: NISCOPE_ATTR_DATA_TRANSFER_MAXIMUM_BANDWIDTH
data_transfer_preferred_packet_size¶
niscope.Session.
data_transfer_preferred_packet_size
¶This property specifies the size of (read request|memory write) data payload. Due to alignment of the data buffers, the hardware may not always generate a packet of this size.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Fetch:Advanced:Preferred Packet Size
- C Attribute: NISCOPE_ATTR_DATA_TRANSFER_PREFERRED_PACKET_SIZE
device_temperature¶
niscope.Session.
device_temperature
¶Returns the temperature of the device in degrees Celsius from the onboard sensor.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Device:Temperature
- C Attribute: NISCOPE_ATTR_DEVICE_TEMPERATURE
driver_setup¶
niscope.Session.
driver_setup
¶This property indicates the Driver Setup string that the user specified when initializing the driver. Some cases exist where the end-user must specify instrument driver options at initialization. An example of this is specifying a particular instrument model from among a family of instruments that the driver supports. This is useful when using simulation. The end-user can specify driver-specific options through the DriverSetup keyword in the optionsString parameter in
niscope.Session.__init__()
, or through the IVI Configuration Utility. If the user does not specify a Driver Setup string, this property returns an empty string.The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based 0 Resettable 0 Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- C Attribute: NISCOPE_ATTR_DRIVER_SETUP
enable_dc_restore¶
niscope.Session.
enable_dc_restore
¶Restores the video-triggered data retrieved by the digitizer to the video signal’s zero reference point. Valid Values: True - Enable DC restore False - Disable DC restore
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Trigger Video:Enable DC Restore
- C Attribute: NISCOPE_ATTR_ENABLE_DC_RESTORE
enable_time_interleaved_sampling¶
niscope.Session.
enable_time_interleaved_sampling
¶Specifies whether the digitizer acquires the waveform using multiple ADCs for the channel enabling a higher maximum real-time sampling rate. Valid Values: True (1) - Use multiple interleaved ADCs on this channel False (0) - Use only this channel’s ADC to acquire data for this channel
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the enable_time_interleaved_sampling.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an enable_time_interleaved_sampling.Session instance, and calling set/get value on the result.:
session['0,1'].enable_time_interleaved_sampling = var var = session['0,1'].enable_time_interleaved_samplingThe following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Horizontal:Enable Time Interleaved Sampling
- C Attribute: NISCOPE_ATTR_ENABLE_TIME_INTERLEAVED_SAMPLING
end_of_acquisition_event_output_terminal¶
niscope.Session.
end_of_acquisition_event_output_terminal
¶Specifies the destination for the End of Acquisition Event. When this event is asserted, the digitizer has completed sampling for all records. Consult your device documentation for a specific list of valid destinations.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Synchronization:End of Acquisition:Output Terminal
- C Attribute: NISCOPE_ATTR_END_OF_ACQUISITION_EVENT_OUTPUT_TERMINAL
end_of_record_event_output_terminal¶
niscope.Session.
end_of_record_event_output_terminal
¶Specifies the destination for the End of Record Event. When this event is asserted, the digitizer has completed sampling for the current record. Consult your device documentation for a specific list of valid destinations.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Synchronization:End of Record:Output Terminal
- C Attribute: NISCOPE_ATTR_END_OF_RECORD_EVENT_OUTPUT_TERMINAL
end_of_record_to_advance_trigger_holdoff¶
niscope.Session.
end_of_record_to_advance_trigger_holdoff
¶End of Record to Advance Trigger Holdoff is the length of time (in seconds) that a device waits between the completion of one record and the acquisition of pre-trigger samples for the next record. During this time, the acquisition engine state delays the transition to the Wait for Advance Trigger state, and will not store samples in onboard memory, accept an Advance Trigger, or trigger on the input signal.. Supported Devices: NI 5185/5186
The following table lists the characteristics of this property.
Characteristic Value Datatype float in seconds or datetime.timedelta Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:End of Record to Advance Trigger Holdoff
- C Attribute: NISCOPE_ATTR_END_OF_RECORD_TO_ADVANCE_TRIGGER_HOLDOFF
equalization_filter_enabled¶
niscope.Session.
equalization_filter_enabled
¶Enables the onboard signal processing FIR block. This block is connected directly to the input signal. This filter is designed to compensate the input signal for artifacts introduced to the signal outside of the digitizer. However, since this is a generic FIR filter any coefficients are valid. Coefficients should be between +1 and -1 in value.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the equalization_filter_enabled.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an equalization_filter_enabled.Session instance, and calling set/get value on the result.:
session['0,1'].equalization_filter_enabled = var var = session['0,1'].equalization_filter_enabledThe following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Onboard Signal Processing:Equalization:Equalization Filter Enabled
- C Attribute: NISCOPE_ATTR_EQUALIZATION_FILTER_ENABLED
equalization_num_coefficients¶
niscope.Session.
equalization_num_coefficients
¶Returns the number of coefficients that the FIR filter can accept. This filter is designed to compensate the input signal for artifacts introduced to the signal outside of the digitizer. However, since this is a generic FIR filter any coefficients are valid. Coefficients should be between +1 and -1 in value.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the equalization_num_coefficients.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an equalization_num_coefficients.Session instance, and calling set/get value on the result.:
session['0,1'].equalization_num_coefficients = var var = session['0,1'].equalization_num_coefficientsThe following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Onboard Signal Processing:Equalization:Equalization Num Coefficients
- C Attribute: NISCOPE_ATTR_EQUALIZATION_NUM_COEFFICIENTS
exported_advance_trigger_output_terminal¶
niscope.Session.
exported_advance_trigger_output_terminal
¶Specifies the destination to export the advance trigger. When the advance trigger is received, the digitizer begins acquiring samples for the Nth record. Consult your device documentation for a specific list of valid destinations.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Synchronization:Advance Trigger:Output Terminal
- C Attribute: NISCOPE_ATTR_EXPORTED_ADVANCE_TRIGGER_OUTPUT_TERMINAL
exported_ref_trigger_output_terminal¶
niscope.Session.
exported_ref_trigger_output_terminal
¶Specifies the destination export for the reference (stop) trigger. Consult your device documentation for a specific list of valid destinations.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Trigger Output Terminal
- C Attribute: NISCOPE_ATTR_EXPORTED_REF_TRIGGER_OUTPUT_TERMINAL
exported_start_trigger_output_terminal¶
niscope.Session.
exported_start_trigger_output_terminal
¶Specifies the destination to export the Start trigger. When the start trigger is received, the digitizer begins acquiring samples. Consult your device documentation for a specific list of valid destinations.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Synchronization:Start Trigger (Acq. Arm):Output Terminal
- C Attribute: NISCOPE_ATTR_EXPORTED_START_TRIGGER_OUTPUT_TERMINAL
flex_fir_antialias_filter_type¶
niscope.Session.
flex_fir_antialias_filter_type
¶The NI 5922 flexible-resolution digitizer uses an onboard FIR lowpass antialias filter. Use this property to select from several types of filters to achieve desired filtering characteristics.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the flex_fir_antialias_filter_type.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an flex_fir_antialias_filter_type.Session instance, and calling set/get value on the result.:
session['0,1'].flex_fir_antialias_filter_type = var var = session['0,1'].flex_fir_antialias_filter_typeThe following table lists the characteristics of this property.
Characteristic Value Datatype enums.FlexFIRAntialiasFilterType Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Vertical:Advanced:Flex FIR Antialias Filter Type
- C Attribute: NISCOPE_ATTR_FLEX_FIR_ANTIALIAS_FILTER_TYPE
fpga_bitfile_path¶
niscope.Session.
fpga_bitfile_path
¶Gets the absolute file path to the bitfile loaded on the FPGA.
Note
Gets the absolute file path to the bitfile loaded on the FPGA.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Device:FPGA Bitfile Path
- C Attribute: NISCOPE_ATTR_FPGA_BITFILE_PATH
high_pass_filter_frequency¶
niscope.Session.
high_pass_filter_frequency
¶Specifies the frequency for the highpass filter in Hz. The device uses one of the valid values listed below. If an invalid value is specified, no coercion occurs. The default value is 0. (PXIe-5164) Valid Values: 0 90 450 Related topics: Digital Filtering
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Vertical:Advanced:High Pass Filter Frequency
- C Attribute: NISCOPE_ATTR_HIGH_PASS_FILTER_FREQUENCY
horz_enforce_realtime¶
niscope.Session.
horz_enforce_realtime
¶Indicates whether the digitizer enforces real-time measurements or allows equivalent-time measurements.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Horizontal:Enforce Realtime
- C Attribute: NISCOPE_ATTR_HORZ_ENFORCE_REALTIME
horz_min_num_pts¶
niscope.Session.
horz_min_num_pts
¶Specifies the minimum number of points you require in the waveform record for each channel. NI-SCOPE uses the value you specify to configure the record length that the digitizer uses for waveform acquisition.
niscope.Session.horz_record_length
returns the actual record length. Valid Values: 1 - available onboard memoryThe following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Horizontal:Min Number of Points
- C Attribute: NISCOPE_ATTR_HORZ_MIN_NUM_PTS
horz_num_records¶
niscope.Session.
horz_num_records
¶Specifies the number of records to acquire. Can be used for multi-record acquisition and single-record acquisitions. Setting this to 1 indicates a single-record acquisition.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Horizontal:Number of Records
- C Attribute: NISCOPE_ATTR_HORZ_NUM_RECORDS
horz_record_length¶
niscope.Session.
horz_record_length
¶Returns the actual number of points the digitizer acquires for each channel. The value is equal to or greater than the minimum number of points you specify with
niscope.Session.horz_min_num_pts
. Allocate a ViReal64 array of this size or greater to pass as the WaveformArray parameter of the Read and Fetch methods. This property is only valid after a call to the one of the Configure Horizontal methods.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Horizontal:Actual Record Length
- C Attribute: NISCOPE_ATTR_HORZ_RECORD_LENGTH
horz_record_ref_position¶
niscope.Session.
horz_record_ref_position
¶Specifies the position of the Reference Event in the waveform record. When the digitizer detects a trigger, it waits the length of time the
niscope.Session.trigger_delay_time
property specifies. The event that occurs when the delay time elapses is the Reference Event. The Reference Event is relative to the start of the record and is a percentage of the record length. For example, the value 50.0 corresponds to the center of the waveform record and 0.0 corresponds to the first element in the waveform record. Valid Values: 0.0 - 100.0The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Horizontal:Reference Position
- C Attribute: NISCOPE_ATTR_HORZ_RECORD_REF_POSITION
horz_sample_rate¶
niscope.Session.
horz_sample_rate
¶Returns the effective sample rate using the current configuration. The units are samples per second. This property is only valid after a call to the one of the Configure Horizontal methods. Units: Hertz (Samples / Second)
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Horizontal:Actual Sample Rate
- C Attribute: NISCOPE_ATTR_HORZ_SAMPLE_RATE
horz_time_per_record¶
niscope.Session.
horz_time_per_record
¶Specifies the length of time that corresponds to the record length. Units: Seconds
The following table lists the characteristics of this property.
Characteristic Value Datatype float in seconds or datetime.timedelta Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Horizontal:Advanced:Time Per Record
- C Attribute: NISCOPE_ATTR_HORZ_TIME_PER_RECORD
input_clock_source¶
niscope.Session.
input_clock_source
¶Specifies the input source for the PLL reference clock (the 1 MHz to 20 MHz clock on the NI 5122, the 10 MHz clock for the NI 5112/5620/5621/5911) to which the digitizer will be phase-locked; for the NI 5102, this is the source of the board clock.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocking:Reference (Input) Clock Source
- C Attribute: NISCOPE_ATTR_INPUT_CLOCK_SOURCE
input_impedance¶
niscope.Session.
input_impedance
¶Specifies the input impedance for the channel in Ohms.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the input_impedance.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an input_impedance.Session instance, and calling set/get value on the result.:
session['0,1'].input_impedance = var var = session['0,1'].input_impedanceThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Vertical:Input Impedance
- C Attribute: NISCOPE_ATTR_INPUT_IMPEDANCE
instrument_firmware_revision¶
niscope.Session.
instrument_firmware_revision
¶A string that contains the firmware revision information for the instrument you are currently using.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Instrument Identification:Firmware Revision
- C Attribute: NISCOPE_ATTR_INSTRUMENT_FIRMWARE_REVISION
instrument_manufacturer¶
niscope.Session.
instrument_manufacturer
¶A string that contains the name of the instrument manufacturer.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Instrument Identification:Manufacturer
- C Attribute: NISCOPE_ATTR_INSTRUMENT_MANUFACTURER
instrument_model¶
niscope.Session.
instrument_model
¶A string that contains the model number of the current instrument.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Instrument Identification:Model
- C Attribute: NISCOPE_ATTR_INSTRUMENT_MODEL
interleaving_offset_correction_enabled¶
niscope.Session.
interleaving_offset_correction_enabled
¶Enables the interleaving offset correction on the specified channel. The default value is TRUE. Related topics: Timed Interleaved Sampling
Note
If disabled, warranted specifications are not guaranteed.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Vertical:Advanced:Interleaving Offset Correction Enabled
- C Attribute: NISCOPE_ATTR_INTERLEAVING_OFFSET_CORRECTION_ENABLED
io_resource_descriptor¶
niscope.Session.
io_resource_descriptor
¶Indicates the resource descriptor the driver uses to identify the physical device. If you initialize the driver with a logical name, this property contains the resource descriptor that corresponds to the entry in the IVI Configuration utility. If you initialize the instrument driver with the resource descriptor, this property contains that value.You can pass a logical name to
niscope.Session.Init()
orniscope.Session.__init__()
. The IVI Configuration utility must contain an entry for the logical name. The logical name entry refers to a virtual instrument section in the IVI Configuration file. The virtual instrument section specifies a physical device and initial user options.Note
One or more of the referenced methods are not in the Python API for this driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Advanced Session Information:Resource Descriptor
- C Attribute: NISCOPE_ATTR_IO_RESOURCE_DESCRIPTOR
logical_name¶
niscope.Session.
logical_name
¶A string containing the logical name you specified when opening the current IVI session. You can pass a logical name to
niscope.Session.Init()
orniscope.Session.__init__()
. The IVI Configuration utility must contain an entry for the logical name. The logical name entry refers to a virtual instrument section in the IVI Configuration file. The virtual instrument section specifies a physical device and initial user options.Note
One or more of the referenced methods are not in the Python API for this driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Advanced Session Information:Logical Name
- C Attribute: NISCOPE_ATTR_LOGICAL_NAME
master_enable¶
niscope.Session.
master_enable
¶Specifies whether you want the device to be a master or a slave. The master typically originates the trigger signal and clock sync pulse. For a standalone device, set this property to False.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Synchronization:Master Enable
- C Attribute: NISCOPE_ATTR_MASTER_ENABLE
max_input_frequency¶
niscope.Session.
max_input_frequency
¶Specifies the bandwidth of the channel. Express this value as the frequency at which the input circuitry attenuates the input signal by 3 dB. The units are hertz. Defined Values:
NISCOPE_VAL_BANDWIDTH_FULL
(-1.0)NISCOPE_VAL_BANDWIDTH_DEVICE_DEFAULT
(0.0)NISCOPE_VAL_20MHZ_BANDWIDTH
(20000000.0)NISCOPE_VAL_100MHZ_BANDWIDTH
(100000000.0)NISCOPE_VAL_20MHZ_MAX_INPUT_FREQUENCY
(20000000.0)NISCOPE_VAL_100MHZ_MAX_INPUT_FREQUENCY
(100000000.0)Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the max_input_frequency.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an max_input_frequency.Session instance, and calling set/get value on the result.:
session['0,1'].max_input_frequency = var var = session['0,1'].max_input_frequencyThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Vertical:Maximum Input Frequency
- C Attribute: NISCOPE_ATTR_MAX_INPUT_FREQUENCY
max_real_time_sampling_rate¶
niscope.Session.
max_real_time_sampling_rate
¶Returns the maximum real time sample rate in Hz.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Horizontal:Maximum Real Time Sample Rate
- C Attribute: NISCOPE_ATTR_MAX_REAL_TIME_SAMPLING_RATE
max_ris_rate¶
niscope.Session.
max_ris_rate
¶Returns the maximum sample rate in RIS mode in Hz.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Horizontal:Maximum RIS Rate
- C Attribute: NISCOPE_ATTR_MAX_RIS_RATE
min_sample_rate¶
niscope.Session.
min_sample_rate
¶Specify the sampling rate for the acquisition in Samples per second. Valid Values: The combination of sampling rate and min record length must allow the digitizer to sample at a valid sampling rate for the acquisition type specified in
niscope.Session.ConfigureAcquisition()
and not require more memory than the onboard memory module allows.Note
One or more of the referenced methods are not in the Python API for this driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable Yes Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Horizontal:Min Sample Rate
- C Attribute: NISCOPE_ATTR_MIN_SAMPLE_RATE
onboard_memory_size¶
niscope.Session.
onboard_memory_size
¶Returns the total combined amount of onboard memory for all channels in bytes.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Horizontal:Memory Size
- C Attribute: NISCOPE_ATTR_ONBOARD_MEMORY_SIZE
output_clock_source¶
niscope.Session.
output_clock_source
¶Specifies the output source for the 10 MHz clock to which another digitizer’s sample clock can be phased-locked.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocking:Output Clock Source
- C Attribute: NISCOPE_ATTR_OUTPUT_CLOCK_SOURCE
pll_lock_status¶
niscope.Session.
pll_lock_status
¶If TRUE, the PLL has remained locked to the external reference clock since it was last checked. If FALSE, the PLL has become unlocked from the external reference clock since it was last checked.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocking:PLL Lock Status
- C Attribute: NISCOPE_ATTR_PLL_LOCK_STATUS
points_done¶
niscope.Session.
points_done
¶Actual number of samples acquired in the record specified by
niscope.Session.fetch_record_number
from theniscope.Session.fetch_relative_to
andniscope.Session.fetch_offset
properties.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Fetch:Points Done
- C Attribute: NISCOPE_ATTR_POINTS_DONE
poll_interval¶
niscope.Session.
poll_interval
¶Specifies the poll interval in milliseconds to use during RIS acquisitions to check whether the acquisition is complete.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based 0 Resettable 0 Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- C Attribute: NISCOPE_ATTR_POLL_INTERVAL
probe_attenuation¶
niscope.Session.
probe_attenuation
¶Specifies the probe attenuation for the input channel. For example, for a 10:1 probe, set this property to 10.0. Valid Values: Any positive real number. Typical values are 1, 10, and 100.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the probe_attenuation.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an probe_attenuation.Session instance, and calling set/get value on the result.:
session['0,1'].probe_attenuation = var var = session['0,1'].probe_attenuationThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Vertical:Probe Attenuation
- C Attribute: NISCOPE_ATTR_PROBE_ATTENUATION
ready_for_advance_event_output_terminal¶
niscope.Session.
ready_for_advance_event_output_terminal
¶Specifies the destination for the Ready for Advance Event. When this event is asserted, the digitizer is ready to receive an advance trigger. Consult your device documentation for a specific list of valid destinations.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Synchronization:Ready for Advance:Output Terminal
- C Attribute: NISCOPE_ATTR_READY_FOR_ADVANCE_EVENT_OUTPUT_TERMINAL
ready_for_ref_event_output_terminal¶
niscope.Session.
ready_for_ref_event_output_terminal
¶Specifies the destination for the Ready for Reference Event. When this event is asserted, the digitizer is ready to receive a reference trigger. Consult your device documentation for a specific list of valid destinations.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Synchronization:Ready for Reference:Output Terminal
- C Attribute: NISCOPE_ATTR_READY_FOR_REF_EVENT_OUTPUT_TERMINAL
ready_for_start_event_output_terminal¶
niscope.Session.
ready_for_start_event_output_terminal
¶Specifies the destination for the Ready for Start Event. When this event is asserted, the digitizer is ready to receive a start trigger. Consult your device documentation for a specific list of valid destinations.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Synchronization:Ready for Start:Output Terminal
- C Attribute: NISCOPE_ATTR_READY_FOR_START_EVENT_OUTPUT_TERMINAL
records_done¶
niscope.Session.
records_done
¶Specifies the number of records that have been completely acquired.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Fetch:Records Done
- C Attribute: NISCOPE_ATTR_RECORDS_DONE
record_arm_source¶
niscope.Session.
record_arm_source
¶Specifies the record arm source.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Synchronization:Record Arm Source
- C Attribute: NISCOPE_ATTR_RECORD_ARM_SOURCE
ref_clk_rate¶
niscope.Session.
ref_clk_rate
¶If
niscope.Session.input_clock_source
is an external source, this property specifies the frequency of the input, or reference clock, to which the internal sample clock timebase is synchronized. The frequency is in hertz.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocking:Reference Clock Rate
- C Attribute: NISCOPE_ATTR_REF_CLK_RATE
ref_trigger_detector_location¶
niscope.Session.
ref_trigger_detector_location
¶Indicates which analog compare circuitry to use on the device.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.RefTriggerDetectorLocation Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Onboard Signal Processing:Ref Trigger Detection Location
- C Attribute: NISCOPE_ATTR_REF_TRIGGER_DETECTOR_LOCATION
ref_trigger_minimum_quiet_time¶
niscope.Session.
ref_trigger_minimum_quiet_time
¶The amount of time the trigger circuit must not detect a signal above the trigger level before the trigger is armed. This property is useful for triggering at the beginning and not in the middle of signal bursts.
The following table lists the characteristics of this property.
Characteristic Value Datatype float in seconds or datetime.timedelta Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Onboard Signal Processing:Ref Trigger Min Quiet Time
- C Attribute: NISCOPE_ATTR_REF_TRIGGER_MINIMUM_QUIET_TIME
ref_trig_tdc_enable¶
niscope.Session.
ref_trig_tdc_enable
¶This property controls whether the TDC is used to compute an accurate trigger.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Horizontal:Advanced:Enable TDC
- C Attribute: NISCOPE_ATTR_REF_TRIG_TDC_ENABLE
resolution¶
niscope.Session.
resolution
¶Indicates the bit width of valid data (as opposed to padding bits) in the acquired waveform. Compare to
niscope.Session.binary_sample_width
.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Acquisition:Resolution
- C Attribute: NISCOPE_ATTR_RESOLUTION
ris_in_auto_setup_enable¶
niscope.Session.
ris_in_auto_setup_enable
¶Indicates whether the digitizer should use RIS sample rates when searching for a frequency in autosetup. Valid Values: True (1) - Use RIS sample rates in autosetup False (0) - Do not use RIS sample rates in autosetup
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Acquisition:Advanced:Enable RIS in Auto Setup
- C Attribute: NISCOPE_ATTR_RIS_IN_AUTO_SETUP_ENABLE
ris_method¶
niscope.Session.
ris_method
¶Specifies the algorithm for random-interleaved sampling, which is used if the sample rate exceeds the value of
niscope.Session.max_real_time_sampling_rate
.The following table lists the characteristics of this property.
Characteristic Value Datatype enums.RISMethod Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Horizontal:RIS Method
- C Attribute: NISCOPE_ATTR_RIS_METHOD
ris_num_averages¶
niscope.Session.
ris_num_averages
¶The number of averages for each bin in an RIS acquisition. The number of averages times the oversampling factor is the minimum number of real-time acquisitions necessary to reconstruct the RIS waveform. Averaging is useful in RIS because the trigger times are not evenly spaced, so adjacent points in the reconstructed waveform not be accurately spaced. By averaging, the errors in both time and voltage are smoothed.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Horizontal:RIS Num Avg
- C Attribute: NISCOPE_ATTR_RIS_NUM_AVERAGES
sample_clock_timebase_multiplier¶
niscope.Session.
sample_clock_timebase_multiplier
¶If Sample Clock Timebase Source <p:py:meth:`niscope.Session.SampleClockTimebaseSource.html>`__ is an external source, this property specifies the ratio between the Sample Clock Timebase Rate <p:py:meth:`niscope.Session.SampleClockTimebaseRate.html>`__ and the actual sample rate, which can be higher. This property can be used in conjunction with the Sample Clock Timebase Divisor Property. Some devices use multiple ADCs to sample the same channel at an effective sample rate that is greater than the specified clock rate. When providing an external sample clock use this property to indicate when you want a higher sample rate. Valid values for this property vary by device and current configuration. Related topics: Sample Clock
Note
One or more of the referenced methods are not in the Python API for this driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocking:Sample Clock Timebase Multiplier
- C Attribute: NISCOPE_ATTR_SAMPLE_CLOCK_TIMEBASE_MULTIPLIER
sample_mode¶
niscope.Session.
sample_mode
¶Indicates the sample mode the digitizer is currently using.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Acquisition:Sample Mode
- C Attribute: NISCOPE_ATTR_SAMPLE_MODE
samp_clk_timebase_div¶
niscope.Session.
samp_clk_timebase_div
¶If
niscope.Session.samp_clk_timebase_src
is an external source, specifies the ratio between the sample clock timebase rate and the actual sample rate, which can be slower.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocking:Sample Clock Timebase Divisor
- C Attribute: NISCOPE_ATTR_SAMP_CLK_TIMEBASE_DIV
samp_clk_timebase_rate¶
niscope.Session.
samp_clk_timebase_rate
¶If
niscope.Session.samp_clk_timebase_src
is an external source, specifies the frequency in hertz of the external clock used as the timebase source.The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocking:Sample Clock Timebase Rate
- C Attribute: NISCOPE_ATTR_SAMP_CLK_TIMEBASE_RATE
samp_clk_timebase_src¶
niscope.Session.
samp_clk_timebase_src
¶Specifies the source of the sample clock timebase, which is the timebase used to control waveform sampling. The actual sample rate may be the timebase itself or a divided version of the timebase, depending on the
niscope.Session.min_sample_rate
(for internal sources) or theniscope.Session.samp_clk_timebase_div
(for external sources).The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Clocking:Sample Clock Timebase Source
- C Attribute: NISCOPE_ATTR_SAMP_CLK_TIMEBASE_SRC
serial_number¶
niscope.Session.
serial_number
¶Returns the serial number of the device.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Device:Serial Number
- C Attribute: NISCOPE_ATTR_SERIAL_NUMBER
simulate¶
niscope.Session.
simulate
¶Specifies whether or not to simulate instrument driver I/O operations. If simulation is enabled, instrument driver methods perform range checking and call Ivi_GetAttribute and Ivi_SetAttribute methods, but they do not perform instrument I/O. For output parameters that represent instrument data, the instrument driver methods return calculated values. The default value is False. Use the
niscope.Session.__init__()
method to override this value.The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:User Options:Simulate
- C Attribute: NISCOPE_ATTR_SIMULATE
specific_driver_description¶
niscope.Session.
specific_driver_description
¶A string that contains a brief description of the specific driver
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Driver Identification:Description
- C Attribute: NISCOPE_ATTR_SPECIFIC_DRIVER_DESCRIPTION
specific_driver_revision¶
niscope.Session.
specific_driver_revision
¶A string that contains additional version information about this instrument driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Driver Identification:Revision
- C Attribute: NISCOPE_ATTR_SPECIFIC_DRIVER_REVISION
specific_driver_vendor¶
niscope.Session.
specific_driver_vendor
¶A string that contains the name of the vendor that supplies this driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Driver Identification:Driver Vendor
- C Attribute: NISCOPE_ATTR_SPECIFIC_DRIVER_VENDOR
start_to_ref_trigger_holdoff¶
niscope.Session.
start_to_ref_trigger_holdoff
¶Pass the length of time you want the digitizer to wait after it starts acquiring data until the digitizer enables the trigger system to detect a reference (stop) trigger. Units: Seconds Valid Values: 0.0 - 171.8
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the start_to_ref_trigger_holdoff.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an start_to_ref_trigger_holdoff.Session instance, and calling set/get value on the result.:
session['0,1'].start_to_ref_trigger_holdoff = var var = session['0,1'].start_to_ref_trigger_holdoffThe following table lists the characteristics of this property.
Characteristic Value Datatype float in seconds or datetime.timedelta Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Start To Ref Trigger Holdoff
- C Attribute: NISCOPE_ATTR_START_TO_REF_TRIGGER_HOLDOFF
supported_instrument_models¶
niscope.Session.
supported_instrument_models
¶A string that contains a comma-separated list of the instrument model numbers supported by this driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Driver Capabilities:Supported Instrument Models
- C Attribute: NISCOPE_ATTR_SUPPORTED_INSTRUMENT_MODELS
trigger_auto_triggered¶
niscope.Session.
trigger_auto_triggered
¶Specifies if the last acquisition was auto triggered. You can use the Auto Triggered property to find out if the last acquisition was triggered.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Auto Triggered
- C Attribute: NISCOPE_ATTR_TRIGGER_AUTO_TRIGGERED
trigger_coupling¶
niscope.Session.
trigger_coupling
¶Specifies how the digitizer couples the trigger source. This property affects instrument operation only when
niscope.Session.trigger_type
is set toEDGE
,HYSTERESIS
, orWINDOW
.The following table lists the characteristics of this property.
Characteristic Value Datatype enums.TriggerCoupling Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Trigger Coupling
- C Attribute: NISCOPE_ATTR_TRIGGER_COUPLING
trigger_delay_time¶
niscope.Session.
trigger_delay_time
¶Specifies the trigger delay time in seconds. The trigger delay time is the length of time the digitizer waits after it receives the trigger. The event that occurs when the trigger delay elapses is the Reference Event. Valid Values: 0.0 - 171.8
The following table lists the characteristics of this property.
Characteristic Value Datatype float in seconds or datetime.timedelta Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Trigger Delay
- C Attribute: NISCOPE_ATTR_TRIGGER_DELAY_TIME
trigger_holdoff¶
niscope.Session.
trigger_holdoff
¶Specifies the length of time (in seconds) the digitizer waits after detecting a trigger before enabling the trigger subsystem to detect another trigger. This property affects instrument operation only when the digitizer requires multiple acquisitions to build a complete waveform. The digitizer requires multiple waveform acquisitions when it uses equivalent-time sampling or when the digitizer is configured for a multi-record acquisition through a call to
niscope.Session.configure_horizontal_timing()
. Valid Values: 0.0 - 171.8The following table lists the characteristics of this property.
Characteristic Value Datatype float in seconds or datetime.timedelta Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Trigger Holdoff
- C Attribute: NISCOPE_ATTR_TRIGGER_HOLDOFF
trigger_hysteresis¶
niscope.Session.
trigger_hysteresis
¶Specifies the size of the hysteresis window on either side of the trigger level. The digitizer triggers when the trigger signal passes through the threshold you specify with the Trigger Level parameter, has the slope you specify with the Trigger Slope parameter, and passes through the hysteresis window that you specify with this parameter.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Trigger Hysteresis
- C Attribute: NISCOPE_ATTR_TRIGGER_HYSTERESIS
trigger_impedance¶
niscope.Session.
trigger_impedance
¶Specifies the input impedance for the external analog trigger channel in Ohms. Valid Values: 50 - 50 ohms 1000000 - 1 mega ohm
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Trigger Impedance
- C Attribute: NISCOPE_ATTR_TRIGGER_IMPEDANCE
trigger_level¶
niscope.Session.
trigger_level
¶Specifies the voltage threshold for the trigger subsystem. The units are volts. This property affects instrument behavior only when the
niscope.Session.trigger_type
is set toEDGE
,HYSTERESIS
, orWINDOW
. Valid Values: The values of the range and offset parameters inniscope.Session.configure_vertical()
determine the valid range for the trigger level on the channel you use as the Trigger Source. The value you pass for this parameter must meet the following conditions:The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Trigger Level
- C Attribute: NISCOPE_ATTR_TRIGGER_LEVEL
trigger_modifier¶
niscope.Session.
trigger_modifier
¶Configures the device to automatically complete an acquisition if a trigger has not been received. Valid Values: None (1) - Normal triggering Auto Trigger (2) - Auto trigger acquisition if no trigger arrives
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.TriggerModifier Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Trigger Modifier
- C Attribute: NISCOPE_ATTR_TRIGGER_MODIFIER
trigger_slope¶
niscope.Session.
trigger_slope
¶Specifies if a rising or a falling edge triggers the digitizer. This property affects instrument operation only when
niscope.Session.trigger_type
is set toEDGE
,HYSTERESIS
, orWINDOW
.The following table lists the characteristics of this property.
Characteristic Value Datatype enums.TriggerSlope Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Trigger Slope
- C Attribute: NISCOPE_ATTR_TRIGGER_SLOPE
trigger_source¶
niscope.Session.
trigger_source
¶Specifies the source the digitizer monitors for the trigger event.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Trigger Source
- C Attribute: NISCOPE_ATTR_TRIGGER_SOURCE
trigger_type¶
niscope.Session.
trigger_type
¶Specifies the type of trigger to use.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.TriggerType Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Trigger Type
- C Attribute: NISCOPE_ATTR_TRIGGER_TYPE
trigger_window_high_level¶
niscope.Session.
trigger_window_high_level
¶Pass the upper voltage threshold you want the digitizer to use for window triggering. The digitizer triggers when the trigger signal enters or leaves the window you specify with
niscope.Session.trigger_window_low_level
andniscope.Session.trigger_window_high_level
Valid Values: The values of the Vertical Range and Vertical Offset parameters inniscope.Session.configure_vertical()
determine the valid range for the High Window Level on the channel you use as the Trigger Source parameter inniscope.Session.ConfigureTriggerSource()
. The value you pass for this parameter must meet the following conditions. High Trigger Level <= Vertical Range/2 + Vertical Offset High Trigger Level >= (-Vertical Range/2) + Vertical Offset High Trigger Level > Low Trigger LevelNote
One or more of the referenced methods are not in the Python API for this driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Trigger Window:High Level
- C Attribute: NISCOPE_ATTR_TRIGGER_WINDOW_HIGH_LEVEL
trigger_window_low_level¶
niscope.Session.
trigger_window_low_level
¶Pass the lower voltage threshold you want the digitizer to use for window triggering. The digitizer triggers when the trigger signal enters or leaves the window you specify with
niscope.Session.trigger_window_low_level
andniscope.Session.trigger_window_high_level
. Units: Volts Valid Values: The values of the Vertical Range and Vertical Offset parameters inniscope.Session.configure_vertical()
determine the valid range for the Low Window Level on the channel you use as the Trigger Source parameter inniscope.Session.ConfigureTriggerSource()
. The value you pass for this parameter must meet the following conditions. Low Trigger Level <= Vertical Range/2 + Vertical Offset Low Trigger Level >= (-Vertical Range/2) + Vertical Offset Low Trigger Level < High Trigger LevelNote
One or more of the referenced methods are not in the Python API for this driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Trigger Window:Low Level
- C Attribute: NISCOPE_ATTR_TRIGGER_WINDOW_LOW_LEVEL
trigger_window_mode¶
niscope.Session.
trigger_window_mode
¶Specifies whether you want a trigger to occur when the signal enters or leaves the window specified by
niscope.Session.trigger_window_low_level
, orniscope.Session.trigger_window_high_level
.The following table lists the characteristics of this property.
Characteristic Value Datatype enums.TriggerWindowMode Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Trigger Window:Window Mode
- C Attribute: NISCOPE_ATTR_TRIGGER_WINDOW_MODE
tv_trigger_event¶
niscope.Session.
tv_trigger_event
¶Specifies the condition in the video signal that causes the digitizer to trigger.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.VideoTriggerEvent Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Trigger Video:Event
- C Attribute: NISCOPE_ATTR_TV_TRIGGER_EVENT
tv_trigger_line_number¶
niscope.Session.
tv_trigger_line_number
¶Specifies the line on which to trigger, if
niscope.Session.tv_trigger_event
is set to line number. The valid ranges of the property depend on the signal format selected. M-NTSC has a valid range of 1 to 525. B/G-PAL, SECAM, 576i, and 576p have a valid range of 1 to 625. 720p has a valid range of 1 to 750. 1080i and 1080p have a valid range of 1125.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Trigger Video:Line Number
- C Attribute: NISCOPE_ATTR_TV_TRIGGER_LINE_NUMBER
tv_trigger_polarity¶
niscope.Session.
tv_trigger_polarity
¶Specifies whether the video signal sync is positive or negative.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.VideoPolarity Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Trigger Video:Polarity
- C Attribute: NISCOPE_ATTR_TV_TRIGGER_POLARITY
tv_trigger_signal_format¶
niscope.Session.
tv_trigger_signal_format
¶Specifies the type of video signal, such as NTSC, PAL, or SECAM.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the tv_trigger_signal_format.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an tv_trigger_signal_format.Session instance, and calling set/get value on the result.:
session['0,1'].tv_trigger_signal_format = var var = session['0,1'].tv_trigger_signal_formatThe following table lists the characteristics of this property.
Characteristic Value Datatype enums.VideoSignalFormat Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Triggering:Trigger Video:Signal Format
- C Attribute: NISCOPE_ATTR_TV_TRIGGER_SIGNAL_FORMAT
vertical_coupling¶
niscope.Session.
vertical_coupling
¶Specifies how the digitizer couples the input signal for the channel. When input coupling changes, the input stage takes a finite amount of time to settle.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the vertical_coupling.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an vertical_coupling.Session instance, and calling set/get value on the result.:
session['0,1'].vertical_coupling = var var = session['0,1'].vertical_couplingThe following table lists the characteristics of this property.
Characteristic Value Datatype enums.VerticalCoupling Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Vertical:Vertical Coupling
- C Attribute: NISCOPE_ATTR_VERTICAL_COUPLING
vertical_offset¶
niscope.Session.
vertical_offset
¶Specifies the location of the center of the range. The value is with respect to ground and is in volts. For example, to acquire a sine wave that spans between 0.0 and 10.0 V, set this property to 5.0 V.
Note
This property is not supported by all digitizers.Refer to the NI High-Speed Digitizers Help for a list of vertical offsets supported for each device.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the vertical_offset.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an vertical_offset.Session instance, and calling set/get value on the result.:
session['0,1'].vertical_offset = var var = session['0,1'].vertical_offsetThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Vertical:Vertical Offset
- C Attribute: NISCOPE_ATTR_VERTICAL_OFFSET
vertical_range¶
niscope.Session.
vertical_range
¶Specifies the absolute value of the input range for a channel in volts. For example, to acquire a sine wave that spans between -5 and +5 V, set this property to 10.0 V. Refer to the NI High-Speed Digitizers Help for a list of supported vertical ranges for each device. If the specified range is not supported by a device, the value is coerced up to the next valid range.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the vertical_range.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an vertical_range.Session instance, and calling set/get value on the result.:
session['0,1'].vertical_range = var var = session['0,1'].vertical_rangeThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Vertical:Vertical Range
- C Attribute: NISCOPE_ATTR_VERTICAL_RANGE
Methods¶
abort¶
niscope.Session.
abort
()¶Aborts an acquisition and returns the digitizer to the Idle state. Call this method if the digitizer times out waiting for a trigger.
acquisition_status¶
niscope.Session.
acquisition_status
()¶Returns status information about the acquisition to the status output parameter.
Return type: niscope.AcquisitionStatus
Returns: Returns whether the acquisition is complete, in progress, or unknown. Defined Values
auto_setup¶
niscope.Session.
auto_setup
()¶Automatically configures the instrument. When you call this method, the digitizer senses the input signal and automatically configures many of the instrument settings. If a signal is detected on a channel, the driver chooses the smallest available vertical range that is larger than the signal range. For example, if the signal is a 1.2 Vpk-pk sine wave, and the device supports 1 V and 2 V vertical ranges, the driver will choose the 2 V vertical range for that channel.
If no signal is found on any analog input channel, a warning is returned, and all channels are enabled. A channel is considered to have a signal present if the signal is at least 10% of the smallest vertical range available for that channel.
The following settings are changed:
General Acquisition mode Normal Reference clock Internal Vertical Vertical coupling AC (DC for NI 5621) Vertical bandwidth Full Vertical range Changed by auto setup Vertical offset 0 V Probe attenuation Unchanged by auto setup Input impedance Unchanged by auto setup Horizontal Sample rate Changed by auto setup Min record length Changed by auto setup Enforce realtime True Number of Records Changed to 1 Triggering Trigger type Edge if signal present, otherwise immediate Trigger channel Lowest numbered channel with a signal present Trigger slope Positive Trigger coupling DC Reference position 50% Trigger level 50% of signal on trigger channel Trigger delay 0 Trigger holdoff 0 Trigger output None
commit¶
niscope.Session.
commit
()¶Commits to hardware all the parameter settings associated with the task. Use this method if you want a parameter change to be immediately reflected in the hardware. This method is not supported for Traditional NI-DAQ (Legacy) devices.
configure_chan_characteristics¶
niscope.Session.
configure_chan_characteristics
(input_impedance, max_input_frequency)¶Configures the properties that control the electrical characteristics of the channel—the input impedance and the bandwidth.
Tip
This method requires repeated capabilities (usually channels). If called directly on the niscope.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an niscope.Session instance, and calling this method on the result.:
session.channels['0,1'].configure_chan_characteristics(input_impedance, max_input_frequency)
Parameters:
- input_impedance (float) – The input impedance for the channel; NI-SCOPE sets
niscope.Session.input_impedance
to this value.- max_input_frequency (float) – The bandwidth for the channel; NI-SCOPE sets
niscope.Session.max_input_frequency
to this value. Pass 0 for this value to use the hardware default bandwidth. Pass –1 for this value to achieve full bandwidth.
configure_equalization_filter_coefficients¶
niscope.Session.
configure_equalization_filter_coefficients
(coefficients)¶Configures the custom coefficients for the equalization FIR filter on the device. This filter is designed to compensate the input signal for artifacts introduced to the signal outside of the digitizer. Because this filter is a generic FIR filter, any coefficients are valid. Coefficient values should be between +1 and –1.
Tip
This method requires repeated capabilities (usually channels). If called directly on the niscope.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an niscope.Session instance, and calling this method on the result.:
session.channels['0,1'].configure_equalization_filter_coefficients(coefficients)
Parameters: coefficients (list of float) – The custom coefficients for the equalization FIR filter on the device. These coefficients should be between +1 and –1. You can obtain the number of coefficients from the :py:data:`niscope.Session.equalization_num_coefficients <cvi:py:data:niscope.Session.equalization_num_coefficients.html>`__ property. The :py:data:`niscope.Session.equalization_filter_enabled <cvi:py:data:niscope.Session.equalization_filter_enabled.html>`__ property must be set to TRUE to enable the filter.
configure_horizontal_timing¶
niscope.Session.
configure_horizontal_timing
(min_sample_rate, min_num_pts, ref_position, num_records, enforce_realtime)¶Configures the common properties of the horizontal subsystem for a multirecord acquisition in terms of minimum sample rate.
Parameters:
- min_sample_rate (float) – The sampling rate for the acquisition. Refer to
niscope.Session.min_sample_rate
for more information.- min_num_pts (int) –
The minimum number of points you need in the record for each channel; call
niscope.Session.ActualRecordLength()
to obtain the actual record length used.Valid Values: Greater than 1; limited by available memory
Note
One or more of the referenced methods are not in the Python API for this driver.
- ref_position (float) – The position of the Reference Event in the waveform record specified as a percentage.
- num_records (int) – The number of records to acquire
- enforce_realtime (bool) –
Indicates whether the digitizer enforces real-time measurements or allows equivalent-time (RIS) measurements; not all digitizers support RIS—refer to Features Supported by Device for more information.
Default value: True
Defined Values
True—Allow real-time acquisitions only
False—Allow real-time and equivalent-time acquisitions
configure_trigger_digital¶
niscope.Session.
configure_trigger_digital
(trigger_source, slope=niscope.TriggerSlope.POSITIVE, holdoff=datetime.timedelta(seconds=0.0), delay=datetime.timedelta(seconds=0.0))¶Configures the common properties of a digital trigger.
When you initiate an acquisition, the digitizer waits for the start trigger, which is configured through the
niscope.Session.acq_arm_source
(Start Trigger Source) property. The default is immediate. Upon receiving the start trigger the digitizer begins sampling pretrigger points. After the digitizer finishes sampling pretrigger points, the digitizer waits for a reference (stop) trigger that you specify with a method such as this one. Upon receiving the reference trigger the digitizer finishes the acquisition after completing posttrigger sampling. With each Configure Trigger method, you specify configuration parameters such as the trigger source and the amount of trigger delay.Note
For multirecord acquisitions, all records after the first record are started by using the Advance Trigger Source. The default is immediate.
You can adjust the amount of pre-trigger and post-trigger samples using the reference position parameter on the
niscope.Session.configure_horizontal_timing()
method. The default is half of the record length.Some features are not supported by all digitizers. Refer to Features Supported by Device for more information.
Digital triggering is not supported in RIS mode.
Parameters:
- trigger_source (str) – Specifies the trigger source. Refer to
niscope.Session.trigger_source
for defined values.- slope (
niscope.TriggerSlope
) – Specifies whether you want a rising edge or a falling edge to trigger the digitizer. Refer toniscope.Session.trigger_slope
for more information.- holdoff (float in seconds or datetime.timedelta) – The length of time the digitizer waits after detecting a trigger before enabling NI-SCOPE to detect another trigger. Refer to
niscope.Session.trigger_holdoff
for more information.- delay (float in seconds or datetime.timedelta) – How long the digitizer waits after receiving the trigger to start acquiring data. Refer to
niscope.Session.trigger_delay_time
for more information.
configure_trigger_edge¶
niscope.Session.
configure_trigger_edge
(trigger_source, trigger_coupling, level=0.0, slope=niscope.TriggerSlope.POSITIVE, holdoff=datetime.timedelta(seconds=0.0), delay=datetime.timedelta(seconds=0.0))¶Configures common properties for analog edge triggering.
When you initiate an acquisition, the digitizer waits for the start trigger, which is configured through the
niscope.Session.acq_arm_source
(Start Trigger Source) property. The default is immediate. Upon receiving the start trigger the digitizer begins sampling pretrigger points. After the digitizer finishes sampling pretrigger points, the digitizer waits for a reference (stop) trigger that you specify with a method such as this one. Upon receiving the reference trigger the digitizer finishes the acquisition after completing posttrigger sampling. With each Configure Trigger method, you specify configuration parameters such as the trigger source and the amount of trigger delay.Note
Some features are not supported by all digitizers. Refer to Features Supported by Device for more information.
Parameters:
- trigger_source (str) – Specifies the trigger source. Refer to
niscope.Session.trigger_source
for defined values.- trigger_coupling (
niscope.TriggerCoupling
) – Applies coupling and filtering options to the trigger signal. Refer toniscope.Session.trigger_coupling
for more information.- level (float) – The voltage threshold for the trigger. Refer to
niscope.Session.trigger_level
for more information.- slope (
niscope.TriggerSlope
) – Specifies whether you want a rising edge or a falling edge to trigger the digitizer. Refer toniscope.Session.trigger_slope
for more information.- holdoff (float in seconds or datetime.timedelta) – The length of time the digitizer waits after detecting a trigger before enabling NI-SCOPE to detect another trigger. Refer to
niscope.Session.trigger_holdoff
for more information.- delay (float in seconds or datetime.timedelta) – How long the digitizer waits after receiving the trigger to start acquiring data. Refer to
niscope.Session.trigger_delay_time
for more information.
configure_trigger_hysteresis¶
niscope.Session.
configure_trigger_hysteresis
(trigger_source, trigger_coupling, level=0.0, hysteresis=0.05, slope=niscope.TriggerSlope.POSITIVE, holdoff=datetime.timedelta(seconds=0.0), delay=datetime.timedelta(seconds=0.0))¶Configures common properties for analog hysteresis triggering. This kind of trigger specifies an additional value, specified in the hysteresis parameter, that a signal must pass through before a trigger can occur. This additional value acts as a kind of buffer zone that keeps noise from triggering an acquisition.
When you initiate an acquisition, the digitizer waits for the start trigger, which is configured through the
niscope.Session.acq_arm_source
. The default is immediate. Upon receiving the start trigger the digitizer begins sampling pretrigger points. After the digitizer finishes sampling pretrigger points, the digitizer waits for a reference (stop) trigger that you specify with a method such as this one. Upon receiving the reference trigger the digitizer finishes the acquisition after completing posttrigger sampling. With each Configure Trigger method, you specify configuration parameters such as the trigger source and the amount of trigger delay.Note
Some features are not supported by all digitizers. Refer to Features Supported by Device for more information.
Parameters:
- trigger_source (str) – Specifies the trigger source. Refer to
niscope.Session.trigger_source
for defined values.- trigger_coupling (
niscope.TriggerCoupling
) – Applies coupling and filtering options to the trigger signal. Refer toniscope.Session.trigger_coupling
for more information.- level (float) – The voltage threshold for the trigger. Refer to
niscope.Session.trigger_level
for more information.- hysteresis (float) – The size of the hysteresis window on either side of the level in volts; the digitizer triggers when the trigger signal passes through the hysteresis value you specify with this parameter, has the slope you specify with slope, and passes through the level. Refer to
niscope.Session.trigger_hysteresis
for defined values.- slope (
niscope.TriggerSlope
) – Specifies whether you want a rising edge or a falling edge to trigger the digitizer. Refer toniscope.Session.trigger_slope
for more information.- holdoff (float in seconds or datetime.timedelta) – The length of time the digitizer waits after detecting a trigger before enabling NI-SCOPE to detect another trigger. Refer to
niscope.Session.trigger_holdoff
for more information.- delay (float in seconds or datetime.timedelta) – How long the digitizer waits after receiving the trigger to start acquiring data. Refer to
niscope.Session.trigger_delay_time
for more information.
configure_trigger_immediate¶
niscope.Session.
configure_trigger_immediate
()¶Configures common properties for immediate triggering. Immediate triggering means the digitizer triggers itself.
When you initiate an acquisition, the digitizer waits for a trigger. You specify the type of trigger that the digitizer waits for with a Configure Trigger method, such as
niscope.Session.configure_trigger_immediate()
.
configure_trigger_software¶
niscope.Session.
configure_trigger_software
(holdoff=datetime.timedelta(seconds=0.0), delay=datetime.timedelta(seconds=0.0))¶Configures common properties for software triggering.
When you initiate an acquisition, the digitizer waits for the start trigger, which is configured through the
niscope.Session.acq_arm_source
(Start Trigger Source) property. The default is immediate. Upon receiving the start trigger the digitizer begins sampling pretrigger points. After the digitizer finishes sampling pretrigger points, the digitizer waits for a reference (stop) trigger that you specify with a method such as this one. Upon receiving the reference trigger the digitizer finishes the acquisition after completing posttrigger sampling. With each Configure Trigger method, you specify configuration parameters such as the trigger source and the amount of trigger delay.To trigger the acquisition, use
niscope.Session.send_software_trigger_edge()
.Note
Some features are not supported by all digitizers. Refer to Features Supported by Device for more information.
Parameters:
- holdoff (float in seconds or datetime.timedelta) – The length of time the digitizer waits after detecting a trigger before enabling NI-SCOPE to detect another trigger. Refer to
niscope.Session.trigger_holdoff
for more information.- delay (float in seconds or datetime.timedelta) – How long the digitizer waits after receiving the trigger to start acquiring data. Refer to
niscope.Session.trigger_delay_time
for more information.
configure_trigger_video¶
niscope.Session.
configure_trigger_video
(trigger_source, signal_format, event, polarity, trigger_coupling, enable_dc_restore=False, line_number=1, holdoff=datetime.timedelta(seconds=0.0), delay=datetime.timedelta(seconds=0.0))¶Configures the common properties for video triggering, including the signal format, TV event, line number, polarity, and enable DC restore. A video trigger occurs when the digitizer finds a valid video signal sync.
When you initiate an acquisition, the digitizer waits for the start trigger, which is configured through the
niscope.Session.acq_arm_source
(Start Trigger Source) property. The default is immediate. Upon receiving the start trigger the digitizer begins sampling pretrigger points. After the digitizer finishes sampling pretrigger points, the digitizer waits for a reference (stop) trigger that you specify with a method such as this one. Upon receiving the reference trigger the digitizer finishes the acquisition after completing posttrigger sampling. With each Configure Trigger method, you specify configuration parameters such as the trigger source and the amount of trigger delay.Note
Some features are not supported by all digitizers. Refer to Features Supported by Device for more information.
Parameters:
- trigger_source (str) – Specifies the trigger source. Refer to
niscope.Session.trigger_source
for defined values.- signal_format (
niscope.VideoSignalFormat
) – Specifies the type of video signal sync the digitizer should look for. Refer toniscope.Session.tv_trigger_signal_format
for more information.- event (
niscope.VideoTriggerEvent
) – Specifies the TV event you want to trigger on. You can trigger on a specific or on the next coming line or field of the signal.- polarity (
niscope.VideoPolarity
) – Specifies the polarity of the video signal sync.- trigger_coupling (
niscope.TriggerCoupling
) – Applies coupling and filtering options to the trigger signal. Refer toniscope.Session.trigger_coupling
for more information.- enable_dc_restore (bool) – Offsets each video line so the clamping level (the portion of the video line between the end of the color burst and the beginning of the active image) is moved to zero volt. Refer to
niscope.Session.enable_dc_restore
for defined values.- line_number (int) –
Selects the line number to trigger on. The line number range covers an entire frame and is referenced as shown on Vertical Blanking and Synchronization Signal. Refer to
niscope.Session.tv_trigger_line_number
for more information.Default value: 1
- holdoff (float in seconds or datetime.timedelta) – The length of time the digitizer waits after detecting a trigger before enabling NI-SCOPE to detect another trigger. Refer to
niscope.Session.trigger_holdoff
for more information.- delay (float in seconds or datetime.timedelta) – How long the digitizer waits after receiving the trigger to start acquiring data. Refer to
niscope.Session.trigger_delay_time
for more information.
configure_trigger_window¶
niscope.Session.
configure_trigger_window
(trigger_source, low_level, high_level, window_mode, trigger_coupling, holdoff=datetime.timedelta(seconds=0.0), delay=datetime.timedelta(seconds=0.0))¶Configures common properties for analog window triggering. A window trigger occurs when a signal enters or leaves a window you specify with the high level or low level parameters.
When you initiate an acquisition, the digitizer waits for the start trigger, which is configured through the
niscope.Session.acq_arm_source
(Start Trigger Source) property. The default is immediate. Upon receiving the start trigger the digitizer begins sampling pretrigger points. After the digitizer finishes sampling pretrigger points, the digitizer waits for a reference (stop) trigger that you specify with a method such as this one. Upon receiving the reference trigger the digitizer finishes the acquisition after completing posttrigger sampling. With each Configure Trigger method, you specify configuration parameters such as the trigger source and the amount of trigger delay.To trigger the acquisition, use
niscope.Session.send_software_trigger_edge()
.Note
Some features are not supported by all digitizers. Refer to Features Supported by Device for more information.
Parameters:
- trigger_source (str) – Specifies the trigger source. Refer to
niscope.Session.trigger_source
for defined values.- low_level (float) – Passes the voltage threshold you want the digitizer to use for low triggering.
- high_level (float) – Passes the voltage threshold you want the digitizer to use for high triggering.
- window_mode (
niscope.TriggerWindowMode
) – Specifies whether you want the trigger to occur when the signal enters or leaves a window.- trigger_coupling (
niscope.TriggerCoupling
) – Applies coupling and filtering options to the trigger signal. Refer toniscope.Session.trigger_coupling
for more information.- holdoff (float in seconds or datetime.timedelta) – The length of time the digitizer waits after detecting a trigger before enabling NI-SCOPE to detect another trigger. Refer to
niscope.Session.trigger_holdoff
for more information.- delay (float in seconds or datetime.timedelta) – How long the digitizer waits after receiving the trigger to start acquiring data. Refer to
niscope.Session.trigger_delay_time
for more information.
configure_vertical¶
niscope.Session.
configure_vertical
(range, coupling, offset=0.0, probe_attenuation=1.0, enabled=True)¶Configures the most commonly configured properties of the digitizer vertical subsystem, such as the range, offset, coupling, probe attenuation, and the channel.
Tip
This method requires repeated capabilities (usually channels). If called directly on the niscope.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an niscope.Session instance, and calling this method on the result.:
session.channels['0,1'].configure_vertical(range, coupling, offset=0.0, probe_attenuation=1.0, enabled=True)
Parameters:
- range (float) – Specifies the vertical range Refer to
niscope.Session.vertical_range
for more information.- coupling (
niscope.VerticalCoupling
) – Specifies how to couple the input signal. Refer toniscope.Session.vertical_coupling
for more information.- offset (float) – Specifies the vertical offset. Refer to
niscope.Session.vertical_offset
for more information.- probe_attenuation (float) – Specifies the probe attenuation. Refer to
niscope.Session.probe_attenuation
for valid values.- enabled (bool) – Specifies whether the channel is enabled for acquisition. Refer to
niscope.Session.channel_enabled
for more information.
disable¶
niscope.Session.
disable
()¶Aborts any current operation, opens data channel relays, and releases RTSI and PFI lines.
fetch¶
niscope.Session.
fetch
(num_samples=None, relative_to=niscope.FetchRelativeTo.PRETRIGGER, offset=0, record_number=0, num_records=None, timeout=datetime.timedelta(seconds=5.0))¶Returns the waveform from a previously initiated acquisition that the digitizer acquires for the specified channel. This method returns scaled voltage waveforms.
This method may return multiple waveforms depending on the number of channels, the acquisition type, and the number of records you specify.
Note
Some functionality, such as time stamping, is not supported in all digitizers.
Tip
This method requires repeated capabilities (usually channels). If called directly on the niscope.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an niscope.Session instance, and calling this method on the result.:
session.channels['0,1'].fetch(num_samples=None, relative_to=niscope.FetchRelativeTo.PRETRIGGER, offset=0, record_number=0, num_records=None, timeout=datetime.timedelta(seconds=5.0))
Parameters:
- num_samples (int) – The maximum number of samples to fetch for each waveform. If the acquisition finishes with fewer points than requested, some devices return partial data if the acquisition finished, was aborted, or a timeout of 0 was used. If it fails to complete within the timeout period, the method raises.
- relative_to (
niscope.FetchRelativeTo
) – Position to start fetching within one record.- offset (int) – Offset in samples to start fetching data within each record. The offset can be positive or negative.
- record_number (int) – Zero-based index of the first record to fetch.
- num_records (int) – Number of records to fetch. Use -1 to fetch all configured records.
- timeout (float or datetime.timedelta) – The time to wait for data to be acquired; using 0 for this parameter tells NI-SCOPE to fetch whatever is currently available. Using -1 seconds for this parameter implies infinite timeout.
Return type: list of WaveformInfo
Returns: Returns an array of classes with the following timing and scaling information about each waveform:
relative_initial_x (float) the time (in seconds) from the trigger to the first sample in the fetched waveform
absolute_initial_x (float) timestamp (in seconds) of the first fetched sample. This timestamp is comparable between records and acquisitions; devices that do not support this parameter use 0 for this output.
x_increment (float) the time between points in the acquired waveform in seconds
channel (str) channel name this waveform was asquire from
record (int) record number of this waveform
gain (float) the gain factor of the given channel; useful for scaling binary data with the following formula:
\[voltage = binary data * gain factor + offset\]offset (float) the offset factor of the given channel; useful for scaling binary data with the following formula:
\[voltage = binary data * gain factor + offset\]samples (array of float) floating point array of samples. Length will be of the actual samples acquired
fetch_into¶
niscope.Session.
fetch_into
(waveform, relative_to=niscope.FetchRelativeTo.PRETRIGGER, offset=0, record_number=0, num_records=None, timeout=datetime.timedelta(seconds=5.0))¶Returns the waveform from a previously initiated acquisition that the digitizer acquires for the specified channel. This method returns scaled voltage waveforms.
This method may return multiple waveforms depending on the number of channels, the acquisition type, and the number of records you specify.
Note
Some functionality, such as time stamping, is not supported in all digitizers.
Tip
This method requires repeated capabilities (usually channels). If called directly on the niscope.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an niscope.Session instance, and calling this method on the result.:
session.channels['0,1'].fetch(waveform, relative_to=niscope.FetchRelativeTo.PRETRIGGER, offset=0, record_number=0, num_records=None, timeout=datetime.timedelta(seconds=5.0))
Parameters:
- waveform (array.array("d")) –
numpy array of the appropriate type and size the should be acquired as a 1D array. Size should be num_samples times number of waveforms. Call
niscope.Session._actual_num_wfms()
to determine the number of waveforms.Types supported are
- numpy.float64
- numpy.int8
- numpy.in16
- numpy.int32
Example:
waveform = numpy.ndarray(num_samples * session.actual_num_wfms(), dtype=numpy.float64) wfm_info = session['0,1'].fetch_into(num_samples, waveform, timeout=5.0)- relative_to (
niscope.FetchRelativeTo
) – Position to start fetching within one record.- offset (int) – Offset in samples to start fetching data within each record.The offset can be positive or negative.
- record_number (int) – Zero-based index of the first record to fetch.
- num_records (int) – Number of records to fetch. Use -1 to fetch all configured records.
- timeout (float) – The time to wait in seconds for data to be acquired; using 0 for this parameter tells NI-SCOPE to fetch whatever is currently available. Using -1 for this parameter implies infinite timeout.
Return type: list of WaveformInfo
Returns: Returns an array of classed with the following timing and scaling information about each waveform:
relative_initial_x (float) the time (in seconds) from the trigger to the first sample in the fetched waveform
absolute_initial_x (float) timestamp (in seconds) of the first fetched sample. This timestamp is comparable between records and acquisitions; devices that do not support this parameter use 0 for this output.
x_increment (float) the time between points in the acquired waveform in seconds
channel (str) channel name this waveform was asquire from
record (int) record number of this waveform
gain (float) the gain factor of the given channel; useful for scaling binary data with the following formula:
\[voltage = binary data * gain factor + offset\]offset (float) the offset factor of the given channel; useful for scaling binary data with the following formula:
\[voltage = binary data * gain factor + offset\]samples (array of float) floating point array of samples. Length will be of the actual samples acquired
get_equalization_filter_coefficients¶
niscope.Session.
get_equalization_filter_coefficients
()¶Retrieves the custom coefficients for the equalization FIR filter on the device. This filter is designed to compensate the input signal for artifacts introduced to the signal outside of the digitizer. Because this filter is a generic FIR filter, any coefficients are valid. Coefficient values should be between +1 and –1.
Tip
This method requires repeated capabilities (usually channels). If called directly on the niscope.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an niscope.Session instance, and calling this method on the result.:
session.channels['0,1'].get_equalization_filter_coefficients()
probe_compensation_signal_start¶
niscope.Session.
probe_compensation_signal_start
()¶Starts the 1 kHz square wave output on PFI 1 for probe compensation.
probe_compensation_signal_stop¶
niscope.Session.
probe_compensation_signal_stop
()¶Stops the 1 kHz square wave output on PFI 1 for probe compensation.
read¶
niscope.Session.
read
(num_samples=None, relative_to=niscope.FetchRelativeTo.PRETRIGGER, offset=0, record_number=0, num_records=None, timeout=datetime.timedelta(seconds=5.0))¶Initiates an acquisition, waits for it to complete, and retrieves the data. The process is similar to calling
niscope.Session._initiate_acquisition()
,niscope.Session.acquisition_status()
, andniscope.Session.fetch()
. The only difference is that withniscope.Session.read()
, you enable all channels specified with channelList before the acquisition; in the other method, you enable the channels withniscope.Session.configure_vertical()
.This method may return multiple waveforms depending on the number of channels, the acquisition type, and the number of records you specify.
Note
Some functionality, such as time stamping, is not supported in all digitizers.
Tip
This method requires repeated capabilities (usually channels). If called directly on the niscope.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an niscope.Session instance, and calling this method on the result.:
session.channels['0,1'].read(num_samples=None, relative_to=niscope.FetchRelativeTo.PRETRIGGER, offset=0, record_number=0, num_records=None, timeout=datetime.timedelta(seconds=5.0))
Parameters:
- num_samples (int) – The maximum number of samples to fetch for each waveform. If the acquisition finishes with fewer points than requested, some devices return partial data if the acquisition finished, was aborted, or a timeout of 0 was used. If it fails to complete within the timeout period, the method raises.
- relative_to (
niscope.FetchRelativeTo
) – Position to start fetching within one record.- offset (int) – Offset in samples to start fetching data within each record. The offset can be positive or negative.
- record_number (int) – Zero-based index of the first record to fetch.
- num_records (int) – Number of records to fetch. Use -1 to fetch all configured records.
- timeout (float or datetime.timedelta) – The time to wait for data to be acquired; using 0 for this parameter tells NI-SCOPE to fetch whatever is currently available. Using -1 seconds for this parameter implies infinite timeout.
Return type: list of WaveformInfo
Returns: Returns an array of classes with the following timing and scaling information about each waveform:
relative_initial_x (float) the time (in seconds) from the trigger to the first sample in the fetched waveform
absolute_initial_x (float) timestamp (in seconds) of the first fetched sample. This timestamp is comparable between records and acquisitions; devices that do not support this parameter use 0 for this output.
x_increment (float) the time between points in the acquired waveform in seconds
channel (str) channel name this waveform was asquire from
record (int) record number of this waveform
gain (float) the gain factor of the given channel; useful for scaling binary data with the following formula:
\[voltage = binary data * gain factor + offset\]offset (float) the offset factor of the given channel; useful for scaling binary data with the following formula:
\[voltage = binary data * gain factor + offset\]samples (array of float) floating point array of samples. Length will be of the actual samples acquired
reset¶
niscope.Session.
reset
()¶Stops the acquisition, releases routes, and all session properties are reset to their default states.
reset_device¶
niscope.Session.
reset_device
()¶Performs a hard reset of the device. Acquisition stops, all routes are released, RTSI and PFI lines are tristated, hardware is configured to its default state, and all session properties are reset to their default state.
reset_with_defaults¶
niscope.Session.
reset_with_defaults
()¶Performs a software reset of the device, returning it to the default state and applying any initial default settings from the IVI Configuration Store.
self_cal¶
niscope.Session.
self_cal
(option=niscope.Option.SELF_CALIBRATE_ALL_CHANNELS)¶Self-calibrates most NI digitizers, including all SMC-based devices and most Traditional NI-DAQ (Legacy) devices. To verify that your digitizer supports self-calibration, refer to Features Supported by Device.
For SMC-based digitizers, if the self-calibration is performed successfully in a regular session, the calibration constants are immediately stored in the self-calibration area of the EEPROM. If the self-calibration is performed in an external calibration session, the calibration constants take effect immediately for the duration of the session. However, they are not stored in the EEPROM until
niscope.Session.CalEnd()
is called with action set toNISCOPE_VAL_ACTION_STORE
and no errors occur.Note
One or more of the referenced methods are not in the Python API for this driver.
Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
Tip
This method requires repeated capabilities (usually channels). If called directly on the niscope.Session object, then the method will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an niscope.Session instance, and calling this method on the result.:
session.channels['0,1'].self_cal(option=niscope.Option.SELF_CALIBRATE_ALL_CHANNELS)
Parameters: option ( niscope.Option
) –The calibration option. Use VI_NULL for a normal self-calibration operation or
NISCOPE_VAL_CAL_RESTORE_EXTERNAL_CALIBRATION
to restore the previous calibration.Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
self_test¶
niscope.Session.
self_test
()¶Runs the instrument self-test routine and returns the test result(s). Refer to the device-specific help topics for an explanation of the message contents.
Raises SelfTestError on self test failure. Properties on exception object:
- code - failure code from driver
- message - status message from driver
Self-Test Code Description 0 Passed self-test 1 Self-test failed
send_software_trigger_edge¶
niscope.Session.
send_software_trigger_edge
(which_trigger)¶Sends the selected trigger to the digitizer. Call this method if you called
niscope.Session.configure_trigger_software()
when you want the Reference trigger to occur. You can also call this method to override a misused edge, digital, or hysteresis trigger. If you have configuredniscope.Session.acq_arm_source
,niscope.Session.arm_ref_trig_src
, orniscope.Session.adv_trig_src
, call this method when you want to send the corresponding trigger to the digitizer.
Parameters: which_trigger ( niscope.WhichTrigger
) –Specifies the type of trigger to send to the digitizer.
Defined Values
Properties¶
Methods¶
Enums¶
Enums used in NI-SCOPE
AcquisitionType¶
-
class
niscope.
AcquisitionType
¶ -
NORMAL
¶ Sets the digitizer to normal resolution mode. The digitizer can use real-time sampling or equivalent-time sampling.
-
FLEXRES
¶ Sets the digitizer to flexible resolution mode if supported. The digitizer uses different hardware configurations to change the resolution depending on the sampling rate used.
-
DDC
¶ Sets the digitizer to DDC mode on the NI 5620/5621.
-
FetchRelativeTo¶
-
class
niscope.
FetchRelativeTo
¶ -
READ_POINTER
¶ The read pointer is set to zero when a new acquisition is initiated. After every fetch the read pointer is incremeted to be the sample after the last sample retrieved. Therefore, you can repeatedly fetch relative to the read pointer for a continuous acquisition program.
-
PRETRIGGER
¶ Fetches relative to the first pretrigger point requested with
niscope.Session.configure_horizontal_timing()
.
-
NOW
¶ Fetch data at the last sample acquired.
-
START
¶ Fetch data starting at the first point sampled by the digitizer.
-
TRIGGER
¶ Fetch at the first posttrigger sample.
-
FlexFIRAntialiasFilterType¶
-
class
niscope.
FlexFIRAntialiasFilterType
¶ -
FOURTYEIGHT_TAP_STANDARD
¶ This filter is optimized for alias protection and frequency-domain flatness
-
FOURTYEIGHT_TAP_HANNING
¶ This filter is optimized for the lowest possible bandwidth for a 48 tap filter and maximizes the SNR
-
SIXTEEN_TAP_HANNING
¶ This filter is optimized for the lowest possible bandwidth for a 16 tap filter and maximizes the SNR
-
EIGHT_TAP_HANNING
¶ This filter is optimized for the lowest possible bandwidth for a 8 tap filter and maximizes the SNR
-
Option¶
RISMethod¶
-
class
niscope.
RISMethod
¶ -
EXACT_NUM_AVERAGES
¶ Acquires exactly the specified number of records for each bin in the RIS acquisition. An error is returned from the fetch method if the RIS acquisition does not successfully acquire the specified number of waveforms within the timeout period. You may call the fetch method again to allow more time for the acquisition to finish.
-
MIN_NUM_AVERAGES
¶ Each RIS sample is the average of a least a minimum number of randomly distributed points.
-
INCOMPLETE
¶ Returns the RIS waveform after the specified timeout even if it is incomplete. If no waveforms have been acquired in certain bins, these bins will have a NaN (when fetching scaled data) or a zero (when fetching binary data). A warning (positive error code) is returned from the fetch method if the RIS acquisition did not finish. The acquisition aborts when data is returned.
-
LIMITED_BIN_WIDTH
¶ Limits the waveforms in the various bins to be within 200 ps of the center of the bin.
-
RefTriggerDetectorLocation¶
-
class
niscope.
RefTriggerDetectorLocation
¶ -
ANALOG_DETECTION_CIRCUIT
¶ use the hardware analog circuitry to implement the reference trigger. This option will trigger before any onboard signal processing.
-
DDC_OUTPUT
¶ use the onboard signal processing logic to implement the reference trigger. This option will trigger based on the onboard signal processed data.
-
TerminalConfiguration¶
TriggerCoupling¶
TriggerModifier¶
TriggerType¶
-
class
niscope.
TriggerType
¶ -
EDGE
¶ Configures the digitizer for edge triggering. An edge trigger occurs when the trigger signal crosses the trigger level specified with the set trigger slope. You configure the trigger level and slope with
niscope.Session.configure_trigger_edge()
.
-
TV
¶ Configures the digitizer for video/TV triggering. You configure the video trigger parameters like signal Format, Line to trigger off of, Polarity, and Enable DC Restore with
niscope.Session.configure_trigger_video()
.
-
IMMEDIATE
¶ Configures the digitizer for immediate triggering. An immediate trigger occurs as soon as the pretrigger samples are acquired.
-
HYSTERESIS
¶ Configures the digitizer for hysteresis triggering. A hysteresis trigger occurs when the trigger signal crosses the trigger level with the specified slope and passes through the hysteresis window you specify. You configure the trigger level, slope, and hysteresis with
niscope.Session.configure_trigger_hysteresis()
.
-
DIGITAL
¶ Configures the digitizer for digital triggering. A digital trigger occurs when the trigger signal has the specified slope. You configure the trigger slope with
niscope.Session.configure_trigger_digital()
.
-
WINDOW
¶ Configures the digitizer for window triggering. A window trigger occurs when the trigger signal enters or leaves the window defined by the values you specify with the Low Window Level, High Window Level, and Window Mode Parameters. You configure the low window level high window level, and window mode with
niscope.Session.configure_trigger_window()
.
-
SOFTWARE
¶ Configures the digitizer for software triggering. A software trigger occurs when
niscope.Session.SendSoftwareTrigger()
is called.
-
TriggerWindowMode¶
VideoPolarity¶
VideoSignalFormat¶
-
class
niscope.
VideoSignalFormat
¶ -
NTSC
¶ NTSC signal format supports line numbers from 1 to 525
-
PAL
¶ PAL signal format supports line numbers from 1 to 625
-
SECAM
¶ SECAM signal format supports line numbers from 1 to 625
-
M_PAL
¶ M-PAL signal format supports line numbers from 1 to 525
-
VIDEO_480I_59_94_FIELDS_PER_SECOND
¶ 480 lines, interlaced, 59.94 fields per second
-
VIDEO_480I_60_FIELDS_PER_SECOND
¶ 480 lines, interlaced, 60 fields per second
-
VIDEO_480P_59_94_FRAMES_PER_SECOND
¶ 480 lines, progressive, 59.94 frames per second
-
VIDEO_480P_60_FRAMES_PER_SECOND
¶ 480 lines, progressive,60 frames per second
-
VIDEO_576I_50_FIELDS_PER_SECOND
¶ 576 lines, interlaced, 50 fields per second
-
VIDEO_576P_50_FRAMES_PER_SECOND
¶ 576 lines, progressive, 50 frames per second
-
VIDEO_720P_50_FRAMES_PER_SECOND
¶ 720 lines, progressive, 50 frames per second
-
VIDEO_720P_59_94_FRAMES_PER_SECOND
¶ 720 lines, progressive, 59.94 frames per second
-
VIDEO_720P_60_FRAMES_PER_SECOND
¶ 720 lines, progressive, 60 frames per second
-
VIDEO_1080I_50_FIELDS_PER_SECOND
¶ 1,080 lines, interlaced, 50 fields per second
-
VIDEO_1080I_59_94_FIELDS_PER_SECOND
¶ 1,080 lines, interlaced, 59.94 fields per second
-
VIDEO_1080I_60_FIELDS_PER_SECOND
¶ 1,080 lines, interlaced, 60 fields per second
-
VIDEO_1080P_24_FRAMES_PER_SECOND
¶ 1,080 lines, progressive, 24 frames per second
-
VideoTriggerEvent¶
-
class
niscope.
VideoTriggerEvent
¶ -
FIELD1
¶ Trigger on field 1 of the signal
-
FIELD2
¶ Trigger on field 2 of the signal
-
ANY_FIELD
¶ Trigger on the first field acquired
-
ANY_LINE
¶ Trigger on the first line acquired
-
LINE_NUMBER
¶ Trigger on a specific line of a video signal. Valid values vary depending on the signal format configured.
-
Exceptions and Warnings¶
UnsupportedConfigurationError¶
- exception
niscope.
UnsupportedConfigurationError
¶An error due to using this module in an usupported platform.
DriverNotInstalledError¶
- exception
niscope.
DriverNotInstalledError
¶An error due to using this module without the driver runtime installed.
Examples¶
niscope_fetch.py¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | #!/usr/bin/python
import argparse
import niscope
import pprint
import sys
pp = pprint.PrettyPrinter(indent=4, width=80)
def example(resource_name, channels, options, length, voltage):
with niscope.Session(resource_name=resource_name, options=options) as session:
session.configure_vertical(range=voltage, coupling=niscope.VerticalCoupling.AC)
session.configure_horizontal_timing(min_sample_rate=50000000, min_num_pts=length, ref_position=50.0, num_records=1, enforce_realtime=True)
with session.initiate():
waveforms = session.channels[channels].fetch(num_samples=length)
for i in range(len(waveforms)):
print('Waveform {0} information:'.format(i))
print(str(waveforms[i]) + '\n\n')
def _main(argsv):
parser = argparse.ArgumentParser(description='Acquires one record from the given channels.', formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('-n', '--resource-name', default='PXI1Slot2', help='Resource name of a National Instruments Digitizer')
parser.add_argument('-c', '--channels', default='0', help='Channel(s) to use')
parser.add_argument('-l', '--length', default=1000, type=int, help='Measure record length')
parser.add_argument('-v', '--voltage', default=1.0, type=float, help='Voltage range (V)')
parser.add_argument('-op', '--option-string', default='', type=str, help='Option string')
args = parser.parse_args(argsv)
example(args.resource_name, args.channels, args.option_string, args.length, args.voltage)
def main():
_main(sys.argv[1:])
def test_example():
options = {'simulate': True, 'driver_setup': {'Model': '5164', 'BoardType': 'PXIe', }, }
example('PXI1Slot2', '0', options, 1000, 1.0)
def test_main():
cmd_line = ['--option-string', 'Simulate=1, DriverSetup=Model:5164; BoardType:PXIe', ]
_main(cmd_line)
if __name__ == '__main__':
main()
|
niscope_read.py¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | #!/usr/bin/python
import argparse
import niscope
import pprint
import sys
pp = pprint.PrettyPrinter(indent=4, width=80)
def example(resource_name, channels, options, length, voltage):
with niscope.Session(resource_name=resource_name, options=options) as session:
session.configure_vertical(range=voltage, coupling=niscope.VerticalCoupling.AC)
session.configure_horizontal_timing(min_sample_rate=50000000, min_num_pts=length, ref_position=50.0, num_records=1, enforce_realtime=True)
waveforms = session.channels[channels].read(num_samples=length)
for i in range(len(waveforms)):
print('Waveform {0} information:'.format(i))
print(str(waveforms[i]) + '\n\n')
def _main(argsv):
parser = argparse.ArgumentParser(description='Acquires one record from the given channels.', formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('-n', '--resource-name', default='PXI1Slot2', help='Resource name of a National Instruments Digitizer')
parser.add_argument('-c', '--channels', default='0', help='Channel(s) to use')
parser.add_argument('-l', '--length', default=1000, type=int, help='Measure record length')
parser.add_argument('-v', '--voltage', default=1.0, type=float, help='Voltage range (V)')
parser.add_argument('-op', '--option-string', default='', type=str, help='Option string')
args = parser.parse_args(argsv)
example(args.resource_name, args.channels, args.option_string, args.length, args.voltage)
def main():
_main(sys.argv[1:])
def test_example():
options = {'simulate': True, 'driver_setup': {'Model': '5164', 'BoardType': 'PXIe', }, }
example('PXI1Slot2', '0', options, 1000, 1.0)
def test_main():
cmd_line = ['--option-string', 'Simulate=1, DriverSetup=Model:5164; BoardType:PXIe', ]
_main(cmd_line)
if __name__ == '__main__':
main()
|
niswitch module¶
Installation¶
As a prerequisite to using the niswitch module, you must install the NI-SWITCH runtime on your system. Visit ni.com/downloads to download the driver runtime for your devices.
The nimi-python modules (i.e. for NI-SWITCH) can be installed with pip:
$ python -m pip install niswitch~=0.8.0
Or easy_install from setuptools:
$ python -m easy_install niswitch
Usage¶
The following is a basic example of using the niswitch module to open a session to a Switch and connect channels.
import niswitch
with niswitch.Session("Dev1") as session:
session.connect(channel1='r0', channel2='c0')
Additional examples for NI-SWITCH are located in src/niswitch/examples/ directory.
API Reference¶
niswitch.Session¶
-
class
niswitch.
Session
(self, resource_name, topology="Configured Topology", simulate=False, reset_device=False)¶ Returns a session handle used to identify the switch in all subsequent instrument driver calls and sets the topology of the switch.
niswitch.Session.__init__()
creates a new IVI instrument driver session for the switch specified in the resourceName parameter. The driver uses the topology specified in the topology parameter and overrides the topology specified in MAX. Note: When initializing an NI SwitchBlock device with topology, you must specify the toplogy created when you configured the device in MAX, using either NISWITCH_TOPOLOGY_CONFIGURED_TOPOLOGY or the toplogy string of the device. Refer to the Initializing with Toplogy for NI SwitchBlock Devices topic in the NI Switches Help for information about determining the topology string of an NI SwitchBlock device. By default, the switch is reset to a known state. Enable simulation by specifying the topology and setting the simulate parameter to True.Parameters: - resource_name (str) – Resource name of the switch module to initialize. Default value: None Syntax: Optional fields are shown in square brackets ([]). Configured in MAX Under Valid Syntax Devices and Interfaces DeviceName Traditional NI-DAQ Devices SCXI[chassis ID]::slot number PXI System PXI[bus number]::device number TIP: IVI logical names are also valid for the resource name. Default values for optional fields: chassis ID = 1 bus number = 0 Example resource names: Resource Name Description SC1Mod3 NI-DAQmx module in chassis “SC1” slot 3 MySwitch NI-DAQmx module renamed to “MySwitch” SCXI1::3 Traditional NI-DAQ module in chassis 1, slot 3 SCXI::3 Traditional NI-DAQ module in chassis 1, slot 3 PXI0::16 PXI bus 0, device number 16 PXI::16 PXI bus 0, device number 16
- topology (str) – Pass the topology name you want to use for the switch you specify with Resource Name parameter. You can also pass NISWITCH_TOPOLOGY_CONFIGURED_TOPOLOGY to use the last topology that was configured for the device in MAX. Default Value: NISWITCH_TOPOLOGY_CONFIGURED_TOPOLOGY Valid Values: NISWITCH_TOPOLOGY_1127_1_WIRE_64X1_MUX NISWITCH_TOPOLOGY_1127_2_WIRE_32X1_MUX NISWITCH_TOPOLOGY_1127_2_WIRE_4X8_MATRIX NISWITCH_TOPOLOGY_1127_4_WIRE_16X1_MUX NISWITCH_TOPOLOGY_1127_INDEPENDENT NISWITCH_TOPOLOGY_1128_1_WIRE_64X1_MUX NISWITCH_TOPOLOGY_1128_2_WIRE_32X1_MUX NISWITCH_TOPOLOGY_1128_2_WIRE_4X8_MATRIX NISWITCH_TOPOLOGY_1128_4_WIRE_16X1_MUX NISWITCH_TOPOLOGY_1128_INDEPENDENT NISWITCH_TOPOLOGY_1129_2_WIRE_16X16_MATRIX NISWITCH_TOPOLOGY_1129_2_WIRE_8X32_MATRIX NISWITCH_TOPOLOGY_1129_2_WIRE_4X64_MATRIX NISWITCH_TOPOLOGY_1129_2_WIRE_DUAL_8X16_MATRIX NISWITCH_TOPOLOGY_1129_2_WIRE_DUAL_4X32_MATRIX NISWITCH_TOPOLOGY_1129_2_WIRE_QUAD_4X16_MATRIX NISWITCH_TOPOLOGY_1130_1_WIRE_256X1_MUX NISWITCH_TOPOLOGY_1130_1_WIRE_DUAL_128X1_MUX NISWITCH_TOPOLOGY_1130_1_WIRE_4X64_MATRIX NISWITCH_TOPOLOGY_1130_1_WIRE_8x32_MATRIX NISWITCH_TOPOLOGY_1130_1_WIRE_OCTAL_32X1_MUX NISWITCH_TOPOLOGY_1130_1_WIRE_QUAD_64X1_MUX NISWITCH_TOPOLOGY_1130_1_WIRE_SIXTEEN_16X1_MUX NISWITCH_TOPOLOGY_1130_2_WIRE_4X32_MATRIX NISWITCH_TOPOLOGY_1130_2_WIRE_128X1_MUX NISWITCH_TOPOLOGY_1130_2_WIRE_OCTAL_16X1_MUX NISWITCH_TOPOLOGY_1130_2_WIRE_QUAD_32X1_MUX NISWITCH_TOPOLOGY_1130_4_WIRE_64X1_MUX NISWITCH_TOPOLOGY_1130_4_WIRE_QUAD_16X1_MUX NISWITCH_TOPOLOGY_1130_INDEPENDENT NISWITCH_TOPOLOGY_1160_16_SPDT NISWITCH_TOPOLOGY_1161_8_SPDT NISWITCH_TOPOLOGY_1163R_OCTAL_4X1_MUX NISWITCH_TOPOLOGY_1166_16_DPDT NISWITCH_TOPOLOGY_1166_32_SPDT NISWITCH_TOPOLOGY_1167_INDEPENDENT NISWITCH_TOPOLOGY_1169_100_SPST NISWITCH_TOPOLOGY_1169_50_DPST NISWITCH_TOPOLOGY_1175_1_WIRE_196X1_MUX NISWITCH_TOPOLOGY_1175_2_WIRE_98X1_MUX NISWITCH_TOPOLOGY_1175_2_WIRE_95X1_MUX NISWITCH_TOPOLOGY_1190_QUAD_4X1_MUX NISWITCH_TOPOLOGY_1191_QUAD_4X1_MUX NISWITCH_TOPOLOGY_1192_8_SPDT NISWITCH_TOPOLOGY_1193_32X1_MUX NISWITCH_TOPOLOGY_1193_16X1_TERMINATED_MUX NISWITCH_TOPOLOGY_1193_DUAL_16X1_MUX NISWITCH_TOPOLOGY_1193_DUAL_8X1_TERMINATED_MUX NISWITCH_TOPOLOGY_1193_QUAD_8X1_MUX NISWITCH_TOPOLOGY_1193_QUAD_4X1_TERMINATED_MUX NISWITCH_TOPOLOGY_1193_INDEPENDENT NISWITCH_TOPOLOGY_1194_QUAD_4X1_MUX NISWITCH_TOPOLOGY_1195_QUAD_4X1_MUX NISWITCH_TOPOLOGY_2501_1_WIRE_48X1_MUX NISWITCH_TOPOLOGY_2501_1_WIRE_48X1_AMPLIFIED_MUX NISWITCH_TOPOLOGY_2501_2_WIRE_24X1_MUX NISWITCH_TOPOLOGY_2501_2_WIRE_24X1_AMPLIFIED_MUX NISWITCH_TOPOLOGY_2501_2_WIRE_DUAL_12X1_MUX NISWITCH_TOPOLOGY_2501_2_WIRE_QUAD_6X1_MUX NISWITCH_TOPOLOGY_2501_2_WIRE_4X6_MATRIX NISWITCH_TOPOLOGY_2501_4_WIRE_12X1_MUX NISWITCH_TOPOLOGY_2503_1_WIRE_48X1_MUX NISWITCH_TOPOLOGY_2503_2_WIRE_24X1_MUX NISWITCH_TOPOLOGY_2503_2_WIRE_DUAL_12X1_MUX NISWITCH_TOPOLOGY_2503_2_WIRE_QUAD_6X1_MUX NISWITCH_TOPOLOGY_2503_2_WIRE_4X6_MATRIX NISWITCH_TOPOLOGY_2503_4_WIRE_12X1_MUX NISWITCH_TOPOLOGY_2510_INDEPENDENT NISWITCH_TOPOLOGY_2512_INDEPENDENT NISWITCH_TOPOLOGY_2514_INDEPENDENT NISWITCH_TOPOLOGY_2515_INDEPENDENT NISWITCH_TOPOLOGY_2520_80_SPST NISWITCH_TOPOLOGY_2521_40_DPST NISWITCH_TOPOLOGY_2522_53_SPDT NISWITCH_TOPOLOGY_2523_26_DPDT NISWITCH_TOPOLOGY_2524_1_WIRE_128X1_MUX NISWITCH_TOPOLOGY_2524_1_WIRE_DUAL_64X1_MUX NISWITCH_TOPOLOGY_2524_1_WIRE_QUAD_32X1_MUX NISWITCH_TOPOLOGY_2524_1_WIRE_OCTAL_16X1_MUX NISWITCH_TOPOLOGY_2524_1_WIRE_SIXTEEN_8X1_MUX NISWITCH_TOPOLOGY_2525_2_WIRE_64X1_MUX NISWITCH_TOPOLOGY_2525_2_WIRE_DUAL_32X1_MUX NISWITCH_TOPOLOGY_2525_2_WIRE_QUAD_16X1_MUX NISWITCH_TOPOLOGY_2525_2_WIRE_OCTAL_8X1_MUX NISWITCH_TOPOLOGY_2525_2_WIRE_SIXTEEN_4X1_MUX NISWITCH_TOPOLOGY_2526_1_WIRE_158X1_MUX NISWITCH_TOPOLOGY_2526_2_WIRE_79X1_MUX NISWITCH_TOPOLOGY_2527_1_WIRE_64X1_MUX NISWITCH_TOPOLOGY_2527_1_WIRE_DUAL_32X1_MUX NISWITCH_TOPOLOGY_2527_2_WIRE_32X1_MUX NISWITCH_TOPOLOGY_2527_2_WIRE_DUAL_16X1_MUX NISWITCH_TOPOLOGY_2527_4_WIRE_16X1_MUX NISWITCH_TOPOLOGY_2527_INDEPENDENT NISWITCH_TOPOLOGY_2529_2_WIRE_DUAL_4X16_MATRIX NISWITCH_TOPOLOGY_2529_2_WIRE_8X16_MATRIX NISWITCH_TOPOLOGY_2529_2_WIRE_4X32_MATRIX NISWITCH_TOPOLOGY_2530_1_WIRE_128X1_MUX NISWITCH_TOPOLOGY_2530_1_WIRE_DUAL_64X1_MUX NISWITCH_TOPOLOGY_2530_1_WIRE_4x32_MATRIX NISWITCH_TOPOLOGY_2530_1_WIRE_8x16_MATRIX NISWITCH_TOPOLOGY_2530_1_WIRE_OCTAL_16X1_MUX NISWITCH_TOPOLOGY_2530_1_WIRE_QUAD_32X1_MUX NISWITCH_TOPOLOGY_2530_2_WIRE_4x16_MATRIX NISWITCH_TOPOLOGY_2530_2_WIRE_64X1_MUX NISWITCH_TOPOLOGY_2530_2_WIRE_DUAL_32X1_MUX NISWITCH_TOPOLOGY_2530_2_WIRE_QUAD_16X1_MUX NISWITCH_TOPOLOGY_2530_4_WIRE_32X1_MUX NISWITCH_TOPOLOGY_2530_4_WIRE_DUAL_16X1_MUX NISWITCH_TOPOLOGY_2530_INDEPENDENT NISWITCH_TOPOLOGY_2531_1_WIRE_4X128_MATRIX NISWITCH_TOPOLOGY_2531_1_WIRE_8X64_MATRIX NISWITCH_TOPOLOGY_2531_1_WIRE_DUAL_4X64_MATRIX NISWITCH_TOPOLOGY_2531_1_WIRE_DUAL_8X32_MATRIX NISWITCH_TOPOLOGY_2531_2_WIRE_4X64_MATRIX NISWITCH_TOPOLOGY_2531_2_WIRE_8X32_MATRIX NISWITCH_TOPOLOGY_2532_1_WIRE_16X32_MATRIX NISWITCH_TOPOLOGY_2532_1_WIRE_4X128_MATRIX NISWITCH_TOPOLOGY_2532_1_WIRE_8X64_MATRIX NISWITCH_TOPOLOGY_2532_1_WIRE_DUAL_16X16_MATRIX NISWITCH_TOPOLOGY_2532_1_WIRE_DUAL_4X64_MATRIX NISWITCH_TOPOLOGY_2532_1_WIRE_DUAL_8X32_MATRIX NISWITCH_TOPOLOGY_2532_1_WIRE_SIXTEEN_2X16_MATRIX NISWITCH_TOPOLOGY_2532_2_WIRE_16X16_MATRIX NISWITCH_TOPOLOGY_2532_2_WIRE_4X64_MATRIX NISWITCH_TOPOLOGY_2532_2_WIRE_8X32_MATRIX NISWITCH_TOPOLOGY_2532_2_WIRE_DUAL_4X32_MATRIX NISWITCH_TOPOLOGY_2533_1_WIRE_4X64_MATRIX NISWITCH_TOPOLOGY_2534_1_WIRE_8X32_MATRIX NISWITCH_TOPOLOGY_2535_1_WIRE_4X136_MATRIX NISWITCH_TOPOLOGY_2536_1_WIRE_8X68_MATRIX NISWITCH_TOPOLOGY_2540_1_WIRE_8X9_MATRIX NISWITCH_TOPOLOGY_2541_1_WIRE_8X12_MATRIX NISWITCH_TOPOLOGY_2542_QUAD_2X1_TERMINATED_MUX NISWITCH_TOPOLOGY_2543_DUAL_4X1_TERMINATED_MUX NISWITCH_TOPOLOGY_2544_8X1_TERMINATED_MUX NISWITCH_TOPOLOGY_2545_4X1_TERMINATED_MUX NISWITCH_TOPOLOGY_2546_DUAL_4X1_MUX NISWITCH_TOPOLOGY_2547_8X1_MUX NISWITCH_TOPOLOGY_2548_4_SPDT NISWITCH_TOPOLOGY_2549_TERMINATED_2_SPDT NISWITCH_TOPOLOGY_2554_4X1_MUX NISWITCH_TOPOLOGY_2555_4X1_TERMINATED_MUX NISWITCH_TOPOLOGY_2556_DUAL_4X1_MUX NISWITCH_TOPOLOGY_2557_8X1_MUX NISWITCH_TOPOLOGY_2558_4_SPDT NISWITCH_TOPOLOGY_2559_TERMINATED_2_SPDT NISWITCH_TOPOLOGY_2564_16_SPST NISWITCH_TOPOLOGY_2564_8_DPST NISWITCH_TOPOLOGY_2565_16_SPST NISWITCH_TOPOLOGY_2566_16_SPDT NISWITCH_TOPOLOGY_2566_8_DPDT NISWITCH_TOPOLOGY_2567_INDEPENDENT NISWITCH_TOPOLOGY_2568_15_DPST NISWITCH_TOPOLOGY_2568_31_SPST NISWITCH_TOPOLOGY_2569_100_SPST NISWITCH_TOPOLOGY_2569_50_DPST NISWITCH_TOPOLOGY_2570_20_DPDT NISWITCH_TOPOLOGY_2570_40_SPDT NISWITCH_TOPOLOGY_2571_66_SPDT NISWITCH_TOPOLOGY_2575_1_WIRE_196X1_MUX NISWITCH_TOPOLOGY_2575_2_WIRE_98X1_MUX NISWITCH_TOPOLOGY_2575_2_WIRE_95X1_MUX NISWITCH_TOPOLOGY_2576_2_WIRE_64X1_MUX NISWITCH_TOPOLOGY_2576_2_WIRE_DUAL_32X1_MUX NISWITCH_TOPOLOGY_2576_2_WIRE_OCTAL_8X1_MUX NISWITCH_TOPOLOGY_2576_2_WIRE_QUAD_16X1_MUX NISWITCH_TOPOLOGY_2576_2_WIRE_SIXTEEN_4X1_MUX NISWITCH_TOPOLOGY_2576_INDEPENDENT NISWITCH_TOPOLOGY_2584_1_WIRE_12X1_MUX NISWITCH_TOPOLOGY_2584_1_WIRE_DUAL_6X1_MUX NISWITCH_TOPOLOGY_2584_2_WIRE_6X1_MUX NISWITCH_TOPOLOGY_2584_INDEPENDENT NISWITCH_TOPOLOGY_2585_1_WIRE_10X1_MUX NISWITCH_TOPOLOGY_2586_10_SPST NISWITCH_TOPOLOGY_2586_5_DPST NISWITCH_TOPOLOGY_2590_4X1_MUX NISWITCH_TOPOLOGY_2591_4X1_MUX NISWITCH_TOPOLOGY_2593_16X1_MUX NISWITCH_TOPOLOGY_2593_8X1_TERMINATED_MUX NISWITCH_TOPOLOGY_2593_DUAL_8X1_MUX NISWITCH_TOPOLOGY_2593_DUAL_4X1_TERMINATED_MUX NISWITCH_TOPOLOGY_2593_INDEPENDENT NISWITCH_TOPOLOGY_2594_4X1_MUX NISWITCH_TOPOLOGY_2595_4X1_MUX NISWITCH_TOPOLOGY_2596_DUAL_6X1_MUX NISWITCH_TOPOLOGY_2597_6X1_TERMINATED_MUX NISWITCH_TOPOLOGY_2598_DUAL_TRANSFER NISWITCH_TOPOLOGY_2599_2_SPDT NISWITCH_TOPOLOGY_2720_INDEPENDENT NISWITCH_TOPOLOGY_2722_INDEPENDENT NISWITCH_TOPOLOGY_2725_INDEPENDENT NISWITCH_TOPOLOGY_2727_INDEPENDENT NISWITCH_TOPOLOGY_2737_2_WIRE_4X64_MATRIX NISWITCH_TOPOLOGY_2738_2_WIRE_8X32_MATRIX NISWITCH_TOPOLOGY_2739_2_WIRE_16X16_MATRIX NISWITCH_TOPOLOGY_2746_QUAD_4X1_MUX NISWITCH_TOPOLOGY_2747_DUAL_8X1_MUX NISWITCH_TOPOLOGY_2748_16X1_MUX NISWITCH_TOPOLOGY_2790_INDEPENDENT NISWITCH_TOPOLOGY_2796_DUAL_6X1_MUX NISWITCH_TOPOLOGY_2797_6X1_TERMINATED_MUX NISWITCH_TOPOLOGY_2798_DUAL_TRANSFER NISWITCH_TOPOLOGY_2799_2_SPDT
- simulate (bool) – Enables simulation of the switch module specified in the resource name parameter. Valid Values: True - simulate False - Don’t simulate (Default Value)
- reset_device (bool) – Specifies whether to reset the switch module during the initialization process. Valid Values: True - Reset Device (Default Value) False - Currently unsupported. The device will not reset.
Properties
Public methods
Properties¶
analog_bus_sharing_enable¶
niswitch.Session.
analog_bus_sharing_enable
¶Enables or disables sharing of an analog bus line so that multiple NI SwitchBlock devices may connect to it simultaneously. To enable multiple NI SwitchBlock devices to share an analog bus line, set this property to True for each device on the channel that corresponds with the shared analog bus line. The default value for all devices is False, which disables sharing of the analog bus. Refer to the Using the Analog Bus on an NI SwitchBlock Carrier topic in the NI Switches Help for more information about sharing the analog bus.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the analog_bus_sharing_enable.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an analog_bus_sharing_enable.Session instance, and calling set/get value on the result.:
session['0,1'].analog_bus_sharing_enable = var var = session['0,1'].analog_bus_sharing_enableThe following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Channel Configuration:Analog Bus Sharing Enable
- C Attribute: NISWITCH_ATTR_ANALOG_BUS_SHARING_ENABLE
bandwidth¶
niswitch.Session.
bandwidth
¶This channel-based property returns the bandwidth for the channel. The units are hertz.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the bandwidth.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an bandwidth.Session instance, and calling set/get value on the result.:
session['0,1'].bandwidth = var var = session['0,1'].bandwidthThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Module Characteristics:Bandwidth
- C Attribute: NISWITCH_ATTR_BANDWIDTH
cabled_module_scan_advanced_bus¶
niswitch.Session.
cabled_module_scan_advanced_bus
¶This property has been deprecated and may be removed from a future release of NI-SWITCH. Use the
niswitch.Session.route_scan_advanced_output()
method instead.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Obsolete Attributes:Cabled Module Scan Advanced Bus
- C Attribute: NISWITCH_ATTR_CABLED_MODULE_SCAN_ADVANCED_BUS
cabled_module_trigger_bus¶
niswitch.Session.
cabled_module_trigger_bus
¶This property has been deprecated and may be removed from a future release of NI-SWITCH. Use the
niswitch.Session.route_trigger_input()
method instead.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Obsolete Attributes:Cabled Module Trigger Bus
- C Attribute: NISWITCH_ATTR_CABLED_MODULE_TRIGGER_BUS
channel_count¶
niswitch.Session.
channel_count
¶Indicates the number of channels that the specific instrument driver supports.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Driver Capabilities:Channel Count
- C Attribute: NISWITCH_ATTR_CHANNEL_COUNT
characteristic_impedance¶
niswitch.Session.
characteristic_impedance
¶This channel-based property returns the characteristic impedance for the channel. The units are ohms.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the characteristic_impedance.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an characteristic_impedance.Session instance, and calling set/get value on the result.:
session['0,1'].characteristic_impedance = var var = session['0,1'].characteristic_impedanceThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Module Characteristics:Characteristic Impedance
- C Attribute: NISWITCH_ATTR_CHARACTERISTIC_IMPEDANCE
continuous_scan¶
niswitch.Session.
continuous_scan
¶When a switch device is scanning, the swich can either stop scanning when the end of the scan (False) or continue scanning from the top of the scan list again (True). Notice that if you set the scan to continuous (True), the Wait For Scan Complete operation will always time out and you must call Abort to stop the scan.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Scanning Configuration:Continuous Scan
- C Attribute: NISWITCH_ATTR_CONTINUOUS_SCAN
digital_filter_enable¶
niswitch.Session.
digital_filter_enable
¶This property specifies whether to apply the pulse width filter to the Trigger Input. Enabling the Digital Filter (True) prevents the switch module from being triggered by pulses that are less than 150 ns on PXI trigger lines 0–7. When Digital Filter is disabled (False), it is possible for the switch module to be triggered by noise on the PXI trigger lines. If the device triggering the switch is capable of sending pulses greater than 150 ns, you should not disable the Digital Filter.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Scanning Configuration:Digital Filter Enable
- C Attribute: NISWITCH_ATTR_DIGITAL_FILTER_ENABLE
driver_setup¶
niswitch.Session.
driver_setup
¶This property indicates the Driver Setup string that the user specified when initializing the driver. Some cases exist where the end-user must specify instrument driver options at initialization time. An example of this is specifying a particular instrument model from among a family of instruments that the driver supports. This is useful when using simulation. The end-user can specify driver-specific options through the DriverSetup keyword in the optionsString parameter to the
niswitch.Session.InitWithOptions()
method, or through the IVI Configuration Utility. If the user does not specify a Driver Setup string, this property returns an empty string.Note
One or more of the referenced methods are not in the Python API for this driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Advanced Session Information:Driver Setup
- C Attribute: NISWITCH_ATTR_DRIVER_SETUP
handshaking_initiation¶
niswitch.Session.
handshaking_initiation
¶The following table lists the characteristics of this property.
Characteristic Value Datatype enums.HandshakingInitiation Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Scanning Configuration:Handshaking Initiation
- C Attribute: NISWITCH_ATTR_HANDSHAKING_INITIATION
instrument_firmware_revision¶
niswitch.Session.
instrument_firmware_revision
¶A string that contains the firmware revision information for the instrument you are currently using.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Instrument Identification:Firmware Revision
- C Attribute: NISWITCH_ATTR_INSTRUMENT_FIRMWARE_REVISION
instrument_manufacturer¶
niswitch.Session.
instrument_manufacturer
¶A string that contains the name of the instrument manufacturer you are currently using.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Instrument Identification:Manufacturer
- C Attribute: NISWITCH_ATTR_INSTRUMENT_MANUFACTURER
instrument_model¶
niswitch.Session.
instrument_model
¶A string that contains the model number or name of the instrument that you are currently using.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Instrument Identification:Model
- C Attribute: NISWITCH_ATTR_INSTRUMENT_MODEL
io_resource_descriptor¶
niswitch.Session.
io_resource_descriptor
¶Indicates the resource descriptor the driver uses to identify the physical device. If you initialize the driver with a logical name, this property contains the resource descriptor that corresponds to the entry in the IVI Configuration utility. If you initialize the instrument driver with the resource descriptor, this property contains that value.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Advanced Session Information:IO Resource Descriptor
- C Attribute: NISWITCH_ATTR_IO_RESOURCE_DESCRIPTOR
is_configuration_channel¶
niswitch.Session.
is_configuration_channel
¶This channel-based property specifies whether to reserve the channel for internal path creation. A channel that is available for internal path creation is called a configuration channel. The driver may use configuration channels to create paths between two channels you specify in the
niswitch.Session.connect()
method. Configuration channels are not available for external connections. Set this property to True to mark the channel as a configuration channel. Set this property to False to mark the channel as available for external connections. After you identify a channel as a configuration channel, you cannot use that channel for external connections. Theniswitch.Session.connect()
method returns the NISWITCH_ERROR_IS_CONFIGURATION_CHANNEL error when you attempt to establish a connection between a configuration channel and any other channel.Tip
This property can use repeated capabilities (usually channels). If set or get directly on the is_configuration_channel.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an is_configuration_channel.Session instance, and calling set/get value on the result.:
session['0,1'].is_configuration_channel = var var = session['0,1'].is_configuration_channelThe following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Channel Configuration:Is Configuration Channel
- C Attribute: NISWITCH_ATTR_IS_CONFIGURATION_CHANNEL
is_debounced¶
niswitch.Session.
is_debounced
¶This property indicates whether the entire switch device has settled since the last switching command. A value of True indicates that all signals going through the switch device are valid.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Module Characteristics:Is Debounced
- C Attribute: NISWITCH_ATTR_IS_DEBOUNCED
is_scanning¶
niswitch.Session.
is_scanning
¶If True, the switch module is currently scanning through the scan list (i.e. it is not in the Idle state). If False, the switch module is not currently scanning through the scan list (i.e. it is in the Idle state).
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Scanning Configuration:Is Scanning
- C Attribute: NISWITCH_ATTR_IS_SCANNING
is_source_channel¶
niswitch.Session.
is_source_channel
¶This channel-based property specifies whether you want to identify the channel as a source channel. Typically, you set this property to True when you attach the channel to a power supply, a method generator, or an active measurement point on the unit under test, and you do not want to connect the channel to another source. The driver prevents source channels from connecting to each other. The
niswitch.Session.connect()
method returns the NISWITCH_ERROR_ATTEMPT_TO_CONNECT_SOURCES when you attempt to connect two channels that you identify as source channels.Tip
This property can use repeated capabilities (usually channels). If set or get directly on the is_source_channel.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an is_source_channel.Session instance, and calling set/get value on the result.:
session['0,1'].is_source_channel = var var = session['0,1'].is_source_channelThe following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Channel Configuration:Is Source Channel
- C Attribute: NISWITCH_ATTR_IS_SOURCE_CHANNEL
is_waiting_for_trig¶
niswitch.Session.
is_waiting_for_trig
¶In a scan list, a semi-colon (;) is used to indicate that at that point in the scan list, the scan engine should pause until a trigger is received from the trigger input. If that trigger is user generated through either a hardware pulse or the Send SW Trigger operation, it is necessary for the user to know when the scan engine has reached such a state.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Scanning Configuration:Is Waiting for Trigger?
- C Attribute: NISWITCH_ATTR_IS_WAITING_FOR_TRIG
logical_name¶
niswitch.Session.
logical_name
¶A string containing the logical name you specified when opening the current IVI session. You may pass a logical name to the
niswitch.Session.init()
orniswitch.Session.InitWithOptions()
methods. The IVI Configuration utility must contain an entry for the logical name. The logical name entry refers to a virtual instrument section in the IVI Configuration file. The virtual instrument section specifies a physical device and initial user options.Note
One or more of the referenced methods are not in the Python API for this driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Advanced Session Information:Logical Name
- C Attribute: NISWITCH_ATTR_LOGICAL_NAME
master_slave_scan_advanced_bus¶
niswitch.Session.
master_slave_scan_advanced_bus
¶This property has been deprecated and may be removed from a future release of NI-SWITCH. Use the
niswitch.Session.route_scan_advanced_output()
method instead.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Obsolete Attributes:Master Slave Scan Advanced Bus
- C Attribute: NISWITCH_ATTR_MASTER_SLAVE_SCAN_ADVANCED_BUS
master_slave_trigger_bus¶
niswitch.Session.
master_slave_trigger_bus
¶This property has been deprecated and may be removed from a future release of NI-SWITCH. Use the
niswitch.Session.route_trigger_input()
method instead.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Obsolete Attributes:Master Slave Trigger Bus
- C Attribute: NISWITCH_ATTR_MASTER_SLAVE_TRIGGER_BUS
max_ac_voltage¶
niswitch.Session.
max_ac_voltage
¶This channel-based property returns the maximum AC voltage the channel can switch. The units are volts RMS.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the max_ac_voltage.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an max_ac_voltage.Session instance, and calling set/get value on the result.:
session['0,1'].max_ac_voltage = var var = session['0,1'].max_ac_voltageThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Module Characteristics:Maximum AC Voltage
- C Attribute: NISWITCH_ATTR_MAX_AC_VOLTAGE
max_carry_ac_current¶
niswitch.Session.
max_carry_ac_current
¶This channel-based property returns the maximum AC current the channel can carry. The units are amperes RMS.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the max_carry_ac_current.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an max_carry_ac_current.Session instance, and calling set/get value on the result.:
session['0,1'].max_carry_ac_current = var var = session['0,1'].max_carry_ac_currentThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Module Characteristics:Maximum Carry AC Current
- C Attribute: NISWITCH_ATTR_MAX_CARRY_AC_CURRENT
max_carry_ac_power¶
niswitch.Session.
max_carry_ac_power
¶This channel-based property returns the maximum AC power the channel can carry. The units are volt-amperes.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the max_carry_ac_power.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an max_carry_ac_power.Session instance, and calling set/get value on the result.:
session['0,1'].max_carry_ac_power = var var = session['0,1'].max_carry_ac_powerThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Module Characteristics:Maximum Carry AC Power
- C Attribute: NISWITCH_ATTR_MAX_CARRY_AC_POWER
max_carry_dc_current¶
niswitch.Session.
max_carry_dc_current
¶This channel-based property returns the maximum DC current the channel can carry. The units are amperes.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the max_carry_dc_current.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an max_carry_dc_current.Session instance, and calling set/get value on the result.:
session['0,1'].max_carry_dc_current = var var = session['0,1'].max_carry_dc_currentThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Module Characteristics:Maximum Carry DC Current
- C Attribute: NISWITCH_ATTR_MAX_CARRY_DC_CURRENT
max_carry_dc_power¶
niswitch.Session.
max_carry_dc_power
¶This channel-based property returns the maximum DC power the channel can carry. The units are watts.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the max_carry_dc_power.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an max_carry_dc_power.Session instance, and calling set/get value on the result.:
session['0,1'].max_carry_dc_power = var var = session['0,1'].max_carry_dc_powerThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Module Characteristics:Maximum Carry DC Power
- C Attribute: NISWITCH_ATTR_MAX_CARRY_DC_POWER
max_dc_voltage¶
niswitch.Session.
max_dc_voltage
¶This channel-based property returns the maximum DC voltage the channel can switch. The units are volts.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the max_dc_voltage.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an max_dc_voltage.Session instance, and calling set/get value on the result.:
session['0,1'].max_dc_voltage = var var = session['0,1'].max_dc_voltageThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Module Characteristics:Maximum DC Voltage
- C Attribute: NISWITCH_ATTR_MAX_DC_VOLTAGE
max_switching_ac_current¶
niswitch.Session.
max_switching_ac_current
¶This channel-based property returns the maximum AC current the channel can switch. The units are amperes RMS.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the max_switching_ac_current.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an max_switching_ac_current.Session instance, and calling set/get value on the result.:
session['0,1'].max_switching_ac_current = var var = session['0,1'].max_switching_ac_currentThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Module Characteristics:Maximum Switching AC Current
- C Attribute: NISWITCH_ATTR_MAX_SWITCHING_AC_CURRENT
max_switching_ac_power¶
niswitch.Session.
max_switching_ac_power
¶This channel-based property returns the maximum AC power the channel can switch. The units are volt-amperes.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the max_switching_ac_power.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an max_switching_ac_power.Session instance, and calling set/get value on the result.:
session['0,1'].max_switching_ac_power = var var = session['0,1'].max_switching_ac_powerThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Module Characteristics:Maximum Switching AC Power
- C Attribute: NISWITCH_ATTR_MAX_SWITCHING_AC_POWER
max_switching_dc_current¶
niswitch.Session.
max_switching_dc_current
¶This channel-based property returns the maximum DC current the channel can switch. The units are amperes.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the max_switching_dc_current.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an max_switching_dc_current.Session instance, and calling set/get value on the result.:
session['0,1'].max_switching_dc_current = var var = session['0,1'].max_switching_dc_currentThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Module Characteristics:Maximum Switching DC Current
- C Attribute: NISWITCH_ATTR_MAX_SWITCHING_DC_CURRENT
max_switching_dc_power¶
niswitch.Session.
max_switching_dc_power
¶This channel-based property returns the maximum DC power the channel can switch. The units are watts.
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the max_switching_dc_power.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an max_switching_dc_power.Session instance, and calling set/get value on the result.:
session['0,1'].max_switching_dc_power = var var = session['0,1'].max_switching_dc_powerThe following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Module Characteristics:Maximum Switching DC Power
- C Attribute: NISWITCH_ATTR_MAX_SWITCHING_DC_POWER
number_of_relays¶
niswitch.Session.
number_of_relays
¶This property returns the number of relays.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Module Characteristics:Number of Relays
- C Attribute: NISWITCH_ATTR_NUMBER_OF_RELAYS
num_of_columns¶
niswitch.Session.
num_of_columns
¶This property returns the number of channels on the column of a matrix or scanner. If the switch device is a scanner, this value is the number of input channels. The
niswitch.Session.wire_mode
property affects the number of available columns. For example, if your device has 8 input lines and you use the four-wire mode, then the number of columns you have available is 2.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Matrix Configuration:Number of Columns
- C Attribute: NISWITCH_ATTR_NUM_OF_COLUMNS
num_of_rows¶
niswitch.Session.
num_of_rows
¶This property returns the number of channels on the row of a matrix or scanner. If the switch device is a scanner, this value is the number of output channels. The
niswitch.Session.wire_mode
property affects the number of available rows. For example, if your device has 8 input lines and you use the two-wire mode, then the number of columns you have available is 4.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Matrix Configuration:Number of Rows
- C Attribute: NISWITCH_ATTR_NUM_OF_ROWS
parsed_scan_list¶
niswitch.Session.
parsed_scan_list
¶This property has been deprecated and may be removed from a future release of NI-SWITCH.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Obsolete Attributes:Parsed Scan List
- C Attribute: NISWITCH_ATTR_PARSED_SCAN_LIST
power_down_latching_relays_after_debounce¶
niswitch.Session.
power_down_latching_relays_after_debounce
¶This property specifies whether to power down latching relays after calling Wait For Debounce. When Power Down Latching Relays After Debounce is enabled (True), a call to Wait For Debounce ensures that the relays are settled and the latching relays are powered down.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Module Characteristics:Power Down Latching Relays After Debounce
- C Attribute: NISWITCH_ATTR_POWER_DOWN_LATCHING_RELAYS_AFTER_DEBOUNCE
scan_advanced_output¶
niswitch.Session.
scan_advanced_output
¶This property specifies the method you want to use to notify another instrument that all signals going through the switch device have settled following the processing of one entry in the scan list.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.ScanAdvancedOutput Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Scanning Configuration:Scan Advanced Output
- C Attribute: NISWITCH_ATTR_SCAN_ADVANCED_OUTPUT
scan_advanced_polarity¶
niswitch.Session.
scan_advanced_polarity
¶The following table lists the characteristics of this property.
Characteristic Value Datatype enums.ScanAdvancedPolarity Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Scanning Configuration:Scan Advanced Polarity
- C Attribute: NISWITCH_ATTR_SCAN_ADVANCED_POLARITY
scan_delay¶
niswitch.Session.
scan_delay
¶This property specifies the minimum amount of time the switch device waits before it asserts the scan advanced output trigger after opening or closing the switch. The switch device always waits for debounce before asserting the trigger. The units are seconds. the greater value of the settling time and the value you specify as the scan delay.
Note
NI PXI-2501/2503/2565/2590/2591 Users–the actual delay will always be
The following table lists the characteristics of this property.
Characteristic Value Datatype float in seconds or datetime.timedelta Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Scanning Configuration:Scan Delay
- C Attribute: NISWITCH_ATTR_SCAN_DELAY
scan_list¶
niswitch.Session.
scan_list
¶This property contains a scan list, which is a string that specifies channel connections and trigger conditions. The
niswitch.Session._initiate_scan()
method makes or breaks connections and waits for triggers according to the instructions in the scan list. The scan list is comprised of channel names that you separate with special characters. These special characters determine the operations the scanner performs on the channels when it executes this scan list. To create a path between two channels, use the following character between the two channel names: -> (a dash followed by a ‘>’ sign) Example: ‘CH1->CH2’ tells the switch to make a path from channel CH1 to channel CH2. To break or clear a path, use the following character as a prefix before the path: ~ (tilde) Example: ‘~CH1->CH2’ tells the switch to break the path from channel CH1 to channel CH2. To tell the switch device to wait for a trigger event, use the following character as a separator between paths: ; (semi-colon) Example: ‘CH1->CH2;CH3->CH4’ tells the switch to make the path from channel CH1 to channel CH2, wait for a trigger, and then make the path from CH3 to CH4.The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Scanning Configuration:Scan List
- C Attribute: NISWITCH_ATTR_SCAN_LIST
scan_mode¶
niswitch.Session.
scan_mode
¶This property specifies what happens to existing connections that conflict with the connections you make in a scan list. For example, if CH1 is already connected to CH2 and the scan list instructs the switch device to connect CH1 to CH3, this property specifies what happens to the connection between CH1 and CH2. If the value of this property is
NONE
, the switch device takes no action on existing paths. If the value isBREAK_BEFORE_MAKE
, the switch device breaks conflicting paths before making new ones. If the value isBREAK_AFTER_MAKE
, the switch device breaks conflicting paths after making new ones. Most switch devices support only one of the possible values. In such cases, this property serves as an indicator of the device’s behavior.Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.ScanMode Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Scanning Configuration:Scan Mode
- C Attribute: NISWITCH_ATTR_SCAN_MODE
serial_number¶
niswitch.Session.
serial_number
¶This read-only property returns the serial number for the switch device controlled by this instrument driver. If the device does not return a serial number, the driver returns the IVI_ERROR_ATTRIBUTE_NOT_SUPPORTED error.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Module Characteristics:Serial Number
- C Attribute: NISWITCH_ATTR_SERIAL_NUMBER
settling_time¶
niswitch.Session.
settling_time
¶This channel-based property returns the maximum length of time from after you make a connection until the signal flowing through the channel settles. The units are seconds. the greater value of the settling time and the value you specify as the scan delay.
Note
NI PXI-2501/2503/2565/2590/2591 Users–the actual delay will always be
Tip
This property can use repeated capabilities (usually channels). If set or get directly on the settling_time.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an settling_time.Session instance, and calling set/get value on the result.:
session['0,1'].settling_time = var var = session['0,1'].settling_timeThe following table lists the characteristics of this property.
Characteristic Value Datatype float in seconds or datetime.timedelta Permissions read-write Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Module Characteristics:Settling Time
- C Attribute: NISWITCH_ATTR_SETTLING_TIME
simulate¶
niswitch.Session.
simulate
¶Specifies whether or not to simulate instrument driver I/O operations. If simulation is enabled, instrument driver methods perform range checking and call Ivi_GetAttribute and Ivi_SetAttribute methods, but they do not perform instrument I/O. For output parameters that represent instrument data, the instrument driver methods return calculated values. The default value is False. Use the
niswitch.Session.InitWithOptions()
method to override this value.Note
One or more of the referenced methods are not in the Python API for this driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype bool Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:User Options:Simulate
- C Attribute: NISWITCH_ATTR_SIMULATE
specific_driver_description¶
niswitch.Session.
specific_driver_description
¶A string that contains a brief description of the specific driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Driver Identification:Description
- C Attribute: NISWITCH_ATTR_SPECIFIC_DRIVER_DESCRIPTION
specific_driver_revision¶
niswitch.Session.
specific_driver_revision
¶A string that contains additional version information about this instrument driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Driver Identification:Revision
- C Attribute: NISWITCH_ATTR_SPECIFIC_DRIVER_REVISION
specific_driver_vendor¶
niswitch.Session.
specific_driver_vendor
¶A string that contains the name of the vendor that supplies this driver.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Driver Identification:Driver Vendor
- C Attribute: NISWITCH_ATTR_SPECIFIC_DRIVER_VENDOR
supported_instrument_models¶
niswitch.Session.
supported_instrument_models
¶Contains a comma-separated list of supported instrument models.
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Inherent IVI Attributes:Driver Capabilities:Supported Instrument Models
- C Attribute: NISWITCH_ATTR_SUPPORTED_INSTRUMENT_MODELS
temperature¶
niswitch.Session.
temperature
¶This property returns the temperature as read by the Switch module. The units are degrees Celsius.
The following table lists the characteristics of this property.
Characteristic Value Datatype float Permissions read only Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Module Characteristics:Temperature
- C Attribute: NISWITCH_ATTR_TEMPERATURE
trigger_input¶
niswitch.Session.
trigger_input
¶This property specifies the source of the trigger for which the switch device can wait when processing a scan list. The switch device waits for a trigger when it encounters a semi-colon in a scan list. When the trigger occurs, the switch device advances to the next entry in the scan list.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.TriggerInput Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Scanning Configuration:Trigger Input
- C Attribute: NISWITCH_ATTR_TRIGGER_INPUT
trigger_input_polarity¶
niswitch.Session.
trigger_input_polarity
¶Determines the behavior of the trigger Input.
The following table lists the characteristics of this property.
Characteristic Value Datatype enums.TriggerInputPolarity Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Scanning Configuration:Trigger Input Polarity
- C Attribute: NISWITCH_ATTR_TRIGGER_INPUT_POLARITY
trigger_mode¶
niswitch.Session.
trigger_mode
¶This property has been deprecated and may be removed from a future release of NI-SWITCH. Use the
niswitch.Session.route_trigger_input()
and/orniswitch.Session.route_scan_advanced_output()
methods instead.The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read-write Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Obsolete Attributes:Trigger Mode
- C Attribute: NISWITCH_ATTR_TRIGGER_MODE
wire_mode¶
niswitch.Session.
wire_mode
¶This property returns the wire mode of the switch device. This property affects the values of the
niswitch.Session.num_of_rows
andniswitch.Session.num_of_columns
properties. The actual number of input and output lines on the switch device is fixed, but the number of channels depends on how many lines constitute each channel.Tip
This property can use repeated capabilities (usually channels). If set or get directly on the wire_mode.Session object, then the set/get will use all repeated capabilities in the session. You can specify a subset of repeated capabilities using the Python index notation on an wire_mode.Session instance, and calling set/get value on the result.:
session['0,1'].wire_mode = var var = session['0,1'].wire_modeThe following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read only Channel Based True Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- LabVIEW Property: Module Characteristics:Wire mode
- C Attribute: NISWITCH_ATTR_WIRE_MODE
Methods¶
abort¶
niswitch.Session.
abort
()¶Aborts the scan in progress. Initiate a scan with
niswitch.Session._initiate_scan()
. If the switch module is not scanning, NISWITCH_ERROR_NO_SCAN_IN_PROGRESS error is returned.
can_connect¶
niswitch.Session.
can_connect
(channel1, channel2)¶Verifies that a path between channel 1 and channel 2 can be created. If a path is possible in the switch module, the availability of that path is returned given the existing connections. If the path is possible but in use, a NISWITCH_WARN_IMPLICIT_CONNECTION_EXISTS warning is returned.
Parameters:
- channel1 (str) – Input one of the channel names of the desired path. Pass the other channel name as the channel 2 parameter. Refer to Devices Overview for valid channel names for the switch module. Examples of valid channel names: ch0, com0, ab0, r1, c2, cjtemp Default value: “”
- channel2 (str) – Input one of the channel names of the desired path. Pass the other channel name as the channel 1 parameter. Refer to Devices Overview for valid channel names for the switch module. Examples of valid channel names: ch0, com0, ab0, r1, c2, cjtemp Default value: “”
Return type: Returns: Indicates whether a path is valid. Possible values include: ————————————
NISWITCH_VAL_PATH_AVAILABLE
1NISWITCH_VAL_PATH_EXISTS
2NISWITCH_VAL_PATH_UNSUPPORTED
3NISWITCH_VAL_RSRC_IN_USE
4NISWITCH_VAL_SOURCE_CONFLICT
5NISWITCH_VAL_CHANNEL_NOT_AVAILABLE
6 Notes: (1)NISWITCH_VAL_PATH_AVAILABLE
indicates that the driver can create the path at this time. (2)NISWITCH_VAL_PATH_EXISTS
indicates that the path already exists. (3)NISWITCH_VAL_PATH_UNSUPPORTED
indicates that the instrument is not capable of creating a path between the channels you specify. (4)NISWITCH_VAL_RSRC_IN_USE
indicates that although the path is valid, the driver cannot create the path at this moment because the switch device is currently using one or more of the required channels to create another path. You must destroy the other path before creating this one. (5)NISWITCH_VAL_SOURCE_CONFLICT
indicates that the instrument cannot create a path because both channels are connected to a different source channel. (6)NISWITCH_VAL_CHANNEL_NOT_AVAILABLE
indicates that the driver cannot create a path between the two channels because one of the channels is a configuration channel and thus unavailable for external connections.Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
commit¶
niswitch.Session.
commit
()¶Downloads the configured scan list and trigger settings to hardware. Calling
niswitch.Session.commit()
optional as it is implicitly called duringniswitch.Session._initiate_scan()
. Useniswitch.Session.commit()
to arm triggers in a given order or to control when expensive hardware operations are performed.
configure_scan_list¶
niswitch.Session.
configure_scan_list
(scanlist, scan_mode=niswitch.ScanMode.BREAK_BEFORE_MAKE)¶Configures the scan list and scan mode used for scanning. Refer to Devices Overview to determine if the switch module supports scanning. The scan list is comprised of a list of channel connections separated by semi-colons. For example, the following scan list will scan the first three channels of a multiplexer: com0->ch0; com0->ch1; com0->ch2; Refer to Scan Lists for more information on scan list syntax To see the status of the scan, call either
niswitch.Session.IsScanning()
orniswitch.Session.wait_for_scan_complete()
. Use theniswitch.Session.configure_scan_trigger()
method to configure the scan trigger. Use theniswitch.Session._initiate_scan()
method to start the scan.Note
One or more of the referenced methods are not in the Python API for this driver.
Parameters:
- scanlist (str) – The scan list to use. The driver uses this value to set the Scan List property. Default value: None
- scan_mode (
niswitch.ScanMode
) – Specifies how the switch module breaks existing connections when scanning. The driver uses this value to set the Scan Mode property. Refer to scan modes for more information. Default value: Break Before Make
configure_scan_trigger¶
niswitch.Session.
configure_scan_trigger
(trigger_input, scan_advanced_output, scan_delay=datetime.timedelta(seconds=0.0))¶Configures the scan triggers for the scan list established with
niswitch.Session.configure_scan_list()
. Refer to Devices Overview to determine if the switch module supports scanning.niswitch.Session.configure_scan_trigger()
sets the location that the switch expects to receive an input trigger to advance through the scan list. This method also sets the location where it outputs a scan advanced signal after it completes an entry in the scan list.
Parameters:
- trigger_input (
niswitch.TriggerInput
) – Trigger source you want the switch module to use during scanning. The driver uses this value to set theniswitch.Session.trigger_input
property. The switch device waits for the trigger you specify when it encounters a semicolon in the scanlist. When the trigger occurs, the switch device advances to the next entry in the scanlist. Refer to theniswitch.Session.trigger_input
topic in the NI Switches Help for a list of valid values.- scan_advanced_output (
niswitch.ScanAdvancedOutput
) – Output destination of the scan advanced trigger signal. The driver uses this value to set theniswitch.Session.scan_advanced_output
property. After the switch processes each entry in the scan list, it waits the length of time you specify in the Scan Delay parameter and then asserts a trigger on the line you specify with this parameter. Refer to theniswitch.Session.scan_advanced_output
topic in the NI Switches Help for a list of valid values.- scan_delay (float in seconds or datetime.timedelta) – The minimum length of time you want the switch device to wait after it creates a path until it asserts a trigger on the scan advanced output line. The driver uses this value to set the Scan Delay property. The scan delay is in addition to the settling time.The driver uses this value to set the
niswitch.Session.scan_delay
property. Express this value in seconds. Default value: 0.0 s
connect¶
niswitch.Session.
connect
(channel1, channel2)¶Creates a path between channel 1 and channel 2. The driver calculates and uses the shortest path between the two channels. Refer to Immediate Operations for information about Channel Usage types. If a path is not available, the method returns one of the following errors: - NISWITCH_ERROR_EXPLICIT_CONNECTION_EXISTS, if the two channels are already explicitly connected by calling either the
niswitch.Session.connect()
orniswitch.Session.set_path()
method. - NISWITCH_ERROR_IS_CONFIGURATION_CHANNEL, if a channel is a configuration channel. Error elaboration contains information about which of the two channels is a configuration channel. - NISWITCH_ERROR_ATTEMPT_TO_CONNECT_SOURCES, if both channels are connected to a different source. Error elaboration contains information about sources channel 1 and 2 connect to. - NISWITCH_ERROR_CANNOT_CONNECT_TO_ITSELF, if channels 1 and 2 are one and the same channel. - NISWITCH_ERROR_PATH_NOT_FOUND, if the driver cannot find a path between the two channels. Note: Paths are bidirectional. For example, if a path exists between channels CH1 and CH2, then the path also exists between channels CH2 and CH1.
Parameters:
- channel1 (str) – Input one of the channel names of the desired path. Pass the other channel name as the channel 2 parameter. Refer to Devices Overview for valid channel names for the switch module. Examples of valid channel names: ch0, com0, ab0, r1, c2, cjtemp Default value: None
- channel2 (str) – Input one of the channel names of the desired path. Pass the other channel name as the channel 1 parameter. Refer to Devices Overview for valid channel names for the switch module. Examples of valid channel names: ch0, com0, ab0, r1, c2, cjtemp Default value: None
connect_multiple¶
niswitch.Session.
connect_multiple
(connection_list)¶Creates the connections between channels specified in Connection List. Specify connections with two endpoints only or the explicit path between two endpoints. NI-SWITCH calculates and uses the shortest path between the channels. Refer to Setting Source and Configuration Channels for information about channel usage types. In the event of an error, connecting stops at the point in the list where the error occurred. If a path is not available, the method returns one of the following errors: - NISWITCH_ERROR_EXPLICIT_CONNECTION_EXISTS, if the two channels are already explicitly connected. - NISWITCH_ERROR_IS_CONFIGURATION_CHANNEL, if a channel is a configuration channel. Error elaboration contains information about which of the two channels is a configuration channel. - NISWITCH_ERROR_ATTEMPT_TO_CONNECT_SOURCES, if both channels are connected to a different source. Error elaboration contains information about sources channel 1 and 2 to connect. - NISWITCH_ERROR_CANNOT_CONNECT_TO_ITSELF, if channels 1 and 2 are one and the same channel. - NISWITCH_ERROR_PATH_NOT_FOUND, if the driver cannot find a path between the two channels. Note: Paths are bidirectional. For example, if a path exists between channels ch1 and ch2, then the path also exists between channels ch1 and ch2.
Parameters: connection_list (str) – Connection List specifies a list of connections between channels to make. NI-SWITCH validates the connection list, and aborts execution of the list if errors are returned. Refer to Connection and Disconnection List Syntax for valid connection list syntax and examples. Refer to Devices Overview for valid channel names for the switch module. Example of a valid connection list: c0 -> r1, [c2 -> r2 -> c3] In this example, r2 is a configuration channel. Default value: None
disable¶
niswitch.Session.
disable
()¶Places the switch module in a quiescent state where it has minimal or no impact on the system to which it is connected. All channels are disconnected and any scan in progress is aborted.
disconnect¶
niswitch.Session.
disconnect
(channel1, channel2)¶This method destroys the path between two channels that you create with the
niswitch.Session.connect()
orniswitch.Session.set_path()
method. If a path is not connected or not available, the method returns the IVISWTCH_ERROR_NO_SUCH_PATH error.
Parameters:
- channel1 (str) – Input one of the channel names of the path to break. Pass the other channel name as the channel 2 parameter. Refer to Devices Overview for valid channel names for the switch module. Examples of valid channel names: ch0, com0, ab0, r1, c2, cjtemp Default value: None
- channel2 (str) – Input one of the channel names of the path to break. Pass the other channel name as the channel 1 parameter. Refer to Devices Overview for valid channel names for the switch module. Examples of valid channel names: ch0, com0, ab0, r1, c2, cjtemp Default value: None
disconnect_all¶
niswitch.Session.
disconnect_all
()¶Breaks all existing paths. If the switch module cannot break all paths, NISWITCH_WARN_PATH_REMAINS warning is returned.
disconnect_multiple¶
niswitch.Session.
disconnect_multiple
(disconnection_list)¶Breaks the connections between channels specified in Disconnection List. If no connections exist between channels, NI-SWITCH returns an error. In the event of an error, the VI stops at the point in the list where the error occurred.
Parameters: disconnection_list (str) – Disconnection List specifies a list of connections between channels to break. NI-SWITCH validates the disconnection list, and aborts execution of the list if errors are returned. Refer to Connection and Disconnection List Syntax for valid disconnection list syntax and examples. Refer to Devices Overview for valid channel names for the switch module. Example of a valid disconnection list: c0 -> r1, [c2 -> r2 -> c3] In this example, r2 is a configuration channel. Default value: None
get_channel_name¶
niswitch.Session.
get_channel_name
(index)¶Returns the channel string that is in the channel table at the specified index. Use
niswitch.Session.get_channel_name()
in a For Loop to get a complete list of valid channel names for the switch module. Use the Channel Count property to determine the number of channels.
Parameters: index (int) – A 1-based index into the channel table. Default value: 1 Maximum value: Value of Channel Count property.
get_path¶
niswitch.Session.
get_path
(channel1, channel2)¶Returns a string that identifies the explicit path created with
niswitch.Session.connect()
. Pass this string toniswitch.Session.set_path()
to establish the exact same path in future connections. In some cases, multiple paths are available between two channels. When you callniswitch.Session.connect()
, the driver selects an available path. Withniswitch.Session.connect()
, there is no guarantee that the driver selected path will always be the same path through the switch module.niswitch.Session.get_path()
only returns those paths explicitly created by niSwitch Connect Channels orniswitch.Session.set_path()
. For example, if you connect channels CH1 and CH3,and then channels CH2 and CH3, an explicit path between channels CH1 and CH2 does not exist an error is returned
Parameters:
- channel1 (str) – Input one of the channel names of the desired path. Pass the other channel name as the channel 2 parameter. Refer to Devices Overview for valid channel names for the switch module. Examples of valid channel names: ch0, com0, ab0, r1, c2, cjtemp Default value: “”
- channel2 (str) – Input one of the channel names of the desired path. Pass the other channel name as the channel 1 parameter. Refer to Devices Overview for valid channel names for the switch module. Examples of valid channel names: ch0, com0, ab0, r1, c2, cjtemp Default value: “”
get_relay_count¶
niswitch.Session.
get_relay_count
(relay_name)¶Returns the number of times the relay has changed from Closed to Open. Relay count is useful for tracking relay lifetime and usage. Call
niswitch.Session.wait_for_debounce()
beforeniswitch.Session.get_relay_count()
to ensure an accurate count. Refer to the Relay Count topic in the NI Switches Help to determine if the switch module supports relay counting.
Parameters: relay_name (str) – Name of the relay. Default value: None Examples of valid relay names: ch0, ab0, 1wire, hlselect Refer to Devices Overview for a list of valid relay names for the switch module. Return type: int Returns: The number of relay cycles.
get_relay_name¶
niswitch.Session.
get_relay_name
(index)¶Returns the relay name string that is in the relay list at the specified index. Use
niswitch.Session.get_relay_name()
in a For Loop to get a complete list of valid relay names for the switch module. Use the Number of Relays property to determine the number of relays.
Parameters: index (int) – A 1-based index into the channel table. Default value: 1 Maximum value: Value of Channel Count property.
get_relay_position¶
niswitch.Session.
get_relay_position
(relay_name)¶Returns the relay position for the relay specified in the Relay Name parameter.
Parameters: relay_name (str) – Name of the relay. Default value: None Examples of valid relay names: ch0, ab0, 1wire, hlselect Refer to Devices Overview for a list of valid relay names for the switch module. Return type: niswitch.RelayPosition
Returns: Indicates whether the relay is open or closed. NISWITCH_VAL_OPEN
10 NIWITCH_VAL_CLOSED 11Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
relay_control¶
niswitch.Session.
relay_control
(relay_name, relay_action)¶Controls individual relays of the switch. When controlling individual relays, the protection offered by setting the usage of source channels and configuration channels, and by enabling or disabling analog bus sharing on the NI SwitchBlock, does not apply. Refer to the device book for your switch in the NI Switches Help to determine if the switch supports individual relay control.
Parameters:
- relay_name (str) – Name of the relay. Default value: None Examples of valid relay names: ch0, ab0, 1wire, hlselect Refer to Devices Overview for a list of valid relay names for the switch module.
- relay_action (
niswitch.RelayAction
) –Specifies whether to open or close a given relay. Default value: Relay Close Defined values:
NISWITCH_VAL_OPEN_RELAY
NISWITCH_VAL_CLOSE_RELAY
(Default Value)Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
reset¶
niswitch.Session.
reset
()¶Disconnects all created paths and returns the switch module to the state at initialization. Configuration channel and source channel settings remain unchanged.
reset_with_defaults¶
niswitch.Session.
reset_with_defaults
()¶Resets the switch module and applies initial user specified settings from the logical name used to initialize the session. If the session was created without a logical name, this method is equivalent to
niswitch.Session.reset()
.
route_scan_advanced_output¶
niswitch.Session.
route_scan_advanced_output
(scan_advanced_output_connector, scan_advanced_output_bus_line, invert=False)¶Routes the scan advanced output trigger from a trigger bus line (TTLx) to the front or rear connector.
Parameters:
- scan_advanced_output_connector (
niswitch.ScanAdvancedOutput
) –The scan advanced trigger destination. Valid locations are the
FRONTCONNECTOR
andREARCONNECTOR
. Default value:FRONTCONNECTOR
Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
- scan_advanced_output_bus_line (
niswitch.ScanAdvancedOutput
) –The trigger line to route the scan advanced output trigger from the front or rear connector. Select
NONE
to break an existing route. Default value: None Valid Values:NONE
TTL0
TTL1
TTL2
TTL3
TTL4
TTL5
TTL6
TTL7
Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
- invert (bool) – If True, inverts the input trigger signal from falling to rising or vice versa. Default value: False
route_trigger_input¶
niswitch.Session.
route_trigger_input
(trigger_input_connector, trigger_input_bus_line, invert=False)¶Routes the input trigger from the front or rear connector to a trigger bus line (TTLx). To disconnect the route, call this method again and specify None for trigger bus line parameter.
Parameters:
- trigger_input_connector (
niswitch.TriggerInput
) –The location of the input trigger source on the switch module. Valid locations are the
FRONTCONNECTOR
andREARCONNECTOR
. Default value:FRONTCONNECTOR
Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
- trigger_input_bus_line (
niswitch.TriggerInput
) –The trigger line to route the input trigger. Select
NISWITCH_VAL_NONE
to break an existing route. Default value: None Valid Values:NISWITCH_VAL_NONE
TTL0
TTL1
TTL2
TTL3
TTL4
TTL5
TTL6
TTL7
Note
One or more of the referenced values are not in the Python API for this driver. Enums that only define values, or represent True/False, have been removed.
- invert (bool) – If True, inverts the input trigger signal from falling to rising or vice versa. Default value: False
self_test¶
niswitch.Session.
self_test
()¶Verifies that the driver can communicate with the switch module.
Raises SelfTestError on self test failure. Properties on exception object:
- code - failure code from driver
- message - status message from driver
Self-Test Code Description 0 Passed self-test 1 Self-test failed
send_software_trigger¶
niswitch.Session.
send_software_trigger
()¶Sends a software trigger to the switch module specified in the NI-SWITCH session. When the trigger input is set to
SOFTWARE_TRIG
through either theniswitch.Session.configure_scan_trigger()
or theniswitch.Session.trigger_input
property, the scan does not proceed from a semi-colon (wait for trigger) untilniswitch.Session.send_software_trigger()
is called.
set_continuous_scan¶
niswitch.Session.
set_continuous_scan
(continuous_scan)¶Sets the to loop continuously through the scan list or to stop scanning after one pass through the scan list.
Parameters: continuous_scan (bool) – If True, loops continuously through the scan list during scanning. If False, the scan stops after one pass through the scan list. Default value: False
set_path¶
niswitch.Session.
set_path
(path_list)¶Connects two channels by specifying an explicit path in the path list parameter.
niswitch.Session.set_path()
is particularly useful where path repeatability is important, such as in calibrated signal paths. If this is not necessary, useniswitch.Session.connect()
.
Parameters: path_list (str) – A string composed of comma-separated paths between channel 1 and channel 2. The first and last names in the path are the endpoints of the path. Every other channel in the path are configuration channels. Example of a valid path list string: ch0->com0, com0->ab0. In this example, com0 is a configuration channel. Default value: None Obtain the path list for a previously created path with niswitch.Session.get_path()
.
wait_for_debounce¶
niswitch.Session.
wait_for_debounce
(maximum_time_ms=datetime.timedelta(milliseconds=5000))¶Pauses until all created paths have settled. If the time you specify with the Maximum Time (ms) parameter elapsed before the switch paths have settled, this method returns the NISWITCH_ERROR_MAX_TIME_EXCEEDED error.
Parameters: maximum_time_ms (float in seconds or datetime.timedelta) – Specifies the maximum length of time to wait for all relays in the switch module to activate or deactivate. If the specified time elapses before all relays active or deactivate, a timeout error is returned. Default Value:5000 ms
wait_for_scan_complete¶
niswitch.Session.
wait_for_scan_complete
(maximum_time_ms=datetime.timedelta(milliseconds=5000))¶Pauses until the switch module stops scanning or the maximum time has elapsed and returns a timeout error. If the time you specify with the Maximum Time (ms) parameter elapsed before the scanning operation has finished, this method returns the NISWITCH_ERROR_MAX_TIME_EXCEEDED error.
Parameters: maximum_time_ms (float in seconds or datetime.timedelta) – Specifies the maximum length of time to wait for the switch module to stop scanning. If the specified time elapses before the scan ends, NISWITCH_ERROR_MAX_TIME_EXCEEDED error is returned. Default Value:5000 ms
Properties¶
Methods¶
Enums¶
Enums used in NI-SWITCH
HandshakingInitiation¶
-
class
niswitch.
HandshakingInitiation
¶ -
MEASUREMENT_DEVICE
¶ The niSwitch Initiate Scan <switchviref.chm::/:py:meth:`niswitch.Session.Initiate_Scan.html>`__ VI does not return until the switch hardware is waiting for a trigger input. This ensures that if you initiate the measurement device after calling the niSwitch Initiate Scan <switchviref.chm::/:py:meth:`niswitch.Session.Initiate_Scan.html>`__ VI , the switch is sure to receive the first measurement complete (MC) signal sent by the measurement device. The measurement device should be configured to first take a measurement, send MC, then wait for scanner advanced output signal. Thus, the first MC of the measurement device initiates handshaking.
-
SWITCH
¶ The niSwitch Initiate Scan <switchviref.chm::/:py:meth:`niswitch.Session.Initiate_Scan.html>`__ VI returns immediately after beginning scan list execution. It is assumed that the measurement device has already been configured and is waiting for the scanner advanced signal. The measurement should be configured to first wait for a trigger, then take a measurement. Thus, the first scanner advanced output signal of the switch module initiates handshaking.
-
PathCapability¶
ScanAdvancedOutput¶
-
class
niswitch.
ScanAdvancedOutput
¶ -
NONE
¶ The switch device does not produce a Scan Advanced Output trigger.
-
EXTERNAL
¶ External Trigger. The switch device produces the Scan Advanced Output trigger on the external trigger output.
-
TTL0
¶ The switch device produces the Scan Advanced Output on the PXI TRIG0 line.
-
TTL1
¶ The switch device produces the Scan Advanced Output on the PXI TRIG1 line.
-
TTL2
¶ The switch device produces the Scan Advanced Output on the PXI TRIG2 line.
-
TTL3
¶ The switch device produces the Scan Advanced Output on the PXI TRIG3 line.
-
TTL4
¶ The switch device produces the Scan Advanced Output on the PXI TRIG4 line.
-
TTL5
¶ The switch device produces the Scan Advanced Output on the PXI TRIG5 line.
-
TTL6
¶ The switch device produces the Scan Advanced Output on the PXI TRIG6 line.
-
TTL7
¶ The switch device produces the Scan Advanced Output on the PXI TRIG7 line.
-
PXI_STAR
¶ The switch module produces the Scan Advanced Output Trigger on the PXI Star trigger bus before processing the next entry in the scan list.
-
REARCONNECTOR
¶ The switch device produces the Scan Advanced Output trigger on the rear connector.
-
FRONTCONNECTOR
¶ The switch device produces the Scan Advanced Output trigger on the front connector.
-
REARCONNECTOR_MODULE1
¶ The switch module produces the Scan Advanced Output Trigger on the rear connector module 1.
-
REARCONNECTOR_MODULE2
¶ The switch module produces the Scan Advanced Output Trigger on the rear connector module 2.
-
REARCONNECTOR_MODULE3
¶ The switch module produces the Scan Advanced Output Trigger on the rear connector module 3.
-
REARCONNECTOR_MODULE4
¶ The switch module produces the Scan Advanced Output Trigger on the rear connector module 4.
-
REARCONNECTOR_MODULE5
¶ The switch module produces the Scan Advanced Output Trigger on the rear connector module 5.
-
REARCONNECTOR_MODULE6
¶ The switch module produces the Scan Advanced Output Trigger on the rear connector module 6.
-
REARCONNECTOR_MODULE7
¶ The switch module produces the Scan Advanced Output Trigger on the rear connector module 7.
-
REARCONNECTOR_MODULE8
¶ The switch module produces the Scan Advanced Output Trigger on the rear connector module 8.
-
REARCONNECTOR_MODULE9
¶ The switch module produces the Scan Advanced Ouptut Trigger on the rear connector module 9.
-
REARCONNECTOR_MODULE10
¶ The switch module produces the Scan Advanced Output Trigger on the rear connector module 10.
-
REARCONNECTOR_MODULE11
¶ The switch module produces the Scan Advanced Output Trigger on the rear connector module 11.
-
REARCONNECTOR_MODULE12
¶ The switch module produces the Scan Advanced Output Trigger on the rear connector module 12.
-
FRONTCONNECTOR_MODULE1
¶ The switch module produces the Scan Advanced Output Trigger on the front connector module 1.
-
FRONTCONNECTOR_MODULE2
¶ The switch module produces the Scan Advanced Output Trigger on the front connector module 2.
-
FRONTCONNECTOR_MODULE3
¶ The switch module produces the Scan Advanced Output Trigger on the front connector module 3.
-
FRONTCONNECTOR_MODULE4
¶ The switch module produces the Scan Advanced Output Trigger on the front connector module 4.
-
FRONTCONNECTOR_MODULE5
¶ The switch module produces the Scan Advanced Output Trigger on the front connector module 5.
-
FRONTCONNECTOR_MODULE6
¶ The switch module produces the Scan Advanced Output Trigger on the front connector module 6.
-
FRONTCONNECTOR_MODULE7
¶ The switch module produces the Scan Advanced Output Trigger on the front connector module 7.
-
FRONTCONNECTOR_MODULE8
¶ The switch module produces the Scan Advanced Output Trigger on the front connector module 8.
-
FRONTCONNECTOR_MODULE9
¶ The switch module produces the Scan Advanced Output Trigger on the front connector module 9.
-
FRONTCONNECTOR_MODULE10
¶ The switch module produces the Scan Advanced Output Trigger on the front connector module 10.
-
FRONTCONNECTOR_MODULE11
¶ The switch module produces the Scan Advanced Output Trigger on the front connector module 11.
-
FRONTCONNECTOR_MODULE12
¶ The switch module produces the Scan Advanced Output Trigger on the front connector module 12.
-
ScanAdvancedPolarity¶
ScanMode¶
TriggerInput¶
-
class
niswitch.
TriggerInput
¶ -
IMMEDIATE
¶ Immediate Trigger. The switch device does not wait for a trigger before processing the next entry in the scan list.
-
EXTERNAL
¶ External Trigger. The switch device waits until it receives a trigger from an external source through the external trigger input before processing the next entry in the scan list.
-
SOFTWARE_TRIG
¶ The switch device waits until you call the
niswitch.Session.send_software_trigger()
method before processing the next entry in the scan list.
-
TTL0
¶ The switch device waits until it receives a trigger on the PXI TRIG0 line before processing the next entry in the scan list.
-
TTL1
¶ The switch device waits until it receives a trigger on the PXI TRIG1 line before processing the next entry in the scan list.
-
TTL2
¶ The switch device waits until it receives a trigger on the PXI TRIG2 line before processing the next entry in the scan list.
-
TTL3
¶ The switch device waits until it receives a trigger on the PXI TRIG3 line before processing the next entry in the scan list.
-
TTL4
¶ The switch device waits until it receives a trigger on the PXI TRIG4 line before processing the next entry in the scan list.
-
TTL5
¶ The switch device waits until it receives a trigger on the PXI TRIG5 line before processing the next entry in the scan list.
-
TTL6
¶ The switch device waits until it receives a trigger on the PXI TRIG6 line before processing the next entry in the scan list.
-
TTL7
¶ The switch device waits until it receives a trigger on the PXI TRIG7 line before processing the next entry in the scan list.
-
PXI_STAR
¶ The switch device waits until it receives a trigger on the PXI STAR trigger bus before processing the next entry in the scan list.
-
REARCONNECTOR
¶ The switch device waits until it receives a trigger on the rear connector.
-
FRONTCONNECTOR
¶ The switch device waits until it receives a trigger on the front connector.
-
REARCONNECTOR_MODULE1
¶ The switch module waits until it receives a trigger on the rear connector module 1.
-
REARCONNECTOR_MODULE2
¶ The switch module waits until it receives a trigger on the rear connector module 2.
-
REARCONNECTOR_MODULE3
¶ The switch module waits until it receives a trigger on the rear connector module 3.
-
REARCONNECTOR_MODULE4
¶ The switch module waits until it receives a trigger on the rear connector module 4.
-
REARCONNECTOR_MODULE5
¶ The switch module waits until it receives a trigger on the rear connector module 5.
-
REARCONNECTOR_MODULE6
¶ The switch module waits until it receives a trigger on the rear connector module 6.
-
REARCONNECTOR_MODULE7
¶ The switch module waits until it receives a trigger on the rear connector module 7.
-
REARCONNECTOR_MODULE8
¶ The switch module waits until it receives a trigger on the rear connector module 8.
-
REARCONNECTOR_MODULE9
¶ The switch module waits until it receives a trigger on the rear connector module 9.
-
REARCONNECTOR_MODULE10
¶ The switch module waits until it receives a trigger on the rear connector module 10.
-
REARCONNECTOR_MODULE11
¶ The switch module waits until it receives a trigger on the rear connector module 11.
-
REARCONNECTOR_MODULE12
¶ The switch module waits until it receives a trigger on the rear connector module 12.
-
FRONTCONNECTOR_MODULE1
¶ The switch module waits until it receives a trigger on the front connector module 1.
-
FRONTCONNECTOR_MODULE2
¶ The switch module waits until it receives a trigger on the front connector module 2.
-
FRONTCONNECTOR_MODULE3
¶ The switch module waits until it receives a trigger on the front connector module 3.
-
FRONTCONNECTOR_MODULE4
¶ The switch module waits until it receives a trigger on the front connector module 4.
-
FRONTCONNECTOR_MODULE5
¶ The switch module waits until it receives a trigger on the front connector module 5.
-
FRONTCONNECTOR_MODULE6
¶ The switch module waits until it receives a trigger on the front connector module 6.
-
FRONTCONNECTOR_MODULE7
¶ The switch module waits until it receives a trigger on the front connector module 7.
-
FRONTCONNECTOR_MODULE8
¶ The switch module waits until it receives a trigger on the front connector module 8.
-
FRONTCONNECTOR_MODULE9
¶ The switch module waits until it receives a trigger on the front connector module 9.
-
FRONTCONNECTOR_MODULE10
¶ The switch module waits until it receives a trigger on the front connector module 10.
-
FRONTCONNECTOR_MODULE11
¶ The switch module waits until it receives a trigger on the front connector module 11.
-
FRONTCONNECTOR_MODULE12
¶ The switch module waits until it receives a trigger on the front connector module 12.
-
Exceptions and Warnings¶
UnsupportedConfigurationError¶
- exception
niswitch.
UnsupportedConfigurationError
¶An error due to using this module in an usupported platform.
DriverNotInstalledError¶
- exception
niswitch.
DriverNotInstalledError
¶An error due to using this module without the driver runtime installed.
Examples¶
niswitch_connect_channels.py¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | #!/usr/bin/python
import argparse
import niswitch
import sys
def example(resource_name, channel1, channel2, topology, simulate):
# if we are simulating resource name must be blank
resource_name = '' if simulate else resource_name
with niswitch.Session(resource_name=resource_name, topology=topology, simulate=simulate) as session:
session.connect(channel1=channel1, channel2=channel2)
print('Channel ', channel1, ' and ', channel2, ' are now connected.')
session.disconnect(channel1=channel1, channel2=channel2)
print('Channel ', channel1, ' and ', channel2, ' are now disconnected.')
def _main(argsv):
parser = argparse.ArgumentParser(description='Performs a connection with NI-SWITCH Channels.', formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('-n', '--resource-name', default='PXI1Slot2', help='Resource name of a National Instruments Switch.')
parser.add_argument('-ch1', '--channel1', default='c0', help='Channel One.')
parser.add_argument('-ch2', '--channel2', default='r0', help='Channel Two.')
parser.add_argument('-t', '--topology', default='Configured Topology', help='Topology.')
parser.add_argument('-s', '--simulate', default=False, action='store_true', help='Simulate device.')
args = parser.parse_args(argsv)
example(args.resource_name, args.channel1, args.channel2, args.topology, args.simulate)
def test_example():
example('', 'c0', 'r0', '2737/2-Wire 4x64 Matrix', True)
def test_main():
cmd_line = ['--topology', '2737/2-Wire 4x64 Matrix', '--simulate']
_main(cmd_line)
def main():
_main(sys.argv[1:])
if __name__ == '__main__':
main()
|
niswitch_get_device_info.py¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | #!/usr/bin/python
import argparse
import niswitch
import sys
def example(resource_name, topology, simulate, device, channel, relay):
# if we are simulating resource name must be blank
resource_name = '' if simulate else resource_name
with niswitch.Session(resource_name=resource_name, topology=topology, simulate=simulate) as session:
if device:
print('Device Info:')
row_format = '{:<18}' * (2)
print(row_format.format('Device Name: ', session.io_resource_descriptor))
print(row_format.format('Device Model: ', session.instrument_model))
print(row_format.format('Driver Revision: ', session.specific_driver_revision))
print(row_format.format('Channel count: ', session.channel_count))
print(row_format.format('Relay count: ', session.number_of_relays))
if channel:
print('Channel Info:')
row_format = '{:6}' + ' ' * 12 + '{:<15}{:<22}{:6}'
print(row_format.format('Number', 'Name', 'Is Configuration', 'Is Source'))
for i in range(1, session.channel_count + 1):
channel_name = session.get_channel_name(index=i)
channel = session.channels[channel_name]
print(row_format.format(i, channel_name, str(channel.is_configuration_channel), str(channel.is_source_channel)))
if relay:
print('Realy Info:')
row_format = '{:6}' + ' ' * 12 + '{:<15}{:<22}{:6}'
print(row_format.format('Number', 'Name', 'Position', 'Count'))
for i in range(1, session.number_of_relays + 1):
relay_name = session.get_relay_name(index=i)
print(row_format.format(i, relay_name, session.get_relay_position(relay_name=relay_name), session.get_relay_count(relay_name=relay_name)))
def _main(argsv):
parser = argparse.ArgumentParser(description='Prints information for the specified National Instruments Switch module.', formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('-n', '--resource-name', default='PXI1Slot2', help='Resource name of a National Instruments Switch.')
parser.add_argument('-d', '--device', default=False, action='store_true', help='Prints information for the device')
parser.add_argument('-c', '--channel', default=False, action='store_true', help='Prints information for all relays on the device')
parser.add_argument('-r', '--relay', default=False, action='store_true', help='Prints information for all channels on the device')
parser.add_argument('-t', '--topology', default='Configured Topology', help='Topology.')
parser.add_argument('-s', '--simulate', default=False, action='store_true', help='Simulate device.')
args = parser.parse_args(argsv)
if not (args.device or args.channel or args.relay):
parser.print_help()
sys.exit(1)
example(args.resource_name, args.topology, args.simulate, args.device, args.channel, args.relay)
def test_example():
example('', '2737/2-Wire 4x64 Matrix', True, True, True, True)
def test_main():
cmd_line = ['--topology', '2737/2-Wire 4x64 Matrix', '--simulate', '--device', '--channel', '--relay', ]
_main(cmd_line)
def main():
_main(sys.argv[1:])
if __name__ == '__main__':
main()
|
niswitch_relay_control.py¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | #!/usr/bin/python
import argparse
import niswitch
import sys
def example(resource_name, topology, simulate, relay, action):
# if we are simulating resource name must be blank
resource_name = '' if simulate else resource_name
with niswitch.Session(resource_name=resource_name, topology=topology, simulate=simulate) as session:
session.relay_control(relay_name=relay, relay_action=niswitch.RelayAction[action])
print('Relay ', relay, ' has had the action ', action, ' performed.')
def _main(argsv):
parser = argparse.ArgumentParser(description='Performs relay control with NI-SWITCH relays.', formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('-n', '--resource-name', default='PXI1Slot2', help='Resource name of a National Instruments Switch.')
parser.add_argument('-r', '--relay', default='k0', help='Relay Name.')
parser.add_argument('-a', '--action', default='OPEN', choices=niswitch.RelayAction.__members__.keys(), type=str.upper, help='Relay Action.')
parser.add_argument('-t', '--topology', default='Configured Topology', help='Topology.')
parser.add_argument('-s', '--simulate', default=False, action='store_true', help='Simulate device.')
args = parser.parse_args(argsv)
example(args.resource_name, args.topology, args.simulate, args.relay, args.action)
def test_example():
example('', '2737/2-Wire 4x64 Matrix', True, 'kr0c0', 'OPEN')
def test_main():
cmd_line = ['--topology', '2737/2-Wire 4x64 Matrix', '--simulate', '--relay', 'kr0c0']
_main(cmd_line)
def main():
_main(sys.argv[1:])
if __name__ == '__main__':
main()
|
nimodinst module¶
Installation¶
As a prerequisite to using the nimodinst module, you must install the NI-ModInst runtime on your system. Visit ni.com/downloads to download the driver runtime for your devices.
The nimi-python modules (i.e. for NI-ModInst) can be installed with pip:
$ python -m pip install nimodinst~=0.8.0
Or easy_install from setuptools:
$ python -m easy_install nimodinst
Usage¶
The following is a basic example of using the nimodinst module to retrieve information on all High Speed Digitizers currently in the system.
import nimodinst
with nimodinst.Session("niscope") as session:
for device in session:
print("{: >20} {: >15} {: >10}".format(device.device_name, device.device_model, device.serial_number))
Additional examples for NI-ModInst are located in src/nimodinst/examples/ directory.
API Reference¶
nimodinst.Session¶
-
class
nimodinst.
Session
(self, driver)[source]¶ Creates a handle to a list of installed devices supported by the specified driver. Call this method and pass in the name of a National Instruments instrument driver, such as “NI-SCOPE”. This method searches the system and constructs a list of all the installed devices that are supported by that driver, and then returns both a handle to this list and the number of devices found. The handle is used with other methods to query for properties such as device name and model, and to safely discard the list when finished. Note This handle reflects the system state when the handle is created (that is, when you call this method. If you remove devices from the system or rename them in Measurement & Automation Explorer (MAX), this handle may not refer to an accurate list of devices. You should destroy the handle using
nimodinst.Session._close_installed_devices_session()
and create a new handle using this method.Parameters: driver (str) – A string specifying the driver whose supported devices you want to find. This string is not case-sensitive. Some examples are: NI-SCOPE niScope NI-FGEN niFgen NI-HSDIO niHSDIO NI-DMM niDMM NI-SWITCH niSwitch Note If you use the empty string for this parameter, NI-ModInst creates a list of all Modular Instruments devices installed in the system. Properties
Property Datatype bus_number
int chassis_number
int device_model
str device_name
str max_pciexpress_link_width
int pciexpress_link_width
int serial_number
str slot_number
int socket_number
int Public methods
Method name Method name
Properties¶
bus_number¶
nimodinst.Session.
bus_number
¶The bus on which the device has been enumerated.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- C Attribute: NIMODINST_ATTR_BUS_NUMBER
chassis_number¶
nimodinst.Session.
chassis_number
¶The number of the chassis in which the device is installed. This property can only be queried for PXI devices installed in a chassis that has been properly identified in MAX.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- C Attribute: NIMODINST_ATTR_CHASSIS_NUMBER
device_model¶
nimodinst.Session.
device_model
¶The model of the device (for example, NI PXI-5122)
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- C Attribute: NIMODINST_ATTR_DEVICE_MODEL
device_name¶
nimodinst.Session.
device_name
¶The name of the device, which can be used to open an instrument driver session for that device
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- C Attribute: NIMODINST_ATTR_DEVICE_NAME
max_pciexpress_link_width¶
nimodinst.Session.
max_pciexpress_link_width
¶MAX_PCIEXPRESS_LINK_WIDTH
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- C Attribute: NIMODINST_ATTR_MAX_PCIEXPRESS_LINK_WIDTH
pciexpress_link_width¶
nimodinst.Session.
pciexpress_link_width
¶PCIEXPRESS_LINK_WIDTH
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- C Attribute: NIMODINST_ATTR_PCIEXPRESS_LINK_WIDTH
serial_number¶
nimodinst.Session.
serial_number
¶The serial number of the device
The following table lists the characteristics of this property.
Characteristic Value Datatype str Permissions read Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- C Attribute: NIMODINST_ATTR_SERIAL_NUMBER
slot_number¶
nimodinst.Session.
slot_number
¶The slot (for example, in a PXI chassis) in which the device is installed. This property can only be queried for PXI devices installed in a chassis that has been properly identified in MAX.
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- C Attribute: NIMODINST_ATTR_SLOT_NUMBER
socket_number¶
nimodinst.Session.
socket_number
¶The socket number on which the device has been enumerated
The following table lists the characteristics of this property.
Characteristic Value Datatype int Permissions read Channel Based False Resettable No Tip
This property corresponds to the following LabVIEW Property or C Attribute:
- C Attribute: NIMODINST_ATTR_SOCKET_NUMBER
Methods¶
Properties¶
Methods¶
Method name |
---|
Method name |
Exceptions and Warnings¶
UnsupportedConfigurationError¶
- exception
nimodinst.
UnsupportedConfigurationError
¶An error due to using this module in an usupported platform.
DriverNotInstalledError¶
- exception
nimodinst.
DriverNotInstalledError
¶An error due to using this module without the driver runtime installed.
Examples¶
nimodinst_all_devices.py¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #!/usr/bin/python
import nimodinst
def example():
with nimodinst.Session('') as session:
if len(session) > 0:
print("%d items" % len(session))
print("{: >20} {: >15} {: >10}".format('Name', 'Model', 'S/N'))
for d in session:
print("{: >20} {: >15} {: >10}".format(d.device_name, d.device_model, d.serial_number))
def _main():
example()
def test_example():
example()
if __name__ == '__main__':
_main()
|