LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID Toolkit

Hello

Has anyone ever used the PID toolkit? I have recently obtained it, and I am
a bit unsure as to how exactly to use it. I have developed a program to
calculate a setpoint and to aqcuire data from my equipment - the problem is
the data is acquired at a rate of ten thousand points a second, but 10,000
averages are taken (i.e. one point a second is actually recorded). The
setpoint is calculated in the same loop and is therefore only updated once a
second which will not give good temperature control.

How can I update the setpoint more often whilst maintaining the same input
rate?

Cheers
Jon
0 Kudos
Message 1 of 11
(4,581 Views)
Jon Atkinson wrote in message
news:6b4F5.389$%k5.16000@news-1.opaltelecom.net...

> How can I update the setpoint more often whilst maintaining the same input
> rate?

Well, it should be obvious that if you need the PID to run 10K times per
second you need to put it in the loop that's taking the 10K datapoints and
doing the averaging!

What are you controlling the temperature *of*? Unless it's a very small
sample it's not going to have a time constant in the sub-millisecond range..
0 Kudos
Message 2 of 11
(4,579 Views)
For temperature control you can take one point every 10 seconds
It's depend on your process but a temperature control better than 2° is not
usual.
therefore, the PID parameter have to be adjust to obtain a good regulation
and a high speed is not essential for temperature regulation

"Jon Atkinson" wrote in message
news:6b4F5.389$%k5.16000@news-1.opaltelecom.net...
> Hello
>
> Has anyone ever used the PID toolkit? I have recently obtained it, and I
am
> a bit unsure as to how exactly to use it. I have developed a program to
> calculate a setpoint and to aqcuire data from my equipment - the problem
is
> the data is acquired at a rate of ten thousand points a second, but 10,000
> averages are taken (i.e. one point a second is actually recorded). The
>
setpoint is calculated in the same loop and is therefore only updated once
a
> second which will not give good temperature control.
>
> How can I update the setpoint more often whilst maintaining the same input
> rate?
>
> Cheers
> Jon
>
>
0 Kudos
Message 3 of 11
(4,579 Views)
Labeo wrote in message
news:8s4o4u$1q91$1@news4.isdnet.net...
> For temperature control you can take one point every 10 seconds
> It's depend on your process but a temperature control better than 2° is
not
> usual.
> therefore, the PID parameter have to be adjust to obtain a good regulation
> and a high speed is not essential for temperature regulation

I don't agree with that. For a large furnace, response times will be slow
and the level of accuracy to which the temperature can be realistically
controlled will suffer, especially if the furnace is not operating at a
single set temperature for a long period. Scale down the system, the
response time decreases and the accuracy increases. If you're, for example,
testing IC interconnect r
eliability under heating/cooling cycles and
prolonged heat stress and you're using a poly-silicon heater on the wafer
you'd get pretty fast response times and the limit on accuracy would shift
to the resolution of your measuring kit rather than the time required for
stabilisation.
0 Kudos
Message 4 of 11
(4,579 Views)
It is possible to make your loop run faster. You can actually read from
your acquisition buffer as you are running. I often do this when I need
to display current values while acquiring data.

Use the AI Read VI, but set the read point to "End of the buffer" and
read one point. Convert this point to engineering units if needed, and
use this as input to your PID loop. You can do this as often as you
want. Just make sure that any other AI Buffer reads outside this loop,
you set the read point to "beginning of buffer".

Therefore, you can run your PID loop as fast as you would like. The
loop can also be independent of your AI loop, as long as the taskID is
shared.

Mark

In article <6b4F5.389$%k5.16000@news-1.opaltelecom.net>,
"Jon Atkinson" otalise.co.uk> wrote:
> Hello
>
> Has anyone ever used the PID toolkit? I have recently obtained it, and
I am
> a bit unsure as to how exactly to use it. I have developed a program
to
> calculate a setpoint and to aqcuire data from my equipment - the
problem is
> the data is acquired at a rate of ten thousand points a second, but
10,000
> averages are taken (i.e. one point a second is actually recorded). The
> setpoint is calculated in the same loop and is therefore only updated
once a
> second which will not give good temperature control.
>
> How can I update the setpoint more often whilst maintaining the same
input
> rate?
>
> Cheers
> Jon
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 5 of 11
(4,578 Views)
Hi

