Skip to end of banner
Go to start of banner

TaskCompleted

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

If you have not read the information explaining the custom feature, then please refer to this page before reading onwards: Customize the Robot's Path

This page gives a short overview of the variable TaskCompleted; and then a more in depth look at how the variable can be used in Pally:


In Short: TaskCompleted

TaskCompleted

A boolean value that Pally updates based on the vacuum levels detected in the gripper. The variable is used to verify that the gripper has gripped the box(es) in the current task. If TaskCompleted = False after the beforeRelease-callback, Pally will assume that no boxes were carried from the pickup to the target position on the pallet, leading Pally to try this same position in the next run.

The user can override the value for TaskCompleted in the beforeRelease-callback. It is however recommend to let Pally handle the logic for this. See the ‘In Detail: TaskCompleted’ section on how to configure the gripper such that Pally gets reliable input to set TaskCompleted.

Possible values

  • True - Sufficient vacuum level has been detected in the gripper, i.e the box(es) have been gripped; or the gripper does not have a vacuum sensor.

  • False - Insufficient vacuum level has been detected in the gripper, i.e the box(es) have not been gripped.

Example

There are two cases for TaskCompleted:

  1. If a Schmalz FXCB Foam gripper is used, and the Vacuum lost signal is tool_input[1] - then Pally will verify that the vacuum is present by checking if the vacuum is not lost. Pally will use this information to set the value for TaskCompleted.

  2. If another gripper, that has no vacuum sensor is used, then leave the Vacuum lost signal at -Always-LOW. Pally will then always set TaskCompleted to True.

Regarding example 2, this may cause Pally to believe that a box has been placed on the pallet, even though the box was lost on the way due to insufficient vacuum.

In Detail: TaskCompleted

The boolean variable TaskCompleted is used to verify that the robot has placed box(es) on the pallet, such that empty runs are not counted as successful runs. Even though it is possible to manually set the value for this variable, which should then be done in the beforeRelease-callback, it is recommended to let Pally handle the logic to set the value of TaskCompleted.

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).

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’.

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:

# Checks the vacuum level before releasing box
has_vacuum = HasVacuum()
global TaskCompleted = has_vacuum

# USERCALLBACK
usercallback_beforeRelease()

ReleaseBox()

if (TaskCompleted):
  LOG_INFO("box released: ", rf_cntPos)
  SetCurrentTaskCompleted()
else:
  if (not has_vacuum):
    LOG_WARNING("vacuum not detected, retrying box: ", rf_cntPos)
  end
  CancelCurrentTask()
end

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.

  • No labels