How to control a Festo solenoid valve (VUVG-LK10-M52) from a UR robot

Based on contributions by Nathan_Saeri.

A Festo solenoid valve switches compressed air on and off in a pneumatic circuit — for example, to actuate a gripper or vacuum generator. This shows how to wire and control a Festo VUVG-LK10-M52 valve from a UR10’s digital output, both from code and from the teach pendant.

What you need

  • Festo solenoid valve, type VUVG-LK10-M52
  • UR10 (or similar) robot with a free digital output (DO)
  • 24 V supply / cable

Steps

1. Connect power to the valve

  1. Connect one side of a cable to the valve’s 24V input.
  2. Connect the other side to 0V and a digital output (DO) on the UR10 controller.

2. Control the valve from code

Use set_digital_output in URScript to switch the valve on and off:

set_digital_output(0, True)   # Activates output 0 (opens the valve)
set_digital_output(0, False)  # Deactivates output 0 (closes the valve)

Replace 0 with whichever digital output port the valve is wired to.

3. Control the valve from the teach pendant

  1. Go to the I/O tab on the teach pendant.
  2. Find the Digital Outputs section.
  3. Locate the output number the valve is wired to.
  4. Toggle it with the button next to that output — press once to activate the valve (the button shows an active state), press again to deactivate it.

4. Verify the setup

Confirm the valve activates and deactivates as expected, whether triggered from the teach pendant or from code. Test with a small load before relying on it in a full pneumatic circuit.

Related


Rewritten and consolidated (Sept 2026) from the original student how-to’s: How to use a festo solenoid valve.