LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create function panel?

I replied to this message but I don't know where my message went to I am posting it here again.

Thanks for youe help Luis.
Is there anyway I can a h file which has all (Most) of these tags used correctly?

Thanks.
Sheetal
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 11 of 21
(2,670 Views)
Here is an example. It probably doesn't have all the tags that can be used, but it might help you get started.

Luis
Message 12 of 21
(2,683 Views)
Great. Thanks Luis. This is what I was looking for.

Sheetal
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 13 of 21
(2,675 Views)
Hi Luis I am back!

Here is another problem. if I add a parameter to your function and then create fp it will create ring only for the last parameter.

It does not create ring for parameter4 but it creates for parameter5.

/// SLD 2
/// BIN 3/MyEnum2
/// RNG 4/MyEnum2
/// RNG 5/MyEnum2
i8 CVIFUNC MyInstr_ClassNoneFunction3(MyEnum1 parameter1, MyEnum1 parameter2, i16 parameter3, u16 parameter4, u16 parameter5);

Would you recommend using this feature?

Thanks.
Sheetal
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 14 of 21
(2,668 Views)
This header will create a fp with para2 as a ring control and para3 as a slide.


#define CVIFUNC __stdcall

/// ENUM my
#define zero 24 // zero slide label
#define one 25 // one slide label
#define two 26 // two slide label
#define three 27 // three slide label

typedef enum
{
zero, // my zero
one, // my one
two, // my two
three, // my three
} test;

/// -> My Class

/// SLD 2
/// RNG 3 / my
/// DFLT 3 / one
int CVIFUNC T_function(int para1, test para2, int para3);



Hope this helps
Bilal Durrani
NI
0 Kudos
Message 15 of 21
(2,652 Views)
This header will create a fp with para2 as a ring control and para3 as a slide.


#define CVIFUNC __stdcall

/// ENUM my
#define zero 24 // zero slide label
#define one 25 // one slide label
#define two 26 // two slide label
#define three 27 // three slide label

typedef enum
{
zero, // my zero
one, // my one
two, // my two
three, // my three
} test;

/// -> My Class

/// SLD 2
/// RNG 3 / my
/// DFLT 3 / one
int CVIFUNC T_function(int para1, test para2, int para3);



Hope this helps
Bilal Durrani
NI
0 Kudos
Message 16 of 21
(2,651 Views)
Thanks Bilal,
Here is my problem. I can not create more than one slide per function. It only creates last slide parameter. I have not tried to create more than one ring per function. So not sure it that works or not.

Thanks.
Sheetal
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 17 of 21
(2,647 Views)
Sheetal,

I'm sorry that the help isn't more clear on this point, but the way you create more than one slide per function is this way:

/// RNG 4/MyEnum2,5/MyEnum2

When you have multiple RNG tags the way you had, the last one overrides the first one.

Luis
0 Kudos
Message 18 of 21
(2,637 Views)
yeah, my bad. I didnt see the other responses when posting the sample. Looks like LuisG responded to your question about that.
Bilal Durrani
NI
0 Kudos
Message 19 of 21
(2,625 Views)
    I'm some confused about the correct order of creating a functional panel. For example, below are four functions that will be included in fp library.
    void A (void);
    void B (void);
    void C (void);
    void D (void);
 
    As far as I know, there's two ways to do this:
1, Create a new fp file by clicking File->new->Create function tree...., then construct your insrument class and function. At last generate source for function node by right click on your function.
2, Create a new .h file, then Click Options->Generate Function tree...
   One difference between them is in "Creating Funtion panel window Node", as shown in attached file.
    Appreciate if somebody could give an step-by-step instruction on how to create a functional panel.
Thanks!
Jacky
0 Kudos
Message 20 of 21
(2,212 Views)