LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Point-by-point VI's - Initialization troubles

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

0 Kudos
Message 1 of 4
(1,862 Views)

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!)

0 Kudos
Message 2 of 4
(1,828 Views)

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!

Download All
0 Kudos
Message 3 of 4
(1,793 Views)

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.

0 Kudos
Message 4 of 4
(1,789 Views)