Difference between revisions of "Dispensing Applications"
m |
(Path command) |
||
Line 1: | Line 1: | ||
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. | 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 = | + | = Using the Path command = |
+ | The path command (since V14-003) is intended specifically for long paths and dispensing tasks. It supports paths defined by DXF (only a subset of features is supported) or CSV files. Unlike normal motion commands there is no need for the path generator to stop and re-calculate after a certain number of motion segments. Starting and stopping the dispensing is handled automatically at a configurable distance from start and stop as well as lifting the tool between objects. Please read the programming section of the [[documentation]] on how to use the path command. | ||
+ | |||
+ | = Defining a path using motion commands = | ||
+ | The motion commands (joint, linear, circular) are optimized for pick and place tasks that move along short paths. For dispensing the following optimizations are often necessary. | ||
+ | |||
+ | == 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%. | 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 [[Motion_Smoothing|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. | + | 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 [[Motion_Smoothing|LookAhead parameter]] (in iRC V14-003 and newer: "File" -> "Configure Robot" -> "Path Generation"), 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 = | + | == 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. | 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. | ||
Line 13: | Line 19: | ||
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|logic program]] which runs in parallel to the motion program. Read the next section on how to do this. | 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|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 = | + | == 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. | 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. | ||
Latest revision as of 12:22, 16 July 2024
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.
Using the Path command
The path command (since V14-003) is intended specifically for long paths and dispensing tasks. It supports paths defined by DXF (only a subset of features is supported) or CSV files. Unlike normal motion commands there is no need for the path generator to stop and re-calculate after a certain number of motion segments. Starting and stopping the dispensing is handled automatically at a configurable distance from start and stop as well as lifting the tool between objects. Please read the programming section of the documentation on how to use the path command.
Defining a path using motion commands
The motion commands (joint, linear, circular) are optimized for pick and place tasks that move along short paths. For dispensing the following optimizations are often necessary.
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 (in iRC V14-003 and newer: "File" -> "Configure Robot" -> "Path Generation"), 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.
Further examples can be found in article Examples.