This tutorial provides a detailed instruction of how to use Signals and Variables.
Contents
- Contents
- Getting Started
- Configure a Device
- Create Signals and User Variables
- Loop Task Until Part Count is Satisfied
- Machine Tending: Receiving Inputs and Sending Outputs
- Simple Force Initiated Action Using a Wait Until
- Best Practices
Getting Started
Configure a Device
In this example, External Device will be the name of the device that is being newly configured. This device is a Moxa E1212 with 8 inputs (0-7) and 8 outputs (0-7).
- Start by clicking the Device Editor in Intera Studio.
- On the Device Editor, press the + icon to create a new device.
- Choose the appropriate type of device (MODBUS or TCP/IP). In this case, the Moxa E1212 is a MODBUS Device.
- Fill out the Name, IP Address, Input and Output details and press save.
- After saving, if the robot and the device establish communication, the status icon will be green next to your newly configured device.
Create Signals and User Variables
Signals
The Signals Panel will populate with all of the inputs and outputs for each of the individual devices that were specifically configured. When setting up the External IO device above, 8 inputs (lines 0-7) and 8 outputs (lines 0-7) were created. All 16 signals will be automatically created and populated in the signals panel.
To edit the name or default value of a signal, click the edit icon next to the signal that needs edit.
User Variables
Create a user variable called Current Part Count.
Loop Task Until Part Count is Satisfied
- Insert a Loop If node into the task.
- Set the conditional Current Part Count <= 100. The Loop If node will run as long as the current part count is less than 100.
- After the place location, for example, add a Set To node and set the Current Part Count to increment. After each place, the part count will increment.
- As the task is running, the User Variables Panel can be opened to watch the part count accumulate.
Alternative Approach
- A user variable called Part Count could be created with a default start value of 100
- The Set To node could be set to decrement Part Count
- The Loop If node conditional would be Loop If Part Count != 0
Machine Tending: Receiving Inputs and Sending Outputs
In this example, a simple machine tending load and unload task will be described. The robot will send an output to the machine to start the cycle. When the cycle is complete the machine will send a signal to the robot (input) to unload. The task will loop until part count equals 100.
- Assume a Pick and Place sequence has been created (Train By Demonstration Basic Pick and Place is used in this example).
- Create a Machine Cycle Sequence node.
- Insert a Set To node and set Machine Cycle Start to true.
- Insert a Wait Until node and set Machine Cycle Complete==true.
- Create the pick and place to unload the machine (Train By Demonstration Basic Pick and Place is used in this example).
- Create a Set To node to increment Part count, assuming the Loop If node will loop until 100 parts completed.
Simple Force Initiated Action Using a Wait Until
In this example, a simple pick is combined with a Wait Until node which is used to wait until the robot measures a specified amount of force. Once the robot measure the force it will proceed to the next node in the behavior tree. The robot will be waiting in a pick position. Once the force is measured, it will pick and then continue on to the place.
- Create a series of Move To nodes for a approach and a pick location.
- Insert a Wait Until node and define the condition Force.z(measured)>= 4 N (for example).
- Create the grip signal Set To node, a retract Move To nodes, and a place sequence.
Best Practices
In the initialization sequence in addition to creating safe poses and registering Landmarks, a Set To node can be inserted to reset all signals to a default state, for example, grippers open and part counts to zero (0).
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article