Go to Post Fun and adrenaline make you waaaaaaaay better at robotics. Proven fact. - Matt Krass [more]
Home
Go Back   Chief Delphi > Technical > Programming
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
  #1   Spotlight this post!  
Unread 20-02-2007, 10:41
purduephotog purduephotog is offline
Active Defense Design Engineer
AKA: Jason
FRC #3015
Team Role: Leadership
 
Join Date: Jan 2007
Rookie Year: 2004
Location: Rochester, NY
Posts: 162
purduephotog is a jewel in the roughpurduephotog is a jewel in the roughpurduephotog is a jewel in the roughpurduephotog is a jewel in the rough
Send a message via AIM to purduephotog
Robot Disabled, yet I can still actuate a Cylinder- HELP!

All-

I witnessed something very scary last night- I was demonstrating to a student how to trigger the actuator and the cylinder fired. I then checked the disable switch, and it was set correctly. I enabled, disabled, and it STILL fired.

I'm very confused- here's the relevant code section:

(global variable)
unsigned char ucGripperPosition = 1; //currently actuated meaning CLOSED

Code:
     //ucGripperPosition = 0 is NON actuated, meaning OPEN
     //Confirm double switch state to toggle the gripper position
     if (   (1 == p2_sw_trig) && (1 == p2_sw_top ) && (1 == ucGripperLatch ) ) {
               if ( 1 == ucGripperPosition) { //Gripper is actuated, so open it
                    ucGripperPosition = 0;
                    ucGripperLatch  = 0;
               } else {
                    ucGripperPosition = 1;
                    ucGripperLatch  = 0;
               } //endifelse gripper position
     } else if ( (0 == p2_sw_trig) && (0 == p2_sw_top ) ) {
               ucGripperLatch = 1;
               //printf("     De-Latching Switch\r\n");
     }  //endif -      ignore the current state of the sw_trigs because they both
                    //werent enabled at the same time

     GRIPPERTOGGLE = ucGripperPosition;      //Set the position of the gripper
As you can see we require both buttons to be depressed to fire the cylinder, and both buttons to be released before you can fire the cylinder again. It's an 'oopsy' prevention that hasn't dropped a tube yet...

Suggestions? This code runs inline with the rest of our code.
 


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
HELP NEEDED! Camera twitches while disabled lkdjm Programming 5 19-02-2007 11:34
Can we still go? Michael Corsetto Championship Event 1 22-03-2006 06:23
LEGO ‘engineers’ compete to help the disabled Billfred FIRST In the News... 1 07-02-2005 13:45
can i use any other custom cylinder MAXbattlebot Pneumatics 2 19-01-2003 12:44


All times are GMT -5. The time now is 04:45.

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