LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID loop in FPGA Issue

Solved!
Go to solution

Running a speed and torque PID loops controlling a valve. The false case for Mode S A runs the torque PID correctly. But when the true case for Mode S A runs I get zeros across all those indicators I slapped in there(cause you cant use probs in FPGA). When it was just speed PID by it's self it was working correctly, am I missing something small involving the case structure? But then I would think both cases wouldn't work correctly. Let me know your thoughts 

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

I'm currently trying to remove the while loop inside the case structure. So one while loop around the case structure with just the code wide open inside the case structure. Hopefully after compiling this solves the issue.

0 Kudos
Message 2 of 3
(2,401 Views)
Solution
Accepted by topic author breezy45

Ok so yes I'm a total noob, and did fully understand data flow. For other noobs, putting a while loop inside a case structure doesn't allow for the Boolean to be read so it never actually exits the inner while loop when I just have the false constant wired to it. Therefore the solution is a while loop over the case structure and a feedback node replacing the shift registers I was using. The system successfully executes the PID for both cases. Hurray.

0 Kudos
Message 3 of 3
(2,378 Views)