Socket Programming with C-Mex
Mostra commenti meno recenti
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 Commento
Jason
il 12 Set 2011
Risposte (2)
Ed Laurence
il 5 Nov 2011
0 voti
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
il 25 Mar 2019
0 voti
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
Categorie
Scopri di più su Simulink Coder in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!