Skip to content

Commit b34ff87

Browse files
committed
modify to support _ex variant only
1 parent 8876722 commit b34ff87

File tree

3 files changed

+6
-190
lines changed

3 files changed

+6
-190
lines changed

generated/nidaqmx/task.py

Lines changed: 1 addition & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -402,39 +402,8 @@ def is_task_done(self):
402402

403403
return is_task_done
404404

405-
def perform_strain_shunt_cal(
406-
self, channel="", shunt_resistor_value=100000,
407-
shunt_resistor_location=0, skip_unsupported_channels=False):
408-
"""
409-
Performs shunt calibration for the specified channels of the task.
410-
The instances of this polymorphic VI correspond to the type of bridge
411-
sensor. Refer to the calibration procedure for your module for detailed
412-
calibration instructions.
413-
414-
Performs shunt calibration for the specified channels using a strain
415-
gage sensor.
416-
417-
Args:
418-
task/channel in: specifies name of the task or a list of virtual
419-
channels to which the operation applies. If you provide a
420-
list of virtual channels, NI-DAQmx creates a task automatically.
421-
channels: specifies a subset of virtual channels in the task that you
422-
want to calibrate. Use this input if you do not want to calibrate
423-
all the channels in the task or if some channels in the task measure
424-
non-bridge-based sensors. If the input is empty, this VI attempts to
425-
calibrate all virtual channels in the task.
426-
shunt resistor value: specifies the shunt resistance in ohms.
427-
shunt resistor location: specifies the location of the shunt resistor.
428-
skip unsupported channels: specifies whether or not to skip channels that
429-
do not support calibration. If skip unsupported channels is TRUE, this
430-
VI calibrates only supported channels. If FALSE, this VI calibrates the
431-
channels specified by channels. The default is FALSE.
432-
"""
433-
self._interpreter.perform_strain_shunt_cal(
434-
self._handle, channel, shunt_resistor_value,
435-
shunt_resistor_location, skip_unsupported_channels)
436405

