Model Block Instance editor

The Model Block Instance editor represents the instances of the class object. The instance editor derives all the pin definitions from the class object and enables the user to create pin connections between different instance objects.

Using instance editor, you can do the following:

  • Assigning a device
  • Assigning variables
  • Assigning endpoint
  • Clear broken connections

Assigning a device

In the instance editor, first select the virtual device from the ‘Assigned Device’ drop down. No changes are allowed to the object or in the editor until the user selects the ‘Assigned Device’.

Assigning variables

Variables defined in ‘IO mapping’ or as global variables are created as pins in the model block class object. The user can assign the variables using the inline editor or by using the Assign Variable button.

  • To assign variables in the inline editor, enter the variable name in the ‘Variable’ column.
  • To assign variables using ‘Assign Variable’ button, click Assign Variables to show a dialog containing all IO mapping and global variables of the corresponding device. Select the required variable and click OK. Connect Variable indicates a variable associated with connected endpoint.
  • Only variables which match the direction and type of a pin are available for mapping. In case of any incorrect data, an error is displayed in the Variable column.

Note

Use the Refresh button to fetch if the user makes any changes to variables, either using IO Mapping tab or using a Codesys application.

Assigning endpoint

Defines the instances and pin connections (Source Block and Source Pin for inputs and Sink Block and Sink Pin for outputs). The user can assign endpoints using Inline editor or by Assign Endpoint button.

  • To assign instances and pin connections in an Inline editor, enter the value in Source Block and Source Pin for inputs and Sink Block and Sink Pin for outputs or click on drop-down which displays the list of instances and pins.
  • To assign instance and pin connections, click Assign Endpoint which displays the endpoint selection dialog. Select the required instance or pin and click OK.

Clear broken connections

The Clear Broken Connection clears all the broken source block instance and pin connections between Model Class objects. If there are any broken connection, the cell is indicated with an error icon. When an instance associated with any mapped signal is deleted, it will generate broken signal.