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.