Skip to content

Add AI TEDS create channel tests #812

Add AI TEDS create channel tests

Add AI TEDS create channel tests #812

GitHub Actions / Test Results failed Feb 6, 2024 in 0s

4 fail, 180 skipped, 1 248 pass in 34m 32s

    30 files      30 suites   34m 32s ⏱️
 1 432 tests  1 248 ✅   180 💤  4 ❌
22 110 runs  19 430 ✅ 2 620 💤 60 ❌

Results for commit decfd0b.

Annotations

Check warning on line 0 in tests.component._task_modules.channels.test_ai_channel

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 20 runs failed: test___task__add_ai_voltage_chan_with_excit___sets_channel_attributes[library_init_kwargs--10.0-10.0-BridgeConfiguration.FULL_BRIDGE-False] (tests.component._task_modules.channels.test_ai_channel)

test_results/system-py310-base-win-10-py32.xml [took 0s]
test_results/system-py310-base-win-10-py64.xml [took 0s]
test_results/system-py310-grpc-win-10-py32.xml [took 0s]
test_results/system-py310-grpc-win-10-py64.xml [took 0s]
test_results/system-py311-base-win-10-py32.xml [took 0s]
test_results/system-py311-base-win-10-py64.xml [took 0s]
test_results/system-py311-grpc-win-10-py32.xml [took 0s]
test_results/system-py311-grpc-win-10-py64.xml [took 0s]
test_results/system-py312-base-win-10-py32.xml [took 0s]
test_results/system-py312-base-win-10-py64.xml [took 0s]
test_results/system-py312-grpc-win-10-py32.xml [took 0s]
test_results/system-py312-grpc-win-10-py64.xml [took 0s]
test_results/system-py38-base-win-10-py32.xml [took 0s]
test_results/system-py38-base-win-10-py64.xml [took 0s]
test_results/system-py38-grpc-win-10-py32.xml [took 0s]
test_results/system-py38-grpc-win-10-py64.xml [took 0s]
test_results/system-py39-base-win-10-py32.xml [took 0s]
test_results/system-py39-base-win-10-py64.xml [took 0s]
test_results/system-py39-grpc-win-10-py32.xml [took 0s]
test_results/system-py39-grpc-win-10-py64.xml [took 0s]
Raw output
nidaqmx.errors.DaqError: Your ratiometric device must use excitation for scaling. The Use Excitation for Scaling property cannot be set to false on this device.
Use excitation for scaling by setting the Use Excitation for Scaling property to true. This will cause NI-DAQmx to return ratiometric data instead of voltage data which is not supported by ratiometric devices.
Channel Name: bridgeTester/ai0

Task Name: _unnamedTask<E0>

Status Code: -201127
task = Task(name=_unnamedTask<E0>)
sim_bridge_device = Device(name=bridgeTester), min_val = -10.0, max_val = 10.0
bridge_config = <BridgeConfiguration.FULL_BRIDGE: 10182>
use_excit_for_scaling = False

    @pytest.mark.parametrize(
        "min_val, max_val, bridge_config, use_excit_for_scaling",
        [
            (-10.0, 10.0, BridgeConfiguration.FULL_BRIDGE, False),
            (-2.0, 2.0, BridgeConfiguration.HALF_BRIDGE, True),
        ],
    )
    def test___task__add_ai_voltage_chan_with_excit___sets_channel_attributes(
        task: Task,
        sim_bridge_device: Device,
        min_val,
        max_val,
        bridge_config,
        use_excit_for_scaling,
    ):
        chan: AIChannel = task.ai_channels.add_ai_voltage_chan_with_excit(
            sim_bridge_device.ai_physical_chans[0].name,
            min_val=min_val,
            max_val=max_val,
            bridge_config=bridge_config,
            voltage_excit_source=ExcitationSource.INTERNAL,
            voltage_excit_val=5.0,
            use_excit_for_scaling=use_excit_for_scaling,
        )
    
>       assert chan.ai_meas_type == UsageTypeAI.VOLTAGE_CUSTOM_WITH_EXCITATION

