Arm#

Introduction#

The 6-Axis Robotic Arm is a robotic manipulator used in the CTE Workcell. In VEXcode EXP, Arm blocks allow an EXP Brain to move the 6-Axis Arm, rotate its end effector, check whether movements are possible, and control attached tools such as the Magnet Pickup Tool or Pen Holder Tool.

This page is for CTE Workcell projects where the 6-Axis Arm is connected to an EXP Brain. If you are using the 6-Axis Arm on its own with the CTE Tile, use the CTE Arm API page instead.

Below is a list of available blocks:

Actions — Move the 6-Axis Arm to positions or orientations.

Settings — Configure movement, tools, and control settings.

Values — Check whether a movement can run, whether movement has finished, whether a crash has occurred, read the current position or orientation, or run blocks when Arm events occur.

Actions#

move arm to position#

The move arm to position stack block moves the 6-Axis Arm to a specified x, y, and z coordinate.

The x, y, and z coordinates describe the position of the end effector in three-dimensional space. Use arm move to position? before this block if the target position may be outside the 6-Axis Arm’s reachable workspace.

move arm to position stack block#
move [Arm1 v] to position x:[120] y:[0] z:[100] [mm v] ▶

Parameter

Description

device

The configured 6-Axis Arm to use.

x

The x-coordinate of the target position.

y

The y-coordinate of the target position.

z

The z-coordinate of the target position.

unit

The unit used for the x, y, and z coordinates: mm (millimeters) or inches.

expanding arrow

By default, the 6-Axis Arm finishes moving before the next block runs. Expand the block to and don’t wait to start the movement and immediately continue to the next block.

Example

When started, moves the 6-Axis Arm to a standard position.#
when started
[Move Arm1 to a standard position at the start of the project.]
move [Arm1 v] to position x:(120) y:(120) z:(75) [mm v] ▶

increment arm position#

The increment arm position stack block moves the 6-Axis Arm by a specified distance from its current position along the x, y, and z axes.

Use this block to move relative to where the end effector is now. Use arm increment position? before this block if the movement may place the 6-Axis Arm outside its reachable workspace.

increment arm position stack block#
increment [Arm1 v] position by x:[0] y:[0] z:[0] [mm v] ▶

Parameter

Description

device

The configured 6-Axis Arm to use.

x

The distance to move along the x-axis.

y

The distance to move along the y-axis.

z

The distance to move along the z-axis.

unit

The unit used for the x, y, and z distances: mm (millimeters) or inches.

expanding arrow

By default, the 6-Axis Arm finishes moving before the next block runs. Expand the block to and don’t wait to start the movement and immediately continue to the next block.

Example

When started, increments Arm1’s position 100 millimeters along the x-axis.#
when started
[Move Arm1 100 millimeters along the x-axis.]
increment [Arm1 v] position by x:[100] y:[0] z:[0] [mm v] ▶

move arm to orientation#

The move arm to orientation stack block rotates the end effector to a specified orientation.

Orientation describes how the end effector is rotated. pitch tilts the end effector up or down, roll rotates it side to side, and yaw rotates it left or right.

move arm to orientation stack block#
move [Arm1 v] to orientation [pitch v] [0] degrees ▶

Parameter

Description

device

The configured 6-Axis Arm to use.

orientation

The axis to rotate the end effector around:

  • pitch
  • roll
  • yaw

degrees

The target orientation angle, in degrees.

expanding arrow

By default, the 6-Axis Arm finishes moving before the next block runs. Expand the block to and don’t wait to start the movement and immediately continue to the next block.

Example

When started, rotates the end effector to 270 degrees of yaw.#
when started
[Rotate the end effector to 270 degrees of yaw.]
move [Arm1 v] to orientation [yaw v] [270] degrees ▶

increment arm orientation#

The increment arm orientation stack block rotates the end effector by a specified number of degrees from its current orientation.

Use this block to rotate relative to the end effector’s current pitch, roll, or yaw.

increment arm orientation stack block#
increment [Arm1 v] orientation by [pitch v] [0] degrees ▶

