FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview - Robot enabled/disabled recognition

Hello all -

I am a (very) novice Labview programmer who just recently picked it up to optimize our driver station. Despite my inherent fear of the GUI, I was actually able to successfully transform the preexisting station into something completely different and was quite surprised by LV's capabilities.

During this programming, I noticed that LV was able to actually access the name of the account logged in on the driver station and adapt to it (hence the borderless dashboard generated on the provided laptops). This led me to wondering if there was a similar check for the robot being enabled or disabled, so that I could load different dashboards when the robot was driving or stationary; for example, having a splash screen of our team logo or different diagnostics while the robot was disabled, then being able to swap to our regular ones when we started.

Keep in mind that in my limited experience I have no idea if this is the best way to do what I want; if the graphics controls are available in code, I was thinking load the splash screen/other stuff in the background and bring to front and back as needed. I've checked most of the extensive PDFs and their specific examples, but I know I likely haven't gotten all the tutorials floating around google, so I apologize for taking time if this is impossible/already answered.

...

PS. Assuming there are enabled/disabled flags available...is there by any chance a random number generator/.random function equivalent in LV, so I can pull up different splash screens on each disable? >.> <.<

0 Kudos
Message 1 of 3
(4,082 Views)

In the default dashboard, there at the output of the FRC DS Receive DS Packet VI, there is a FRC DS Status to Indicator VI, which will tell you which mode (teleop or autonomous) and what state (enabled, disabled, e-stop, and disconnected).

There is a random number generator. Look for the dice in the programming -> numeric pallete.

Message 2 of 3
(2,563 Views)

Ahh, thank you. I should've figured that was what it was. I've got it hooked up to an equals enum check now, which is progress, and the RNG seems to be working fine.

However, does anyone still know the most efficient way to show or hide images in LV? From what I gather, pasted graphics don't appear in the block diagram for editing (unless there's an easy way I'm missing, in which case things would probably be far simpler), so I'm figuring I have to use the Read Jpeg File VI, with the RNG affecting the read image directory, and then flatten it into a pixmap for editing. From there, however, search function didn't turn up a move to back/front function, so I'm wondering if I can just use Move Pen and create the same effect by moving the splash on and off the visible area.

Sorry for the continued troubling. All the help has been greatly appreciated so far though!

0 Kudos
Message 3 of 3
(2,563 Views)