Actinav - Using the Currently Selected Pick Rule as a Conditional Expression
Create Date: 23 March 2021
Goal:
By supporting detection of the Pick Rule used to pick a part (i.e. by Find Next Part) during program play, an Actinav program can use UR If or ElseIf node(s) to proceed conditionally depending on the selected Pick Rule.
e.g.:
If Current_Pick==”Pick_Rule_1” (notional representation)
<Do stuff and place the part a certain way>
ElseIf Current_Pick==”Pick_Rule_2”
<Do other stuff and place the part a different way>
Functionality:
The feature enables the user, after Do Pick, to check for the Pick Rule that was used to pick the current part, against the names of the Pick Rules, using UR If and ElseIf nodes. A predefined variable (‘Current_Pick’) is automatically created by Actinav when a new program is created. During runtime, it's value is assigned the name of the Pick Rule used for picking the current part. In this way it can be compared against any Pick Rule name in the conditional expression of a UR If or ElseIf.
For example:
Pick And Place Loop:
Pick And Place Rules
Top Pick
Barcode Side Pick
Clear Side Pick
Home Position
Find Next Part
Do Pick
If Current_Pick=="Top Pick"
Do Place
.....
ElseIf Current_Pick=="Barcode Side Pick"
Do Place
.....
Else
(Assume this is the clear side, by default)
Do Place
.....
Comments/Notes:
- You will only be able to use this feature in programs that were newly created in Actinav 1.1.3 and beyond. If you take a program that was created in a previous release and load it into Actinav 1.1.3 you will not be able to use this feature.
- The variable 'Current_Pick' is automatically created for ActiNav programs and can be selected from the “Variable” menu in the UR If/ElseIf expression editor.
- The user will need to type in the name of the chosen Pick Rule on the right-hand side of an If or ElseIf node's expression exactly as it is named in ActiNav.
- Using the UR If/ElseIf node enables the user to make full use of the nodes' expression's ability to contain compound expressions - e.g.: If [Current_Pick == "Top Pick" and D[0] == true]
- If the user finds Current_Pick or the Pick Rules' names to be too inconvenient to type, they can always assign them to variables in the program:
- current_pick’s value is updated upon entering pre-pick so it can be used in a conditional at that time but no earlier.