How to use a C# DLL in an S-Function for a Real Time application
Show older comments
I have a problem using a C# DLL (which I don´t have the root code) in a S-function in Simulink. I tried with a simple call using "addNetAssembly", but since it is not a valid "C++" command, it didn´t work.
I then looked for a way of implement code from C# in C++, so I created a C# Wrapper code that I compiled for a COM use. I made my tests in Visual Studio and then came back to my S-Function and it worked well.
The problem appears when I switched to external use for Real Time Work Shop with Real Time Windows Targe(RTWT), because I load my COM with the command line #import, and the compiler for RTWT (OPEN WATCOM)did not accept it. I have been thinking in some ways to solve the problem, but I don´t want to lose myself in so many languages. Are there others ways to do what I´m trying here? Are there other ways to run a real time application with no physical devices connected than Real Time Windows Target? Thanks in advance and forgive my short experience :D.
Accepted Answer
More Answers (0)
Categories
Find more on Simulink Coder in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!