working with Real-time windows target by M-file
Ältere Kommentare anzeigen
I'm just getting to know and develop a simple control with MATLAB's real-time windows target.
Basically, the tool supports real-time application developed with Simulink block diagram with just a interface card.
My control application is fairly simple. The pseudo-code can be described shortly as:
while (1)
{
if (flg)
{
valve.open();
}
if (pressure > thres_pressure_B) && (flg)
{
valve.off();
wait(5s);
valve.reverse();
flg=0;
}
if (pressure < thres_pressure_A) && (!flg)
{
prog.exit();
}
}
with pressure: real-time sensor feedback reading valve: value transmitted to I/O card
where the aim of the control is to vary the pressure (in a container) up from thres_pressure_A to thres_pressure_B and down back to A (similar to a trapezoidal trajectory)
However, I feel difficulty implementing this algorithm in Simulink which is required by the toolbox (real-time windows target)
Is there any way-around this e.g. I can program it with M-file (preferred)? or any Simulink toolbox that can perform the same logic
Thank you and Merry Christmas!
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Target Computer Setup finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!