Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to 'reset' NI-VISA?

Hi

 

I have a test system with a bunch of USB "serial ports" (they are actually Atmel micros, a duplicate of the Arduino ItsyBitsy, so there's no physical serial port as such).

 

Leaving aside my misgivings about having 24 of them - the point being to test a load of them in parallel - I have an occasional problem that totally hangs VISA. I suspect electrical noise or similar disrupts things, which I can live with; it's the fact that I can't ever recover the situation in software.

 

Once I end up in that situation, even after quitting and restarting LabVIEW, a simple VI with only 'Visa Find' or 'Visa Open' in it hangs and can't be aborted. I can close its window but LabVIEW can't quit ("Resetting VI ...") and has to be killed from the task manager.

 

When I try to open one of the serial ports, NI I/O Trace shows:

1. viOpenDefaultRM (0x121F9560)
Process ID: 0x00000704 Thread ID: 0x000004E4
Start Time: 09:55:16.7393 Call Duration 00:00:00.0089
Status: 0 (VI_SUCCESS)

 

2. viParseRsrc (0x121F9560, "COM6", 0x105FFBC8, 0x105FFBC4)
Process ID: 0x00000704 Thread ID: 0x000004E4
Start Time: 09:55:16.7483

(note: no status so presumably it's hung)

 

If I expand "Devices and Interfaces" in MAX, I get an immediate error saying that it timed out waiting for a driver, and then hangs for a minute or so (Windows greys the window out and declares it 'Not responding') before returning but with no devices at all. I/O trace shows nothing in this case.

 

After messing around with DEVCON.EXE (red herring I think), I found that I can still access the 'serial ports' in question via PuTTY, so it's presumably NI-VISA that's gone AWOL.

 

A reboot will cause everything to spring into life, but that's not really helpful; presumably what I actually need is a means to prod NI-VISA.

 

System is: Windows 10 with all updates; LabVIEW 2020; NI-VISA 20.0.0.

 

Any ideas?

 

thanks

 

John

 

0 Kudos
Message 1 of 6
(660 Views)

Driver corruption?

0 Kudos
Message 2 of 6
(581 Views)

I really don't know; clearly something has got its proverbials in a twist.

Perhaps NI-VISA has had its data corrupted somehow, given that I can still talk to the devices in question via PuTTY.

One way or another it would be very useful to be able to do whatever a reboot does to sort out VISA, but without a reboot. Looks to me (as a non expert in the field) that it's got problems enumerating devices and perhaps needs its cache of devices cleared so that it can start afresh.

 

0 Kudos
Message 3 of 6
(572 Views)

Dear  JohnJoyceFlusso,

 

Try updating the driver, it might solve the problem.

0 Kudos
Message 4 of 6
(357 Views)

@JohnJoyceFlusso wrote:

Looks to me (as a non expert in the field) that it's got problems enumerating devices and perhaps needs its cache of devices cleared so that it can start afresh.


In MAX, go to Tools->NI-VISA->VISA Options.  In the navigation pane, go to the Aliases settings.  There is a button on the bottom to "Clear All Aliases".


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 5 of 6
(352 Views)

Hi

 

Thanks, I'll give that a go next time things go wrong - it's not that frequent. MAX gets rather upset and hangs on starting for a while, but perhaps once it's got its act together it will play.

 

Is there some way to do this programmatically? The whole point of the escapade was to enable recovery without user intervention.

 

regards

 

John

 

0 Kudos
Message 6 of 6
(329 Views)