tests\component\_task_modules\channels\test_ai_channel.py:1129: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
generated\nidaqmx\_task_modules\channels\ai_channel.py:2270: in ai_meas_type
    val = self._interpreter.get_chan_attribute_int32(self._handle, self._name, 0x695)
generated\nidaqmx\_library_interpreter.py:2398: in get_chan_attribute_int32
    self.check_for_error(error_code)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nidaqmx._library_interpreter.LibraryInterpreter object at 0x03C51638>
error_code = -201127, samps_per_chan_written = None, samps_per_chan_read = None

    def check_for_error(self, error_code, samps_per_chan_written=None, samps_per_chan_read=None):
        if not error_code:
            return
    
        if error_code < 0:
            extended_error_info = self.get_extended_error_info()
    
            if samps_per_chan_read is not None:
                raise DaqReadError(extended_error_info, error_code, samps_per_chan_read)
            elif samps_per_chan_written is not None:
                raise DaqWriteError(extended_error_info, error_code, samps_per_chan_written)
            else:
>               raise DaqError(extended_error_info, error_code)
E               nidaqmx.errors.DaqError: Your ratiometric device must use excitation for scaling. The Use Excitation for Scaling property cannot be set to false on this device.
E               Use excitation for scaling by setting the Use Excitation for Scaling property to true. This will cause NI-DAQmx to return ratiometric data instead of voltage data which is not supported by ratiometric devices.
E               Channel Name: bridgeTester/ai0
E               
E               Task Name: _unnamedTask<E0>
E               
E               Status Code: -201127

generated\nidaqmx\_library_interpreter.py:6146: DaqError

Check warning on line 0 in tests.component._task_modules.channels.test_ai_channel

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 20 runs failed: test___task__add_ai_voltage_chan_with_excit___sets_channel_attributes[library_init_kwargs--2.0-2.0-BridgeConfiguration.HALF_BRIDGE-True] (tests.component._task_modules.channels.test_ai_channel)

test_results/system-py310-base-win-10-py32.xml [took 0s]
test_results/system-py310-base-win-10-py64.xml [took 0s]
test_results/system-py310-grpc-win-10-py32.xml [took 0s]
test_results/system-py310-grpc-win-10-py64.xml [took 0s]
test_results/system-py311-base-win-10-py32.xml [took 0s]
test_results/system-py311-base-win-10-py64.xml [took 0s]
test_results/system-py311-grpc-win-10-py32.xml [took 0s]
test_results/system-py311-grpc-win-10-py64.xml [took 0s]
test_results/system-py312-base-win-10-py32.xml [took 0s]
test_results/system-py312-base-win-10-py64.xml [took 0s]
test_results/system-py312-grpc-win-10-py32.xml [took 0s]
test_results/system-py312-grpc-win-10-py64.xml [took 0s]
test_results/system-py38-base-win-10-py32.xml [took 0s]
test_results/system-py38-base-win-10-py64.xml [took 0s]
test_results/system-py38-grpc-win-10-py32.xml [took 0s]
test_results/system-py38-grpc-win-10-py64.xml [took 0s]
test_results/system-py39-base-win-10-py32.xml [took 0s]
test_results/system-py39-base-win-10-py64.xml [took 0s]
test_results/system-py39-grpc-win-10-py32.xml [took 0s]
test_results/system-py39-grpc-win-10-py64.xml [took 0s]
Raw output
nidaqmx.errors.DaqError: Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
Property: DAQmx_AI_Min
Requested Value: -2.0
Value Must Be Greater Than: -25.0e-3
Value Must Be Less Than:  25.0e-3

Channel Name: bridgeTester/ai0

Task Name: _unnamedTask<E1>

