Support : Knowledge base

Knowledge Base

Welcome to OPAL-RT’s Knowledge Base

OPAL-RT offers a repository of support information for optimal use of its technology.

Loading…

Please note that OPAL-RT knowledge base is not fully optimized for mobile platforms.

For optimal experience, use a desktop computer.

Reference Number: AA-02223// Views: AA-02223// Created: 2023-09-07 09:39:03// Last Updated: 2023-09-11 15:22:45
General Article
How to Create a S-Function from Simulink Blocks and Protect the Source Code [OPAL-RTLinux3]

How to Create a S-Function from Simulink Blocks and Protect the Source Code [OPAL-RTLinux3]

Note: for Redhat-based simulators, follow one of those two KBs:

How to Create a S-Function and Protect the Source Code [LEGACY - MATLAB 2017a and lower]

How to Create a S-Function from Simulink Blocks and Protect the Source Code [MATLAB 2017b and above]


Overview

Attached to this KB, you will find the document called s_function_for_OPAL-RTLinux3.pdf

It is guiding you through the creation of a protected S-Function that can be used with RT-LAB and OPAL-RTLinux3-based simulators.

The three other documents (template.mk, create_rtlabsfcn_x64.m and create_opconfig_from_rtlabsfcn_x64.m) are the required files to go through the procedure.


For whom is this KB relevant?

For any users who wants to hide part of their model, to share it with third-party users / companies.


Which Versions Were Used?

•    MATLAB 2022a
•    RT-LAB 2023.2.1.578
•    Virtual Machine with OPAL-RTLinux3.4.1
•    MATLAB Compiler is MinGW64 Compiler (C)



s-function_protected_OPAL-RTLinux_11092023.zip 1.3 Mb 1.3 Mb