Dispensing Applications

From Wiki
Revision as of 13:14, 18 December 2023 by Mab (talk | contribs) (Added link to article CPRog Examples)

Dispensing or glueing along a path frequently require some optimizations and programming patterns that differ from pick and place applications. This article explains the most common issues and how to solve them.

Smoothing a long path

Evenly dispensing along a path requires that motion commands are smoothed with each other - otherwise the robot stops shortly and creates a blob or puddle. Enable smoothing in each motion command of the path by setting the smoothing parameter to a value other than 0%.

Even if you enable smoothing you may notice that the robot stops after a certain number of succeeding motion commands, usually 20. This break is necessary to generate the next smoothed path segment. You can increase the number of motion commands after which the robot stops by increasing the LookAhead parameter, however this also increases the time needed to calculate. In other words, increasing this value makes the robot stop less often but for a longer time. In our tests a value of 100 should still be usable but you can try higher values.

Logic commands, loops and motion types

You may also notice that only motion commands of the same type can be smoothed with each other. This means cartesian commands (i.e. linear, relative-linear and circular) can be smoothed with each other or joint commands (joint and relative joint). Changing the motion type or using logic commands (e.g. setting a digital output) will shortly stop the motion.

This means loops can not be used. If your path repeats you may need to duplicate it instead.

This also means that you can not start or stop dispensing using only the robot program while in motion. Instead you can use the logic program which runs in parallel to the motion program. Read the next section on how to do this.

Preventing blobs using a logic program

A common programming pattern to prevent blobs at the start and end of a path is the following. Before the robot program starts moving it tells the logic program to enable the dispenser as soon as the starting position is reached. The motion is started before this position so that the robot can accelerate before dispensing.

In your motion program:

  • Set a global signal (e.g. GSig1) using the digital output command - this is to signal the logic program to get ready to start the dispensing.
  • Start the motion path

In your logic program:

  • Use an if command to check whether GSig1 is set and whether the starting position is reached (e.g. condition "GSig1 and #position.x >= 100")
  • In the first branch of this if enable the digital output and disable the GSig.

This example prevents blobs at the start of the motion. You can use this same pattern to disable the dispenser before the robot reaches the end position. To do this you could set another GSig after enabling the dispenser and wait for the target position (e.g. "#position.x > 500 and #position.y > 300"). If you need to start and stop a couple times you may want to copy this pattern and use different GSig (up too 100), use values that work for all start and end positions or use variables to let the motion program tell the logic program when to start and stop.

As a sidenote: the logic program repeats automatically but it may take up to 500ms to restart if it is very short. This may lead to a slow response and delayed dispensing. To prevent this use an infinite loop to repeat all commands of the logic program.

Example program

The following example shows this approach for starting and stopping with an M-shape path. You can try it in a DLE-RG-0001 simulation: ExampleDispensing.zip - copy both programs to the Data/Programs directory, set them in the program configuration area and observe the digital output below the 3D view.

DispensingMotion.PNG DispensingLogic.PNG

Further examples can be found in article Examples.