LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make LabVIEW "forget"

Greetings,

After launching a LabVIEW 2016 app that accesses I/O, i.e. resource strings, it seems that they are not released as expected. The same is true for file handles after they are used. For example if the app uses a file with read&write access, then closes the file properly, Windows7 cannot open it because it is marked read-only. After closing the LabVIEW app the file is available.

My more important issue is with I/O resources. I am using ("shhh") several Measurement Computing USB-1024 digital modules. Sorry they are lower cost, OK say cheaper than NI.

Anyway here is the scenario.

(1) Start a LabVIEW app, access the device and properly closing it with MC utilities. Works OK.

(2) Unplug the USB cable, no I/O occurs during this event.

(3) Re-insert the same cable to the same device, no I/O occurring.

The LabVIEW app refuses to recognize it as it did 20 seconds ago.

This is the case regardless of whether or not I run the InstaCal utility (functionally a small version of MAX that configures MC devices).

After deployment this is a problem if the operators remove or replace one of the devices then try to reconfigure while the app is running at idle. A workaround is to require the app to restart. That is OK but don't we all hate to do that if not necessary?

 

Question: Is there a way to programmatically clear all -- or preferably part of -- LabVIEW's cache of handles and resources? I am not neccessarily asking for help with the MC devices but if anyone has insight that is also good. Responders may be general or comment on the file handle example.

Scott Bell

0 Kudos
Message 1 of 2
(1,941 Views)

We ars going need to see code.


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 2
(1,912 Views)