×
Siemens Industry Online Support
Siemens AG
Entry type: Application example Entry ID: 56969417, Entry date: 02/01/2019
(11)
Rate

WinAC Target: Add-on for MATLAB/Simulink for integrating and calling MATLAB/Simulink models using STEP 7 and WinAC ODK

  • Entry
  • Associated product(s)
Make MATLAB/Simulink models run on a programmable logic controller in a few steps

In automation and control engineering, the MATLAB/Simulink software from MathWorks is frequently used to graphically model and simulate processes and PID controllers. The requirement is to run Simulink models created in a few steps on a programmable logic controller.
MathWorks provides the option to compile the Simulink models into C/C++ code using Embedded Coder. This code in turn can be integrated into a WinAC ODK project and called and executed from the S7 program via DLL/RTDLL.

Solution
This application illustrates the integration of MATLAB/Simulink models using STEP 7 and WinAC ODK on a powerful PC-based controller with WinAC RTX.

Note:
SIMATIC WinAC RTX is listed as phase-out product. The solution with the successor product SIMATIC S7-1500 Software Controller and SIMATIC Target 1500S you will find in this entry:
SIMATIC Target 1500S: Calling Simulink® Models 


WinAC Target facilitates integration and independently generates:

  • DLL or RTDLL file with the algorithm of the Simulink model
  • SCL source with the interfaces of the model and the communication with the DLL/RTDLL file

This allows you to quickly and conveniently port a Simulink model to a WinAC RTX controller and place it in service.

Using the example of a PID controller, we provide a detailed description of all steps: From the creation of the PID controller in MATLAB/Simulink to the execution on the WinAC RTX PC-based controller. It shows you how to use WinAC Target in a time-saving and easy way to integrate MATLAB/Simulink models. Models can be integrated for STEP 7 V5.5 and also for STEP 7 V11 SP2 or higher.

To integrate the Simulink model, the following steps are performed:

  1. Creating a model in MATLAB/Simulink and testing it in MATLAB/Simulink
  2. Compiling the Simulink model into an SCL source and a DLL/RTDLL file using WinAC Target
  3. Integrating the SCL source into the S7 program
  4. Copying the DLL/RTDLL file to the IPC with WinAC RTX
  5. Downloading the S7 program to WinAC RTX and launching it

Advantages
This application provides, in particular, the following advantages:

  • Easy integration of Simulink models into WinAC RTX
  • Simulink External mode for monitoring Simulink models and changing integrated model parameters during operation:



    1. Graphical online view of the running process
    2. Changing internal model parameters using Simulink
     
  • Manipulating internal model parameters in the user program with STEP 7

Benefits
This application provides, in particular, the following advantages:


  • Easy and time-saving familiarization with WinAC Target through detailed step-by-step instructions
  • Optimized process for integrating Simulink models into WinAC RTX
  • Effective commissioning and diagnostics with Simulink and External mode
  • Flexible options to change internal model parameters during operation in the STEP 7 program

Overview of the application (Video)



 Registrierung notwendig  Download Video (172,4 MB)


Downloads
  Documentation (3,8 MB)
  Example projects (6,5 MB)
SHA-256 checksum: 8E3B270BE538A45809440F5472BBB4DB9D986F3795207FABBFEF260D7D896361
 Registrierung notwendig  WinAC Target SETUP V1.5.1 (483,0 KB)
SHA-256 checksum: 97F57D247364F486CAF7710E84E4134E7C9E3D83036FDC28C1E39D95453A8E15

You can find Informations to SHA-256 at the entry
How do you determine the SHA-256 checksum of a file?


Requirements for installation:

  • Windows XP Professional or Windows 7 32-bit
  • STEP 7 V5.5 with SCL V5.3 or STEP 7 V12 SP1 is required
  • WinAC ODK V4.2
  • MATLAB/Simulink R2012b is required

 

Support to the statistics
With this function the IDs found are listed according to number (format .txt).

Generate list
Copy URL
Display page in new design
mySupport Cockpit