Thanks for your response,

The problem I have is that the input I am taking in at 10,000 points per
cycle (and then averaged 10,000 times) is not the same input as the one for
the PID toolkit. The instrument I am trying to control is a furnace
containing a plate. The PID toolkit needs to read the furnace temperature
whilst the input side of my program is to read the temperature of the plate.

So, at the moment I have two distinct routines - one calculating a SP and
reading the PV (furnace temperature) and one reading two thermocouples
attached to the plate (sample and reference) at 10,000 samples per loop, per
second.

I was informed by the "contact an engineer" part of the NI web-page that I
could have both loops running simultaneously, but when I have tried this the
overall rate has been determined by the data acquisition loop (which takes
one second per iteration). How do I get the loops to run at separate speeds?

Cheers,

Jon


wrote in message
news:8s56bg$2ni$1@nnrp1.deja.com...
> It is possible to make your loop run faster. You can actually read from
> your acquisition buffer as you are running. I often do this when I need
> to display current values while acquiring data.
>
> Use the AI Read VI, but set the read point to "End of the buffer" and
> read one point. Convert this point to engineering units if needed, and
> use this as input to your PID loop. You can do this as often as you
> want. Just make sure that any other AI Buffer reads outside this loop,
> you set the read point to "beginning of buffer".
>
> Therefore, you can run your PID loop as fast as you would like. The
> loop can also be independent of your AI loop, as long as the taskID is
> shared.
>
> Mark
>
> In article <6b4F5.389$%k5.16000@news-1.opaltelecom.net>,
> "Jon Atkinson" wrote:
> > Hello
> >
> > Has anyone ever used the PID toolkit? I have recently obtained it, and
> I am
> > a bit unsure as to how exactly to use it. I have developed a program
> to
> > calculate a setpoint and to aqcuire data from my equipment - the
> problem is
> > the data is acquired at a rate of ten thousand points a second, but
> 10,000
> > averages are taken (i.e. one point a second is actually recorded). The
> > setpoint is calculated in the same loop and is therefore only updated
> once a
> > second which will not give good temperature control.
> >
> > How can I update the setpoint more often whilst maintaining the same
> input
> > rate?
> >
> > Cheers
> > Jon
> >
> >
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
0 Kudos
Message 6 of 11
(4,577 Views)
Jon,

Is it possible for you to zip up your application and email it to me?
I would think that putting your two "loops" in separate while loops
should work just fine, with one taking a second to run, and the other
(the PID loop) running at a completely separate rate. This should
work; it's common practice. I sounds like you have some dependency
between the two loops, like a wire is shared, or one loop is inside
another, or both loops are inside a bigger while loop.

Mark

