first fare 2010 lab-view creating custom dashboards

Post on 15-May-2015

728 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1

FIRSTFare 2010Creating Custom Dashboards

Dennis C. Erickson ~ Senior Mentor for Teams 1510 and 2898

Daniel Bramblett ~ Team 1510Amy Wiegand ~ Team 2915

2

Introduction

The Real-Time screen on the Driver Station is called the

“Dashboard”

It can be modified to include additional functions and displays

3

The Driver Station (DS)•Use to interface local sensors and the joystick to the communications link to the robot process

•Also has capability to handle digital and analog commands

•Also provides for a real-time display that can contain status, sensor and video information from the robot

4

Driver Station for 2010A view of the Driver Station first introduced in 2010

Instead of using the I/O board it is suggested that the buttons on the joysticks be used as commands to the robot

5

DS CommunicationsAllows for the wireless communications between the driver and the robot

Also used as a control system from the competition director computers (watchdog, start, Autonomous, TeleOp, etc)

6

More on the Driver Station

•Windows XP•1.6 GHz Atom processor, 1 GB RAM•16 GB solid state hard drive•8.9” screen, 1024x600 resolution•No VGA port

7

More on the Driver Station

•Runs with an executable built with LabVIEW

•Does what the Kwikbyte DS did in pre-2010 years

8

More on the Driver Station

Diagnostics Tab:

Operation Tab:

9

More on the Driver Station

IO Tab:

Setup Tab: Auto IP address setup, Run a simulated match, will remap joysticks

Can simulate analog and digital I/O, shows states of I/O hardware

10

More on the Driver Station

•Connects via USB•Performs E-Stop not disable –Robot must be rebooted after E-stop –Same as the E-Stop on the field –Space Bar acts as disable•Must be connected for robot to be enabled –This may be bypassed

The Stop Button

11

More on the Driver StationIntegrated Dashboard

The dashboard data may be re-directed to another computer

The top half of this display can easily be customized

12

Three ways to move Data from the Robot to the DS

•Use the User Message Box

•Use the Dashboard.ctr (The Low Dashboard Data VI)

•Use the High Dashboard Data VI

13

The User Message Box•There is a User Message Box where one line messages can be sent from the robot to the DS

Here 2 messages in lines 1 and 2 are written in the “User Messages” box. Error messages can be included

Any Sensor 2.34Any Sensor 1.23

Use the “User Message.vi

14

The User Message Box•Recommendations that might be included in your message box:

The version # of the Robot software perhaps with the most recent modificationThe battery voltage and estimated drive time left

15

The Dashboard Datatype.ctlUse the Dashboard Datatype.ctl to send simple data to the Dashboard from the Robot using the “Build DashBoard Data.vi”, specifically the “Set Low Priority Dashboard Data.vi”

Open the “Dashboard datatype.ctl from the Project Explorer

16

The Dashboard Datatype.ctlAdding new controls to the .ctl

Add a new control or controls to the .ctl and save it.

17

The Dashboard Datatype.ctlThe rest of the process is fairly complex and would take up more time than we have, so visit the website for a complete step by step tutorial:

http://decibel.ni.com/content/docs/DOC-8862

18

The “Set High Priority Dashboard Data.vi”

•A more flexible and simpler method is to use the “Set High Priority Dashboard Data.vi”

19

Steps to move User data from the Robot to the Driver StationStep 1

Example Block Diagram of a Robot application.

In 2010 there were two SubVIs available to transfer User data to the DS. We Use the High Priority SubVI for this example.

Open the SubVI for Step 2

20

Steps to move User data from the Robot to the Driver StationStep 2

Block Diagram of the Build Dashboard Data HI SubVI

All User data elements that are to be transferred to the DS are “Bundled” and the result “Flattened to a String”

Then that String is sent to a Special SubVI called the “Set High Priority Dashboard Data” that is basically a memory function

Note that the inputs can be local variables, global variables or simply hardwired to the SubVI

21

