04-11-2005 04:51 AM
04-11-2005 05:52 AM
07-24-2006 03:38 AM
Hi
i m using queue vis first time.I think i m using them correctly but i am not able to stop the VI.
i am sending the VI . If someone sort out the problem then plz tell me
thanxs
07-24-2006 03:50 AM - edited 07-24-2006 03:50 AM
Hi
The vi did no terminate, because the dequeue element waits for an element to dequeue for an infinite time.
You have two options:
1. Remove the "wait for ms multiple" function and wire a constant to the timeout of the dequeue function
2. Wire the release queue function out of the loop where you generate the events instead of the consumer loop. In this case the dequeue function is also interrupted.
Message Edited by becktho on 07-24-2006 10:53 AM
07-24-2006 04:02 AM
Hi
Thanxs for quick reply.
one more questions - sometimes while running the same vi for the first time i got an error
Error 1 occured at Enqueue element in Queue.vi
Error code - 1
what is the reason of getting this error.
thanxs
07-24-2006 04:09 AM
If you have a look at the LV help, you can find that error code 1 occured due to an invalid input parameter.
Run the vi in highlighting mode and observe what's going on in the block diagram. This way you can locate the error and maybe eliminate it on your own or you can give more information about it.
07-05-2007 03:49 AM
07-05-2007 01:13 PM
The reason is indeed the two errors.
What's happening is this:
That's your two 0's.
07-06-2007 03:01 AM
This error is inevitable? To stop the VI I need release queue, isn't it?
3. You destroy the queue in the top loop. The dequeue node returns error 1122 and 0 (the default value for the DBL data type). The loop does not stop, because the stop button was read at the beginning.
I've solved the error 1 (picture), but I think this solution is very dirty.
4. The loop iterates again. The queue was destoryed, so you get error 1 and 0. Since you pressed the stop button, it is now T and the loop stops.
07-06-2007 03:58 AM
You don't need to destroy the queue twice. Once is enough and you can then use the error.
Here's an alternative approach.