Hope this helps.
I recommend running an infinite loop in Matlab, reading a trigger (e.g. some Boolean value) from REXYGEN via REST API. Afterwards execute your function and pass the results to REXYGEN, again via REST API.
See example 0302-03 which is included in REXYGEN Studio.
thanks for reporting and explaining this. Since version 2.10.8 is outdated and there is no problem in the current version 2.50.9, we're not going to fix this. Please apply a workaround as you suggested. Thanks for understanding.
how about using the PWM block?
If u=-1, then UP will be ON and you can use it for heating. If u=0 then both outputs are off. And if u=-1 then DN will be ON and you can use it for cooling.
The PWM:offtime parameter defines the minimum delay between heating and cooling phases.
Let me know.
thanks for the parameters. If the controlled plant is defined by
then there is no need to use Smith predictor. A simple PI (k=16.859, ti=5866.1) or PID controller will work fine.
However, if you insist on using the Smith predictor, then the blocks inside the Smith_predictor subsystem should be as close to the controlled plant as possible. Because tau1 and tau2 are close to each other, you should use MDL function block as in the original example. And for sure, the only difference between the upper and lower block in the Smith_predictor subsystem should be the time delay. The gain and time constants must be the same.
The parameters which you provided can hardly lead to satisfactory closed loop performance.
the task "Smith predictor - process model" is a model of the controlled process/plant. In a real-world application, you'll exclude the whole task from your project. In the control task, you'll replace the green
pv Inport and
mv Outport with I/O signals.
The Smith_Predictor subsystem in the control task is where you should change the gain, time constant and dead time to match your controlled process/plant. Plus I guess you'll want to replace the MDL blocks with FOPDT blocks.
Can you share the gain, time constant and dead time of your process? I understand the process response is quite slow, but it's the ratio between dead time and time constant which is the most important for the decision whether to use Smith predictor or not. There are many processes which are easy to control even with a simple PI/PID controller, no matter how sluggish their response is.