What it is: TaskCanvas flow is the flowchart logic that governs the order that blocks execute in a task. Whereas all blocks have a green path, some have both a green and red path, and some of those require the use of the red path to take full advantage of the block's purpose.
Timed and counted loops
- Both the count block and timer block require use of the red path to serve their intended purpose.
- For the count block, the flowchart will follow the red path whenever the count value is below the maximum defined value; for the timer block, the flowchart will follow the red path whenever the timer is below the defined value. Once both blocks reach their maximum value, they will follow the green path once and then reset their value and bring following the red path again.
- In order for the timed loop to stop when the timer runs out, the end of the loop must connect back to the timer block. A timer loop will not stop when the timer runs out until the next time the block executes.
- A count block to 2 will act as a switch that changes direction every time the black executes. The first time, it will go to the red path, the second time to the green path, then alternate indefinitely.
- Set the "reset on complete" value to OFF to make the block not reset its value after it follows the green path. In this mode, it will follow the red path up to the specified value, then only follow the green path.
Wait for user input
- Both PLC input and Wait for Force blocks can be set to repeat indefinitely until they receive external input.
- Connect the red paths of these blocks back onto themselves to create an indefinite loop. So long as the PLC block doesn't see the specified input or the Wait for Force block doesn't feel the specified force, they will continue to execute repeatedly.
- When the specified input is received for either block, they will immediately follow the green path.
Force motions and repeats
- Any move/jog block with "enable contact" set to ON will follow the red path when the contact is felt by the end effector.
- If a move with force block does not have a block along its red path, the task will return FAILED when the force is felt because the red path for the block will not have any action to execute.
- Force motions can be used as checks or decision points on a flowchart, for example checking if a part fit into a chuck or collided with the surface.
- A force repeat is a function a function that repeats to itself when feeling force. For this function, program an action along the red path of the move with force block and connect that action back to the move with force block. For example, a move with force that will follow the green path when the waypoint is reached (part inside chuck), but if the part hits the surface of the chuck, the red path has a jog in the opposite direction, resends the PLC signal to open the chuck, and then connects back to the move with force to try again. Program a count block into this loop to make the repeat execute a certain number of times before notifying the operator with a breakpoint.