Socket Programming with C-Mex
Ältere Kommentare anzeigen
Hello,
I'm in need of setting up a TCP/IP connection to a Simulink simulation (which will employ a demodulator). I am using RTW (Simulink Coder) to output C Code and an exe for the demod.
I need to send the data to the generated executable via TCP/IP. I'm currently looking to accomplish this via sockets through a C-Mex implementation with an S-function block.
I have C++ server and client code that compiles (and runs via cmd line - Windows XP 32 bit) but crashes MATLAB upon execution.
Any thoughts as to what may be causing the crashing or better ways to implement this architecture would be greatly appreciated.
Thanks,
Jason
1 Kommentar
Jason
am 12 Sep. 2011
Antworten (2)
Ed Laurence
am 5 Nov. 2011
0 Stimmen
Hi Jason,
Did you get anywhere with this problem? I've been trying to get something similar working where I've embedded C code for a WinSock client in a level 2 S-function but as soon as I run the simulation Simulink hangs. I've tried debugging by attaching the MEX file to VS 2008 and have found some errors relating to invalid parameters passed to the C function but haven't managed to solve it yet.
Cheers,
Ed
Silmara da Silva Palmieri
am 25 Mär. 2019
0 Stimmen
Hi Ed,
Did you get any answer regarding this problem? I am facing the same issue and have no clue how to check where is my problem.
Thank you!
Regards,
Silmara
Kategorien
Mehr zu Simulink Coder finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!