Here is what the ideal goal is.
We have a simulink model and while it is running we want all the outcome values to be sent to our vb.net application.
I think I have found a few ways but prior to diving in would like some input. I havent used matlab or simulink in the past which is making this harder than it is.
There is a COM object for matlab but that doesnt allow for real time access to variables while simulink is running. Simulink only dumps its data to matlab after it is completed.
Option #1: Callback? I have been reading and it seems I am able to add a callback to the blocks so as the values is sent to matlab based on a timer. I would then have to make constant calls to matlab from vb to get these values. This doesnt seem efficient and would likely take up to much resources with simulnk running at the same time? How do I get data from a Simulink block into a MATLAB GUI?
Option #2: I found a 'Simulink Coder' on the mathworks website and seems like the ideal solution but would like some clarification if anyone here has used it. I have requested a trial but still have a few more hoops to jump through before I get it.
It seems to me like the coder would take the simulink model and create the algorithm in C/C++ code? Does this then mean I can create a C application and use that code as a source? So instead of running simulink with my application I would just run the code and input the parameters to give us the output variable?
I have also been reading some info about matlab outputing DLL's or mux? so can be used with .net applications?
Any input/opinions are appreciated :)