View Single Post
  #7   Spotlight this post!  
Unread 19-02-2004, 07:36
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Pneumatics Programming

Yes, That is simlest.

Our idea was using a pot for 'Target' position and using a sensor with 2 solenoids to make it stop.
Like:
Code:
Const Arm_Upper_Stop as Unsigned Int = 150
const Arm Upper_Catch as unsigned int = 140
Const Arm_Upper_Range as Unsigned Int = 130
Const Arm_Target as Unsigned Int = 125
Const Arm_Lower_Range as Unsigned Int = 120
const Arm_Lower_Catch as Unsigned Int = 110
Const Arm_Lower_Stop as Unsigned Int = 100

void inter_ArmSensor(void)
{
 Static iPrevValue as unsigned int
 
 //Continue after catchup
 if (iPrevValue >= Arm_Upper_Stop & ArmSensor < Arm_Upper_Catch)
  {ArmMotor_Go;}
 if (iPrevValue <= Arm_Lower_Stop & ArmSensor > Arm_Lower_Catch)
  {ArmMotor_Go;}
 
 //Emergancy Stops
 if (ArmSensor >= Arm_Upper_Stop)
  {ArmMotor_Stop;}
 if (ArmSensor <= Arm_Lower_Stop)
  {ArmMotor_Stop:}
 
 //Start Cylinder
 if (ArmSensor >= Arm_Upper_Range)
  {ArmCylinder_Out;}
 if (ArmSensor <= Arm_Lower_Range)
  {ArmCylinder_In;}
 
 //Stop Cylinder
 if (ArmSensor < Arm_Upper_Range)
  {ArmCylinder_Stop;}
 if (ArmSensor > Arm_Lower_Range)
  {ArmCylinder_Stop;}
}
But I have a more efficient idea.