09-26-2019 08:22 AM
I have a very simple VI where I open the VISA communication (see image below) and close it later (it does not run in a loop).
I found out that the time between opening and closing the VISA port is minimum 16s !
This "pause" is taken by the Close VI.
For instance, if I wait 10s after opening the VISA port, the Close VI will take 6s to complete.
What I found strange is that this behavior is new on my system.
I tried to reboot the PC => same thing.
I use LV 2018 and NI-VISA driver 18.5.
The PC runs on Windows 10 64bit
Does anybody has an idea ?
09-26-2019 08:55 AM
Only 2 shot-in-the-dark guesses:
1. You haven't diagnosed the situation correctly -- something else is the *actual* cause of the delay, but you've attributed to the VISA Close function itself. (BTW, if you suspect the problem to be around the VISA Close function, why post only a screenshot of VISA Open?)
2. This one's really unlikely, but we've seen some occasional weird behavior on systems that have done a Win 10 update without yet rebooting. A fair amount of the weirdness seems to affect serial communication. A lot of these things self-heal after rebooting and allowing the Windows Update to get to its finished state.
-Kevin P
09-26-2019 09:19 AM - edited 09-26-2019 09:25 AM
Thanks for your ideas.
To answer your points :
1. I didn't show the Close VI because it is the "normal" Close.vi without any other code added. I can tell the problem happens im this VI by following the execution with the light bulb tool. I also measured the time for this VI to complete by placing a "tick count" function before and after it.
There is no other VI or software running.
2. I already tried to reboot. There is no Windows update running.
09-26-2019 09:55 AM
Sorry, forgot that you had already mentioned the reboot.
I've not seen this particular symptom, but have occasionally experienced and read about various kinds of bad behavior by some (usually very cheap) USB-to-serial devices and/or their drivers. I've seen excellent behavior by some really cheap ones too, but I don't *automatically* trust them.
Might you have such a not-extremely-well-supported USB-to-serial converter, possibly embedded within a bigger more functional device? Again, just shooting in the dark here...
-Kevin P
09-26-2019 10:37 AM
09-26-2019 11:16 AM
Yes cbutcher, this is what happens.
I forgot to mention that I use an "Ethernet to RS-232" converter from Phoenix Contact.
They provide a "COM-Port Redirector" software to configure the converter port
.
Could it be that there is a problem between the Close.vi and the converter driver ?
If so I guess I can't do anything about it...
09-26-2019 12:41 PM
@titi_nicolas wrote:
Yes cbutcher, this is what happens.
I forgot to mention that I use an "Ethernet to RS-232" converter from Phoenix Contact.
They provide a "COM-Port Redirector" software to configure the converter port
.
Could it be that there is a problem between the Close.vi and the converter driver ?
If so I guess I can't do anything about it...
I have had issues with other Ethernet-RS232 converters. That is most likely your problem. Just for fun, try a good USB-RS232 adapter or the RS-232 port on your motherboard. I would expect those to close really quickly.
09-27-2019 08:32 AM
It looks like you're closing it without actually opening it first, only configuring it. Does that make a difference?
/Y
09-27-2019 12:49 PM
@titi_nicolas wrote:
Yes cbutcher, this is what happens.
I forgot to mention that I use an "Ethernet to RS-232" converter from Phoenix Contact.
They provide a "COM-Port Redirector" software to configure the converter port
.
Could it be that there is a problem between the Close.vi and the converter driver ?
If so I guess I can't do anything about it...
Get another supplier for your converter.
Didn't I already mention Serenum services today? COM2 is usually reserved by BIOS .