From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
Joaoparm, indeed I was answering to the OP, however I agree that we could use a selection function. As thoult pointed out, however, this is less flexible.
Paolo ------------------- LV 7.1, 2011, 2017, 2019, 2021
Thanks for your answers. As for the equal condition it´s not a problem at all, I put it there just for testing but I´m usually using a lower or equal to condition. This is how it works:
Two parameters, one measured M(t), one applied A(t). Depending on the values measured we change the applied one.
Ao is applied at the beginning until M reaches Mf, then we switch to -Ao until M reaches Mi, then we switch back to Ao until M reaches Mf, and this a certain number of times. My problem was that we reach Mi two times, at the beginning (in this case we need to keep applying Ao) and a second time (and here we need to switch back to Ao). I was thinking of putting something that indicates the sign of Ao, it would make the cases simpler, but then I thought maybe it would be even better if I just didn´t change A in the corresponding case.