Using Signals and Variables

Created by Rico Stodt, Modified on Tue, 1 Feb, 2022 at 2:56 PM by Rico Stodt

This tutorial provides a detailed instruction of how to use Signals and Variables. 


Contents


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.


Signals Variables Device Configuration.png


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


Modbus.png


  • Fill out the Name, IP Address, Input and Output details and press save.


Modbus1.png


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


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


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


  • Insert a LoopIf 5 1.png Loop If node into the task.
  • 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


  • After the place location, for example, add a SetTo 5 1.pngSet 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



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.


Signals Variables Loop Machine Cycle Start.png



Signals Variables Loop Machine Cycle Wait Until.png



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.pngWait Until node and define the condition Force.z(measured)>= 4 N (for example).
  3. Create the grip signal SetTo 5 1.pngSet To node, a retract MoveTo 5 1.pngMove 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

 

 


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article