10-31-2007 12:10 PM
Hi everybody,
I have a problem with my timed loop and synchronization of my data acquisition.
process of my
I am usind a Master/Slave architecture with notification. Master loop gets the results of the bus. Max possible speed is approx. 245ms but I am slowing down to 750ms to relax the bus commutation.
Some of the values are transferred to the Slave loop for wave chart graph and Excel sheet.
Slave has to be a timed loop with 1second. This loop graphs a wave chart with temperatures etc and all the information about the oven, timestamps, stopwatch and the information from GPIB are documented in Excel. All in all 14 columns on a time based Excel table. And I am automatically creating a copy file every minute. (This will be later changed to every 10 min)
Problem: The Slave loop needs about 790ms for one period on the normal way, which is perfect. But for my time based documentation I need to slow it down to 1000ms to get one timestamp per second. Everything sound good, right..:-)
As soon as I select 1000ms for my timed Slave loop the period time goes up to 1800ms. Best value was around 1,0346ms. And after running this program for about 3hours to monitor the oven there is no synchronized result.
(see screenshots in word file pls.)
I got this problem after putting the Excel data saving into my Slave loop, to save permanently and to be able to create copy file while running time. Before that I was indexing on my Slaveloop and created an Excel sheet after stopping the VI. On these sheets my timing was perfect (see screenshots in word file pls.)
So the problem has anything to do with creating data in the
It must be possible to create this data in this 1000ms timed loop without delays because it needs 790ms if it is not timed.
If I choose 965ms for the timed loop it looks okay, but not good enough. I still get sometimes the same timestamp the two times.
If someone is interested I can upload a .llb but it won’t run, because of the missing devices etc.
I appreciate any help!
10-31-2007 01:15 PM
10-31-2007 02:36 PM
10-31-2007 04:25 PM
11-01-2007 09:59 AM
Yes I understood the way how you are thinking... but if you don't mind a draw would be very nice to make sure about the error in/out
ok, what I have found out is, the Master loop has to be slowed down (or a timed loop) in my case. In Labview Basics II it says "Use a master/slave architecture only if you are certain that each slave task takes less time to execute than master loop"
but running three loops with timed master loop is better... 8sec difference after 60min but still not synchron. But it is not a good way, because I am using the second loop as a Slave and as Master for the third loop.
but even I slow the master loop down to 1000ms the period time of two slaves are also around 1000ms and always a bit slower than the master loop... (the minimum period times in plain loops are 250ms, 380ms, 380ms for my program)
I think you are right about MS interruptions. Everytime when Excel sheet pops up the loop periods slows down a little bit. But what is the reason that a timed loop is not stable??? Is it MS the interruptions only, which makes it instable???
for synchronization of the elapsed test time and wave chart time I will put the chart into the master loop... (That has to work!!!??? What would you say?)
And what do you think about Producer/Consumer architecture?? have you ever used this? is synchronisation possible? Labview book says: "The producer/consumer design pattern is based on the master/slave design pattern and enhances data sharing among multiple loops running at different rates."
thx a lot!
11-01-2007 03:08 PM