Inherited a spaghetti code that controls two yokogawa GS610 power supplies.
It has the VISA resource selection on the front panel and the lines directly used by VISA write/reads. Not using the initializing VI from the NI Instr drivers. Code works to drive both units.


Modernizing the code, instead of front panel, it's reading the ID# from an ini file and then looking up the results from VISA find to generate the VISA resource.

Up to here, no issues. The VISA resource is wrapped in a powersupply class. I have a "constructor" that just calls the initialize VI from the driver. There is a difference here between the old and new code. VISA open is explicitly called where as it was not before.


So here's where the problem shows up when I try to initialize my objects.
The starting order is Neg PS, followed by Pos PS. No particular reason for the order.
When pos_addr = GPIB0::1, neg_addr = GPIB0::2, then Neg PS starts fine. Pos PS hangs
I've swapped out a spare unit for pos_addr and same behavior.
So then I tried pos_addr = GPIB0::3, neg_addr = GPIB0::2, this time, the Pos PS works, but Neg PS hangs
So it seems the higher ID works but not the lower one. Is there some GPIB order/timing that needs to be followed? It's the same object code so I'm not sure why it's behaving differently