Status Code: -200077
task = Task(name=_unnamedTask<E1>)
sim_bridge_device = Device(name=bridgeTester), min_val = -2.0, max_val = 2.0
bridge_config = <BridgeConfiguration.HALF_BRIDGE: 10187>
use_excit_for_scaling = True

    @pytest.mark.parametrize(
        "min_val, max_val, bridge_config, use_excit_for_scaling",
        [
            (-10.0, 10.0, BridgeConfiguration.FULL_BRIDGE, False),
            (-2.0, 2.0, BridgeConfiguration.HALF_BRIDGE, True),
        ],
    )
    def test___task__add_ai_voltage_chan_with_excit___sets_channel_attributes(
        task: Task,
        sim_bridge_device: Device,
        min_val,
        max_val,
        bridge_config,
        use_excit_for_scaling,
    ):
        chan: AIChannel = task.ai_channels.add_ai_voltage_chan_with_excit(
            sim_bridge_device.ai_physical_chans[0].name,
            min_val=min_val,
            max_val=max_val,
            bridge_config=bridge_config,
            voltage_excit_source=ExcitationSource.INTERNAL,
            voltage_excit_val=5.0,
            use_excit_for_scaling=use_excit_for_scaling,
        )
    
>       assert chan.ai_meas_type == UsageTypeAI.VOLTAGE_CUSTOM_WITH_EXCITATION

tests\component\_task_modules\channels\test_ai_channel.py:1129: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
generated\nidaqmx\_task_modules\channels\ai_channel.py:2270: in ai_meas_type
    val = self._interpreter.get_chan_attribute_int32(self._handle, self._name, 0x695)
generated\nidaqmx\_library_interpreter.py:2398: in get_chan_attribute_int32
    self.check_for_error(error_code)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nidaqmx._library_interpreter.LibraryInterpreter object at 0x04D56F68>
error_code = -200077, samps_per_chan_written = None, samps_per_chan_read = None

    def check_for_error(self, error_code, samps_per_chan_written=None, samps_per_chan_read=None):
        if not error_code:
            return
    
        if error_code < 0:
            extended_error_info = self.get_extended_error_info()
    
            if samps_per_chan_read is not None:
                raise DaqReadError(extended_error_info, error_code, samps_per_chan_read)
            elif samps_per_chan_written is not None:
                raise DaqWriteError(extended_error_info, error_code, samps_per_chan_written)
            else:
>               raise DaqError(extended_error_info, error_code)
E               nidaqmx.errors.DaqError: Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
E               Property: DAQmx_AI_Min
E               Requested Value: -2.0
E               Value Must Be Greater Than: -25.0e-3
E               Value Must Be Less Than:  25.0e-3
E               
E               Channel Name: bridgeTester/ai0
E               
E               Task Name: _unnamedTask<E1>
E               
E               Status Code: -200077

generated\nidaqmx\_library_interpreter.py:6146: DaqError

Check warning on line 0 in tests.component._task_modules.channels.test_ai_channel

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 10 runs failed: test___task__add_ai_voltage_chan_with_excit___sets_channel_attributes[grpc_init_kwargs--10.0-10.0-BridgeConfiguration.FULL_BRIDGE-False] (tests.component._task_modules.channels.test_ai_channel)

test_results/system-py310-grpc-win-10-py32.xml [took 0s]
test_results/system-py310-grpc-win-10-py64.xml [took 0s]
test_results/system-py311-grpc-win-10-py32.xml [took 0s]
test_results/system-py311-grpc-win-10-py64.xml [took 0s]
test_results/system-py312-grpc-win-10-py32.xml [took 0s]
test_results/system-py312-grpc-win-10-py64.xml [took 0s]
test_results/system-py38-grpc-win-10-py32.xml [took 0s]
test_results/system-py38-grpc-win-10-py64.xml [took 0s]
test_results/system-py39-grpc-win-10-py32.xml [took 0s]
test_results/system-py39-grpc-win-10-py64.xml [took 0s]
Raw output
nidaqmx.errors.DaqError: Your ratiometric device must use excitation for scaling. The Use Excitation for Scaling property cannot be set to false on this device.
Use excitation for scaling by setting the Use Excitation for Scaling property to true. This will cause NI-DAQmx to return ratiometric data instead of voltage data which is not supported by ratiometric devices.
Channel Name: bridgeTester/ai0

Task Name: _unnamedTask<10C>

