first fare 2010 lab-view creating custom dashboards

32
FIRSTFare 2010 Creating Custom Dashboards Dennis C. Erickson ~ Senior Mentor for Teams 1510 and 2898 Daniel Bramblett ~ Team 1510 Amy Wiegand ~ Team 2915 1

Upload: oregon-first-robotics

Post on 15-May-2015

728 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: First fare 2010 lab-view creating custom dashboards

1

FIRSTFare 2010Creating Custom Dashboards

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

Daniel Bramblett ~ Team 1510Amy Wiegand ~ Team 2915

Page 2: First fare 2010 lab-view creating custom dashboards

2

Introduction

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

“Dashboard”

It can be modified to include additional functions and displays

Page 3: First fare 2010 lab-view creating custom dashboards

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

Page 4: First fare 2010 lab-view creating custom dashboards

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

Page 5: First fare 2010 lab-view creating custom dashboards

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)

Page 6: First fare 2010 lab-view creating custom dashboards

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

Page 7: First fare 2010 lab-view creating custom dashboards

7

More on the Driver Station

•Runs with an executable built with LabVIEW

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

Page 8: First fare 2010 lab-view creating custom dashboards

8

More on the Driver Station

Diagnostics Tab:

Operation Tab:

Page 9: First fare 2010 lab-view creating custom dashboards

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

Page 10: First fare 2010 lab-view creating custom dashboards

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

Page 11: First fare 2010 lab-view creating custom dashboards

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

Page 12: First fare 2010 lab-view creating custom dashboards

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

Page 13: First fare 2010 lab-view creating custom dashboards

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

Page 14: First fare 2010 lab-view creating custom dashboards

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

Page 15: First fare 2010 lab-view creating custom dashboards

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

Page 16: First fare 2010 lab-view creating custom dashboards

16

The Dashboard Datatype.ctlAdding new controls to the .ctl

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

Page 17: First fare 2010 lab-view creating custom dashboards

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

Page 18: First fare 2010 lab-view creating custom dashboards

18

The “Set High Priority Dashboard Data.vi”

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

Page 19: First fare 2010 lab-view creating custom dashboards

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

Page 20: First fare 2010 lab-view creating custom dashboards

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

Page 21: First fare 2010 lab-view creating custom dashboards

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.

Page 22: First fare 2010 lab-view creating custom dashboards

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

Page 23: First fare 2010 lab-view creating custom dashboards

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

Page 24: First fare 2010 lab-view creating custom dashboards

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

Page 25: First fare 2010 lab-view creating custom dashboards

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

Page 26: First fare 2010 lab-view creating custom dashboards

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)

Page 27: First fare 2010 lab-view creating custom dashboards

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

Page 28: First fare 2010 lab-view creating custom dashboards

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"

Page 29: First fare 2010 lab-view creating custom dashboards

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

Page 30: First fare 2010 lab-view creating custom dashboards

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

Page 31: First fare 2010 lab-view creating custom dashboards

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

Page 32: First fare 2010 lab-view creating custom dashboards

Questions?

Dennis C. Erickson - [email protected]