LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

exit of queued state machine

Hello,

 

i have probleme existing an queued state machine vi :

 

I can't see how to do to make my vi stop before the wainting time here example is 3s (splitted in 25ms) .

 

I thinkthere is a probleme flush queued or course competition  something like that but i a little new to this kind of codind that i'm a little bit lost.

 

here zip file of a minimized programme to isolate part that make me crazy

 

For the moment to make it run in a trash mode i put the 25ms wait out of case structure , it works but it means that every case take 25ms

and is not  good job , because i have something like 20 cases in reality  

 

 

Thank you for help

 

 Best regards

 

Tinnitus

 

CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
0 Kudos
Message 1 of 22
(3,628 Views)

Sorry for not understanding you correctly, 

From your question, your vi takes total 3 seconds to stop after you actually stopped it. Am I right?

 

Why dont you put the timer inside the cases which runs continuously? You need not place it outside the case structure.

Sorry I could not look into you code. Could you post it in 8.5?

 

PS- You can post your problem in french also. There are many who speaks french and can help you faster.

0 Kudos
Message 2 of 22
(3,611 Views)

hello,

 

yes it depends of moment you ask to stop so it may take from 0 to 3s to stop

 

yes it couls be easier if you can see my code, what is the way to dowgrade vi with other vi and control attached ?

 

Yes it just a habit because there is often much more people connect at this time

 

Regards 

 

Tinnitus

 

CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
0 Kudos
Message 3 of 22
(3,604 Views)

Just select File>>Save for Previous in your top level vi (Main vi). It takes care of rest of the hierarchy. Send your vis here. 

 

But placing the timer inside specific cases wouldnt solve your peoblem? 

0 Kudos
Message 4 of 22
(3,599 Views)
is it in 85 this time ?
Message Edité par tinnitus le 11-24-2009 10:50 AM
CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
0 Kudos
Message 5 of 22
(3,586 Views)

Well..

I was not able to get events you have registered with event structures. And also couldnot understand properly because of french texts.

 

Anyway, you are facing this problem due to the STTM Q MGR_new.vi in the consumer loop. You are queing more elements in each iteration. This causes your loop to hault untill this vi finishes execution although you have dequed exit case in the end.

 

So is it really necessary to have this vi outside the case structure? cant you use this vi to que elements in the producer loop? (loop above?) 

. Or you can queue required elements inside the case structure of consumer loop.(Place this vi in whichever cases necessary)

 

As shown in the figure,  move that vi either inside the case, or you can just que those when the user action takes place in the producer loop.

 

Deque.PNG

 

  I hope i am clear in what i am trying to say. Your lower loop will never stop untill the STTM Q MGR_new.vi stops its execution, so it is necessary to meve as mentioned in the figures

0 Kudos
Message 6 of 22
(3,575 Views)

Or another simple solution would be, put a case structure around the vi STTM Q MGR_new.vi, and donot execute this vi when output of the deque element is Exit. 

 

DequeModified.PNG 

0 Kudos
Message 7 of 22
(3,568 Views)

hello, thans you for your suggestions i will have a look tomorrow

 

Best regards

 

Tinnitus

 

 

CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
0 Kudos
Message 8 of 22
(3,557 Views)

To add on,

1.Clean up your block diagram.

2. Donot use default tunnels in case structure borders. (right click, uncheck use default if unwired

3. wires must flow left to right or top-bottom-top.

4. You can just destroy the queue when the producer loop ends, and use the error out of deque function to terminate the consumer loop. 

0 Kudos
Message 9 of 22
(3,556 Views)

tinnitus wrote: 

hello, thans you for your suggestions i will have a look tomorrow

  


Tomorrow???? no finish it today. Its 9pm here but still im trying to help you. Why cant you check it now? Never say tomorrow, what if tomorrow never comes?? huh. :smileymad:
 
0 Kudos
Message 10 of 22
(3,549 Views)