LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

vis loaded twice?

Hello

Our labview executable program calls a dll (built with labview). All worked fine still now.
Now we want to use some vis (that were used to compile the dll) in the main executable program.
Are those vis loaded twice, one load for the dll and another one for the executable? Can we use the same vi in the dll and in the executable (main program) that calls the dll? Must we change all the names in order to be able to use those vis that the dll uses?
0 Kudos
Message 1 of 5
(2,971 Views)
I do not believe that you can do this. I made a little VI to test it and here is what happened. After I had added the DLL call with "Call Library Funciton Node" VI, I added the subVI which this DLL calls. It came up with a question mark on it. It actually ran fine, so you can do this, but I was unable to open it. So basically, you can do this, but you could run into something on down the line.
J.R. Allen
Message 2 of 5
(2,971 Views)
Thanks for your answer.

So, if I use a vi in a dll, I can't use it in the vi that calls the dll.
I think it is a limiting factor, if for example I am using in the dll a vi that commnicate with my instrument through the serial port, but I need to use this low level vi in the main program.
By now I am copying again this vi in another folder and changing its name. Then I can use it in the main program, but I think it's quite inefficient, because I must duplicate a vi.
0 Kudos
Message 3 of 5
(2,971 Views)
I met a similar problem. In my work I need to call a subvi several times with different parameters at the same time, so that I can compare the results and see the how the change in one section affects those in others. But I can only call and activate ONE COPY of the subvi at one moment unless I close the running one.
I was told someone in GSI already made it working well but I don't know the detail so far.
BTW: I attach my examples and hope someone can work them out.
Download All
0 Kudos
Message 4 of 5
(2,971 Views)
The effect other posters mention could also cause compatbility problems down the road. Say you modify the non-DLL version of a subvi to change the connector pane. The next time you try loading that code with the DLL open it will break your VI. Conversely, I would also expect that if you loaded the VI first and then loaded the dll, the DLL would comeup as being broken--though heaven only knows how that would showup. Hopefully it wouldn't crash something...

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 5
(2,971 Views)