10-26-2020 08:41 AM
Good morning,
I am curently developing a software in LabVIEW and it already operates perfectly as I want.
The whole setup is made up of 4 instruments communicated via USB (VISA).
The problem occurs when I try to run an external osciloscope software (not NI domain) while running the LabVIEW one. After about 1min, the external software loses communication with the osciloscope and says that another program is using the device. Then I need to restart LabVIEW so the osciloscope can communicate again.
No, the osciloscope is not being used by LabVIEW in any way.
And the communication with the osciloscope is being made by USB too.
Anyone knows how to "block" the communication of this COM port to LabVIEW or other solution to this?
Thanks!
Solved! Go to Solution.
10-26-2020 11:49 AM - edited 10-26-2020 11:52 AM
@GabrielTo wrote:
Good morning,
I am curently developing a software in LabVIEW and it already operates perfectly as I want.
The whole setup is made up of 4 instruments communicated via USB (VISA).
The problem occurs when I try to run an external osciloscope software (not NI domain) while running the LabVIEW one. After about 1min, the external software loses communication with the osciloscope and says that another program is using the device. Then I need to restart LabVIEW so the osciloscope can communicate again.
No, the osciloscope is not being used by LabVIEW in any way.
And the communication with the osciloscope is being made by USB too.
Anyone knows how to "block" the communication of this COM port to LabVIEW or other solution to this?
Thanks!
Two applications cannot access the same COM port at the same time. Period. This isn't really a LabVIEW issue, as much as an OS one.
10-26-2020 11:54 AM
In one sentence you say you are running both the LabVIEW and the non-LabVIEW oscope software at the same, time, then the next sentence you appear to say this is not the case. Did I misunderstand something?
Thanks.
10-26-2020 11:58 AM - edited 10-26-2020 12:00 PM
Thanks for your reply.
I am running both softwares at the same time, but they are not acessing the same COM port.
LabVIEW deals with the other 4 instruments while the osciloscope software deals only with the osciloscope.
10-26-2020 12:16 PM
For the instruments it does use, did you write all of the communication code yourself? Or are you using some drivers from the manufacturer in LabVIEW, or possibly some DLL or ActiveX?
I ask because some hardware I have seen has manufacturer's drivers that, in an effort to be "easy to use", have some sort of "scan" function that will attempt to send an ID request on all COM ports that exist on the PC and then report back which ones have identified themselves properly. If any of the 4 instruments you are using have some sort of autodetect code running, that could do it.
10-27-2020 07:09 AM
After a few tests, i found out that LabVIEW was not the problem.
The problem was with my PC USB hub that when I communicate with the other device connected to it the osciloscope just shut down.
Thanks everyone that tried to help me!
10-27-2020 07:22 AM
@GabrielTo wrote:
The problem was with my PC USB hub that when I communicate with the other device connected to it the osciloscope just shut down.
Yet another reason I hate using USB. If possible, switch to using Ethernet for communicating with external instruments, preferably on a private network.
10-27-2020 09:14 AM
USB hubs has caused many problems over the years. It seems to be a little better if they're powered ...