ni / nimi-python

Python bindings for NI Modular Instrument drivers.
Other
111 stars 85 forks source link

nidcpower clearing committed triggers #1059

Closed bdh2016 closed 5 years ago

bdh2016 commented 5 years ago

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.

"initialize a session"

session.sequence_iteration_complete_event_output_terminal = "PXI_TRIG1" session.initiate() session.close()

"repeat"

marcoskirsch commented 5 years ago

Support moved to NI support forums https://forums.ni.com/t5/Digital-Multimeters-DMMs-and/Managing-Trigger-Reservations-on-4140/m-p/3976427