How to operate a vacuum gripper using CPRog and the Modular Control Electronics

From Wiki

In general, all grippers are controlled via a Digital Input/Output (DIO) module on the DIN rail. The Modular Control Electronics come with a single DIO module in the standard configuration.

This document shows how to connect and operate a vacuum gripper. For instructions on how to operate a electrical parallel gripper with the Modular Control Electronics, see How to operate an electrical parallel gripper using CPRog and the Modular Control Electronics

The DIO module does not provide its own supply voltage. However the main supply of the Modular Control Electronics can be connected to the SUP pin (see section below) to supply power to the components connected to the digital outputs.

Electrical Integration

Digital IO connection
Note: The digital inputs at the top of the image are irrelevant for the operation of the gripper. They demonstrate the use of digital Inputs and can remain disconnected for the purpose of this tutorial. The gripper is connected in place of the lamp shown in the image above.

Digital Outputs

The digital outputs are at the bottom of the image on the left.

  • Disconnect the robot and its control electronics from power.
  • Connect a (external 24V) power supply to the D-out A "Sup" pin(see image on the left)
  • The supply voltage can be output to the pins labeled DOut A "1-3" and D-out B "4-7". (There are seven separate reed relays that close/open the connection between SUP and pin 1, 2, 3,...7 respectively.)
  • Connect the positive side of a solenoid valve to a DOut pin. Here D-out B pin "5".
  • Connect the negative side of the gripper to GND of the negative side of the same power supply to close the electrical circuit, e.g. the Ground rail, if the DIN rail power supply of the control electronics is used.
  • See the example with the lamp on output 5 on the left. (You would obviously connect the gripper in place of the lamp for the purpose of this tutorial.)

Note: The digital inputs at the top of the image on the left are irrelevant for the operation of the gripper. They demonstrate the use of digital Inputs and can remain disconnected for the purpose of this tutorial.

Operate the gripper in CPRog/iRC

This could also be titled "how to switch a digital output in CPRog/iRC".

  • Turn on the power supply (or power supplies, when using a separate power supply for the gripper).
  • Disengage the Emergency Stop button
  • Start CPRog/iRC
  • Connect, Reset, Enable

Manual Use

This is e.g. useful for an initial test: The tab "Input/Output" in CPRog/iRC allows to check the input states and to set the output channels for up to three DIO modules. When the physical robot is connected, only the outputs can be set. The inputs are shown based on the signals from the electronics. (During simulation, i.e. with the physical robot disconnected, also the input channels can be set to simulate e.g. sensors.) Only the outputs are relevant for the gripper that we are trying to operate.

To operate the gripper connected to pin D-Out B "5" of the first DIO module, toggle the tick-box before "25: Dout" as shown on the screenshot below.

DIO cprog 5th output manual.png

Use in CPRog/iRC Programs

The same can be achieved in a CPRog/iRC program. To operate the gripper set DOut25 to enabled/disabled as shown in the image below.

This enables the

  • fifth output of the first DIO module (DOut25)

DIO CPRog firstmodule 5th output.png

Once you save, load and run the program the gripper should operate.

The program was recorded for an earlier version of CPRog. However, the same logic applied to any version of CPRog. The program in this video closes the gripper once. You can see the activation of DOut25 at the bottom of the video around 39 seconds into the video. If the program is run multiple times, the gripper will stay closed. If you want to open the gripper again, add another Digital Out command in the same way and set the state of DOut25 to false (in newer CPRog Versions false is named disabled and true is named enabled). The program here is just running the simulation. When the robot is connected, reset and enabled, it will operate the physical robot in the same way.