LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA close.vi takes huge time to complete

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).init VISA communication.vi Block Diagram.png

 

 

 

 

 

 

 

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 ?

 

 

 

0 Kudos
Message 1 of 9
(3,219 Views)

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

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 9
(3,202 Views)

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.

0 Kudos
Message 3 of 9
(3,178 Views)

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

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 9
(3,167 Views)

So to confirm, the following code:

Example_VI.png

when given appropriate constants at VISA Configure Serial Port, gives a value of max(0, 16000-<constant value, shown here as 0, regardless of value>) when run?


GCentral
0 Kudos
Message 5 of 9
(3,151 Views)

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...

0 Kudos
Message 6 of 9
(3,133 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 9
(3,116 Views)

It looks like you're closing it without actually opening it first, only configuring it. Does that make a difference?

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 9
(3,085 Views)

@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 .  


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 9
(3,068 Views)