02-24-2020 03:33 PM
Hi all - I'm trying to use the ptbypt Derivative & Integral functions for the first time, and I'm thoroughly confused about initialization. So I create triangle & square waves to test. I integrate the square wave, and yea verily I get a triangle wave out of the integral. So I move on to initializing. The Help says "Note You must pass the same value to initial condition on every call to this VI between one initialization of the VI and the next", which I do. I try several different values for the initial condition, but the output always only 'glitches' to some new value *FOR ONLY ONE POINT* before carrying on at the same levels as before. In other words, setting the "Initialize" boolean input for one point/iteration, and setting a new Initial Condition from then on have no effect on the output, except for one point.
It gets weirder to me. I open the Integral & Derivative VI's, and the initialization code looks like nothing I'd expect for either. The initialization cases contain other VI's for integral/derivative, and they seemingly have *no effect* on the outputs of the VI's - they only have numeric Error Code outputs which go nowhere and aren't used. Huh?
I'm running LV 2015 on Windows 7. Totally befuddled, paul
02-24-2020 04:45 PM - edited 02-24-2020 04:45 PM
Can you attach a small VI that demonstrates the problem.
(Easier for us than to start wiring from scratch just to test something...., more likely to get help!)
02-24-2020 08:26 PM
Here's the plaything, Altenbach. It doesn't seem to matter that the Initialize input gets held=TRUE for more than a single point/iteration, or that the Initial Value is held at the same value thru many points. The behavior I *expect* would be that, just after releasing the Initialize from TRUE to FALSE, the output would assume the value of the Initial Condition, and start integrating from that value. But since this my first foray into point-by-point stuff, there's probably just requirement I'm not understanding. Thanks for looking!
02-24-2020 08:32 PM
Forgot to mention - I'm trying to use this in a DIY PID-ish control algorithm - all I need is to "reset" the integral when the operator sets a new setpoint.