Pneumatic Pistons Firing Off

Currently on our robot the pneumatic pistons we use to power our claw are firing off when we turn on the cortex. Then when the controller links with the cortex via vex net key it doesn’t want to work.

We fixed it!

How did you fix it? I was under the impression that this was a “normal” part of the booting of the cortex. (im referring to the pistons firing on and off when turning the Cortex on)

We have a manual shutoff valve that we make sure to close before turning the robot on. But you can still here the solenoid clicking away for the first couple seconds until the VEXnet makes a connection.

I’ve found that when you use the digital ports 12-9 this prevents the pistons from firing.

My team has had an issue with the pneumatic not working with the remote on our current use control program. When we download the pneumatic code in a program by itself it works fine but when we copy and paste the same code into our control program it wont work. any suggestions?

Can you post the code?

#pragma config(Sensor, dgtl1,  Solenoid,       sensorDigitalOut)
#pragma config(Sensor, dgtl7,  Solenoid,       sensorNone)
#pragma config(Motor,  port2,           FrontRightMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port3,           FrontLeftMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port4,           BackRightMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port5,           BackLeftMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port6,           clawMotor,     tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port7,           fingerMotor,   tmotorVex393_MC29, openLoop)
#pragma config(Motor,  port8,           liftMotor,     tmotorServoContinuousRotation, openLoop)
#pragma config(Motor,  port9,           armMotor,      tmotorServoContinuousRotation, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#pragma platform(VEX)

//Competition Control and Duration Settings
#pragma competitionControl(Competition)
#pragma autonomousDuration(20)
#pragma userControlDuration(120)

#include "Vex_Competition_Includes.c"   //Main competition background code...do not modify!

/////////////////////////////////////////////////////////////////////////////////////////
//
//                          Pre-Autonomous Functions
//
// You may want to perform some actions before the competition starts. Do them in the
// following function.
//
/////////////////////////////////////////////////////////////////////////////////////////


void pre_auton()
{
  bStopTasksBetweenModes = true;
}

/////////////////////////////////////////////////////////////////////////////////////////
//
//                                 Autonomous Task
//
// This task is used to control your robot during the autonomous phase of a VEX Competition.
// You must modify the code to add your own robot specific commands here.
//
/////////////////////////////////////////////////////////////////////////////////////////

task autonomous()
{


motor[FrontRightMotor]=-127;
motor[FrontLeftMotor]=-127;
motor[BackRightMotor]=-127;
motor[BackLeftMotor]=-127;

waitInMilliseconds(1000);

stopMotor(FrontLeftMotor);
stopMotor(FrontRightMotor);
stopMotor(BackLeftMotor);
stopMotor(BackRightMotor);

}

/////////////////////////////////////////////////////////////////////////////////////////
//
//                                 User Control Task
//
// This task is used to control your robot during the user control phase of a VEX Competition.
// You must modify the code to add your own robot specific commands here.
//
/////////////////////////////////////////////////////////////////////////////////////////

task usercontrol()
{
    while(1 == 1)
    {
        //Driving Motor Control
            motor[FrontLeftMotor] = vexRT[Ch3] / 2;
        motor[FrontRightMotor] = vexRT[Ch3] / 2;
        motor[BackLeftMotor] = vexRT[Ch2] / 2;
        motor[BackRightMotor] = vexRT[Ch2] / 2;
        //Arm Control
        if(vexRT[Btn5U] == 1)
        {
            motor[armMotor] = 127;
        }
        else if(vexRT[Btn5D] == 1)
        {
            motor[armMotor] = -127;
        }
        else
        {
            motor[armMotor] = 0;
        }



        //Claw Control

        if(vexRT[Btn5U] ==1)
        {
            motor[clawMotor] = 127;
        }
        else if(vexRT[Btn5D] == 1)
        {
            motor[clawMotor] = -127;
        }
        else
        {
            motor[clawMotor] = 0;
        }
        // Liftmotor is arm motor.
        if(vexRT[Btn8R] ==1)
        {
            motor[liftMotor] = 127;
        }
        else if(vexRT[Btn8D] == 1)
        {
            motor[liftMotor] = -127;
        }
        else
        {
            motor[liftMotor] = 0;
        }
        //Finger motor is the claw

        if(vexRT[Btn7L] ==1)
        {
            motor[fingerMotor] = 60;
        }
        else if(vexRT[Btn7D] == 1)
        {
            motor[fingerMotor] = -60;
        }
        else
        {
            motor[fingerMotor] = 0;
        }
    }


    if(vexRT[Btn5U] ==1)
    {
        motor[clawMotor] = 127;
    }
    else if(vexRT[Btn5D] == 1)
    {
        motor[clawMotor] = -127;
    }
    else

        motor[clawMotor] = 0;
        
 if(vexRT[Btn6U] == 1)         // If button 6U (upper right shoulder button) is pressed:
    {
      SensorValue[Solenoid] = 1;  // ...activate the solenoid.
    }
    else                          // If button 6U (upper right shoulder button) is  NOT pressed:
    {
      SensorValue[Solenoid] = 0;  // ..deactivate the solenoid.
    }

}
    // User control code here, insid

The control for the solenoid is outside your infinite while loop. Move the if statement directly below the code for the finger motor. Also, you have a duplicate if statement for the claw motor, with one on the outside of the while loop.

Also in his Praga only one of the solenoids is set up the other in port 17 has no sensor in it.

Thanks for the replies. We had it as sensor none because we were moving it around to different ports trying to get it to work. We will try it and see what happens. Thanks.