This is an archive of G2M. Please refer to this post for more information. Archived on 2026-01-09.

Pneumatic Piston Retracting Issue

6104G
10/11/2023 at 09:35:56 AM PDT

I’m using PROS by Purdue to actuate a piston, but after each cycle of the loop the piston retracts, and I’m not sure why. How would I be able to keep it in the extended position? (The delay is there because without it the piston won’t actuate, due to it being retracted right after). (Also I tried to see if I did the same in VEXCode V5 but it worked correctly there) Here is my code, where I have the button to extend the piston:
if (wingButton.isPressed()) {
leftWing.set_value(true);
pros::delay(5000);
}

1908A
10/11/2023 at 12:27:59 PM PDT

It’s pronounced cylinder :wink:

6104G
10/11/2023 at 02:34:44 PM PDT

Replying to 1908A ↩️

The piston is the object moving due to the compressed air in the cylinder, I want the piston to move back and forth not the cylinder, if the cylinder moved that would be bad

Sidoti
10/12/2023 at 10:17:21 AM PDT

Replying to 6104G ↩️

Finally. Someone said it.

6104G
10/12/2023 at 11:01:16 AM PDT

Also thanks to Ben on the VEX Discord the issue was solved, the problem was that I initialized leftWing in the while true loop in opcontrol, I now still initialize it in opcontrol, just not in the while true loop.