Components

cancel
Showing results for 
Search instead for 
Did you mean: 

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, CTA
0 Kudos
Message 11 of 36
(9,291 Views)

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, CTA
0 Kudos
Message 12 of 36
(9,290 Views)

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

 

Can you help Brian? 

H. Molsen, CIM Industrial Systems
CLA, CTA
0 Kudos
Message 13 of 36
(9,243 Views)

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, CTA
0 Kudos
Message 14 of 36
(9,242 Views)
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.
0 Kudos
Message 15 of 36
(9,230 Views)

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





PORTUGAL
0 Kudos
Message 16 of 36
(8,259 Views)

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.
0 Kudos
Message 17 of 36
(8,254 Views)

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. Smiley Very Happy

Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 18 of 36
(8,247 Views)
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.
0 Kudos
Message 19 of 36
(8,243 Views)

yes you are.

 

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

 

Thanks for the help

Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 20 of 36
(8,240 Views)