09-24-2007 08:04 AM
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?
09-24-2007 08:13 AM - edited 09-24-2007 08:13 AM
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
09-24-2007 08:14 AM
09-24-2007 08:23 AM
I agree, if this is your intended path, I would advise against it.
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?
09-24-2007 08:56 AM
09-24-2007 09:30 AM
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.
09-24-2007 09:53 AM
09-25-2007 05:45 AM
09-25-2007 05:52 AM