07-09-2014 10:26 AM
hello
in attachement VI below
the problem is the action delay 4 Boolean button (EA50, SA, Sa, Ea) up to a new program run
I used Queue for transferring data between the 2 while loop
07-09-2014 10:34 AM
What do you mean by "action delay"?
Does it have anything to do with the 60 second wait you have in your producer loop?
07-09-2014 10:36 AM
@bilalus wrote:
hello
in attachement VI below
the problem is the action delay 4 Boolean button (EA50, SA, Sa, Ea) up to a new program runI used Queue for transferring data between the 2 while loop
What do you mean by Action delay? Your 2nd loop iteration depends on the 1st loop and your 1st loop iterates every 1 minute. Your button executes only every 60 seconds. Please clarify for more clear information.
07-09-2014 12:25 PM
1. You don't need the wait in your consumer loop. It will run when you get data from the producer.
2. How are you stopping the VI? From what I can see, you are using the ABORT button in the toolbar. You should not be doing that. You need a clean way to allow your VI to stop on its own. I would recommend adding a stop button to go in the producer loop to stop it. Then send an empty array through the queue. In the consumer, do a check for an empty array. Stop that loop when you see an empty array.
3. Are you really just gathering data at once a minute? That is a bloody eternity!
07-10-2014 04:02 AM
hello
Why is the execution of the 4 buttons depends on the acquisition loop every 60 seconds?
me I want an instantaneous execution of buttons, without delay, without dependence of the acquisition loop
action delay=the delay for execution of the 4 buttons, that's what I mean,I am sorry
07-10-2014 04:38 AM
It actually depends on the timeout you specify in the Dequeue function. Since your 1st loop executes every 60 seconds your queue doesn't have anything to be read. When you see the dequeue functions its default timeout is -1 which means it will wait indefenetly until an element is available in the queue. To overcome this situation you can wire a timeout of 1000 ms so that your 2 nd loop executes every 1 second.
But I don't really understand what you are trying to achieve in the 1st loop waiting for 1 minute and doing nothing.