MATLAB: Standalone executable, real time application

MATLAB Builder NEMATLAB Compilersimulink

Hello to all,
I am developing a project and i would like your thoughts and your opinion about this…
I want to design a fuzzy logic controller with real inputs and real outputs. I would like to run the controller outside Matlab environment (probably an .exe file…?) and along with a Visual Basic application.
Should i use – Matlab compiler, – Matlab Builder NE or – Simulink coder (Real Time Workshop) ??
The controller's input will be inserted from a .txt file but the output will be sent in a serial port for communication with a pic micro-controller.
What do you think?
Thank you in advance,
Tassos

Best Answer

It depends what you mean by "real time". I/O on MS Windows is synonymous with "unbounded latency".
Average latency on any particular MS Windows system might be tolerable for your purposes, but you cannot count on it.
You mentioned serial ports for communication with the PIC micro-controller. If you are planning to use a virtual USB serial port, then unless you write your own drivers, the lower bound on your latency is 40 ms, equivalent to 125 Hz. That applies no matter which OS.
Related Question