Note |
---|
If you have not read the information explaining the custom path feature, then please refer to this page before reading onwards: Customize the Robot's Path |
...
Table of Contents | ||
---|---|---|
|
...
In Short: TaskCompleted
TaskCompletedA boolean value that controls whether the main Pally program should proceed to the next box position on the pallet, or repeat the same box position again. This is useful in the following scenarios:
The variable should be controlled by the user code in the beforeRelease-callback if required: Possible values
The default value is True unless lost vacuum is reported by the “vacuum lost” signal. Example
|
In Detail: TaskCompleted
The boolean variable TaskCompleted
is used to verify that the robot has placed box(es) on the pallet, and the program can proceed to the next position or not.
It is possible to manually set the value for this variable, which should then be done in the beforeRelease-callback.
Pally will set TaskCompleted
(to either True
or False
) based on if it detects sufficient vacuum level in the gripper before it releases the box. This, as the vacuum level in the gripper will signal to Pally that the gripper is lifting a box (i.e a successful run). If the vacuum level in the gripper is low, then it signals that there is no box present on the gripper (i.e an empty run).
Gripper Configuration for TaskCompleted
The signal that is used to check the vacuum level in the gripper, and subsequently set the value for TaskCompleted
, is set in the Pally installation node. It is the Vacuum lost-signal in the Gripper → Input/Output tab:
...
The signal for ‘Vacuum lost' is used by Pally to check the vacuum in the gripper
If the gripper in use does not have a vacuum sensor, set the Vacuum lost-signal to -Always-LOW- in the Pally installation node (see screenshot above). In this case, Pally will always set TaskCompleted
to True.
If the gripper does have a vacuum sensor, then a digital input should be set for the Vacuum lost-signal. Examples of grippers that have vacuum sensors are:
Schmalz FXCB - Foam
Schmalz FXCB - Suction cups
Whenever one of the Schmalz grippers is selected as the gripper type in Pally, the Vacuum lost-signal is automatically set to the digital input that corresponds to the vacuum lost signal for that gripper. In the Schmalz case, there is a sensor that detects if vacuum is present, not lost. Therefore, to make the logic correct in Pally, the signal for vacuum lost with one of the supported Schmalz grippers is inverted (see screenshot below).
Note |
---|
If a Schmalz FXCB gripper is used, make sure that the vacuum switch in the gripper is configured properly for the boxes that will be used - specifically the switching point (SP2) and reset point (rP2) values. This, to make sure that the signal for vacuum lost is reliable. Refer to the user manual for Schmalz’s vacuum switch here: Operating instructions for the vacuum switch VSi 30.30.01.00956. |
...
An example showing how the ‘Vacuum lost’ signal is automatically set to ‘tool_in[1]’ when the gripper type is set to ‘Schmalz FXCB - Foam’.
Info |
---|
It is possible to manually set the the Vacuum lost signal even if a Schmalz FXCB gripper is selected, this is done by checking the Edit-checkbox in the Input/Output-tab for the gripper configuration (as seen in the screenshot above). |
If you have a gripper with a vacuum sensor, and it is not a Schmalz FXCB gripper, then select the Custom vacuum gripper-type in the Pally installation node. It is then possible to assign a digital input for the Vacuum lost-signal as you please.
...
An example showing how the ‘Vacuum lost’ signal can be manually set when the gripper type is set to ‘Custom vacuum sensor’
Logic in Pally Code for TaskCompleted
The logic in the Pally code gives more insight as to how the TaskCompleted
variable is used and altered:
Code Block | ||
---|---|---|
| ||
global TaskCompleted = HasVacuum()
# USER CALLBACK
usercallback_beforeRelease()
# control the gripper, turn off vacuum
ReleaseBox()
if (TaskCompleted):
# box has reached the pallet, can proceed to next box
SetCurrentTaskCompleted()
else:
# box has not reached the pallet, repeat last position
CancelCurrentTask()
end
# USER CALLBACK
usercallback_afterRelease() |
The logic in the Pally code shows how the TaskCompleted
is set based on the vacuum level (but it can also be overwritten in the beforeRelease-callback), and then used to verify if boxes were moved or not
As shown in the code snippet from above, setting the TaskCompleted = True
in the beforeRelease-callback, will ensure that all movements of the robot are treated as successful runs - where Pally assumes that the boxes in the current task have been placed on the pallet. If TaskCompleted = False
after the beforeRelease-callback, then Pally will not count the current task as completed. This will lead to Pally re-trying to place the box(es) in the current task.
Info |
---|
Please note: the TaskCompleted variable cannot be used along the path from the pick position towards the drop position. The first callback where TaskCompleted has a valid value is BeforeRelease. |
Info |
---|
Please note: even if a box is lost on the way from the pick position to the drop position, the robot will continue its motion to the drop position. Vacuum sensor is not being monitored constantly along the path. To do this, you can create your own thread and monitor the vacuum sensor input directly. |