Go to Post If you're sore over the vigorous defense teams play, get over it. It happens and will continue to, as the majority of people hope. - AmyPrib [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Spotlight this post!  
Unread 30-03-2010, 20:28
sparks-1784 sparks-1784 is offline
Lance Stronk
FRC #1784 (Litchbots)
Team Role: Engineer
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Litchfield, CT
Posts: 46
sparks-1784 is on a distinguished road
Re: Autonomous Independent

We tested the Autonomous independent tonight. At first, we had a FOR loop with drive commands and delays (similar to the tutorial example) and a WHILE loop with a watchdog with 20mS delay. What happened was that the motor commands and delay was being executed and the solenoid logic (in the WHILE loop) was only executed (briefly) after each delay was executed. This seems to make sense that the delay processing was 'hogging' all the processing resources and the solenoid logic would only be executed where each delay had finished.
We removed the FOR loop and brought a single motor command into the WHILE loop with the rest of the solenoid logic. What happened next was interesting, but first an explanation of the attached. The attached does not show all the cases for the solenoid logic, but I didn't think that was important for this discussion. If you need to look at all of the case states, let me know and I will send some screen shots of those.

We copied the solenoid logic from our Teleop program and used it in the autonomous. The way it works in Teleop is with 3 different button depressions - 1 fires the 'B' side of all solenoids for max kick, another fires 2 solenoids for a lesser kick and the third is the smallest kick. Each button depress fires the solenoid for 1 second and then fires the 'A' side of the solenoid for returning the kicker to 'cocked' mode. There is a 2 second timer to prevent the kicker from being fired again (within 2 seconds).
For the autonomous version, we replaced the 'buttons' with the optical sensor DIO and fire all the solenoid 'B' sides for the max kick in autonomous.

All of this was done with what I will call 'classical' logic and does not employ state machines of the type in the labview tutorial. I am sure that using the 'tutorial' type state machine would result in more 'readable' code, but all I can say is that I am still learning labview. Converting this to be more readable will be left as and exercise for the student (and mentor!).

Ok - so, we ran the autonomous and the autonomous mode was picking up the sensor and causing the solenoid logic to transition. However, the solenoid logic 1 second timing loops were quite a bit less than 1 second and the result was a flash change of state and back to 'cocked mode' for the kicker. The interesting thing was that the 2 second timer seemed to work...when we interrupted the optical beam constantly, the 2 second timer would count and then the solenoid logic would 'flash' and then the 2 second timer would repeat. We could not understand why one timer in the WHILE loop worked while the others did not.
Anyway...sorry for the long explanation. Hope you can help.
Attached Files
File Type: doc autonomous Indendent.doc (251.0 KB, 46 views)
__________________
Lance
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
periodic tasks in autonomous independent Ether NI LabVIEW 19 31-03-2010 07:15
Autonomous independent-watchdog errors ewoodring NI LabVIEW 2 20-03-2010 20:19
global variables and autonomous independent Team1824 NI LabVIEW 10 19-02-2010 23:00
Autonomous Mode, Independent, Iterative (?) FRC2669_Valery General Forum 4 18-02-2010 09:50
Using Sensors in Autonomous Independent Felipe Sagui NI LabVIEW 2 27-01-2009 17:25


All times are GMT -5. The time now is 09:44.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi