How to use the niswitch.attributes.AttributeViBoolean function in niswitch

To help you get started, we’ve selected a few niswitch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ni / nimi-python / generated / niswitch / session.py View on Github external
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'].bandwidth
    '''
    cabled_module_scan_advanced_bus = attributes.AttributeViInt32(1150009)
    '''
    This attribute has been deprecated and may be removed from a future release of  NI-SWITCH.  Use the niSwitch_RouteScanAdvancedOutput function instead.
    '''
    cabled_module_trigger_bus = attributes.AttributeViInt32(1150008)
    '''
    This attribute has been deprecated and may be removed from a future release of  NI-SWITCH.  Use the niSwitch_RouteTriggerInput function instead.
    '''
    cache = attributes.AttributeViBoolean(1050004)
    '''
    Specifies whether to cache the value of attributes.  When caching is  enabled, the instrument driver keeps track of the current instrument  settings and avoids sending redundant commands to the instrument.
    The instrument driver can choose always to cache or never to cache  particular attributes regardless of the setting of this attribute.
    The default value is VI_TRUE.   Use the niSwitch_InitWithOptions  function to override this value.
    '''
    channel_count = attributes.AttributeViInt32(1050203)
    '''
    Indicates the number of channels that the specific instrument  driver supports.
    '''
    characteristic_impedance = attributes.AttributeViReal64(1250016)
    '''
    This channel-based attribute 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
