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 6 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

Possible values

Example

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