ni.com checkout is currently experiencing issues.
Support teams are actively working on the resolution.
ni.com checkout is currently experiencing issues.
Support teams are actively working on the resolution.
08-01-2014 01:56 PM
Hi,
I'm working on a VI that will be used to control a number of RC Quadcopters and cars.
The VI gets the amount of vehicles from tracking tools, and then runs a loop and finds out for each vehicle if it's a quad or a car.
Now that that stage is completed, I want the front panel to display a line of controlls and indicators for each of the vehicles, and have a different line for quads or cars (i.e for quads I need indicators for x, y, z coordinates and a "takeoff" button, while for cars I need indicators for x, y coordinates and a speed limit control).
Is there a way to create the front panel dynamically depending on input?
the best way I found up until now will be using invisible tabs, so I'll have a tab for each number of vehicles containing said number of lines, and then each line would have two tabs (quad/car), and the tabs to display would be picked at runtime.
The problem is that that would require me to set a maximum number of vehicles, and would require a lot of work if I'll introduce a new type of vehicle, so I'd rather have a more modular system.
I would love some fresh ideas about that problem.
Thank you!
Shayelk
Solved! Go to Solution.
08-01-2014 02:46 PM - edited 08-01-2014 02:46 PM
Use arrays of clusters for each of your device type, rather than putting a fixed number of controls/indicators on your FP. You can display more than one array element and use a scroll bar if there are too many to display.
Could you show what you've done? Maybe I'll see that I'm way off base if I see your work.
08-01-2014 03:04 PM - edited 08-01-2014 03:07 PM
Take a look at this: https://decibel.ni.com/content/docs/DOC-23893
The "Simple Actor Example", which can be found within the .zip file, seems exactly like the kind of thing that you need.
Edit: more resources
NI LabVIEW Virtual User Group: Introduction to Actor Framework: http://www.ni.com/webcast/2551/en/ (Video introduction to AF)
http://ni.com/actorframework (User group and more resources)
08-02-2014 10:15 AM
looks great, I'll try it out!
In the example you attached the different controlls are displayed in a number of windows, is there a way of displaying them in a single FP?
thank you!
08-02-2014 10:40 AM
@shayelk wrote:
looks great, I'll try it out!
In the example you attached the different controlls are displayed in a number of windows, is there a way of displaying them in a single FP?
thank you!
Yes!
Use subpanels.
I'm assuming you are LVOOPing the class "RC Vehicle" with children classes of "RC Car", "RC Plane", "RC Submarine.Yellow"...etc?
Just dynamically dispatch the "Control RC vehicle" methods to a subpanel.
OK, "JUST" is an oversimplification..... but that is the way I would look into if it was my project.
08-02-2014 11:34 AM
I'm pretty new to Labview so I didn't think of using classes, but now that you said it it sounds like the right way to go, so I'll certainly try getting there. thanks!