Pneumatics#

Introduction#

Pneumatics allow the VEX IQ Pneumatic Solenoid to control the flow of compressed air to a pneumatic cylinder. These controls can extend or retract the cylinder by setting the solenoid to direct air appropriately.

Below is a list of all blocks:

set cylinder#

The set cylinder block extends or retracts a cylinder.

    set [Pneumatic1 v] [cylinder1 v] to [extend v]

Parameters

Description

pneumatics

Which pneumatics system to use, configured in the Devices window.

cylinder

Which cylinder to extend or retract, configured in the Devices window.

state

The state of the cylinder to set:

  • extend
  • retract

Example

    when started
    [Extend and retract the Pneumatic Cylinder.]
    set [Pneumatic1 v] [cylinder1 v] to [extend v]
    wait (2) seconds
    set [Pneumatic1 v] [cylinder1 v] to [retract v]

set pump#

The set pump turns an air pump on or off.

  set [Pneumatic1 v] pump to [on v]

Parameters

Description

pneumatics

Which air pump to turn on or off, configured in the Devices window.

state

The state of the air pump to set:

  • on
  • off

Example

    when started
    [Turn off the air pump after extending and retracting.]
    set [Pneumatic1 v] [cylinder1 v] to [extend v]
    wait (2) seconds
    set [Pneumatic1 v] [cylinder1 v] to [retract v]
    wait (1) seconds
    set [Pneumatic1 v] pump to [off v]