LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
rgvdh@rdf

PID Setpoint Profile VI (PID Toolkit) add error checking

Status: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined. 

The "profile" that this VI takes as an input is an array of time/value pairs.  Two sequential points with the same time make a step, two sequential points with increasing time make a ramp or soak.

 

Currently, two sequential points with decreasing time cause unpredictable behavior.  I suggest they should cause the VI to throw an error instead.

3 Comments
AristosQueue (NI)
NI Employee (retired)

I strongly suspect that not doing this check is deliberate. There is a constant tension in API design, particularly with math APIs, between performance vs. input checking. If I'm writing an algorithm where I know my inputs are good, I do not want the APIs that I call to waste time checking the inputs. This would be such a case.

rgvdh@rdf
Member

>"I strongly suspect that not doing this check is deliberate."

 

In that case maybe write a "sanity check" or "coerce to sanity" vi?

 

At the very least, reword the documentation a bit:

"time (s) specifies the time values in the setpoint profile. Specify the time (s) values in ascending order." 

"ascending" should be "non descending" as you can have equal times for a step function.

Append "Descending times will result in unpredictable behavior."

 

 

Darren
Proven Zealot
Status changed to: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined.