08-01-2008 03:04 PM
08-01-2008 03:18 PM
I cannot look at your code at this time because I do not have LabVIEW installed on this PC.
However, if you are using a Producer / Consumer with Data architecture, then you should use a Queue to pass data from your producer loop to your consumer loop. Otherwise, you (may) will look data if you consumer loop is not able to process your data faster than the producer can obtain it.
I can look at the code later today or during the weekend, but I'm sure many will have a look at it as well.
R
08-01-2008 04:27 PM
08-01-2008 05:46 PM
Just looked at the code. I totally agree with smercurio.
The first place to start is to convert those loops into a single sub-vi (1 of the loops). Make the sub-vi re-entrant.
R
08-01-2008 06:42 PM
08-01-2008 09:25 PM
Have a look at the attached sub-vi. It is unmodified from your current code and should be an easy replacement.
It is called "sub-vi.vi", so change it to an appropriate name.
It is set as re-entrant.
R
08-01-2008 10:36 PM
08-02-2008 08:10 AM
You asked for an example of a sub-vi that was based on your code, which is what I did.
Now, you would like to change the code (and sub-vi) to implement what smercurio suggested... It would be better if you attempted the change and learned from doing so..
Let us know if you are having trouble... but at least try to do the implementation.. It is a good learning exercise 🙂
R