LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

object-oriented control reference

Solved!
Go to solution

I will not answer your question but will make a point that is oftne missed.

 

LVOOP is not all or nothing.

 

You can use for where it helps and skip for where it does not help.

 

In the litle reading I have done of OOP I never ran across anything that even took into concideration a GUI but what I did read sorta waved their hands about the is a GUI somewhere but ignored.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 11 of 16
(1,415 Views)

@Fakstory wrote:

@Steve Chandler, I really appreciate the time you took to describe your application. In fact, this is a nice way to separate the GUI, from the module. Never the less, as you said,

(The other loop dequeues messages from the GUI's InputQueue and sets indicators on the front panel.) It looks like that you can only set indicator, and there is no way that those “indicator” can be used as a control! So, even if I like your solution, this side effect is the exact reason why I’m now thinking about Xcontrol.


Fakstory


There are parts of the code that set controls in the GUI. In run mode the test sequencer will disable the power supply setting control and update it's value at each step of the sequence. I do this with a local variable. The GUI is the only place where local variables or control property nodes are used.

 

Edit: I have not really played with XControls but there is a nice example that ships with LabVIEW. Look for the Simple Dual Mode Thermometer XControl.lvproj in the example finder. It is a good example of why you might want to use them.

=====================
LabVIEW 2012


0 Kudos
Message 12 of 16
(1,409 Views)

yes, indeed... This really look like what I need.

 

I cannot find how to create an xcontrol... In the project manager, if I click on new, then control, this is only a normal custom control...

 

I'm using labview 2011. It's weird, I have to start from the exemple... ô.o

 

Fakstory

0 Kudos
Message 13 of 16
(1,403 Views)
Solution
Accepted by topic author FakStory

Ben asks himself out loud...

 

Do I need a fancy license to create an XControl?

 

Ben scratches his in wonder...

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 16
(1,399 Views)

LOL, Ben, I marked you as the solution... I run on the full development system... and I need the Pro dev system... as you can read here...

http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/using_labview_xcontrols/

 

Then, back to the begining... I was suppose to save time and money... and this is actually the opposite...

 

FakAngry

 

I need to tell that, in school, there is no consideration in terms of licensing... AND, this is not at all indicated which part is actually, under a special license... very frustrating!

 

any way, thanks guy.

Message 15 of 16
(1,393 Views)

Hi there,

 

I finally come up with a solution, I had to mix up some technics, and it is surprisingly a simple solution!

 

I wanted to post my code here, it will certainly helps someone to overcome the difficulty of this relative abstract concept in Labview.

Finally, I think that the Xcontrol, is a nice feature, but there is some advantage of using the subpanel instead of the xcontrol, and, unfortunately, it takes some times to really understand all the implication. One of the great things I found, is that it is more simple to think in an object oriented way, and even if the Xcontrol feature can be seen like an "object", it didn't completely wrap an OOP. So, in my case, I choose to only use some class, and "wrap" a vi, to embed it (like a Xcontrol) in a toplevel VI.

 

Have fun looking at this, any advice are welcome.

 

Satisfied,

 

Fakstory

Message 16 of 16
(1,367 Views)