Creating IOs

You can create IOs at the resource level or inside a task.

This task shows you how to:


Before you begin: To perform this procedure, you must have an organizational resource containing a robot, a tool device, or a human.

Create a Resource IO

You can associate IOs to a resource.

  1. Select a resource and open the Sequencing tab.
  2. From the commands at the bottom of the panel, click Create a Resource IO .
    The Global IO dialog box appears.

    If Array field is empty, it is a simple variable, otherwise it is an array.

    This gives the capability to model arrays in Behavior modeler and access dynamically to data members using evaluated indexes.

    Var Array [3];

    Array[index] := Array[index-1] + 1;

    If (Array[index] == 6) ….

    Array definition format:

    [ <d1>, <d2>, <d3>, <d4>] (indexing={<d1b>,<d2b>, <d3b>, <d4b>})

    Where:

    • <di>: is the size of a degree. The maximum number of degrees is limited to 4.
    • <dib>: is the 0/1 based indexing. Indexing declaration is optional, and default indexing is 1.

    If indexing is declared, declaration must done for every degree.

    Example:

    [10]: Array with 1 degree and 10 items. Indexes between 1 and 10.

    [2,3]:

    • Array with 2 degrees and 6 items.
    • Indexes for 1st degree between 1 and; 2.
    • Indexes for 2nd degree between 1 and; 3.

    [2,3] (indexing={0,1}):

    • Array with 2 degrees and 6 items.
    • Indexes for 1st degree between 0 and; 1 (0 based).
    • Indexes for 2nd degree between 1 and; 3 (1 based).

    Default value format:

    When a variable is declared as an array, it is possible to give a default value.

    The format is similar to C++, using closing and; opening braces.

    Example:

    [10]: {1,2,3,4,5,6,7,8,9,10}

    [2,3] or [2,3] (indexing={0,1}): {{“A”,”B”,”C”},{“D”,”E”,”F”}}

  3. Provide the parameters to create a Boolean output, and click OK.
  4. Click the black arrow to expand Resource Entities and select the IOs tab.


    The new output is listed in the IOs tab.

Create a Local IO

You can create a IO as a task parameter.

  1. Select a task.
  2. Right-click the task and select Edit.
    The Sequencing Editor appears. At the bottom of the Usable frame, the commands to create local entities are available.
  3. Click Create IO .
    The IO dialog box appears.
  4. Provide the parameters to create a Boolean output and click OK.
  5. In the Usable frame, expand the content of the IOs row.

    The new IO is now available to be used in the Sequencing Editor.

    Tip: If the IO has been defined at the resource level, it appears in the list prefixed by the resource icon.

Create a Group IO

You can group IOs that combine the signals from multiple of a device’s IOs. The group combines the Boolean IOs into an integer value. In your program logic, you can get or set the Boolean values individually or get or set them as an integer using the group.

  1. Select a resource that already has a Boolean IO and open the Sequencing tab.
  2. From the commands at the bottom of the panel, click Create a Group IO .
    The Group IO dialog box appears.
  3. Provide the parameters to create a Group Input or Output and click OK.


    If Array field is empty, it is a simple variable, otherwise it is an array.

    Using Array - Group definition format (simple variable):Group must defined between closing and opening parenthesis. Every item are to be separated using commas. A group can contain simple variables, array items, or a range of items.

    (IO1, IO2, IO3): case of simple IOs. The group is composed of IO1, IO2, IO3.

    (IO[1], IO[2], IO[3]): case of array items. The group is composed of IO[1], IO[2], IO[3].

    (IO[1]-IO[3]): case of range. The group is composed of IO[1], IO[2], IO[3].

    And it is possible to mix, simple IOs, array items and ranges.

    (IO1, IO2, IO3, IO[1]-IO[3], IO[4], IO[5])

    Group definition format (array):

    When a group is declared as an array, it is necessary to give a group composition for every item. This is done using closing and opening braces similar to the Default value format.

    Example:

    GIO[2] { (IO[1]-IO[5]) , (IO[6]-IO[10]) }

    • The first group item is composed of: IO[1], IO[2], IO[3], IO[4], IO[5]
    • The second group item is composed of: IO[1], IO[2], IO[3], IO[4], IO[5]



  4. Expand the Resource Entities at the bottom of the panel.

    The new Group IO is listed in the groups tab.

  5. Double-click in the Group column to enter the names of the IOs you require to group, with the names of the IOs separated by commas and the full list enclosed in parentheses.