Simulink® with PLCnext Technology

Use Case

If you already use Simulink® for modelling, you might be eager to run these models on a PLCnext Control, monitor the values online, modify block parameters, and even operate your models together with other programs created in IEC 61131-3 or high-level languages like C++.

And of course you can do that!

From Day 1 of PLCnext Technology, there is an Add-on that can be implemented to the PLCnext Engineer (former PC Worx Engineer) and provides the Simulink® target for a range of Phoenix Contact controllers, including members of the PLCnext Control family.


Simulink® is a software program for the graphical, model-based development of dynamic systems, developed by The MathWorks, Inc.  This company is already famous for MATLAB® which provides a text-based simulation environment containing thousands of algorithms that you can also use with Simulink.

Models converted from Simulink® into code can be integrated into the PLCnext Engineer development environment using the PC Worx Target for Simulink software add-on by Phoenix Contact (product no. 2400041, downloadable free of charge for testing).

This enables the conversion of Simulink® models into device-specific code for use with Remote Field Controllers, e. g. RFC 4072S, and Axioline Controllers, e.g. AXC F 2152.

The model-based design and versatile simulation possibilities of Simulink® can therefore also be used for automation projects within PLCnext Technology. A structured model implementation can be ensured, thanks to the automatic creation of executable code. The import and configuration options in PLCnext Engineer also enable Simulink® models to be operated together with programs that have been created in IEC 61131-3 languages or C++.

The combination with other high-level-language programs in the same task and execution in the real-time context is therefore also possible for Simulink® models. Furthermore, you can also implement monitoring of model parameters, and optimization of the models during execution via the “External Mode”.

How to

As a regular user of Simulink®, you know how to set up a model.Package shot of PC Worx Target for Simulink
But how can you apply the hard work put in there to run on your PLCnext Control?

Installation instructions and tutorial videos in the PLCnext Community show these steps:

  • Download PC Worx Target for Simulink®
  • Install the PC Worx Target for Simulink® for your PLCnext Control
  • Create a Simulink® model and export it as a library 
  • Import the library into PLCnext Engineer
  • Execute the model on your PLCnext Control
  • and optional:
    • Configure the model for use in External Mode in Simulink®
    • Set up a split view with Simulink® and PLCnext Engineer
    • Monitor the online values via a scope
    • Modify block parameters online




 • Published/reviewed: 2020-03-29 •  Rev. 24