LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wisely Manage GUI's in LabVIEW

The LabVIEW features I would like to use are features like FFT and THD calculations and to plot the results and communicating with miscellaneous NI equipment. I have read your comments, but my dream 🙂 is still to program part of my Front Panel in C++ and, possibly, to use some C++ components (for example, buttons, radio button, text boxes, but NOT the graphs!) instead of LabVIEW controls and indicators. Is it possible or not?

0 Kudos
Message 11 of 19
(1,347 Views)

Arnold,

I think you will have much better success if you stick to using LV to updated the controls and indicators.  It looks to me like you are trying to use LV as just a pretty picture and not taking advantage of the programming language beneath it.

A couple of suggestions I have would be to place a case structure in your loop that is controled by the state of the state machine that is output by your CIN.  In each case update your indicators.  Then, pass just the controls to your CIN to determine your next state.  That way labview can handle updated your indicators and your controls and CIN can be left to manage the state machine.

I notice your are changing the colors of your LED's.  Are you using more than two colors?  If not, just set the two colors to the true and false states and only worry about the value.  If you need more than one color, you possibly go the other way and not worry about the value then.

It seems, as others have mentioned, your knowledge of text based programming is confusing your understanding of LV, especially the interaction between the front panel and block diagram.  Specifically, you don't need to generate a separate "GUI cluster in/out" controls and indicators.  Just bundle the exiting controls.

Keep the questions comming, your code is very clean and easy to read and with that, people here will appreciate that and give you tons of help!

Paul

EDIT: My above post came a bit late, it is not in response to your last post...  See below for that...

"program part of my Front Panel in C++ and, possibly, to use some C++ components (for example, buttons, radio button, text boxes, but NOT the graphs!) instead of LabVIEW controls and indicators. Is it possible or not?"

Yes,  it is possible.  Personally I think LabVIEW will be easier to do the whole thing but you need to utilize what you know.  You may come to really like LV.

Message Edited by paulmw on 09-24-2007 08:19 AM

0 Kudos
Message 12 of 19
(1,343 Views)
Hi Arnold,

I think it's not possible (atleast in a reasonable manner) to get GUI elements from other languages into the LV front panel.
How do you think to integrate tem into the LV environment? How should LV detect those elements?

All the elements you listed ([radio] buttons, strings) are already available in LV.
And you can customize your front panel elements! You can change their appearance by changing colors or changing/incorporating other graphics...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 19
(1,340 Views)


I think it's not possible (atleast in a reasonable manner) to get GUI elements from other languages into the LV front panel.
How do you think to integrate tem into the LV environment? How should LV detect those elements?


I agree, if this is your intended path, I would advise against it.
0 Kudos
Message 14 of 19
(1,331 Views)
What about custom made ActiveX or .Net Components, can they somehow be used? Can either of these two components generate events to "the rest of the LabVIEW code"? If so, I could make my own ActiveX or .NET Component which contains several other GUI components...
0 Kudos
Message 15 of 19
(1,321 Views)

With LV 8.2 and above you can use .NET controls in your FP.

You might consider doing something else, however. Most analysis VIs in LabVIEW are wrappers around C functions (probably because it's more optimized and because NI uses them in other products). If you go into the VIs you can see the function calls and recreate them yourself.

Another option (probably the best one) is to use NI software already compatible with C\C++ and that way you won't have to worry about integrating two different languages. What you want is probably Measurement Studio or CVI (which is a C compiler), but I don't have any experience with either of those. I suggest you do some searching to see how to use them.


___________________
Try to take over the world!
Message 16 of 19
(1,317 Views)
(I'm always late, so....) I agree with TST.

   Only, take care about the fact that LabWindows (CVI) is a C compiler + IDE (with useful tools to build User Interfaces, almost the same as LabVIEW), and hasn't C++, while Measurement Studio is a suite of classes and controls, which integrates in Visal Studio (almost from 6.0 on, latest releases).  Consider it if you developed using (say...) gcc.

   Please, feed us back with your choice! Smiley Happy

   Have a nice day!

graziano
0 Kudos
Message 17 of 19
(1,308 Views)
Thanks y'all for your contributions. I think a .NET Component seems to be the best (and cheapest) solution. I consider this thread closed and will start a new one where I ask .NET Component questions.
0 Kudos
Message 18 of 19
(1,274 Views)
tst will be of much help, if it is related to .NET-LV. Smiley Wink
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 19 of 19
(1,269 Views)