07-26-2019 02:54 PM
Hello,
I have been using the following code to simply read a voltage from a digital lock-in amplifier. For some reason, the lock-in does not respond to my manual settings adjustments in the code I've provided. If I isolate the left session, the lock-in updates as expected, and if I isolate the right session, the lock-in provides me with a voltage as expected. However, when the two sessions are used in the same document, only the right session works. Does anyone know what the problem is/how to fix it?
07-26-2019 03:01 PM
You are actually opening and closing more than twice. You are opening and closing on every iteration of that while loop.
Open our VISA session once at the beginning of your code. Then close it once after you while loop has completed.
07-26-2019 03:23 PM
Thank you for pointing that out. If I still want to read something every time the while loop executes, can I have two VISA Writes connected to each other across the sequence structure?
07-26-2019 03:44 PM
Of course!