437-
def perform_strain_shunt_cal_ex(
406+
def perform_strain_shunt_cal(
438407
self, channel="", shunt_resistor_value=10000,
439408
shunt_resistor_location=0, shunt_resistor_select=0,
440409
shunt_resistor_source=0, skip_unsupported_channels=False):
@@ -471,42 +440,6 @@ def perform_strain_shunt_cal_ex(
471440
shunt_resistor_source, skip_unsupported_channels)
472441

473442
def perform_bridge_shunt_cal(
474-
self, channel="", shunt_resistor_value=100000,
475-
shunt_resistor_location=0, bridge_resistance=120,
476-
skip_unsupported_channels=False):
477-
"""
478-
Performs shunt calibration for the specified channels of the task.
479-
The instances of this polymorphic VI correspond to the type of bridge
480-
sensor. Refer to the calibration procedure for your module for detailed
481-
calibration instructions.
482-
483-
Performs shunt calibration for the specified channels using a bridge sensor.
484-
485-
Args:
486-
task/channel in: specifies name of the task or a list of virtual
487-
channels to which the operation applies. If you provide a
488-
list of virtual channels, NI-DAQmx creates a task automatically.
489-
channels: specifies a subset of virtual channels in the task that you
490-
want to calibrate. Use this input if you do not want to calibrate
491-
all the channels in the task or if some channels in the task measure
492-
non-bridge-based sensors. If the input is empty, this VI attempts to
493-
calibrate all virtual channels in the task.
494-
shunt resistor value: specifies the shunt resistance in ohms.
495-
shunt resistor location: specifies the location of the shunt resistor.
496-
bridge resistance: specifies the bridge resistance in ohms. A value of -1
497-
means to use the nominal bridge resistance specified when you created
498-
the virtual channel.
499-
skip unsupported channels: specifies whether or not to skip channels that
500-
do not support calibration. If skip unsupported channels is TRUE, this
501-
VI calibrates only supported channels. If FALSE, this VI calibrates the
502-
channels specified by channels. The default is FALSE.
503-
"""
504-
self._interpreter.perform_bridge_shunt_cal(
505-
self._handle, channel, shunt_resistor_value,
506-
shunt_resistor_location, bridge_resistance,
507-
skip_unsupported_channels)
508-
509-
def perform_bridge_shunt_cal_ex(
510443
self, channel="", shunt_resistor_value=100000,
511444
shunt_resistor_location=0, shunt_resistor_select=0,
512445
shunt_resistor_source=0, bridge_resistance=120,

src/handwritten/task.py

Lines changed: 1 addition & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -402,39 +402,8 @@ def is_task_done(self):
402402

403403
return is_task_done
404404

405-
def perform_strain_shunt_cal(
406-
self, channel="", shunt_resistor_value=100000,
407-
shunt_resistor_location=0, skip_unsupported_channels=False):
408-
"""
409-
Performs shunt calibration for the specified channels of the task.
410-
The instances of this polymorphic VI correspond to the type of bridge
411-
sensor. Refer to the calibration procedure for your module for detailed
412-
calibration instructions.
413-
414-
Performs shunt calibration for the specified channels using a strain
415-
gage sensor.
416-
417-
Args:
418-
task/channel in: specifies name of the task or a list of virtual
419-
channels to which the operation applies. If you provide a
420-
list of virtual channels, NI-DAQmx creates a task automatically.
421-
channels: specifies a subset of virtual channels in the task that you
422-
want to calibrate. Use this input if you do not want to calibrate
423-
all the channels in the task or if some channels in the task measure
424-
non-bridge-based sensors. If the input is empty, this VI attempts to
425-
calibrate all virtual channels in the task.
426-
shunt resistor value: specifies the shunt resistance in ohms.
427-
shunt resistor location: specifies the location of the shunt resistor.
428-
skip unsupported channels: specifies whether or not to skip channels that
429-
do not support calibration. If skip unsupported channels is TRUE, this
430-
VI calibrates only supported channels. If FALSE, this VI calibrates the
431-
channels specified by channels. The default is FALSE.
432-
"""
433-
self._interpreter.perform_strain_shunt_cal(
434-
self._handle, channel, shunt_resistor_value,
435-
shunt_resistor_location, skip_unsupported_channels)
436405

437-
def perform_strain_shunt_cal_ex(
406+
def perform_strain_shunt_cal(
438407
self, channel="", shunt_resistor_value=10000,
439408
shunt_resistor_location=0, shunt_resistor_select=0,
440409
shunt_resistor_source=0, skip_unsupported_channels=False):
@@ -471,42 +440,6 @@ def perform_strain_shunt_cal_ex(
471440
shunt_resistor_source, skip_unsupported_channels)
472441

473442
def perform_bridge_shunt_cal(
474-
self, channel="", shunt_resistor_value=100000,
475-
shunt_resistor_location=0, bridge_resistance=120,
476-
skip_unsupported_channels=False):
477-
"""
478-
Performs shunt calibration for the specified channels of the task.
479-
The instances of this polymorphic VI correspond to the type of bridge
480-
sensor. Refer to the calibration procedure for your module for detailed
481-
calibration instructions.
482-
483-
Performs shunt calibration for the specified channels using a bridge sensor.
484-
485-
Args:
486-
task/channel in: specifies name of the task or a list of virtual
487-
channels to which the operation applies. If you provide a
488-
list of virtual channels, NI-DAQmx creates a task automatically.
489-
channels: specifies a subset of virtual channels in the task that you
490-
want to calibrate. Use this input if you do not want to calibrate
491-
all the channels in the task or if some channels in the task measure
492-
non-bridge-based sensors. If the input is empty, this VI attempts to
493-
calibrate all virtual channels in the task.
494-
shunt resistor value: specifies the shunt resistance in ohms.
495-
shunt resistor location: specifies the location of the shunt resistor.
496-
bridge resistance: specifies the bridge resistance in ohms. A value of -1
497-
means to use the nominal bridge resistance specified when you created
498-
the virtual channel.
499-
skip unsupported channels: specifies whether or not to skip channels that
500-
do not support calibration. If skip unsupported channels is TRUE, this
501-
VI calibrates only supported channels. If FALSE, this VI calibrates the
502-
channels specified by channels. The default is FALSE.
503-
"""
504-
self._interpreter.perform_bridge_shunt_cal(
505-
self._handle, channel, shunt_resistor_value,
506-
shunt_resistor_location, bridge_resistance,
507-
skip_unsupported_channels)
508-
509-
def perform_bridge_shunt_cal_ex(
510443
self, channel="", shunt_resistor_value=100000,
511444
shunt_resistor_location=0, shunt_resistor_select=0,
512445
shunt_resistor_source=0, bridge_resistance=120,

tests/component/test_task.py

Lines changed: 4 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -42,32 +42,6 @@ def test___tasks_with_different_names___hash___not_equal(generate_task):
4242
assert hash(task1) != hash(task2)
4343

4444

45-
@pytest.mark.device_name("bridgeTester")
46-
@pytest.mark.parametrize(
47-
"shunt_resistor_value, shunt_resistor_location, bridge_resistance, skip_unsupported_channels",
48-
[
49-
(100000, 12465, 0.2, True),
50-
(100000, 12465, 0.2, False),
51-
(100000, 12467, 0.2, True),
52-
(100000, 12467, 0.2, False),
53-
],
54-
)
55-
def test___perform_bridge_shunt_cal___no_errors(
56-
ai_bridge_task: nidaqmx.Task,
57-
shunt_resistor_value,
58-
shunt_resistor_location,
59-
bridge_resistance,
60-
skip_unsupported_channels,
61-
) -> None:
62-
ai_bridge_task.perform_bridge_shunt_cal(
63-
ai_bridge_task.channels.name,
64-
shunt_resistor_value,
65-
shunt_resistor_location,
66-
bridge_resistance,
67-
skip_unsupported_channels,
68-
)
69-
70-
7145
@pytest.mark.device_name("bridgeTester")
7246
@pytest.mark.parametrize(
7347
"shunt_resistor_value, shunt_resistor_location, shunt_resistor_select, shunt_resistor_source, bridge_resistance, skip_unsupported_channels",
@@ -78,7 +52,7 @@ def test___perform_bridge_shunt_cal___no_errors(
7852
(100000, 12467, 0, 0, 0.2, False),
7953
],
8054
)
81-
def test___perform_bridge_shunt_cal_ex___no_errors(
55+
def test___perform_bridge_shunt_cal___no_errors(
8256
ai_bridge_task: nidaqmx.Task,
8357
shunt_resistor_value,
8458
shunt_resistor_location,
@@ -87,7 +61,7 @@ def test___perform_bridge_shunt_cal_ex___no_errors(
8761
bridge_resistance,
8862
skip_unsupported_channels,
8963
) -> None:
90-
ai_bridge_task.perform_bridge_shunt_cal_ex(
64+
ai_bridge_task.perform_bridge_shunt_cal(
9165
ai_bridge_task.channels.name,
9266
shunt_resistor_value,
9367
shunt_resistor_location,
@@ -98,30 +72,6 @@ def test___perform_bridge_shunt_cal_ex___no_errors(
9872
)
9973

10074

101-
@pytest.mark.device_name("bridgeTester")
102-
@pytest.mark.parametrize(
103-
"shunt_resistor_value, shunt_resistor_location, skip_unsupported_channels",
104-
[
105-
(100000, 12465, True),
106-
(100000, 12465, False),
107-
(100000, 12467, True),
108-
(100000, 12467, False),
109-
],
110-
)
111-
def test___perform_strain_shunt_cal___no_errors(
112-
ai_strain_gage_task: nidaqmx.Task,
113-
shunt_resistor_value,
114-
shunt_resistor_location,
115-
skip_unsupported_channels,
116-
) -> None:
117-
ai_strain_gage_task.perform_strain_shunt_cal(
118-
ai_strain_gage_task.channels.name,
119-
shunt_resistor_value,
120-
shunt_resistor_location,
121-
skip_unsupported_channels,
122-
)
123-
124-
12575
@pytest.mark.device_name("bridgeTester")
12676
@pytest.mark.parametrize(
12777
"shunt_resistor_value, shunt_resistor_location, shunt_resistor_select, shunt_resistor_source, skip_unsupported_channels",
@@ -132,15 +82,15 @@ def test___perform_strain_shunt_cal___no_errors(
13282
(100000, 12467, 0, 0, False),
13383
],
13484
)
135-
def test___perform_strain_shunt_cal_ex___no_errors(
85+
def test___perform_strain_shunt_cal___no_errors(
13686
ai_strain_gage_task: nidaqmx.Task,
13787
shunt_resistor_value,
13888
shunt_resistor_location,
13989
shunt_resistor_select,
14090
shunt_resistor_source,
14191
skip_unsupported_channels,
14292
) -> None:
143-
ai_strain_gage_task.perform_strain_shunt_cal_ex(
93+
ai_strain_gage_task.perform_strain_shunt_cal(
14494
ai_strain_gage_task.channels.name,
14595
shunt_resistor_value,
14696
shunt_resistor_location,

0 commit comments

Comments
 (0)