from JohnM:
QUOTE
Yes - the timer time should match the Loop update time.
absolutely correct ... but ...
if the two settings (Loop Update Time and the "trigger") do NOT match, it is possible (but not recommended) to compensate for the mismatch by "fudging" the tuning parameters (especially the Integral setting and the Derivative setting) ... whoever set up the system originally might have done that ...
from Conor:
QUOTE
I see that the system integrator that originally set up the PID has a timer triggering the PID every 2 seconds. I have reduced this to 1 second.
smart money says that when you changed the trigger setting to "correct" it, then the existing tuning changed also ...
in simplest terms, by "fixing" the mismatch, you might (well, actually "probably") will now have to retune (at least) the Integral and the Derivative settings to accommodate the new trigger setting ...
possible scenario:
suppose that the original tuning was working OK ... suppose that you just happened to notice the discrepancy between the trigger and the Loop Update Time settings ... suppose that you simply "fixed" the trigger to match the Loop Update Time – but did nothing else ... in that case, the tuning is probably NOT going to be OK anymore ...
analogy: suppose that the thermostat knob on Granny's oven is installed "crooked" ... but Granny is aware of that – and knows that to bake at 350 degrees F. she just needs to set the knob to 400 degrees instead ... she's been compensating that way for years - and doing very well ... now suppose that you come in and "fix" the knob for Granny – but you neglect to tell her about the change ... oops! ... until she figures out the new "correct" setting, the cakes aren't going to turn out right at all ...
major point: if TWO things are "wrong" (Granny's knob position and her compensating setting) then fixing just ONE of those things is probably not a good idea ...
in your case, the TWO things that were "wrong" were (apparently) the "trigger" setting and the "compensating" tuning ... so ... you really can't just fix ONE of those things and expect the system to keep working the same way that it was ... in simplest terms, it might not get "better" – it might get "worse" ...
suggested plan of action: if the previous tuning wasn't all that great to begin with, then grit your teeth and "fix" the trigger and the Loop Update Time to match – and then retune the system ... on the other hand, if the original tuning worked (more or less) OK, then you're probably not going to see any improvement by "fixing" the trigger timing ... indeed, you might end up worse than you were before ...
big questions: (1) when you "fixed" the trigger setting, did the system response change? ... (2) if the system response changed, did it improve – or did it get worse? ...
all of this should make a lot more sense after you read (and understand) the part about Bubba's paycheck in those posts that I linked above ...
hope this helps ...