07-22-2020 10:35 AM
I'm trying to use 2 PXI-4312 SMUs in a VI using the niDCPower drivers. When I try to run the VI normally, both SMUs show the following error: "niDCPower Configure Output Enabled.vi<ERR>IVI: (Hex 0xBFFA1190) The session handle is not valid"
However, when I run the VI with Highlight Execution selected, it runs without any errors. If I wait the first 3 cases in the case structure execute and then turn off highlight execution, it will also run without errors.
Does anyone have any suggestions on how to debug this?
I have attached the VI. I am using LabVIEW 2019
Solved! Go to Solution.
07-22-2020 10:58 AM
Local Variables! You don't need them. Use Wires instead.
What is happening here is you have a race condition between when the loop gets to the first time it reads the resource variable to when your initialization completes and writes the local variable. As GerdW will state: THINK DATAFLOW! Use wires to pass your data around.
07-22-2020 11:11 AM
That solved it. Thanks