S-Function & Hardware Interface
6 views (last 30 days)
Show older comments
Hi everyone! I want to communicate with a RS-232 Port and a USB Port by a s-function way. I want to know how the S-function communicate with the operating system and where can I find the supported c function list in s-function.
0 Comments
Answers (1)
Kaustubha Govind
on 16 May 2013
There is no limit on what C-functions you can use in your C-MEX S-functions, as long as the code is ANSI-C compatible. You just need to figure out the right build rules that you need (ie. header files, libraries, etc.), and supply them appropriately at the time of compiling the MEX-file. So essentially, you need to figure out how you would write standalone C-code for your application and compile it into a binary outside of MATLAB - if you are able to do so, you just need to write an S-function wrapper for that code. In fact you can even use the Legacy Code Tool to automatically generate an S-function for you, once you have your C code.
0 Comments
See Also
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!