취소
다음에 대한 결과 표시 
다음에 대한 검색 
다음을 의미합니까? 

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 포인트
11/36 메시지
12,420 조회수

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 포인트
12/36 메시지
12,419 조회수

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 포인트
13/36 메시지
12,372 조회수

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 포인트
14/36 메시지
12,371 조회수
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 포인트
15/36 메시지
12,359 조회수

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 포인트
16/36 메시지
11,388 조회수

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 포인트
17/36 메시지
11,383 조회수

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. 매우 기쁨 이모티콘

Software developer
www.mcm-electronics.com





PORTUGAL
0 포인트
18/36 메시지
11,376 조회수
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 포인트
19/36 메시지
11,372 조회수

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 포인트
20/36 메시지
11,369 조회수