Pneumatics#

Introduction#

The Pneumatics category includes blocks that allow the VEX IQ (2nd generation) air pump to compress air and send it to pneumatic cylinders through a solenoid. These blocks can turn the air pump on and off or extend and retract the pneumatic cylinder.

Below is a list of available 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 :: hat events
    [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 :: hat events
    [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]