Closed aguileraGit closed 2 years ago
Dear M. Aguilera,
I don't have Jupyter. I am running Visual Studio 2015 with this library. Of course you are welcome to use any compatible Python IDE to be sure. However when I run either analog output example (v_out.py, VOut01.py or ULAO01.py) and terminate the app using all the ways I am capable (click on the X, CTRL+C, etc.) the last value set out of the DAC stays where it was last set. The mcculw uses the same underlying library used for Win32 C, VB6, and in a round about way VB.NET and C#.NET. Meaning they all hold the last value the calling program output to the DAC.
I believe the phenomenon you are witnessing is nothing to do with our library but rather to do with Jupyter.
I agree this could be a safety issue, but as stated above, the last value output to the DAC is where it stays when the app terminates. That is why when you output a value of 0VDC and then ended your app, it would/should stay at 0VDC. Best regards, Jeff
@aguileraGit you could catch the KeyboardInterrupt
and use a finally
to set analog output to 0 volts.
Refer to https://docs.python.org/3/tutorial/errors.html#defining-clean-up-actions
I'm running the analog out example. I'm using Jupyter to write my python code.
I've notice if I interrupt the kernel (suppose to be the same as Ctrl + C), it quits, but the voltage jumps to the max voltage. Is there any way to prevent this happening? It's actually a safety issue for me.