Quote:
Originally Posted by Greg McKaskle
Assuming your setpoint will change more slowly than your PID and other elements will execute, you will continue calling IFT each iteration, and occasionally it will change the setpoint, advancing it to the next value in the sequence.
|
Greg,
The problem is that, when IFT is enabled, the setpoint changes (or should change, if the program was working

) for every loop of the main program.
Basically, the sequence I want in the main loop with IFT enabled is this:
Run PID, run the simulated plant, store MV and PV in an array (until the array is N elements long), and calculate a setpoint to be sent to the PID block in the next loop.
I have tried a state machine as well, but with every solution I come up with, the problem is the same: the setpoint should be updated every iteration and it is not.