Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

TIePie HS4 oscilloscope - how to pragmatically unload .dll library from .vi

Hello,

 

I'm trying to figure out how to pragmatically unload the .dll library that is used for the communication and control of the TiePie HS4 USB oscilloscope. Currently, the program works well when it is started for the first time, but when I want to re-run the program, it collapses. I found out that this issue is caused by the .dll library HS4.dll. This library has to be unloaded and loaded again before re-running the program, otherwise the oscilloscope returns NO_HARDWARE error. If I quit the .vi and open it again everything is OK, because LV automatically unloads the library. I'm looking for a solution to unload the .dll, so the .vi can be re-run without any problems or restarts.

I' ve followed http://digital.ni.com/public.nsf/allkb/77594203D78D12278625729100758BE5, but wiring the empty path to the initial Call Library Node didn't help too much.

Pulse_Compression is the main .vi and HS_Set_Channels shows, how the .dll is called.

 

Thanks Jan

Download All
0 Kudos
Message 1 of 3
(4,012 Views)

Hi Jan,

 

When I looked at the code that you posted, it didn't look like you were implementing what was talked about in the KB that you referenced, was that in another version of the code?

 

But do we really need to do this?  TiePie doesn't provide an instrument driver on their site or have one listed on our drivers page, but they do have an example program.  Does that example throw the same error as your program on the second run? If not are you calling the ExitInstrument function at they end of your program like they are in theirs? Do you need to call the ExitInstrument before you can call the InitInstrument again(a question that TiePie would be more qualified to answer)?

 

Hope that helps,

Justin Parker
National Instruments
Product Support Engineer
0 Kudos
Message 2 of 3
(4,002 Views)

Hi

Anybody is familiar using TIEPIE HS5 with microsoft visual studio 13? 

 

I'm having problems setting it up and loading the examples provided by the website.

0 Kudos
Message 3 of 3
(3,534 Views)