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

Quick start guide : Update a model on FPGA using the Schematic Editor

The following guide will show how to edit a model on Schematic Editor and use it in a different configuration setup with the different driver options.

Update flow for SFunction Driver

Editing the model

Click on Edit the model in the Preparing and Compiling pane.

image2022-4-11_14-42-46.png


Double click on the eHS OpalBoards Drivers block to open the Boost2lvl FPGA-Based circuit using the OPAL-RT Schematic Editor.

Once inside the OPAL-RT Schematic Editor, modifications can be made to the model that will be simulated on eHS. In this example, a measurement will be added and the simulator used for the simulation will be changed from a OP5700 to a OP4510.

Add a voltage measurement measuring Vin.

Editing the simulator setup

Open the Simulator Setup by clicking the Open Simulator Setup button at the bottom. Once opened, create a new setup to use a OP4510 and select the license class and firmware to use.


Once the new setup is created and selected, the connections for the Digital Inputs must be re-mapped.

  1. Click on the second gate input of arm1
  2. Expand the input mapping view by pressing the blue arrow
  3. Add a new input source for the second gate input g2 of arm1
  4. Connect the input to DI1 with a high polarity

Repeat these steps but for arm2 with DI2, arm3 with DI3 and arm4 with DI4 with polarities both High and Low respectively for the first gate g1 and second gate g2

Updating the simulink model

With the new Simulator Setup selected, save the model and return to Simulink and exit the OPAL-RT Schematic Editor. Press the CTRL+D to launch the Simulink model initialization and notice the new output pin V_in.

Connect this new output pin to the bus creator and add a scope to your sc_ console to view the results of that new measurement.

Notice also the OpCtrl block has automatically updated the board type and firmware based on the one chosen inside the OPAL-RT Schematic Editor from VC707 (OP5707) to TE0741 (OP4510).

Finally, if needed, update the DataIn port number inside the Digital_Out subsystem to the correct number inside the .conf file associated to this firmware. In this case, it will remain the same at 11.

Run the simulation

The model is now ready to be run on a OP4510 target with the new connections re-mapped to new this hardware and firmware setup.

Update flow for Opalboards driver

Editing the model

Click on Edit the model in the Preparing and Compiling pane.

image2022-4-11_14-42-46.png


Double click on the eHS OpalBoards Drivers block to open the subsystem  mask and click Edit to open the Boost2lvl FPGA-Based circuit using the OPAL-RT Schematic Editor.


Once inside the OPAL-RT Schematic Editor, modifications can be made to the model that will be simulated on eHS. In this example, a measurement will be added and the simulator used for the simulation will be changed from a OP5700 to a OP4510.

Add a voltage measurement measuring Vin.

Editing the simulator setup

Open the Simulator Setup by clicking the Open Simulator Setup button at the bottom. Once opened, create a new setup to use a OP4510 and select the license class and firmware to use.

Once the new setup is created and selected, the connections for the Digital Inputs must be re-mapped.

  1. Click on the second gate input of arm1
  2. Expand the input mapping view by pressing the blue arrow
  3. Add a new input source for the second gate input of arm1
  4. Connect the input to DI1 with a high polarity

Repeat these steps for arm2 with DI2, arm3 with DI3 and arm4 with DI4 with polarities High and Low respectively for the first and second gate.


Updating the simulink model

With the new Simulator Setup selected, save the model and return to Simulink and exit the OPAL-RT Schematic Editor. Press the Load circuit button to load the modifications and notice the new output pin V_in.

Connect this new output pin to the bus creator and add a scope to your sc_ console to view the results of that new measurement.

Editing the opalboards driver

Now that the modified model is loaded, return to RT-LAB and open the OPAL-RT Board view and change the Chassis type to OP4510.

Now select the same firmware that was selected in the Simulator Setup in the OPAL-RT Schematic Editor.

Once the correct firmware is selected, the Digital Inputs connections need to be re-mapped inside Opalboards.

  1. Open the Configuration view and split the window with OPAL-RT Board view and the Configuration view
  2. Select the Slot 1B - Digital out in the Folders of the OPAL-RT Board view
  3. Enable the digital outputs of Slot 1B and set the Data type to Pulse width modulated
  4. In the Configuration view, connect the following OpInputs & OpOutputs PWMOut_Ch00's Frequency (0) and Duty cycle (1) to Digital out Channel 0
  5. Repeat previous step for Channels 1, 2 and 3 with PMWOut_Ch01, PMWOut_Ch02 and PMWOut_Ch03 respectively

Run the simulation

The model is now ready to be run on a OP4510 target with the new connections re-mapped to new this hardware and firmware setup.

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