In article ,
"Dr Jon Atkinson" wrote:
> Hi
>
> Thanks for your response,
>
> The problem I have is that the input I am taking in at 10,000 points
per
> cycle (and then averaged 10,000 times) is not the same input as the
one for
> the PID toolkit. The instrument I am trying to control is a furnace
> containing a plate. The PID toolkit needs to read the furnace
temperature
> whilst the input side of my program is to read the temperature of the
plate.
>
> So, at the moment I have two distinct routines - one calculating a SP
and
> reading the PV (furnace temperature) and one reading two thermocouples
> attached to the plate (sample and reference) at 10,000 samples per
loop, per
> second.
>
> I was informed by the "contact an engineer" part of the NI web-page
that I
> could have both loops running simultaneously, but when I have tried
this the
> overall rate has been determined by the data acquisition loop (which
takes
> one second per iteration). How do I get the loops to run at separate
speeds?
>
> Cheers,
>
> Jon
>
> wrote in message
> news:8s56bg$2ni$1@nnrp1.deja.com...
> > It is possible to make your loop run faster. You can actually read
from
> > your acquisition buffer as you are running. I often do this when I
need
> > to display current values while acquiring data.
> >
> > Use the AI Read VI, but set the read point to "End of the buffer"
and
> > read one point. Convert this point to engineering units if needed,
and
> > use this as input to your PID loop. You can do this as often as you
> > want. Just make sure that any other AI Buffer reads outside this
loop,
> > you set the read point to "beginning of buffer".
> >
> > Therefore, you can run your PID loop as fast as you would like. The
> > loop can also be independent of your AI loop, as long as the taskID
is
> > shared.
> >
> > Mark
> >
> > In article <6b4F5.389$%k5.16000@news-1.opaltelecom.net>,
> > "Jon Atkinson" wrote:
> > > Hello
> > >
> > > Has anyone ever used the PID toolkit? I have recently obtained
it, and
> > I am
> > > a bit unsure as to how exactly to use it. I have developed a
program
> > to
> > > calculate a setpoint and to aqcuire data from my equipment - the
> > problem is
> > > the data is acquired at a rate of ten thousand points a second,
but
> > 10,000
> > > averages are taken (i.e. one point a second is actually
recorded). The
> > > setpoint is calculated in the same loop and is therefore only
updated
> > once a
> > > second which will not give good temperature control.
> > >
> > > How can I update the setpoint more often whilst maintaining the
same
> > input
> > > rate?
> > >
> > > Cheers
> > > Jon
> > >
> > >
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 7 of 11
(4,570 Views)
If you figure out what is wrong, could you please make sure to post it to
the newsgroup? I thought I knew what was wrong, so I was making a quick
VI to make sure and fell into the same problem myself!

I thought the problem was that you need to make sure that the DAQ buffer
has time to fill up with data before you try to read it. In past experience
I thought I observed that if you tell AI Read to read 1 second worth of data
starting with an empty buffer, that the program would pause for 1 second
to read the data. So, I tried putting delays in the DAQ loop in different
ways to give the buffer time to fill up. This worked *sometimes* but when
it did work, sometimes it all of a sudden started to sync up the two loops
again. Right now, I'm trying out a DAQ occurrence, but the loops are still
running at the same speed.

The way I'm checking to see if the loops are running independently is by
connecting an indicator to the while loop counters. The loop without the
DAQ only has that indicator and a small ms wait. There are no wires going
into or out of that loop.

So, now I've gone and confused myself. I'm sure it's something silly, so
any tips would be appreciated!

Melissa

