Generating system model

System Modelling allows you to generate System Model for Drives and I/O devices which can be readily used for Virtual System Testing.

  • System Model generation is only implemented for AC500_Product_Name V2 products.
  • Deleting one node of a generated System Model will result in the entire System Model being deleted.
  • Symbols are exposed for the devices which are used in System Model generation.
  • It is recommended that the manual changes should not be made to any generated objects.
  • If any changes are made to the devices which have a System Model, it is recommended to use ‘Update System Model’ command to keep the System Model up-to-date.

The System Model generation commands can be found in the context menu of a System Model object in the device tree.

  • Generate System Model for Drives
  • Generate System Model for I/O
  • Update System Model

Generating System Model for Drives

To generate System Model for the Drives, the user has to configure Automation_Builder project with profibus or profinet drive and minimum of one variable mapping. To expose the symbols of a device, launch IEC 61131-3 editor application and generate the symbol file.

The command will generate a System Model for one or more selected drives.

  1. Right-click on System Model node and select System Modelling ‣ Generate System Model for Drives.

    ../_images/f71ebf7df18079df0a317f347112d32f
  2. Select the desired PLC from the drop-down list and select the Drive and click OK to generate a System Model.

    The System Model is generated for the selected device(s). You can see multiple nodes are been added to the device tree under the System Model node.

    • Two Class and two Instance objects are generated for each device selected for generation.
    • The Drive Class object contain pin definitions for all the mapped variables on the selected device.
    • The Drive Instance object contain information about which pin/variable is mapped to the PLC Instance.

The PLC instance will contain exposed variables and the Drive instance will contain internal drive variables (FBAdatain/FBAdataout), but with the pin directions reversed. (for example, If the drive has an input variable ‘var’ mapped, the PLC equivalent will have an output variable ‘var’ mapped). At this point, the System Model is successfully generated and is ready for use in Virtual System Testing.

Generating system model for I/O

To generate a System Model for I/O device, the user has to create an I/O device minimum of one variable mapping. The same type of device have to exist under the virtual PLC and have variable mappings with the same names and types but in opposite directions.

The command will generate a System Model for one or more selected I/O devices.

  1. Right-click on System Model node and select System Modelling ‣ Generate System Model for I/O.

    Generate System Model dialog shows the devices which are suitable for generating System Model.

    ../_images/98ba287bff6fba9f0a317f3419deb111
  2. From the drop-down list, select the real and virtual PLCs which displays the I/O devices that are associated with the real PLC.

    The System Model for I/O devices are generated successfully.

Two Class and two Instance objects are generated for each device. One Real Class and Instance, and one Virtual Class and Instance. It is possible that the generation of a System Model can fail or generate warnings or errors. See sections Generating system model and Generating system model.

The Class objects contain pin definitions for the variables which are in real and virtual devices. The Instance objects contain the information of pin mappings.

Update System Model

Update System Model command updates all the existing System Models to reflect the current state of the devices.

  1. Right-click on System Model node and select System Modelling -> Update System Model to update the System Models.

  2. Confirm an upcoming message with OK.

    Any manual changes made to the existing generated System Models are overwritten and they are updated to reflect the information contained within the devices.

Warnings

When a System Model generation is failed due to the selected device with no variable mappings, a warning ‘Model not generated for device: No variable mappings found’ is displayed.

The device should contain minimum of one variable mapping to generate a System Model.

Errors

When a System Model is generated for a device which does not have the symbols exposed, an error ‘The required symbols are not exposed. Please generate the symbol file for device x’ is displayed.

The System Model can be generated without exposing the symbols. However, you cannot use in Virtual System Testing until the symbols of the device are exposed.