Pneumatics working weird & Coding isn't working

So this is our code, we’re trying to code a double action pneumatic actuator… Down below is a code and further down below pic of my setup… I removed the pressure regulator just to see if it works in this raw format… also no on-off switch needed because I don’t have t-fittings and multiple actuators… Do you think the problem is how I setup the solenoid? When I press the button for the pneumatics the solenoid makes this clicking sound, but nothing is triggering in fact the actuator is automatically extended by itself without the code and it just stays extended like that even when i push it back in…

So as you can see there is a hardware problem… then for the software since its a double action we need to code it to go back to the zero position (unextended) how do you suppose doing that? We just though to use like the wait command or what do you suggest because there might be some better code for double action pneumatic stuff

 #pragma config(Motor, port2, backrightMotor, tmotorVex393, openLoop)
#pragma config(Motor, port1, middlerightMotor, tmotorVex393, openLoop)
#pragma config(Motor, port3, frontrightMotor, tmotorVex393, openLoop)
#pragma config(Motor, port6, backleftMotor, tmotorVex393, openLoop)
#pragma config(Motor, port7, middleleftMotor, tmotorVex393, openLoop)
#pragma config(Motor, port10, frontleftMotor, tmotorVex393, openLoop)
#pragma config(Motor, port4, armMotor, tmotorVex393, openLoop)
#pragma config(Motor, port8, rubbermonster, tmotorVex393, openLoop)
#pragma config(Sensor, dgtl6, solenoid, sensorDigitalOut)

task main()
{

while(1 == 1)
{
motor[port2] = -vexRT[Ch2];
motor[port1] = -vexRT[Ch2];
motor[port3] = -vexRT[Ch2];

motor[port6] = vexRT[Ch3];
motor[port7] = vexRT[Ch3];
motor[port10] = vexRT[Ch3];

//telling solenoid to start at the "0" position aka not extended
SensorValue[solenoid] = 0;
if(vexRT[Btn8U] == 1)
{
SensorValue[solenoid] = 1;
}

if(vexRT[Btn6U] == 1)
{
motor[port4] = 127;
}
else
{
motor[port4] = 0;
}

if(vexRT[Btn6D] == 1)
{
motor[port4] = -127;
}
else
{
motor[port4] = 0;
}

if(vexRT[Btn5U] == 1)
{
motor[port8] = 127;
}

if(vexRT[Btn5D] == 1)
{
motor[port8] = -127;
}

}
}


20181205_171006.jpg

This seems kind of weird, but your 0 command is unprompted, and inside of the while loop. You may want to move it outside so it only calls once. That may be an issue. And then put another 0 command in an Else If statement testingvto see if the button==0.

@Got a Screw Loose Ok, but in the end is the hardware where it pre-emptively extends when I fill with air a NORMAL thing??

Anyone else if you have expertise in pneumatics or at least has used pneumatics could you give a hand too? I’m sure lots of people have used pneumatics

I’ve used FRC pneumatics. Not exactly the same. It’s normal for them to fill with air, and thusly extend. At least if the line is open.

I really want to see this shooter working, so can anyone with experience help?

@kmmohn @FatGorilla

https://vexforum.com/t/pneumatic-help/50411/1
Does this sound like what’s happening? Maybe the tagged people can help?