Documentation Home Page HYPERSIM Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

ABB PS935 | Configuration

The ABB PS935 driver is configurable either through HYPERSIM's graphical user interface or through the legacy workflow using the .io file. The two methods are equivalent and will produce the same results. Choosing one method or the other is a matter of the user's preference.

Configuring Using The Graphical User Interface

Accessing The I/O Interface Configuration

The ABB PS935 interface can be configured in the I/O Interface Configuration tool that can be opened from the HYPERSIM ribbon.

For more information on the general use of the I/O Interface Configuration, read here.

General Configuration

The ABB PS935 driver is configured within a single page.

MAC address

The identifier of the physical ABB PS935 device being configured

Count digital in

Number of binary values sent from HYPERSIM to the device

Count digital out

Number of binary values received by HYPERSIM from the device

Count float in

Number of floating point values sent from HYPERSIM to the device

Count float out

Number of floating point values received by HYPERSIM from the device

Board execution mode

Select whether the driver works in hardware loop-back mode, software loop-back mode or no loop-back at all.

The no loop-back option is the one that needs to be used in order to interface with the equipment connected to the ABB PS935 device. The way the data exchanged with HYPERSIM is consumed depends on the firmware programmed in the device. In other words, the driver uses the memory space specified by ABB (considered as default mode).

The hardware loop-back option exchanges data with the ABB PS935 device, and is therefore meant to ensure the correct setup and function of the device, if necessary. The driver uses the same memory space for writing and reading (considered as test mode for internal loopback).

The software loop-back option does not make use of the ABB PS935 device, instead it emulates the board. This mode allows to test the HYPERSIM model setup without any boards.

Possible options are:

  • No loopback

  • Loopback HW

  • Loopback SW

Configuring Using The .io File Workflow

The ABB PS935 I/O interface also offers the possibility of using the legacy file system for configuration.

It needs two configuration files to be able to work properly in HYPERSIM:

  • the .io file

  • the driver configuration file

For sake of simplicity, this document will use the following names: PS935.io for the .io file and PS935_cfg.opal for the driver configuration file.

Note that these files exist only on the simulator. Therefore, editing them requires access to the simulator's file system and console. In order to achieve that, please follow this knowledge base article: https://www.opal-rt.com/support-knowledge-base/?article=AA-01044.

PS935.IO

This file lists a series of important details needed by the HYPERSIM simulation. The name of the .io file must be specified in the hyServMain.cfg file (found at /export/local/ssr/hyconfig) with the line:

IOFILE PS935.io

The file has three main sections, named as follows: [HARDWARE_DIL], [MAPPING] and [SENSORS_DIL]. Below is an explanation of how these sections must be completed in order to use the ABB PS935 driver in your simulation.
First of all, the [HARDWARE_DIL] section lists the drivers that will be used in the simulation. For the PS935 driver to be included, the section should look as follows:

[HARDWARE_DIL] !Tag Type Identification IOMode Config !--- ---- -------------- ------ ------ opal_1 PS935 0xeace4474 1 export/local/ssr/hyconfig/PS935_cfg.opal

Each entry (line) is composed of 5 items :

  • Tag: Label used to refer to the current hardware. You can choose the tag name as you wish; this tag is used to identify the driver further down in the next sections of the .io file.

  • Type: Main hardware’s type. “PS935” = ABB PS935.

  • Identification: ID to differentiate identical hardware. For ABB PS935, this ID represents the device's MAC address. Therefore, the identification column must contain the MAC address of the PS935 device being configured; here as an example it is set to 0xeace4474. 

  • IOMode: 1 = Send IOs with a step delay; 3 = send IOs after computation. Should be the same for all IOs on the same core of a given system.

  • Config: The config column must contain the full path to the configuration file of the driver.

The [MAPPING] section binds the tags defined in the section described above to cores of the simulator. Example:

[MAPPING] !Tag Node !--- ---- opal_1 1

Each entry (line) is composed of 2 items :

  • Tag: Label referring to specific hardware (defined in [HARDWARE_DIL]).

  • Node: The core number bound to this hardware.

Note that it is possible to assign multiple cores to hardware defined in [HARDWARE_DIL].

Finally, the [SENSORS_DIL] section is used to bind sensors in the simulation to drivers identified with their tags.

You can make connections on different data points in this section. These data points are between the card and the driver and represent the values of the floating point and binary data.
Here is an example of the file:

Each entry (line) is composed of 5 items :

  • Type: Type of sensor: DA (F32), AD (F32), DO (bit), DI (bit)

  • Sensors: Range of sensor numbers linking to the connection points

  • Tag: Label referring to specific hardware (defined in [HARDWARE_DIL])

  • ConnectionPoint: Name of the connection point defined in the driver configuration file. PS935 publishes four types of connection points:

    • F32Out and F32In: for voltage and current values

    • BitIn and BitOut: for discrete values (switches’ position)

The file also contains a relative path to the PS935_cfg.opal file. This file is very important, as it is used to configure the driver, and is detailed below.

PS935_CFG.OPAL

This file is used to configure the driver. It describes the configuration of the connected PS935 device. Below is an example of this configuration file when the card is configured to work with a hardware loop-back.

Configuration parameters

countDigitalIn

