Standalone executable, real time application

4 Ansichten (letzte 30 Tage)
Tassos
Tassos am 10 Okt. 2011
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

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 10 Okt. 2011
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.
  12 Kommentare
Walter Roberson
Walter Roberson am 12 Okt. 2011
Timers in VB that deliberately invoke the DLL would be feasible only if the timer will reliably fire and execute and complete the DLL task within your maximum latency period (which you indicated earlier is 1/2 second.)
If you have the VB reading from the PIC, then I am confused about which part will be doing what? What computation would the the MATLAB DLL do that you would not just execute in straight VB ? And is the MATLAB component responsible for controlling the PIC or is the VB part? (You wouldn't want to be sharing a single serial port between the two; MATLAB doesn't like sharing files or devices.)
Tassos
Tassos am 13 Okt. 2011
Ok, i have a pic that communicates with the vb application via serial port. This work is already done. Its a data acquisition and data visualization application...
Now i want to develop a fuzzy logic cotroller that will control my system.
Fuzzy controller will use a different serial port to "speak" with a different pic controller. So, Matlab will be responsible for controlling the pic and there is no serial port sharing.
So, the vb part will read the data and the matlab part will do the control.
My problem is the interface between vb part and matlab part. I want to send two differnt data values(velocity, inclination) from vb part to matlab part. With these two values, fuzzy controller will make the control...
I dont know a way to develop a fuzzy logic controller in VB. Is there any?
I hope to made things more clear now...

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Tassos
Tassos am 10 Okt. 2011
Thank you for your answer Walter.
So until now we have 40 ms latency of virtual serial port adding the OS latency which is Windows XP.
What is the maximum average latency on Windows XP?
I think a latency of 500 ms is affordable. You think that something like that i want to do is a "waste of time"?
If no, which is the best Matlab product to develop the fuzzy controler?

Kategorien

Mehr zu Deployment, Integration, and Supported Hardware finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by