取消
显示结果 
搜索替代 
您的意思是: 

Producer Consumer

已解决!
转到解答

I have a State Machine with a subvi in it.  The code runs in the state machine then encounters the subvi.  The subvi pops up a display to the user a clock and a pressure measurement.  The clock counts down 2 mins while monitoring the pressure (loop).  A the end of the subvi loop the final pressure value is passed back to the main vi from which the subvi was called from.  This all works fine for me.  If there is a catastrophic leak and the pressure drops below a large amount..say 500 psi..there is no sense in continuing w the count down.  Can I use a producer/consumer routine such that if I put an abort button on the popup and the user hits it ( the producer) the subvi will end and return to the main vi??  Does this sound like its feasible and what producer/consumer is used for??  Where is Producer/Consumer in Labview 2014 ?  I can't find it in the examples or on any pallets.

 

Thxs

0 项奖励
1 条消息(共 6 条)
3,673 次查看

From you description, it doesn't sound like you need a Producer/Consumer.  Just put the button on the dialog window to stop the loop.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 项奖励
2 条消息(共 6 条)
3,664 次查看

OK..thanks.  Do you know where those are in EXAMPLES and on the pallets of LV2014?

0 项奖励
3 条消息(共 6 条)
3,656 次查看
解答
已被主题作者 Clint1000 接受

I'm in 2019, but I think 2014 should have at least similar examples (it was around then that the examples got a major overhaul).  But the closest example I am finding is the Queued Message Handler Fundamentals.vi.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
4 条消息(共 6 条)
3,640 次查看

I'm pretty sure that Producer/Consumer is present as a Template.  Open LabVIEW, go to File, "New ..." (the dots are important!), and expand "From Template" (under "VI").  You should see a couple of Producer/Consumer Templates, which have some comments explaining the basic idea.

 

Bob Schor

5 条消息(共 6 条)
3,562 次查看

thanks..

0 项奖励
6 条消息(共 6 条)
3,527 次查看