omron delta tau logo

partner login | contact | support: 818 717-5656

Search Delta Tau Website



MATLAB®’s Simulink® Power PMAC Target

    Main objective for Simulink®-Power PMAC Interface:

    Facilitating user-servo code generation for Power PMAC using Simulink®’s Embedded Coder (previously known as Real-Time Workshop). The objective is to fully automate code generation for Power PMAC’s servo loop closure routines (tasks) utilizing Simulink®’s control blocks.

    Who should use this interface?

    Users who may find the Power PMAC’s already built-in servo algorithms not suited for their application and wish to use their own servo algorithms. Also those who wish to use Power PMAC’s servo interrupt routine for predictive time slice non-servo tasks.The built-in servo algorithms in Power PMAC include:

  • Basic PID and feed forward servo control
  • Extensive additional non-linearities and polynomials (higher order filters)
  • Cross coupled dual gantry control
  • Automatic adaptation to system inertia changes

  •           Integrating MATLAB® With Power PMAC


    User needs to know how to work with Simulink® and Power PMAC IDE. Knowledge on C programming language is not required but useful. Hardware and software requirements include a computer that runs MATLAB®, Simulink®, Simulink Coder, Embedded Coder and Power PMAC IDE, which compiles and communicates with a Power PMAC. This Add-on must be integrated with an existing MATLAB® installation. This feature has been tested and verified on Windows 7, 32bit, with MATLAB® Release 2012a.

    Package includes:

    A library of MATLAB® “m-files”, “p-codes”, “S-functions” and “TLC (Target Language Compiler)” files. Main ones are:

  • Power PMAC Input Block for Simulink®
  • Power PMAC Output Block for Simulink®
  • Power PMAC ERT (Embedded Real Time) Code Template files
  • Power PMAC File Process Template
  • Power PMAC Target files (Edited ERT library)
  • Brief overview of how to work with this interface:

  • Installing the interface: User needs to install it as an Add-on to MATLAB® by installing it in MATLAB® environment.

  • Creating a simulation model: It is needed to create a Simulink® block diagram for the user’s control algorithm that needs to be implemented and deployed on Power PMAC. User can use the automated code generation only if the control algorithm has two input signals and one output. One of the input signals is the desired position. User needs to go to “Power PMAC library” in “Simulink® Library Browser” and drag and drop a Power PMAC input block as an in-port to this signal. The only parameter of this block should be set properly such that the block corresponds to the desired position. The other input signal is the “position feedback” which corresponds to the actual position of the motor. User needs to set a similar Power PMAC input Block as an in-port for this signal and set its parameter properly. The output signal corresponds to the DAC output and user needs to set an out-port block for this signal properly. This is how the set-up of a Single-input Single-output SISO system works. If the algorithm is Multi-input Multi-output (MIMO), then the user can still use the automated code generation (this interface) but needs to edit the generated code manually before deploying it on Power PMAC.

  • Testing the control model: In some applications, users need to test the model of the control algorithm coupled with the model of the hardware (system plant) in Simulink®. This way they can modify the control algorithm to get its best performance and fine tune its parameters. The input signal to the plant model is DAC and the output is the actual position of the motor.

  • Generating the C code: In the configuration parameters dialog box of the Simulink® model, there is a code generation pane where the user can chose the Delta Tau Power PMAC target (powerpmac.tlc). By doing so, all the necessary modifications for the code to be deployable to Power PMAC and be compatible with its memory structures are set properly. At this point the code can be generated. This MATLAB® Add-on generates the proper C file and the corresponding header files for Power PMAC deployment.

  • Deploying on Power PMAC: The generated code can be added to the Real-time Routine in the C Language folder of the Solution Explorer of Power PMAC IDE. By setting the “User-servo set up” properly, the user servo code can be assigned to the designated motor(s).

  • ® MATLAB® and Simulink® are registered trademarks of Mathworks Inc.

Delta Tau Data Systems, Inc. © 2017. All rights reserved. USA Corporate Headquarters: 818.998.2095, 21314 Lassen St. Chatsworth, CA 91311