Parameter

Description

device

The configured 6-Axis Arm to use.

orientation

The axis to rotate the end effector around:

  • pitch
  • roll
  • yaw

degrees

The number of degrees to rotate the end effector.

expanding arrow

By default, the 6-Axis Arm finishes moving before the next block runs. Expand the block to and don’t wait to start the movement and immediately continue to the next block.

Example

When started, rotates the end effector 40 degrees in pitch.#
when started
[Rotate the end effector 40 degrees in pitch.]
increment [Arm1 v] orientation by [pitch v] [40] degrees ▶

Settings#

set arm speed#

The set arm speed stack block sets the movement speed of the 6-Axis Arm.

The 6-Axis Arm speed is set to 50% at the start of a project.

set arm speed stack block#
set [Arm1 v] speed to [50]%

Parameter

Description

device

The configured 6-Axis Arm to use.

percent

The movement speed of the 6-Axis Arm, from 1 to 100 percent.

Example

When started, sets the 6-Axis Arm speed, then moves to a position.#
when started
[Set Arm1's speed to 30%.]
set [Arm1 v] speed to [30]%
move [Arm1 v] to position x:[120] y:[120] z:[70] [mm v] ▶

set arm end effector#

The set arm end effector stack block selects the tool attached to the 6-Axis Arm.

When the end effector is changed, the 6-Axis Arm automatically adjusts its z-offset to match the selected tool. The end effector is set to the Magnet Pickup Tool at the start of a project.

set arm end effector stack block#
set [Arm1 v] end effector to [magnet v]

Parameter

Description

device

The configured 6-Axis Arm to use.

end effector

The tool attached to the 6-Axis Arm: magnet (Magnet Pickup Tool) or pen (Pen Holder Tool).

Example

When started, sets the 6-Axis Arm to use the Pen Holder Tool.#
when started
[Set Arm1 to use the Pen Holder Tool.]
set [Arm1 v] end effector to [pen v]

set arm magnet mode#

The set arm magnet mode stack block engages or releases the Magnet Pickup Tool.

The magnet mode stays active until another set arm magnet mode block changes it. The magnet mode is reset to released at the start of a project.

set arm magnet mode stack block#
set [Arm1 v] magnet to [engaged v]

Parameter

Description

device

The configured 6-Axis Arm to use.

mode

The Magnet Pickup Tool state: engaged to pick up objects or released to drop any held object and not pick up new objects.

Example

When started, engages the magnet, waits, then releases it.#
when started
[Pick up objects, then drop them after 2 seconds.]
set [Arm1 v] magnet to [engaged v]
wait [2] seconds
set [Arm1 v] magnet to [released v]

set arm pen offset#

The set arm pen offset stack block sets the vertical offset for the Pen Holder Tool.

Set the end effector to pen before using this block. If the Pen Holder Tool is not selected, this block has no effect.

The pen offset is the distance from the top of the Pen Holder Tool to the tip of the Dry-Erase Marker. At the start of a project, the pen offset is set to 0. A pen offset of 0 places the arm’s z-axis origin at the point where the Pen Holder Tool connects to the 6-Axis Arm.

set arm pen offset stack block#
set [Arm1 v] pen offset to [0] [mm v]

Parameter

Description

device

The configured 6-Axis Arm to use.

offset

The pen offset value.

unit

The unit used for the pen offset: mm (millimeters) or inches.

Example

When started, sets the pen offset, then moves the 6-Axis Arm.#
when started
[Set the end effector to the Pen Holder Tool and set the pen offset to 1 inch.]
set [Arm1 v] end effector to [pen v]
set [Arm1 v] pen offset to [1] [inches v]
move [Arm1 v] to position x:[120] y:[120] z:[0] [mm v] ▶

set arm to control stopped#

The set arm to control stopped stack block immediately stops the 6-Axis Arm and prevents any more Arm blocks from running.

Once this block runs, the 6-Axis Arm cannot be re-enabled until the project is restarted.

set arm to control stopped stack block#
set [Arm1 v] to control stopped

Parameter

Description

device

The configured 6-Axis Arm to use.

Example

When started, moves the 6-Axis Arm, then control stops it.#
when started
[Control stop after a movement.]
move [Arm1 v] to position x:[120] y:[120] z:[70] [mm v] ▶
set [Arm1 v] to control stopped

Values#

arm move to position?#

The arm move to position? Boolean block returns whether the 6-Axis Arm can move to a specified x, y, and z coordinate.

This block checks a target position before the 6-Axis Arm moves. It can help prevent a project from trying to move the arm outside its reachable workspace.

arm move to position? Boolean block#
<[Arm1 v] move to position x:[0] y:[0] z:[0] [mm v] ?>

Parameter

Description

device

The configured 6-Axis Arm to use.

x

The x-coordinate of the target position.

y

The y-coordinate of the target position.

z

The z-coordinate of the target position.

unit

The unit used for the x, y, and z coordinates: mm (millimeters) or inches.

Example

When started, checks whether the 6-Axis Arm can move to a position.#
when started
[Check if Arm1 can move to a position.]
if <not <[Arm1 v] move to position x:[0] y:[0] z:[0] [mm v] ?>> then
  print [The 6-Axis Arm can't move to this position.] on screen ▶
end

arm increment position?#

The arm increment position? Boolean block returns whether the 6-Axis Arm can move the specified distance from its current position.

This block checks an incremental movement before the 6-Axis Arm moves.

arm increment position? Boolean block#
<[Arm1 v] increment position by x:[0] y:[0] z:[0] [mm v] ?>

Parameter

Description

device

The configured 6-Axis Arm to use.

x

The distance to move along the x-axis.

y

The distance to move along the y-axis.

z

The distance to move along the z-axis.

unit

The unit used for the x, y, and z distances: mm (millimeters) or inches.

Example

When started, checks whether the 6-Axis Arm can increment its position.#
when started
[Check if Arm1 can increment from its current position.]
if <not <[Arm1 v] increment position by x:[0] y:[500] z:[0] [mm v] ?>> then
  print [The 6-Axis Arm can't move that distance.] on screen ▶
end

arm move end effector?#

The arm move end effector? Boolean block returns whether the end effector can rotate to a specified orientation.

Use this block to check whether a target pitch, roll, or yaw value is within the allowed range before rotating the end effector.

arm move end effector? Boolean block#
<[Arm1 v] move end effector to [pitch v] [0] degrees?>

Parameter

Description

device

The configured 6-Axis Arm to use.

orientation

The axis to rotate the end effector around:

  • pitch
  • roll
  • yaw

degrees

The target orientation angle, in degrees.

Example

When started, checks whether the end effector can roll to an orientation.#
when started
[Check if Arm1 can roll its end effector to an orientation.]
if <[Arm1 v] move end effector to [roll v] [40] degrees?> then
  print [The end effector can roll to that orientation.] on screen ▶
end

arm increment orientation?#

The arm increment orientation? Boolean block returns whether the end effector can rotate by a specified number of degrees from its current orientation.

Use this block to check an incremental pitch, roll, or yaw movement before rotating the end effector.

arm increment orientation? Boolean block#
<[Arm1 v] increment orientation by [pitch v] [0] degrees?>

Parameter

Description

device

The configured 6-Axis Arm to use.

orientation

The axis to rotate the end effector around:

  • pitch
  • roll
  • yaw

degrees

The number of degrees to rotate the end effector.

Example

When started, checks whether the end effector can increment yaw by 20 degrees.#
when started
[Check if Arm1 can increment yaw.]
if <[Arm1 v] increment orientation by [yaw v] [20] degrees?> then
  print [The end effector can increment yaw by 20 degrees.] on screen ▶
end

arm is done moving?#

The arm is done moving? Boolean block returns whether the 6-Axis Arm has finished moving.

This block is useful after a movement block is expanded to and don’t wait.

arm is done moving? Boolean block#
<[Arm1 v] is done moving?>

Parameter

Description

device

The configured 6-Axis Arm to use.

Example

When started, prints the current y-position while the 6-Axis Arm moves.#
when started
[Display the current y-position while Arm1 moves.]
move [Arm1 v] to position x:(-100) y:(200) z:(100) [mm v] ◀ and don't wait
repeat until <[Arm1 v] is done moving?>
  print ([Arm1 v] position [y v] in [mm v]) on screen ◀ and set cursor to next row
  wait [0.25] seconds
end

arm is crashed?#

The arm is crashed? Boolean block returns whether the 6-Axis Arm has crashed while moving.

When a crash is detected, the 6-Axis Arm stops motor movement and may appear to go limp. This reduces strain and helps protect the motors from accidental damage.

arm is crashed? Boolean block#
<[Arm1 v] is crashed?>

Parameter

Description

device

The configured 6-Axis Arm to use.

Example

When started, checks for a crash while Arm1 moves.#
when started
[Quickly move to the specified location.]
set [Arm1 v] speed to [100] %
move [Arm1 v] to position x: [-20] y: [240] z: [40] [mm v] ◀ and don't wait
[While moving, check for a crash.]
forever
  if <[Arm1 v] is crashed?> then
    [Indicate a crash with the Signal Tower and Brain screen.]
    print [Crash Detected] on screen ▶
    set [SignalTower2 v] to [green v] and [off v]
    set [SignalTower2 v] to [red v] and [solid v]
    break
  end
end

arm position#

The arm position reporter block returns the current position of the 6-Axis Arm along a selected axis.

Use this block to read where the end effector is currently located along the x, y, or z axis.

arm position reporter block#
([Arm1 v] position [x v] in [mm v])

Parameter

Description

device

The configured 6-Axis Arm to use.

axis

The position axis to report:

  • x
  • y
  • z

unit

The unit used for the position value: mm (millimeters) or inches.

Example

When started, prints the current y-position while the 6-Axis Arm moves.#
when started
[Display the current y-position while Arm1 moves.]
move [Arm1 v] to position x:(-100) y:(200) z:(100) [mm v] ◀ and don't wait
repeat until <[Arm1 v] is done moving?>
  print ([Arm1 v] position [y v] in [mm v]) on screen ◀ and set cursor to next row
  wait [0.25] seconds
end

arm orientation#

The arm orientation reporter block returns the current orientation of the end effector about a selected axis in degrees.

Use this block to read the end effector’s current pitch, roll, or yaw.

arm orientation reporter block#
([Arm1 v] orientation [pitch v] in degrees)

Parameter

Description

device

The configured 6-Axis Arm to use.

orientation

The orientation axis to report:

  • pitch
  • roll
  • yaw

Example

When started, prints the current yaw while the 6-Axis Arm moves.#
when started
[Display the current yaw after rotating the end effector.]
move [Arm1 v] to orientation [yaw v] [90] degrees ◀ and don't wait
repeat until <[Arm1 v] is done moving?>
  print ([Arm1 v] orientation [yaw v] in degrees) on screen ◀ and set cursor to next row
  wait [0.25] seconds
end

when arm control stopped#

The when arm control stopped Hat block runs the attached stack when the 6-Axis Arm’s control stop has been enabled.

when arm control stopped Hat block#
when [Arm1 v] control stopped  :: hat events

Parameter

Description

device

The configured 6-Axis Arm to use.

when arm crashed#

The when arm crashed Hat block runs the attached stack when the 6-Axis Arm has crashed while moving.

When a crash is detected, the 6-Axis Arm stops motor movement and may appear to go limp. This reduces strain and helps protect the motors from accidental damage.

when arm crashed Hat block#
when [Arm1 v] crashed  :: hat events

Parameter

Description

device

The configured 6-Axis Arm to use.

Example

When Arm1 crashes, turns the Signal Tower red.#
when [Arm1 v] crashed  :: hat events
[Indicate a crash with the Signal Tower and Brain screen.]
print [Crash Detected] on screen ▶
set [SignalTower2 v] to [red v] and [solid v]