Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

pid control in producer/consumer mode ?

Hello guys,

 

Could i use pid control in producer/consumer mode ?

Now in our lab, we use pid control the fuel pressure in producer/consumer mode.

I put the data acquisition in the producer loop and the pid control in consumer mode.

I found there will be delay between the value acquired in the producer loop and the value sent to pid.

 

Is  that because there are delay between the producer/consumer ?

 

Thanks.

 

0 Kudos
Message 1 of 3
(4,001 Views)

There is a lot of things that could cause delay.  Is your PID loop running slower than your acquisition loop?  Does the consumer loop start later than the producer loop?  It could just be that the system is slow.

 

To me, your PID should only care about the last value, so I would use the Master/Slave, which uses Notifiers instead of Queues.  This is assuming that the two loops need to run at different rates.  If they are running at the same rate, I would just put them both in the same loop.  That way you just use the wire instead of a queue/notifier.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(3,996 Views)

Hi Proven

 

Thank you for your post.

I already sloved this problem.

Yes, you are right put the producer loop and the PID loop in one loop the problem will be solved if they run at the same rate.

0 Kudos
Message 3 of 3
(3,979 Views)