NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member hmo
Member
hmo
Posts: 23
0 Kudos

Re: Generic Configuration Editor (xCE) Reference Example

Brian

 

OK - it worked except for data access.

 

I created a new Public function in the RootClass:  "get Node ref.vi" which has NodeName as input and returns the DataNode*. Code is as you described above.

 

Now how do I change the data of that object when I receive new data in the main.vi (assuming it happend at a time when the node UI is not runnning)?

In the examples it seems that data is only accesible during execution of the UI in the subpanel.

 

 

H. Molsen, CIM Industrial Systems
CLA, CTD
Member hmo
Member
hmo
Posts: 23
0 Kudos

Re: Generic Configuration Editor (xCE) Reference Example

Brian - again

 

Forget about my last post!

The data are encapsulated by the object (and should be) so I figured out how to update these during run of the UI.

 

 

H. Molsen, CIM Industrial Systems
CLA, CTD
Member hmo
Member
hmo
Posts: 23
0 Kudos

Re: Generic Configuration Editor (xCE) Reference Example

Did anybody figure out how to use tree glyph in the xCE framework?

 

Can you help Brian? 

H. Molsen, CIM Industrial Systems
CLA, CTD
Member hmo
Member
hmo
Posts: 23
0 Kudos

Re: Generic Configuration Editor (xCE) Reference Example

Figured it out:

 

On the main.vi -> Initialize there is a call to Initialize root. The InitRoot input should ALSO bundle the glyphs folder. F.eks. C:\Program Files\National Instruments\LabVIEW 2009\examples\general\controls\treecontrol\max_symbols.

 

For the lvclass override the  GetGlyphFile.vi and return only the name of the file in the glyph folder. For example: max_mysystem_max_remotesystems.png.

 

It works :-) 

H. Molsen, CIM Industrial Systems
CLA, CTD
Active Participant
Brian_K.
Posts: 228
0 Kudos

Re: Generic Configuration Editor (xCE) Reference Example

That is correct. When you initialize the root you can set the glyph folder. Then every class that overrides GetGlyphFolder.vi can output the exact string that relates to the glyph that they want. Awesome job figuring that out. Sorry about not posting back on the 1-22, I guess I did not see the response in my inbox.
Brian K.
Active Participant
Jorge_Amaral
Posts: 461
0 Kudos

Re: Generic Configuration Editor (xCE) Reference Example

Hello guys,

 

I'm really interested in this subject. Because I believe that since labview allows us to do things in a quick way we fall in a stupid situation where we are always doing the same code. And the configuration system it's a good example.

OOP it's a new thing for me but I already read some tutorials.

But a very nice way to understand, would be by modifying the the example posted here. I was pretending to add a new class. But I can't understand the procedure for that... The Object init should be something that all got to have. And there must be a way to do a "copy-paste". Can someone illuminate me?

 

Thanks to all!

Software developer
www.mcm-electronics.com

PS: Don't forget to rate a good anwser ; )

Currently using Labview 2011
PORTUGAL
Active Participant
Brian_K.
Posts: 228
0 Kudos

Re: Generic Configuration Editor (xCE) Reference Example

LVOOP can take a little while to understand.  To create a new class I would follow this

http://zone.ni.com/reference/en-XX/help/371361F-01/lvconcepts/creating_classes/

 

If you need to see examples on how the xCE works I would look at the LCE:

http://zone.ni.com/devzone/cda/epd/p/id/6257

Brian K.
Active Participant
Jorge_Amaral
Posts: 461
0 Kudos

Re: Generic Configuration Editor (xCE) Reference Example

Hello again and thanks for the reply...

 

In the first link that Brian sent ("To create a new class") I can see the generic procedure to create class.

Probably I expressed myself in a bad way. I was trying to know a way of creating a new in the posted example. So, I would want to know the procedure to create a new class using the "channel" class.

I created a new class named "TCPDevices" where the object will be the IP string. The next step that i tried was the "Initialize.vi". That I supposed that should be a good way for copy that. Making this example more easy to grow. And that was my first problem. But it's not possible to copy-paste that vi.

A solution for my problem was by using "Clone Class" option. But is this the correct way?

 

Another strange thing that i saw was the following.... I made the next steps:

1. Create TCP class

2. create "new... vi from static dispatch template"

3. Named "Initialize.vi" (because I wanna something similar to Initialize.vi of the ChannelClass)

4. Placed the "Set UiViName.vi" on this

5. Tried to connect my object to the input... But it returns an error. And I can see that the width of my object wire it's larger than the one in the Channel example.

 

So... What's the basic error that I'm making here??

 

I'm really trying to jump to OOP but it's not very easy. :smileyvery-happy:

Software developer
www.mcm-electronics.com

PS: Don't forget to rate a good anwser ; )

Currently using Labview 2011
PORTUGAL
Active Participant
Brian_K.
Posts: 228
0 Kudos

Re: Generic Configuration Editor (xCE) Reference Example

I believe the concept you are missing is Inheritance. If you want to create a new class that builds off another class then your "Child" class need to inherit from your "parent" class. In your example I would say the "TCPDevices" class would inherit from the "channel" class. Then you could create a dynamic dispatch method for TCPDevices that overrides Inialize OR the TCPDevice class could just use the channel classes Initialize. I would suggest looking up LVOOP Inheritance, as well as looking at the example Dynamic Dispatching.lvoop in the LabVIEW Example finder. Am I correct in what I am suggesting?
Brian K.
Active Participant
Jorge_Amaral
Posts: 461
0 Kudos

Re: Generic Configuration Editor (xCE) Reference Example

yes you are.

 

I will take your suggestion and think a little on that.

 

Thanks for the help

Software developer
www.mcm-electronics.com

PS: Don't forget to rate a good anwser ; )

Currently using Labview 2011
PORTUGAL
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page