06-21-2018 10:09 AM
I have a VI (LV 2017) controlling 4 Lake Shore 648 powersupplies connected by USB simulated COM ports, one of which (the same one regardless of cable or port) keeps disconnecting. I cannot tell if it is the unit itself or the computer or the software doing it. To reconnect the insturment, I have to physically disconnect and reconnect the unit by either unplugging the cable or turning it off and then on. After this, I cannot get the VI to see the instrument with out completely shutting LV down and re-opening it. I can still however communicate with the instument via the VISA control panel within NIMAX.
I have no idea why one program would be able to see it but not the other. I've never had any issues with the other three instruments.
Is there some method of diagnosing the issue I can employ? Or better yet....a known fix!?
Solved! Go to Solution.
06-21-2018 11:31 AM
What power supplies are you using? Is there another communication bus you can use?
Personally, I despise USB for stupid things like this. My preference is Ethernet. With a simple Ethernet switch, you can connect a lot of instruments with a reliable bus for cheap. Just be sure to use a localized network that uses fixed IP addresses to avoid most of the pitfalls.
06-21-2018 11:48 AM
They are Lake Shore 648 power supplies.
I have no choice but to use USB.
06-21-2018 01:30 PM - edited 06-21-2018 01:32 PM
Does it stay with the port, cord, or instrument when you try to switch some things around? Stay with the method of only changing one variable at a time to help isolate the issue (IE Leaving all the cables plugged into their USB ports, disconnect the bad supply from its cord and swap it with a good one then place the good one onto the bad cable. Try it again - what fails now?)
06-21-2018 01:48 PM
The specs page says it also supports IEEE 488.2, i.e. GPIB. I don't suppose you could use that instead?
Do you have any support from the manufacturer? It could be a bad board in the actual machine. If the fault stays with the particular machine no matter what cord or USB port you use, that's the most likely culprit.
06-22-2018 02:56 AM
As I said, regardless of port or cable it stays with the same machine. GPIB is a potential fix but I don't want to spend money on the cables and USB adapter if it's not a certain fix.
Does LV store some kind of address for each COM port that cannot change without a restart of the program? I'm just a little confused as to why NIMAX can communicate with it after the disconnect but not LV.
06-25-2018 07:40 AM
The tendency is that if it works in NI-Max, then it is an error in the vi configuration. It may be a point where that instrument is handled differently, or a shared resource is not handled properly. Without seeing any code, everything is just speculation.
06-26-2018 04:24 PM
This is what I thought, I'm hoping it is indeed a issue with the configuration.
You are quite right, please find attached. I made the code with a single magnet and then copied it 4 times to get it where it is. VJ is the broken output, please forgive and issues, I am only a beginner.
06-27-2018 07:35 AM
Other than guessing at what is happening within your lake shore 648 init+read+close.vi, here are my main observations.
Additionally, you might want to do these as clean-up
06-28-2018 10:13 AM
Still no luck?
It seems this work is continuing on from this post -https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Virtual-com-port-usb-reconnect/m-p/3806347#M...
If the same instrument is failing while 3 others work, then you need to call Lakeshore to discuss with them what the issues might be. If its not specific to one instrument, then there's something wrong with your hardware setup.
Can you explain the physical setup? Is this 4 USB-RS232 cables leading to 4 magnets? What USB ports are you using? Have you tried a dedicated USB PCIe card ($20-50) for all of these? Cheaper than GPIB, which was mentioned. Perhaps you can borrow a USB-GPIB and some cables to perform a test and check if that solves the problem? (No change to the code would be required).
Craig