Your SlideShare is downloading. ×
0
FIRSTFare 2012 advanced lab view topics
FIRSTFare 2012 advanced lab view topics
FIRSTFare 2012 advanced lab view topics
FIRSTFare 2012 advanced lab view topics
FIRSTFare 2012 advanced lab view topics
FIRSTFare 2012 advanced lab view topics
FIRSTFare 2012 advanced lab view topics
FIRSTFare 2012 advanced lab view topics
FIRSTFare 2012 advanced lab view topics
FIRSTFare 2012 advanced lab view topics
FIRSTFare 2012 advanced lab view topics
FIRSTFare 2012 advanced lab view topics
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

FIRSTFare 2012 advanced lab view topics

421

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
421
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Advanced LabVIEW Topics Jim Chastain jimc2550@gmail.com
  • 2. Agenda• Use Robot Global Data as debug tool• Minimize watchdog timer errors• D/S message to track prog version• Scan all sensors in Periodic Tasks• Reusable templates ‘debugged ‘• State machines - build two jimc2550@gmail.com
  • 3. CONCEPT BUNNYBOT jimc2550@gmail.com
  • 4. We want our bunny bot design to have..– Arcade control during teleop– Tank drive for Autonomous– Grip/Release solenoid control in teleop & auto using a state machine– Robot Global Data optimized for debug– Use a template for reuse with common functions– All sensors and controls driven through Periodic Tasks.vi, minimize watchdog timer problems– Use D/S message block for program version notation jimc2550@gmail.com
  • 5. Basic Template to start• Rather than have to start with a fresh 2012 FRC Robot Project every time…. Build a re-usable template with the basic sensors we know for sure….• joysticks read into Robot Global Data• Two Drive motors, one solenoid, compressor, encoder• In Teleop, put name is d/s message block• BUNNYBOT 2012 template• Then SAVE AS special name for program jimc2550@gmail.com
  • 6. Advanced Program Design Topics• State Machines – Often used in control programs to improve stability… ie limit weird unexpected outputs• Robot Global Variable – Useful temp storage for LabVIEW program variable data which is accessible by all project Vis• Watchdog timer – Used to detect if program has gotten lost! – Timer must be “updated” at a specific frequency so that HOST OS knows the margin of safety is ok – Used in Robot Project Drive Motors to ensure robot motion is always under positive control must refresh every 100 ms• USER Message to ID program in cRIO• Video image processing use global data to debug• Autonomous system controls . . Use periodic tasks to combine controls into global data jimc2550@gmail.com
  • 7. FRC 2012 Robot Project• Start by looking at Robot Main. Vi in our template• Then put joystick scan and solenoid state machine in template ENUM GRIP SOLENOID STATE CHART STATE OUTPUT TRIG to CASE NEXT STATE START SOL = REV NONE REVERSE REVERSE SOL= REV GRIP GRIP GRIP SOL = FORW REL REVERSE jimc2550@gmail.com
  • 8. In autonomous we want to…• Reset ENCODER, RELEASE GRIP• Drive forward 10 feet• Reset encoder• Close gripper• Back 5 feet• Reset encoder• Turn left 90 degrees• Reset encoder• Go forward 5 feet• Stop and open gripper• (note, we need a 5 sec delay to build pressure?) jimc2550@gmail.com
  • 9. State Machine chart for Autonomous STATE OUTPUTS TRIGGER NEXT STATE NOTES1 START R=L=0, G=F, NONE FORW10 ENCRS=REL=T2 FORW10 R=L=-.4 ENC=10 RSENC1 ENCRS=REL=F3 RSENC1 R=L=0; ENCRS=T 1025 MS CLOSEGRP4 CLOSEGRP R=L=0; ENCRS=F; 1025 MS BACK5 GRP=T5 BACK5 R=L=.34; GRP = F ENC = 5 RSENC26 RSENC2 R=L=0;ENCRS=T 1025 MS TURN LEFT7 TURN LEFT ENCRS=F; R=-.34 ENC = .03 RSENC38 RSENC3 R=L=0; ENCRS=T; 1025 MS FORW59 FORW5 R=L=-.35;ENCRS=F ENC = 5 STP&REL10 STP&REL R=L=0; REL=T 1025 MS END11 END R=L=0, REL=GRP=F NONE END jimc2550@gmail.com
  • 10. Create and debug• Build state machine in autonomous• Watch Robot Global Data during execution• Use ‘highlight execution’ to debug• WATCH DIAGNOSTIC WINDOW IN DS IMPROVEMENTS? jimc2550@gmail.com
  • 11. First fare notes• First fare template.lvproj – Robot main.vi • Robot mode state machine • Global variables • Put AUTO ENABLE in Robot Global – Teleop.vi • Disable drive • Put messages into driver station – Periodic tasks.vi • Autoencoder reset create and put in global • Gripper state machine – Output to solenoide – Input from grip/release – Enum – Enum indicator put on robot global data – Run Template with driver station jimc2550@gmail.com
  • 12. First fare notes 2• First fare bunnybot – Teleop put in message – Autonomous • Put message in driver station • Show state machine chart • Go through each step in state machine – Finds errors – Run with driver station – Run in highlight execution mode jimc2550@gmail.com

×