mark.wysong@ae.ge.com wrote:
>Jon,>>Is it possible for you to zip up your application and email it to
me?>I would think that putting your two "loops" in separate while loops>should
work just fine, with one taking a second to run, and the other>(the PID loop)
running at a completely separate rate. This should>work; it's common practice.
I sounds like you have some dependency>between the two loops, like a wire
is shared, or one loop is inside>another, or both loops are inside a bigger
while loop.>>Mark>>In article ,>
"Dr Jon Atkinson" wrote:>> Hi>>>> Thanks for your
response,>>>> The problem I have is that the input I am taking in at 10,000
points>per>> cycle (and then averaged 10,000 times) is not the same input
as the>one for>> the PID toolkit. The instrument I am trying to control is
a furnace>> containing a plate. The PID toolkit needs to read the furnace>temperature>>
whilst the input side of my program is to read the temperature of the>plate.>>>>
So, at the moment I have two distinct routines - one calculating a SP>and>>
reading the PV (furnace temperature) and one reading two thermocouples>>
attached to the plate (sample and reference) at 10,000 samples per>loop,
per>> second.>>>> I was informed by the "contact an engineer" part of the
NI web-page>that I>> could have both loops running simultaneously, but when
I have tried>this the>> overall rate has been determined by the data acquisition
loop (which>takes>> one second per iteration). How do I get the loops to
run at separate>speeds?>>>> Cheers,>>>> Jon>>>>
wrote in message>> news:8s56bg$2ni$1@nnrp1.deja.com...>> > It is possible
to make your loop run faster. You can actually read>from>> > your acquisition
buffer as you are running. I often do this when I>need>> > to display current
values while acquiring data.>> >>> > Use the AI Read VI, but set the read
point to "End of the buffer">and>> > read one point. Convert this point
to engineering units if needed,>and>> > use this as input to your PID loop.
You can do this as often as you>> > want. Just make sure that any other
AI Buffer reads outside this>loop,>> > you set the read point to "beginning
of buffer".>> >>> > Therefore, you can run your PID loop as fast as you would
like. The>> > loop can also be independent of your AI loop, as long as the
taskID>is>> > shared.>> >>> > Mark>> >>> > In article <6b4F5.389$%k5.16000@news-1.opaltelecom.net>,>>
> "Jon Atkinson" wrote:>> > > Hello>> > >>> > >
Has anyone ever used the PID toolkit? I have recently obtained>it, and>>
> I am>> > > a bit unsure as to how exactly to use it. I have developed a>program>>
> to>> > > calculate a setpoint and to aqcuire data from my equipment - the>>
> problem is>> > > the data is acquired at a rate of ten thousand points
a second,>but>> > 10,000>> > > averages are taken (i.e. one point a second
is actually>recorded). The>> > > setpoint is calculated in the same loop
and is therefore only>updated>> > once a>> > > second which will not give
good temperature control.>> > >>> > > How can I update the setpoint more
often whilst maintaining the>same>> > input>> > > rate?>> > >>> > > Cheers>>
> > Jon>> > >>> > >>> >>> >>> > Sent via Deja.com http://www.deja.com/>>
> Before you buy.>>>>>>>Sent via Deja.com http://www.deja.com/>Before you
buy.
0 Kudos
Message 9 of 11
(4,566 Views)
> Is it possible for you to zip up your application and email it to me?
> I would think that putting your two "loops" in separate while loops
> should work just fine, with one taking a second to run, and the other
> (the PID loop) running at a completely separate rate. This should
> work; it's common practice. I sounds like you have some dependency
> between the two loops, like a wire is shared, or one loop is inside
> another, or both loops are inside a bigger while loop.
>

Or the DAQ operation blocks in the driver, which it does, and there is
no other thread to run the parallel loop until the driver returns. To
fix this, you can do the DAQ in a subVI, set the subVI to another
execution system, change the DAQ VI's exec system, configure
LV to have
more than one thread per execution system.

Of course none of this will work if running in LV earlier than 5, or if
threaded execution is turned off.

Greg McKaskle
0 Kudos
Message 10 of 11
(4,561 Views)
I agree, Greg. You could also use DAQ occurrences, and suspend the AI
Read until the buffer fills up with the desired amount of data. That
way, the data acquisition thread isn't held up until the AI read comes
back.

Mark

In article <39F11074.B26D70EB@austin.rr.com>,
gmckaskle@austin.rr.com wrote:
> > Is it possible for you to zip up your application and email it to
me?
> > I would think that putting your two "loops" in separate while loops
> > should work just fine, with one taking a second to run, and the
other
> > (the PID loop) running at a completely separate rate. This should
> > work; it's common practice. I sounds like you have some dependency
> > between the two loops, like a wire is shared, or one loop is
inside
> > another, or both loops are inside a bigger while loop.
> >
>
> Or the DAQ operation blocks in the driver, which it does, and there is
> no other thread to run the parallel loop until the driver returns. To
> fix this, you can do the DAQ in a subVI, set the subVI to another
> execution system, change the DAQ VI's exec system, configure LV to
have
> more than one thread per execution system.
>
> Of course none of this will work if running in LV earlier than 5, or
if
> threaded execution is turned off.
>
> Greg McKaskle
>


Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 11 of 11
(4,071 Views)