How do I set up an MPC block simulation?

It is recommended that simulations are performed on a copy of the live project, rather than on the project itself. This ensures that any changes made for simulations are not brought into the real-time system. To do this:

  • Create a copy of the original project and rename it
  • Delete any configuration present on Actuation or Measured Signals on Channel 1 and Channel 2
  • Deselect ”Auto?” for any program or script that write values to any signal you will be simulating (these will be the signals present within the simulator Block)

Step 1. Import a model to create an MPC Block if one does not already exist in your project.

  • Click on File -> Open Model -> Create a Block -> Automatic.
  • Select the required MPC model (.mmod file) in the resulting window and click "Open"

Step 2. Import a model to create a Plant Simulator Block. You can use the same block to import as in Step 1.

  • Click on File -> Open Model -> Use for Simulation -> Automatic
  • Select the same .mmod file and click "Open".

Step 3. Setup “Simulation Speed Up” (this allows you to run your simulation faster than your normal project) and Start Sampling the Project.

  • If required, the simulation can be sped up by clicking on Edit -> System Intervals button and setting the "Simulation Speed Up Factor" value. It is recommended that the minimum interval (after speed-up) is greater than 1 second.
  • Click on the "Start Sampling" to start sampling.

Step 4. Set the MPC controller to Ready.

The first step to initialise the MPC depends on how the MPC block is configured. Right click on the MPC block -> Overview. In the overview page go to the Interface tab and verify the Configuration column for Process Level In, Controller Status Out, MPC Request In and MPC Confirm Out.

  1. If there is “none” in the Configuration column, go to the View All Blocks page, select the Status of the MPC block, it will open a window where Initialise can be selected.
  2. If there are signals configured on the Configuration column of the Overview page, set the Process Level In signal value to 1 and the MPC Request In signal value to 1

After step (1) or (2) the APC status on the overview page of the MPC block should have: Auto, Request and Confirm.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Article is closed for comments.
Powered by Zendesk