github ni / nimi-python / generated / niswitch / session.py View on Github external
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_impedance
    '''
    continuous_scan = attributes.AttributeViBoolean(1150002)
    '''
    When a switch device is scanning, the swich can either stop scanning when  the end of the scan (VI_FALSE) or continue scanning from the top of the  scan list again (VI_TRUE).
    Notice that if you set the scan to continuous (VI_TRUE), the Wait For Scan  Complete operation will always time out and you must call Abort to stop  the scan.
    '''
    digital_filter_enable = attributes.AttributeViBoolean(1150016)
    '''
    This property specifies whether to apply the pulse width filter to the  Trigger Input. Enabling the Digital Filter (VI_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 (VI_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.
    '''
    driver_setup = attributes.AttributeViString(1050007)
    '''
    This attribute 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_InitWithOptions function, or through the IVI Configuration Utility.
    If the user does not specify a Driver Setup string, this attribute returns an empty string.
    '''
    group_capabilities = attributes.AttributeViString(1050401)
    '''
    A string that contains a comma-separated list of class-extention groups that  this driver implements.
    '''
    handshaking_initiation = attributes.AttributeEnum(attributes.AttributeViInt32, enums.HandshakingInitiation, 1150013)
    instrument_firmware_revision = attributes.AttributeViString(1050510)
github ni / nimi-python / generated / niswitch / session.py View on Github external
A string that contains a comma-separated list of class-extention groups that  this driver implements.
    '''
    handshaking_initiation = attributes.AttributeEnum(attributes.AttributeViInt32, enums.HandshakingInitiation, 1150013)
    instrument_firmware_revision = attributes.AttributeViString(1050510)
    '''
    A string that contains the firmware revision information  for the instrument you are currently using.
    '''
    instrument_manufacturer = attributes.AttributeViString(1050511)
    '''
    A string that contains the name of the instrument manufacturer you are currently  using.
    '''
    instrument_model = attributes.AttributeViString(1050512)
    '''
    A string that contains the model number or name of the instrument that you  are currently using.
    '''
    interchange_check = attributes.AttributeViBoolean(1050021)
    '''
    Specifies whether to perform interchangeability checking and retrieve  interchangeability warnings when you call  niSwitch_Connect, niSwitch_SetPath and niSwitch_InitiateScan functions.
    The default value is VI_FALSE.
    Interchangeability warnings indicate that using your application with a  different instrument might cause different behavior.   You call niSwitch_GetNextInterchangeWarning to extract interchange warnings.   Call the niSwitch_ClearInterchangeWarnings function to clear the list  of interchangeability warnings without reading them.
    Interchangeability checking examines the attributes in a  capability group only if you specify a value for at least one  attribute within that group.  Interchangeability warnings can  occur when an attribute affects the behavior of the instrument and you  have not set that attribute, or the attribute has been invalidated since you set it.
    '''
    io_resource_descriptor = attributes.AttributeViString(1050304)
    '''
    Indicates the resource descriptor the driver  uses to identify the physical device.
    If you initialize the driver with a logical name, this  attribute 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 attribute contains that value.
    '''
    is_configuration_channel = attributes.AttributeViBoolean(1250003)
    '''
    This channel-based attribute 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_Connect function.  Configuration channels are not available  for external connections.
    Set this attribute to VI_TRUE to mark the channel as a configuration  channel.  Set this attribute to VI_FALSE to mark the channel as available  for external connections.
github ni / nimi-python / generated / niswitch / session.py View on Github external
is_configuration_channel = attributes.AttributeViBoolean(1250003)
    '''
    This channel-based attribute 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_Connect function.  Configuration channels are not available  for external connections.
    Set this attribute to VI_TRUE to mark the channel as a configuration  channel.  Set this attribute to VI_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.  The niSwitch_Connect function  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_channel
    '''
    is_debounced = attributes.AttributeViBoolean(1250002)
    '''
    This attribute indicates whether the entire switch device has settled  since the last switching command.  A value of VI_TRUE indicates that all  signals going through the switch device are valid.
    '''
    is_scanning = attributes.AttributeViBoolean(1250024)
    '''
    If VI_TRUE, the switch module is currently scanning through the scan list  (i.e. it is not in the Idle state). If VI_FALSE, the switch module is not  currently scanning through the scan list (i.e. it is in the Idle state).
    '''
    is_source_channel = attributes.AttributeViBoolean(1250001)
    '''
    This channel-based attribute specifies whether you want to identify the  channel as a source channel.  Typically, you set this attribute to VI_TRUE  when you attach the channel to a power supply, a function 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_Connect function  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.:
github ni / nimi-python / generated / niswitch / session.py View on Github external
'''
    characteristic_impedance = attributes.AttributeViReal64(1250016)
    '''
    This channel-based attribute 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_impedance
    '''
    continuous_scan = attributes.AttributeViBoolean(1150002)
    '''
    When a switch device is scanning, the swich can either stop scanning when  the end of the scan (VI_FALSE) or continue scanning from the top of the  scan list again (VI_TRUE).
    Notice that if you set the scan to continuous (VI_TRUE), the Wait For Scan  Complete operation will always time out and you must call Abort to stop  the scan.
    '''
    digital_filter_enable = attributes.AttributeViBoolean(1150016)
    '''
    This property specifies whether to apply the pulse width filter to the  Trigger Input. Enabling the Digital Filter (VI_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 (VI_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.
    '''
    driver_setup = attributes.AttributeViString(1050007)
    '''
    This attribute 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_InitWithOptions function, or through the IVI Configuration Utility.
    If the user does not specify a Driver Setup string, this attribute returns an empty string.
    '''
    group_capabilities = attributes.AttributeViString(1050401)
github ni / nimi-python / generated / niswitch / session.py View on Github external
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_channel
    '''
    is_debounced = attributes.AttributeViBoolean(1250002)
    '''
    This attribute indicates whether the entire switch device has settled  since the last switching command.  A value of VI_TRUE indicates that all  signals going through the switch device are valid.
    '''
    is_scanning = attributes.AttributeViBoolean(1250024)
    '''
    If VI_TRUE, the switch module is currently scanning through the scan list  (i.e. it is not in the Idle state). If VI_FALSE, the switch module is not  currently scanning through the scan list (i.e. it is in the Idle state).
    '''
    is_source_channel = attributes.AttributeViBoolean(1250001)
    '''
    This channel-based attribute specifies whether you want to identify the  channel as a source channel.  Typically, you set this attribute to VI_TRUE  when you attach the channel to a power supply, a function 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_Connect function  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_channel
    '''
    is_waiting_for_trig = attributes.AttributeViBoolean(1150004)
    '''
    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.
    '''
github ni / nimi-python / generated / niswitch / session.py View on Github external
If VI_TRUE, the switch module is currently scanning through the scan list  (i.e. it is not in the Idle state). If VI_FALSE, the switch module is not  currently scanning through the scan list (i.e. it is in the Idle state).
    '''
    is_source_channel = attributes.AttributeViBoolean(1250001)
    '''
    This channel-based attribute specifies whether you want to identify the  channel as a source channel.  Typically, you set this attribute to VI_TRUE  when you attach the channel to a power supply, a function 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_Connect function  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_channel
    '''
    is_waiting_for_trig = attributes.AttributeViBoolean(1150004)
    '''
    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.
    '''
    logical_name = attributes.AttributeViString(1050305)
    '''
    A string containing the logical name you specified when opening the  current IVI session.
    You may pass a logical name to the niSwitch_init or  niSwitch_InitWithOptions functions.   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.
    '''
    master_slave_scan_advanced_bus = attributes.AttributeViInt32(1150007)
    '''
    This attribute has been deprecated and may be removed from a future release of  NI-SWITCH.  Use the niSwitch_RouteScanAdvancedOutput function instead.
    '''
    master_slave_trigger_bus = attributes.AttributeViInt32(1150006)
    '''
    This attribute has been deprecated and may be removed from a future release of  NI-SWITCH.  Use the niSwitch_RouteTriggerInput function instead.
    '''
github ni / nimi-python / generated / niswitch / session.py View on Github external
'''
    This channel-based attribute 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_time
    '''
    simulate = attributes.AttributeViBoolean(1050005)
    '''
    Specifies whether or not to simulate instrument driver I/O operations.  If  simulation is enabled, instrument driver functions perform range checking  and call Ivi_GetAttribute and Ivi_SetAttribute functions, but they do not  perform instrument I/O.  For output parameters that represent instrument  data, the instrument driver functions return calculated values.
    The default value is VI_FALSE.   Use the niSwitch_InitWithOptions  function to override this value.
    '''
    specific_driver_class_spec_major_version = attributes.AttributeViInt32(1050515)
    '''
    The major version number of the IviSwtch class specification.
    '''
    specific_driver_class_spec_minor_version = attributes.AttributeViInt32(1050516)
    '''
    The minor version number of the class specification with which this driver is compliant.
    '''
    specific_driver_description = attributes.AttributeViString(1050514)
    '''
    A string that contains a brief description of the specific  driver.
    '''
github ni / nimi-python / generated / niswitch / session.py View on Github external
After you identify a channel as a configuration channel, you cannot  use that channel for external connections.  The niSwitch_Connect function  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_channel
    '''
    is_debounced = attributes.AttributeViBoolean(1250002)
    '''
    This attribute indicates whether the entire switch device has settled  since the last switching command.  A value of VI_TRUE indicates that all  signals going through the switch device are valid.
    '''
    is_scanning = attributes.AttributeViBoolean(1250024)
    '''
    If VI_TRUE, the switch module is currently scanning through the scan list  (i.e. it is not in the Idle state). If VI_FALSE, the switch module is not  currently scanning through the scan list (i.e. it is in the Idle state).
    '''
    is_source_channel = attributes.AttributeViBoolean(1250001)
    '''
    This channel-based attribute specifies whether you want to identify the  channel as a source channel.  Typically, you set this attribute to VI_TRUE  when you attach the channel to a power supply, a function 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_Connect function  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_channel
    '''
github ni / nimi-python / generated / niswitch / session.py View on Github external
def __enter__(self):
        self._session._initiate_scan()
        return self

    def __exit__(self, exc_type, exc_value, traceback):
        self._session.abort()


class _SessionBase(object):
    '''Base class for all NI-SWITCH sessions.'''

    # This is needed during __init__. Without it, __setattr__ raises an exception
    _is_frozen = False

    analog_bus_sharing_enable = attributes.AttributeViBoolean(1150018)
    '''
    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  attribute to VI_TRUE for each device on the channel that corresponds  with the shared analog bus line. The default value for all devices is  VI_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_enable
    '''
    bandwidth = attributes.AttributeViReal64(1250005)
    '''
    This channel-based attribute returns the bandwidth for the channel.