Using Signals and Variables

Jump to: navigation , search

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

  1. Start by clicking the Device Editor in Intera Studio.
  2. On the Device Editor, press the + icon to create a new device.
  3. Signals Variables Device Configuration.png

  4. Choose the appropriate type of device (MODBUS or TCP/IP). In this case, the Moxa E1212 is a MODBUS Device.
  5. Modbus.png

  6. Fill out the Name, IP Address, Input and Output details and press save.
  7. Modbus1.png

  8. After saving, if the robot and the device establish communication, the status icon will be green next to your newly configured device.
  9. Modbus2.png

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.

Signalson device.png

User Variables

  1. Create a user variable called Current Part Count.
    Signals Variables Create Current Part Count.png
    Signals Variables Panel Current Part Count.png

Loop Task Until Part Count is Satisfied

  1. Insert a LoopIf 5 1.png Loop If node into the task.
  2. Set the conditional Current Part Count <= 100. The LoopIf 5 1.png Loop If node will run as long as the current part count is less than 100.
    Signals Variables Loop If 100.png
  3. After the place location, for example, add a SetTo 5 1.png Set To node and set the Current Part Count to increment. After each place, the part count will increment.
    Signals Variables Loop Increment Part Count.png
  4. As the task is running, the User Variables Panel can be opened to watch the part count accumulate.
    Signals Variables Loop Increment Part Count View.png

Alternative Approach

  • A user variable called Part Count could be created with a default start value of 100
  • The SetTo 5 1.png Set To node could be set to decrement Part Count
  • The LoopIf 5 1.png 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.

  1. Assume a Pick and Place sequence has been created (Train By Demonstration Basic Pick and Place is used in this example).
  2. Create a Machine Cycle Sequence 5 1.png Sequence node.
  3. Insert a SetTo 5 1.png Set To node and set Machine Cycle Start to true.
    Signals Variables Loop Machine Cycle Start.png
  4. Insert a WaitUntil 5 1.png Wait Until node and set Machine Cycle Complete == true.
    Signals Variables Loop Machine Cycle Wait Until.png
  5. Create the pick and place to unload the machine (Train By Demonstration Basic Pick and Place is used in this example).
  6. Create a SetTo 5 1.png Set To node to increment Part count, assuming the LoopIf 5 1.png Loop If node will loop until 100 parts completed.
    Signals Variables Loop Machine Cycle Increment Part Count.png

Simple Force Initiated Action Using a Wait Until

In this example, a simple pick is combined with a WaitUntil 5 1.png 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.

  1. Create a series of MoveTo 5 1.png Move To nodes for a approach and a pick location.
  2. Insert a WaitUntil 5 1.png Wait Until node and define the condition Force.z(measured) >= 4 N (for example).
  3. Create the grip signal SetTo 5 1.png Set To node, a retract MoveTo 5 1.png Move To nodes, and a place sequence.
    Signals Variables wait until measured force.png

Best Practices

In the initialization sequence in addition to creating safe poses and registering Landmarks, a SetTo 5 1.png Set To node can be inserted to reset all signals to a default state, for example, grippers open and part counts to zero (0).

Signals Variables Initialize Reset Variables.png