11-21-2023 06:24 PM
How do I prevent this from happening?
I am using a Pickering chassis and a few Chroma DC electronic loads that are contained in different chassis. The Chromas are on a GPIB bus and the Pickering chassis uses PXI. At the start of my test program, I initialize all of the equipment, which leads to some duplicate sessions, even when I first start Labview.
This only seems to happen with the Chromas. I'm not sure if it is because they are using different standards, or if it has to do with the VIs that the company provided, which might not be checking for duplicate sessions when the instrument is first initialized.
I've searched the forums and have learned about opening, closing, and duplicate sessions, but I'm not sure how I would go about checking for duplicates with Chroma's initilaize.vi.
Can someone point me in the right direction?
11-15-2023 09:01 AM
How do I prevent this from happening?
I am using a Pickering chassis and a few Chroma DC electronic loads that are contained in different chassis. The Chromas are on a GPIB bus and the Pickering chassis uses PXI. At the start of my test program, I initialize all of the equipment, which leads to some duplicate sessions, even when I first start Labview.
This only seems to happen with the Chromas. I'm not sure if it is because they are using different standards, or if it has to do with the VIs that the company provided, which might not be checking for duplicate sessions when the instrument is first initialized.
I've searched the forums and have learned about opening, closing, and duplicate sessions, but I'm not sure how I would go about checking for duplicates with Chroma's initilaize.vi.
Can someone point me in the right direction?
11-21-2023 06:27 PM
You have to close the session explicitly once you're done with the work and reuse existing handle and don't create a new handle everytime.
This is like leaving the door open when you enter the room, you must close it as well at the end.
11-22-2023 06:57 AM
@santo_13 wrote:
This is like leaving the door open when you enter the room, you must close it as well at the end.
I would equate it more like logging into your bank account on a public computer and then just walking away. I'll let your imagination go from there.
Yes, you need to make sure the references are closed. Another issue I have ran into is losing the reference for various reasons. The one that bit me the hardest was a zero iteration FOR loop (use Shift Registers for references to avoid this issue). The other common way I've seen references lost is with tunnels set to "Use Default If Unwired" on a Case Structure or Event Structure and then a case is left unwired. Only use that setting in extremely rare cases.
11-22-2023 10:14 AM
For anyone that comes across this in the future, I did a little more searching on this and found a different post below that describes the same problem.
The Chromas seem to work differently than my other devices in that every time I use them it seems to create a new IVI session. I fixed the issue by wiring the IVI Delete Session to the instrument VIs so that it closes every time.