Steps to move User data from the Robot to the Driver StationStep 3

Typical Block Diagram of a Robot application.

Create a Constant of the output of the Bundle. This will provide a “DataType” or “Image” to be used later in the Unflatten from String process in the DS application

The DataType for this example looks like this.

Note that this constant would be cut from this block diagram and pasted into the DS application.

22

Steps to move User data from the Robot to the Driver Station – Design a Front Panel

An example Front Panel for a Custom Dashboard – The Sensor Panel Tab

In this particular example 4 ultrasonic sensors are displayed (note that the bar indicators are Log scaled from 4 inches to 120 inches), 5 kicker strength commands, a gyroscope reading, a ball locator (from 2 photoelectric sensors) and a real-time image of the target are displayed.

Step 4

23

Steps to move User data from the Robot to the Driver Station

An example Front Panel for a Custom Dashboard – The Misc Data Tab

This tab displays data from modules in 2 slots, the IP address of the robot, and strip charts showing the Joystick X, Gyro, and Target information

24

Steps to move User data from the Robot to the Driver StationStep 5

Example Block Diagram showing the extraction of the User data from the Robot. This is a portion of the code

used to display on the dashboard the User data from the robot

Note that the application receives a UDP transmission, and unflattens the string using the datatype (image) that was created in the robot application and unbundled to provide the 5 front panel indicators

The video display is not shown here for clarity

25

The Last Step – Build an ExecutableStep 6 On the DS, Login to the Developer Account

or bring the project over from the development laptop to create an exe file. Note that these steps are for a new exe only. Note that in this example the VI we are building the exe file for is “Dashboard Main.vi” •On the Project Explorer

Screen, right click onBuild Specifications -> New -> Application (EXE) this will bring up the Properties screen

26

The Last Step – Build an Executable (Con’t)

Note that if one or more custom Dashboards already exist, simply “Build All” and that will complete the process except perhaps for being sure that the ini file is corrected (see a later slide)

27

The Last Step – Build an Executable (Con’t)In the Properties Screen, Information list box “Target Filename" - give it something meaningful, e.g., “Dashboard Team 1510 2010.exe” Also it is advisable to change the “Build specification name” to be the same name

Note that for an existing file, right-clicking on the Properties selection brings up the same screen

28

The Last Step – Build an Executable (Con’t)

Click on "Build" at the bottom to create the exe.

After it is built, pressDone

In the Category list box click on "Source Files“ and Click on "Dashboard Main.vi“ and Click on the right pointing arrow that will highlight. You should see Dashboard Main.vi appear on the right hand side under•"Startup VIs"

29

The Last Step – Build an Executable (Con’t)

When it's done building go to the Destinations list box. With this example it will look like this: C://Documents and Settings\My Documents\LabVIEW Data\builds\2010 Game Dashboard Project\ Dashboard Team 1510 2010

30

The Last Step – Build an Executable (Con’t)

Navigate to C:\Program Files\FRC Dashboardand Paste all three files to that directory

Clicking on this button shows that three files have been created:Dashboard Team 1510 2010.aliases, .exe, .ini.

Then navigate to C:\Documents and Settings/Developer//My Documents/LabVIEW Data/builds/2010 Game Dashboard Project//Dashboard Team 1510 2010 and Copy all 3 files

31

You'll see a line: DashboardCmdLine=""C:\\Program Files\\FRCDashboard\\Dashboard.exe"“ then Change the name of the Dashboard.exe to :Dashboard Team 1510 2010.exe then Save and exit the file. Note do this only if the name has changed

Login to the Driver account (Windows Logo+L) to start up the new dashboard and see if it works.

The Last Step – Build an Executable (Con’t)Finally, go to: C:\Documents and Settings\All Users\Shared Documents

Make a backup copy of the file: FRC DS Data Storage.ini

Open and edit the file:FRC DS Data Storage.ini in Notepad

Questions?

Dennis C. Erickson - dcerickson1@comcast.net

top related