LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW and custom controls

Hi all,

I'm an italian PhD student working with Polytechnic of Bari.

I'd like to submit to this forum a question about LabVIEW and custom controls in form of ActiveX components.

Some introductory word about my problem will be helpful: in the past few months here at Polytechnic of Bari my colleagues and I developed some useful ActiveX controls with custom functionalities to use in LabVIEW.

For example we developed a "contraves", an
"endless knob" and a useful counter with a scale very similar to that of standard gazometers or energy counters.

However we are experimenting some difficulties with the integration of these controls in LabVIEW; the controls are correctly imported in our VIs with using the ActiveX Container but...
in the block diagram they appear as ActiveX references and we must use property nodes to access even their most useful property (value).

Please, do someone of you know if (and eventually how) is it possible to integrate more deeply the controls in the LabVIEW environment?

Do someone of you know if it exist an hypothetical "Custom Controls SDK" for LabVIEW more advanced of that integrated in LabVIEW 6.0?

Any hint would be appreciated.
0 Kudos
Message 1 of 4
(3,032 Views)
> Please, do someone of you know if (and eventually how) is it possible
> to integrate more deeply the controls in the LabVIEW environment?
>
> Do someone of you know if it exist an hypothetical "Custom Controls
> SDK" for LabVIEW more advanced of that integrated in LabVIEW 6.0?
>


You probably want to take a look at the 3D graph. It is also an ActiveX
control and has had wrapper VIs written for it to make it more
accessible. There are no internal APIs yet, and the 3D graph is about
as good as you can get for integrating an ActiveX control with LV. If
you choose to go this route, to have the VIs and drop already wired to
the ActiveX refnum, you mark them in the menu as a merge-VI. If you
can't find info about that, ask again and I'll fill in the
details.

Greg McKaskle
Message 2 of 4
(3,032 Views)
Greg,

I think this may be a possible solution to my problem; I will try the suggested way.

Please can you specify in more detail how I can obtain the ActiveX refnum input automatically wired to a constant (I have observed this behaviour with the 3D-Graph control as you suggested). I haven't found any reference in the LabVIEW on-line help about the topic "merge-VI".

This will be very helpful to me.

Thank you again!

Francesco Adamo.
0 Kudos
Message 3 of 4
(3,032 Views)
> Please can you specify in more detail how I can obtain the ActiveX
> refnum input automatically wired to a constant (I have observed this
> behaviour with the 3D-Graph control as you suggested). I haven't found
> any reference in the LabVIEW on-line help about the topic "merge-VI".
>


The first step is to build a VI that contains the panel and diagram
elements that you want to drop all at once. In your case, drop the
ActiveX control at a good size, and on the diagram, you can wire it to
helper VIs, property nodes, etc. The VI's icon and name are important
as that is what will show up in the palette menu representing your
control. The connector pane isn't used.

With the VI constructed, you want to add it to the palette menu. In the
Tools menu, Advanced, there is an item about half way down for
Customizing the Palette menu. You will need to build a New Palette Set
using the ring and name it whatever you like. You can now add your VI
wherever you like. Most likely you will want to right click to add a
new subMenu in the Controls palette and place it in a new .mnu file. In
the subMenu, right click to add Control. The file dialog will open
allowing you to select a control file to add to the palette. By
changing the filter from .ctl to all, you can insert VIs into the
controls palette.

All VIs inserted into the Control palette will act as merge VIs, meaning
that when dragged to a panel, the panel elements will be merged into the
destination panel, and the diagram elements will be merged into the
destination diagram.

For others that want to have these on the Functions palette rather than
the Controls, you add the VI to the Functions palette, then popup on the
palette item and check the menu item to make it a Merge VI.

When it comes time to distribute, you will want to give out your .mnu
file and the VI of course. Easiest is to place both of them in
user.lib. If you want the items to go at the top level of the palettes,
then you can add them to add-ons inside of vi.lib, but this causes more
upgrade challenges.

Hope that helps.

Greg McKaskle
0 Kudos
Message 4 of 4
(3,032 Views)