LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to display vi ,when vc calls labview dll

i create a vi for detecting use,and build it as a dll, before this ,i changed the vi  appearence,
i'd like to make vc(for example ,a button) call this labview dll to display the detecting process and result ,
i add the .h,.lib files ,move the .dll file to the program folder, building passed,but it can't display vi.
i don't know why,and i really need your help.
 
0 Kudos
Message 1 of 14
(3,788 Views)
Your VI needs to explicitedly open its own front panel. You use VI server property nodes for this. By default all front panels are removed by the application builder as the functions are usually just called and not shown.

Rolf Kalbermatter

Message Edited by rolfk on 07-06-2005 02:58 PM

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 14
(3,772 Views)
thanks
i do open its front panel when i build it,
but there's no response.
i'm a newer in this field ,please give me some advice to carry out the function i mentioned above.
0 Kudos
Message 3 of 14
(3,759 Views)
How do you open the front panel? ANd you need to make sure that the front panel is not removed by the Application Builder. For DLLs the removal of the front panel is the default behaviour in the Application Builder.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 4 of 14
(3,750 Views)
i do it in this way:
open the vi,show its front panel, then, change its VI Properties in file session,change the catelog to Window Appearance,and customize ,select show front panel when called,and close afterwards if originally closed ,and show front panel when loaded.
 
am i right?
0 Kudos
Message 5 of 14
(3,739 Views)
I'm not sure but the execution from the DLL wrapper may not count as calling the VI so the "Show VI when called" may not make any differenced. Instead open the front panel explicitedly in the VI using property nodes.

The other setting to make sure the front panel is not removed from the application build is good.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 6 of 14
(3,734 Views)
i use the property node, but it makes no deference.
i have a question:
when i build the dll file, i make  no parameters,no input ,no output, is there something wrong with it ? i am not sure.  
 
in addition,in another experiment, i make one parameter,only output, when i use VC call the method defined in the vi, it reminds can't convert long to *long, another situation, i make input,output parameters, it's correct.
 
so, i guess maybe the problem is connected to the parameters when building vi,but i don't know how,and in my idea, i want the program  just show the detecting process and result ,
0 Kudos
Message 7 of 14
(3,719 Views)

Hello! The parameters of your VI should have nothing to do with whether or not the front panel is visible (unless of course the application crashes before it can execute the VI-turned-DLL). There is no problem having a DLL without any inputs or outputs, so none are necessary. As for the type mismatch between a value and a pointer, that's a whole other issue.

Getting back to showing the front panel, I will have to echo Rolf again: make sure that you are not removing the front panel when building your application. Front panel removal is the default setting which requires that you change it. You should change this by going to the VI Settings tab in the LabVIEW build configuration window and changing the "Remove front panel" option to NO.

Kind Regards,

E. Sulzer
Applications Engineer
National Instruments
0 Kudos
Message 8 of 14
(3,708 Views)
thank you,
but i'm sure the Remove Panel section is changed to NO,
 
0 Kudos
Message 9 of 14
(3,700 Views)
Hello,
 
Can you tell if your LabVIEW program (as a DLL) is running at all? I would suggest adding some VIs to write to a specific file each time the DLL is called. If the panel is not removed, and the property node is used then the panel should show each time the DLL is called.
 
After we determine if the VI (as a DLL) is actually running we will be able to interpret the behavior more accurately.
 
Scott Y
NI
0 Kudos
Message 10 of 14
(3,677 Views)