Number of binary values sent from HYPERSIM to the device

countDigitalOut

Number of binary values received by HYPERSIM from the device

countFloatIn

Number of floating point values sent from HYPERSIM to the device

countFloatOut

Number of floating point values received by HYPERSIM from the device

loopbackMode

Select whether the driver works in hardware loop-back mode, software loop-back mode or no loop-back at all.

Possible options are:

  • 0: This value represents the no loop-back mode. This option is the one that needs to be used in order to interface with the equipment connected to the ABB PS935 device. The way the data exchanged with HYPERSIM is consumed depends on the firmware programmed in the device. In other words, the driver uses the memory space specified by ABB (considered as default mode).

  • 1: This value represents the hardware loop-back mode. This option configures the driver to exchange data with the ABB PS935 device, and is therefore meant to ensure the correct setup and function of the device, if necessary. The driver uses the same memory space for writing and reading (considered as test mode for internal loopback).

  • 2: This value represents the software loop-back mode. This option does not make use of the ABB PS935 device, instead it emulates the board. This mode allows to test the HYPERSIM model setup without any boards.

Programming The PS935 Device

Configuring the device in HYPERSIM is not enough to have a working setup. The ABB PS935 device must be programmed with the right firmware before attempting to run a simulation that interfaces with it.

There are certain constraints that apply to programming the device:

  • It cannot be done from the Windows host computer; it can only be executed on the OPAL Linux simulator

  • It is very important that the firmware (in the form of <file_name>.hex) corresponds to the version of the FPGA found in the PS935 device

  • The device's memory is volatile, therefore flashing after every PS935 power-up is necessary

  • Flashing is also necessary after a power-up of the OPAL simulator the PS935 device is connected to

  • If flashing has failed for any reason, the ABB PS935 device needs to be powered off then powered back on and the target it is connected to needs to be restarted (since during the power loss of PS935, the PCIe link between it and the target is lost). Once the power cycle sequence finished, programming the firmware can be re-attempted

  • Flashing only works once, after powering on the device. If for some reason the .hex file requires changing, you must power off the PS935, power it back on, reboot the simulator it is connected to and then re-attempt programming the firmware

Note that as the programming of the PS935 device is done strictly on the simulator, the operation requires access to the simulator's file system and console. In order to achieve that, please follow this knowledge base article: https://www.opal-rt.com/support-knowledge-base/?article=AA-01044.

The tool used to program the firmware on the PS935 device is called PS935Flasher. It is a small application that can be found here: /export/local/ssr/<hypersim_version>/<OS_version>/HyServer/bin/PS935Flasher. The exact location of the flasher tool can be determined by replacing the <hypersim_version> and <OS_version> placeholders.

In order to check the outcome of the flash command, one can read the content of the /var/log/message file or check the “OK” LED on the PS935.

How to Use the Flasher

There are multiple options for how to use the tool, depending on how many ABB PS935 devices need to programmed or when the programming occurs. These are detailed below.

Manually Load Firmware Using PS935Flasher

The commands described in this section must be executed as root. Before executing them, users must make sure to change directory (cd) to the Linux directory where the application is found. 

  • To load a firmware manually to a single card:

    The parameter following -macAddress is used to identify the PS935 device to be flashed by means of referring to its MAC address; the parameter following -file represents the absolute path to the firmware (.hex) file. In the example above, the firmware is in the same directory as the flasher executable

  • To load firmware manually to a list of cards:

    The parameter yourCustomConfig.opal is a file giving the flasher tool the information necessary about the PS935 devices to program and the firmware to use for each.

Here is an example of such a file:

Explanation:

  • there is one item per controller

  • the fileName element represents the firmware to program

  • the macAddress element represents the MAC address of the controller to be programmed with the fileName firmware

Note that there is nothing preventing having just one item in the list. In this case, the two flashing methods described above will be equivalent.

Users must pay careful attention to have the correct MAC addresses and firmware file names when executing the flasher tool.

The options used during the last manual load are saved in a file named defaultConfig.opal. This file can be found here: /export/local/ssr/<hypersim_version>/<OS_version>/HyServer/rt/lib/Data/Drivers/PS935/defaultConfig.opal.

Configure Firmware Loading at Startup

Seeing that the PS935 device needs to be programmed each time the simulator it is connected to has booted, users might find it useful to automate the process. This is especially relevant if the firmware rarely changes.

To automate the flashing process:

  • Edit /etc/rc.d/rc.local and add at the end of the file: 
    /export/local/ssr/<hypersim_version>/<OS_version>/HyServer/bin/PS935Flasher &
    Users must pay attention to correctly replace the <hypersim_version> and <OS_version> place-holders with the relevant information. When used in this manner, the default flasher configuration file will be used (defaultConfig.opal).
    Before starting to use this mode it is necessary to run the flasher application with a custom .opal file. This is so that the custom configuration can be recorded in the defaultConfig.opal file therefore ensuring that the default configuration contains pertinent information.

  • For using a custom .opal configuration file instead of the default one:
    /export/local/ssr/<hypersim_version>/<OS_version>/HyServer/bin/PS935Flasher  /path/to/file/custom.opal &
    Here too, users must pay attention to correctly replace the <hypersim_version> and <OS_version> place-holders with the relevant information.

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323