Are external inputs for saturation block possible ?

Hello everyone!

I am working on a powertrain model that runs on RTBox and I want to impose some variables/parameters via CAN communication during the real time operation. One set of them are the saturation limits for some signals based on the desired operational state, but saturation block does not have external inputs… Is there a way to change limits (maybe as an external input or in some way to let CAN data override the simulation parameters for it?) during operation for this block or should I replace it with a customized one?

Thanks in advance for the ideas,

Burak

There isn’t a library block with this behavior, but it is straightforward to implement such functionality with the min/max blocks, as shown below. This example is taken from saturation implementation in the PID Controllers from the PLECS library. The assertion logic serves to generate an error for the invalid condition when the lower limit exceeds the upper limit.

Uh okay, that’s what I thought as well but just wanted to see if an easier way is possible. Thanks for the help!