When using nidcpower, in this case with the 4140 4-channel SMU, it's possible to initiate handshaking by using the digital_edge_sequence_advance_trigger_input_terminal attribute to set the input trigger and the sequence_iteration_complete_event_output_terminal attribute to set the output trigger.
When executing the code the first time, it runs perfectly, When running it again, the following error is generated: -1074107495: Trigger line requested could not be reserved because it is already in use.
Reallocating the trigger line, e.g. by committing the sequence_iteration_complete_event_output_terminal to an empty string does not clear the previously committed trigger.
The niswitch module appears to not have this issue with multiple commits and the nidocuments suggest this is because the trigger routes need to be cleared on the chassis, and, if this is not handled appropriately, they will not be cleared.
Only solutions are to reset chassis or develop code to manually clear chassis lines.
Description of issue
When using nidcpower, in this case with the 4140 4-channel SMU, it's possible to initiate handshaking by using the digital_edge_sequence_advance_trigger_input_terminal attribute to set the input trigger and the sequence_iteration_complete_event_output_terminal attribute to set the output trigger.
When executing the code the first time, it runs perfectly, When running it again, the following error is generated: -1074107495: Trigger line requested could not be reserved because it is already in use.
Reallocating the trigger line, e.g. by committing the sequence_iteration_complete_event_output_terminal to an empty string does not clear the previously committed trigger.
The niswitch module appears to not have this issue with multiple commits and the nidocuments suggest this is because the trigger routes need to be cleared on the chassis, and, if this is not handled appropriately, they will not be cleared.
Only solutions are to reset chassis or develop code to manually clear chassis lines.
python -c "import niscope; niscope.print_diagnostic_information()"
output (replaceniscope
with appropriate package name)OS: Name: Windows Version: 10.0.16299 Bits: 64 Driver: Name: NI-DCPower Version: 17.0.0.49152 Module: Name: nidcpower Version: 1.1.2 Python: Version: 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 10:22:32) [MSC v.1900 64 bit (AMD64)] Bits: 64 Is_Venv: True Installed Packages: six==1.12.0 pyvisa==1.10.1 pyvisa-py==0.3.1 numpy==1.17.2 niswitch==1.1.2 nimodinst==1.1.2 nidcpower==1.1.2 setuptools==28.8.0 pip==9.0.1
Steps to reproduce issue
"initialize a session"
session.sequence_iteration_complete_event_output_terminal = "PXI_TRIG1" session.initiate() session.close()
"repeat"