LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Simple PIDs

I am attempting to run two simple PID loops. I started with a example file and added another PID loop to the file. I found that the output of both PIDs appears to be dependent on the other. This is evident when both outputs change when i change the parameter of one of the controllers. I was able to further confirm this by placing one of the controllers within a if statement, which allows me to turn it off. When it is off the other controller responds as I would expect it to. As soon as the other PID is turned on the output becomes invalid.

 

I am not overly concerned with speed at the moment and would like to avoid buying any tool boxes for this simple project. Does anyone have any suggests on how to fix this issue?

 

Hardware

2.8GHz Pentium D

PCI-6036E card

1 gig ram

 

CPU usage 50-60% in the task manager.

0 Kudos
Message 1 of 3
(2,724 Views)

I don't have your subVI's to be able to look at this more closely.  But is sounds like the PID subVI's are set to non-reentrant.  Because PID subVI's store a history of past data in uninitialized shift registers, the calling of one is affected by the history of when the other one was called.

 

I would recommend you make a copy of the subVI and save it to a slightly different name.  Have one of the subVI's be the first one and the other the second and see how it behaves.

0 Kudos
Message 2 of 3
(2,709 Views)
That solved the problem. Thank you.
0 Kudos
Message 3 of 3
(2,707 Views)