02-15-2021 05:37 AM
Dear forumers,
I have developer PC and target PC. Communication is unreliable with the USB device on target PC. I built application exe that is to be running on target PC.When i open my application exe on target PC, COM selection gets confused. It won't refresh COM ports or shows COM11 instead of COM5. Next time i plugged in the device to the same USB port and it showed me COM6. When i unplugging the device will not affect the list of COM devices after refreshing it.
Note:
- I use 10m long 2.0 active USB cable,
- When i loose communication during data acquisition I connect my instrument to my developer PC and i get "" (empty string constant from the instrument). Labview shows me no communication error which is very strange.
- After communication lost, I connected the instrument to my developer PC and tesed it with manufacturer's serial communication application that could communicate with the instrument.
Developer PC config:
Target PC config:
Target PC confguration must be compatible with currently running application exe.
Could someone please tell me how to fix this issue?
Kind regards,
Balázs
Solved! Go to Solution.
02-15-2021 06:10 AM
Which device gets which com port is determined by the OS.
There's little you can do about it.
You can make the com ports selectable by the user or from file. (Recommended)
Or, loop over all com ports available and try to use *IDN?, etc. to figure out which device is connected where.
02-15-2021 07:03 AM
Alternatively, if you have a desktop PC, use the onboard serial port and assign it to the same COM port as your dev PC. I Hate USB to RS-232 adapters. They are evil.
02-15-2021 10:25 AM - edited 02-15-2021 10:31 AM
02-15-2021 12:21 PM
"I use 10m long 2.0 active USB cable"
Any chance you can shorten that? 5 meters or less is best for USB, with 2m and under being even better. 10m is asking for problems.
02-16-2021 02:37 AM
@Kyle97330 wrote:
"I use 10m long 2.0 active USB cable"
Any chance you can shorten that? 5 meters or less is best for USB, with 2m and under being even better. 10m is asking for problems.
Also, do you use that cable for the development and the target?
If you're going to compare, that might make a big difference.
02-19-2021 06:19 AM
It was because of a contact issue with the mini USB cable that goes into the instrument. After I replaced the USB->Mini USB cable to another one the configuration is working well with 10m long active USB cable.
Kind regards,
Balázs