ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

No output from PID (DBL Array)

Solved!
Go to solution

Hi,

 

I am new to Labview.  I am trying to simulate two PID loops simultaneously using the PID (DBL Array) as shown in the attached vi. However, the PID loop does not appear to produce any output.  I would be very grateful if you can point out the (foolish) error in my code!

 

Thanks in advance.

0 Kudos
Message 1 of 3
(1,342 Views)
Solution
Accepted by topic author KFarries

Hi KF,

 

there are several problems with your VI:

  • the shift register is not initialized: so it starts as empty array and your PID will output an empty array when it gets an empty input array…
  • the loop delay is given in ms, but the PID function expects a value using unit s: did you notice that red coercion dot?

See this:

One problem is solved, the other not…

 

Suggestion:

Instead of using BuildCluster to create the plots for your chart I would stick with array functions (BuildArray). This way your code is more scalable once you start to use more than two channels in your PID…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(1,321 Views)

Of course! Had looked all over for an example using the PID array but couldn't find one. 

 

Many thanks!

0 Kudos
Message 3 of 3
(1,309 Views)