Status Code: -201127
task = Task(name=_unnamedTask<10C>)
sim_bridge_device = Device(name=bridgeTester), min_val = -10.0, max_val = 10.0
bridge_config = <BridgeConfiguration.FULL_BRIDGE: 10182>
use_excit_for_scaling = False

    @pytest.mark.parametrize(
        "min_val, max_val, bridge_config, use_excit_for_scaling",
        [
            (-10.0, 10.0, BridgeConfiguration.FULL_BRIDGE, False),
            (-2.0, 2.0, BridgeConfiguration.HALF_BRIDGE, True),
        ],
    )
    def test___task__add_ai_voltage_chan_with_excit___sets_channel_attributes(
        task: Task,
        sim_bridge_device: Device,
        min_val,
        max_val,
        bridge_config,
        use_excit_for_scaling,
    ):
        chan: AIChannel = task.ai_channels.add_ai_voltage_chan_with_excit(
            sim_bridge_device.ai_physical_chans[0].name,
            min_val=min_val,
            max_val=max_val,
            bridge_config=bridge_config,
            voltage_excit_source=ExcitationSource.INTERNAL,
            voltage_excit_val=5.0,
            use_excit_for_scaling=use_excit_for_scaling,
        )
    
>       assert chan.ai_meas_type == UsageTypeAI.VOLTAGE_CUSTOM_WITH_EXCITATION

tests\component\_task_modules\channels\test_ai_channel.py:1129: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
generated\nidaqmx\_task_modules\channels\ai_channel.py:2270: in ai_meas_type
    val = self._interpreter.get_chan_attribute_int32(self._handle, self._name, 0x695)
generated\nidaqmx\_grpc_interpreter.py:1731: in get_chan_attribute_int32
    response = self._invoke(
generated\nidaqmx\_grpc_interpreter.py:96: in _invoke
    self._handle_rpc_error(rpc_error)
generated\nidaqmx\_grpc_interpreter.py:130: in _handle_rpc_error
    self._raise_error(error_code, error_message, samps_per_chan_written, samps_per_chan_read)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nidaqmx._grpc_interpreter.GrpcStubInterpreter object at 0x000001DA5F5776D0>
error_code = -201127
error_message = 'Your ratiometric device must use excitation for scaling. The Use Excitation for Scaling property cannot be set to fal...ported by ratiometric devices.\nChannel Name: bridgeTester/ai0\n\nTask Name: _unnamedTask<10C>\n\nStatus Code: -201127'
samps_per_chan_written = None, samps_per_chan_read = None

    def _raise_error(self, error_code, error_message, samps_per_chan_written=None, samps_per_chan_read=None):
        if error_code < 0:
            if samps_per_chan_read is not None:
                raise errors.DaqReadError(error_message, error_code, samps_per_chan_read) from None
            elif samps_per_chan_written is not None:
                raise errors.DaqWriteError(error_message, error_code, samps_per_chan_written) from None
            else:
>               raise errors.DaqError(error_message, error_code) from None
E               nidaqmx.errors.DaqError: Your ratiometric device must use excitation for scaling. The Use Excitation for Scaling property cannot be set to false on this device.
E               Use excitation for scaling by setting the Use Excitation for Scaling property to true. This will cause NI-DAQmx to return ratiometric data instead of voltage data which is not supported by ratiometric devices.
E               Channel Name: bridgeTester/ai0
E               
E               Task Name: _unnamedTask<10C>
E               
E               Status Code: -201127

generated\nidaqmx\_grpc_interpreter.py:147: DaqError

Check warning on line 0 in tests.component._task_modules.channels.test_ai_channel

See this annotation in the file changed.

@github-actions github-actions / Test Results

All 10 runs failed: test___task__add_ai_voltage_chan_with_excit___sets_channel_attributes[grpc_init_kwargs--2.0-2.0-BridgeConfiguration.HALF_BRIDGE-True] (tests.component._task_modules.channels.test_ai_channel)

test_results/system-py310-grpc-win-10-py32.xml [took 0s]
test_results/system-py310-grpc-win-10-py64.xml [took 0s]
test_results/system-py311-grpc-win-10-py32.xml [took 0s]
test_results/system-py311-grpc-win-10-py64.xml [took 0s]
test_results/system-py312-grpc-win-10-py32.xml [took 0s]
test_results/system-py312-grpc-win-10-py64.xml [took 0s]
test_results/system-py38-grpc-win-10-py32.xml [took 0s]
test_results/system-py38-grpc-win-10-py64.xml [took 0s]
test_results/system-py39-grpc-win-10-py32.xml [took 0s]
test_results/system-py39-grpc-win-10-py64.xml [took 0s]
Raw output
nidaqmx.errors.DaqError: Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
Property: DAQmx_AI_Min
Requested Value: -2.0
Value Must Be Greater Than: -25.0e-3
Value Must Be Less Than:  25.0e-3

Channel Name: bridgeTester/ai0

Task Name: _unnamedTask<10D>

Status Code: -200077
task = Task(name=_unnamedTask<10D>)
sim_bridge_device = Device(name=bridgeTester), min_val = -2.0, max_val = 2.0
bridge_config = <BridgeConfiguration.HALF_BRIDGE: 10187>
use_excit_for_scaling = True

    @pytest.mark.parametrize(
        "min_val, max_val, bridge_config, use_excit_for_scaling",
        [
            (-10.0, 10.0, BridgeConfiguration.FULL_BRIDGE, False),
            (-2.0, 2.0, BridgeConfiguration.HALF_BRIDGE, True),
        ],
    )
    def test___task__add_ai_voltage_chan_with_excit___sets_channel_attributes(
        task: Task,
        sim_bridge_device: Device,
        min_val,
        max_val,
        bridge_config,
        use_excit_for_scaling,
    ):
        chan: AIChannel = task.ai_channels.add_ai_voltage_chan_with_excit(
            sim_bridge_device.ai_physical_chans[0].name,
            min_val=min_val,
            max_val=max_val,
            bridge_config=bridge_config,
            voltage_excit_source=ExcitationSource.INTERNAL,
            voltage_excit_val=5.0,
            use_excit_for_scaling=use_excit_for_scaling,
        )
    
>       assert chan.ai_meas_type == UsageTypeAI.VOLTAGE_CUSTOM_WITH_EXCITATION

tests\component\_task_modules\channels\test_ai_channel.py:1129: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
generated\nidaqmx\_task_modules\channels\ai_channel.py:2270: in ai_meas_type
    val = self._interpreter.get_chan_attribute_int32(self._handle, self._name, 0x695)
generated\nidaqmx\_grpc_interpreter.py:1731: in get_chan_attribute_int32
    response = self._invoke(
generated\nidaqmx\_grpc_interpreter.py:96: in _invoke
    self._handle_rpc_error(rpc_error)
generated\nidaqmx\_grpc_interpreter.py:130: in _handle_rpc_error
    self._raise_error(error_code, error_message, samps_per_chan_written, samps_per_chan_read)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nidaqmx._grpc_interpreter.GrpcStubInterpreter object at 0x000001DA5FA135E0>
error_code = -200077
error_message = 'Requested value is not a supported value for this property. The property value may be invalid because it conflicts wi... Must Be Less Than:  25.0e-3\n\nChannel Name: bridgeTester/ai0\n\nTask Name: _unnamedTask<10D>\n\nStatus Code: -200077'
samps_per_chan_written = None, samps_per_chan_read = None

    def _raise_error(self, error_code, error_message, samps_per_chan_written=None, samps_per_chan_read=None):
        if error_code < 0:
            if samps_per_chan_read is not None:
                raise errors.DaqReadError(error_message, error_code, samps_per_chan_read) from None
            elif samps_per_chan_written is not None:
                raise errors.DaqWriteError(error_message, error_code, samps_per_chan_written) from None
            else:
>               raise errors.DaqError(error_message, error_code) from None
E               nidaqmx.errors.DaqError: Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
E               Property: DAQmx_AI_Min
E               Requested Value: -2.0
E               Value Must Be Greater Than: -25.0e-3
E               Value Must Be Less Than:  25.0e-3
E               
E               Channel Name: bridgeTester/ai0
E               
E               Task Name: _unnamedTask<10D>
E               
E               Status Code: -200077

generated\nidaqmx\_grpc_interpreter.py:147: DaqError