LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

The windows explorer .llb browser affects my program running

Hi there

I've just discovered that when i execute my program from within the windows explorer .llb viewer, new to labview 7.1 i think, my program doesnt work.

Im writing instrument drivers and it calls a dll, Im thinking that has something to do with it.

Though when i launch the labview library in 2 different ways ive found that my program works and then doesnt work, to my surprise.

Thanks for that

Stephen Webb
0 Kudos
Message 1 of 7
(3,304 Views)
Hello –

When you say that your program doesn’t work, do you mean that the program doesn’t run at all? Or, do you mean that it runs but it gives you unexpected results?

Also, you mention that you launch your program in 2 different ways and one works and the other doesn’t. What are those 2 different ways? Which one works and which one doesn’t?

If you launch a simple VI that doesn’t do instrument communication, does it work? If you launch a simple VI that doesn’t call a dll, does it work?

S Vences
Applications Engineer
National Instruments
0 Kudos
Message 2 of 7
(3,277 Views)
Thanks alot for the help!!!!

My problem is to do with loading llb, library files. Im running win xp and have labview 7.1 . I've found that there is 2 ways to open a llb file.

1) Double click the llb file in windows explorer and i get another windows explorer window open where i can select the vi to run.

2) To open labview first and then open the llb file, then select the vi to run.

A bit of background knowledge. Im writing a device driver to control a ccd detector. There has already been a dll written to control the detector. So the labview program ive written just wraps the dll functions therefore creating a labview driver.

Ive found that one of the functions of the detector works when i load the library with method (2) and not with method (1) !

To answer your question, the vi runs but it does different things when i load the library in the 2 ways. It works when i open the library through labview first and not from windows explorer. A simple vi would work, its when im trying to do instrument communication, through the dll, that it fails.

I hope your've understood my plight and i thank you again for any help you could give me.

Stephen Webb
0 Kudos
Message 3 of 7
(3,270 Views)
Hello –

What I am trying to identify is whether the problem appears when doing instrument communication, calling a dll, or only when doing both things at the same time.

So, does a VI that calls a dll (but this dll does not do instrument communication) work? Does a VI that does instrument communication (but not through a dll) work?

You mention that one of the functions of the detector works when loading the library with method 2 but not with method 1. Do other functions work with method 1?

What are the things that the program does different when loading with method 1 and 2?

Also, is your dll a LabVIEW dll? If you do a search in your computer, do you only have one copy of your dll?
It is possible that you have different instances of the same dll and the search paths LabVIEW uses depending on what method you use (1 or 2) are different. In this case you could be using two different versions of the dll which would explain the different behaviors. So, make sure you only have one copy of the dll on your machine and move it to the C:\Windows\System32 directory.

S Vences
Applications Engineer
National Instruments
0 Kudos
Message 4 of 7
(3,238 Views)
Hello

I'm not using any labview built in routimes to do instrument communication. Im not using VISA or serial of GPIB. Labview is calling a dll and this dll communicates with the detector.

Its hard for me to try and answer your questions because someone else has written this dll and i just know the exported functions and what they do.

A new function has been designed into the detector. They have said "This is the exported function from the dll, these are the parameters and it should work".

All the old functions of the detector work when loading the llb file with methods 1 and 2. Its only this new thing they have introduced which varies between the different methods.

The new function will only work if it finds a particular ini file that is supposed to be in the same directory as the dll. Maybe this has something to do with it.

I only put one copy of the dll in system32 directory and the problem persists. I dont know what you mean by a labview dll.

I've been sitting here for about an hour thinking about what to write, i cant answer your questions. Ill just have to put it in the documentation for my driver to load with the correct method. I dont think you can help me because its just a bug in labview, i thought id just be useful and report it. It shouldnt matter which method is used to load the library.

Thankyou for your trouble.

Stephen Webb
0 Kudos
Message 5 of 7
(3,237 Views)
I have re-read this thread a couple of times to try to understand the issue.

If I understand you correctly your driver,

Works if;
you open LV explicitly and then double click on the VI from explorer

Fails if;
you just attempt to open (LV is closed).

This may be a file association issue (guessing).

In the failing scenario, if you rihgt click and choose open with... and choose LV, does that work?

Sorta confused,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 7
(3,223 Views)

@jesuS^ wrote:
The new function will only work if it finds a particular ini file that is supposed to be in the same directory as the dll. Maybe this has something to do with it.



Hello –

So, if I understand correctly, when you use method one, the VI appears not to find the particular ini file. What is the search path to find that ini file?
I mention this because an llb is considered a directory by LabVIEW. Searching the top directory means searching the llb the VI is located in, but not the directory the llb is located in. It is possible that, because of the path you have defined, the VI is not looking for the ini file in the correct place.

S Vences
Message 7 of 7
(3,208 Views)