12-06-2022 02:35 PM - edited 12-06-2022 02:40 PM
Good morning,
While working on a test bench, I encountered the following problem.
I have five laboratory power supplies connected to the computer, connected via the USB port, seen as COM ports. Each power supply is controlled and queried for parameters in a separate loop. During the operation of all power supplies, the read data is distorted. The read data is sometimes a fragment of data from another COM port or a string of random characters. When connecting two power supplies, I did not notice such a problem. Switching the read and write functions to synchronous mode of work improved a little, but from time to time the same problem occurs.
Has anyone encountered such a problem before? If so, please help me solve the problem.
And sorry for my language.
Equipment parameters:
Labview 2014 x64
NI-VISA 14.0.1
Windows 10
Power supply: Itech IT-6005B
12-06-2022 05:08 PM
Most likely a code issue, we can provide more guidance if you could share your code.
12-07-2022 06:24 AM
It could be a driver issue. I am not a fan of USB for instrumentation. And it is possible the Virtual Serial Port driver is having issues with multiple instances. Personally, I use Ethernet with static IP addresses for my instrument communications. A decent network switch and cables to connect everything up is all that is needed. As long as everybody has unique IP addresses, there should be no issues.
12-07-2022 04:21 PM
When timing is not critical I would ensure that messages and answers are read one by one, so no parallel problems anymore. but only when timing is not an issue.
This can easily be done by putting a command answer combination n a subvi.
And because a subvi (when not marked as re-entrant) will block all other callers.