This application example provides information on how to create a packaging task that leverages variables and logic to pack multiple layers with a divider. The parts will be picked from a moving conveyor with vision detection and placed into a tote using patterns.
Scenario & Assumptions
- Plastics packaging application into a tote with two layers and one divider in between the layers. No divider placed on top layer.
- Parts are transferred into the work cell via conveyor
- Use the camera to vision detect and track parts on a moving conveyor to pick
- Use patterns to place parts in an array with multiple layers (stacks)
- User variables will keep track of count and create logic that trigger sequences in the task. Using variables and logic greatly simplifies the task.
- During an initialize sequence use landmarks to find and re-register the conveyor and the tote stand/fixture.
- No external signals or outputs used in this basic task
Note: This task was created using Intera 5.0. Some differences may be seen if you are using newer versions of Intera.
Create and Set Up User Variables
- Create the following user variables to be used in the task.
|User Variable||Start Value||Description|
|Divider Start||1||The divider is only to be placed in between the layers but not on the top. Use an initial value for the Divider Start equal to 1 so that when the divider increments it will be one (1) more than the total number of layers so that a divider is not place onto the top layer. Use a Do If Node to trigger the Divider Sequence. The robot will not place a divider onto the top if the number of divider count is greater than the total number of layers. Therefore the task will finish upon packing the last layer and will not end on a divider insert sequence.|
|Part Count||0||This is the number of parts being packed. It will be incremented after each place in the pattern.|
|Total Layers||2||Will set the total number of layers to be packaged. This should correspond to the # of stacks in the Pattern Node.|
|Trigger Divider Insert Action||0||This is the variable that will trigger the Do If Node to do the Divider pick and place. It will be triggered after the part count reaches 3.|
- Create a series of nodes to initialize the task, have a safe pose if necessary, and re-register landmarks.
- Create a Set To node in the Initialize Sequence to allow the user to quickly input the number of layers in the task. This is a best practice so that if the user wants to leverage this task as a template, it is a visual indicator (or prompt) to allow the user to input the number of layers here and changes the User Variable where ever it is used throughout the task. It should correspond to the # of stacks (or layers) that are in the pattern.
Task Start Work Flow
- The task Loop Node and task Sequence node are placed into the behavior tree in series.
- Toggle the user variable control feature to On and set the input variable to "Total Layers". Therefore, the task will loop the number of times specified by the "Total Layers" variable, in this case it will loop two (2) times.
Loop If Node- Packaging Sequence
- Add a Loop If Node for the packing part of the task (will include a Vision Pick and Pattern Place). In the Loop If node, the condition variable is set "Divider Insert Action == 0". This means that that the packing sequence will only run when this variables is set to zero. (Subsequently, when the count in the pattern place layer is full it sets the variable to 1 and escapes out of the Loop If and into the Do If for the divider action. This will be set up and configured next).
2. In the Place Sequence, a Set To is placed after the place to increment the part count.
3. A Do If node is inserted after the pick. The conditions of the Do If node will be set so that when the part count reaches 3 it will then set the Variable to trigger the divider insert sequence sequence (Trigger Divider Insert Action).
4. A Set To Variable is created as a child of the Do If node. It sets the divider insert action variable to 1 which will trigger the divider insert pick and place sequence. An additional variable is added to also reset the part count to zero (0) in preparation for the next loop of the packing sequence.
Do If Node- Divider Pick and Place Sequence
- A Do If Node is used for the Divider Insert Sequence. The divider sequence will only occur when the part count reaches 3 and a Do If Node in the part Place sequence sets the variable to 1 to turn on the divider pick AND only if the Divider Start variable is less than the Total number of layers. This will prevent the task from putting the a divider on the top after the pattern is full.
2.Then, after the Place Divider sequence a Set To node Resets the Trigger Divider Insert Action back to 0 to go back into the Loop If part pick and place sequence. It also increments the Divider Start value so that it will always remain one higher than the total layer count so that it will also prevent the task from putting the a divider on the top after the pattern is full.
Task File Download
Download the task file here: