LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Enquing Button Strings

I am trying to have LabVIEW search for a pressed button and output the integer. The one button dialog should be able to place which botton # was pressed in place of #d.
CLD Certified 2014
0 Kudos
Message 1 of 18
(3,252 Views)

You had essentially what was a format string (but it should be %d, not d%) but didn't use it in a Format Into String.

Then proceeded to place your button number into the enqueue element as a timeout value.

 

It should be

 

Message Edited by Ravens Fan on 03-21-2010 05:14 PM
Message 2 of 18
(3,249 Views)
Thank You! That fixed it up perfectly.
CLD Certified 2014
0 Kudos
Message 3 of 18
(3,246 Views)
I tried to add data collecting to my vi. but failed. I have tried many routes but this is the closest I have come to being successful.
Message Edited by ADrexelDragon on 03-21-2010 07:50 PM
CLD Certified 2014
0 Kudos
Message 4 of 18
(3,232 Views)

What do you mean by data collecting?

 

What is it you are trying to do with the upper loop?  I looks like you have a state machine packed in after dequeue functions, but there is no logical reason for the way the state machine runs relative the data being dequeued.  Why would you take an element off the queue just to stick it onto the front of the queue again?

0 Kudos
Message 5 of 18
(3,224 Views)
I am trying to figure out a way to continuously generate data with a queue and consumer loop.
CLD Certified 2014
0 Kudos
Message 6 of 18
(3,196 Views)
After hours of research, I have made a breakthrough. I can run data independently and continuously. Is this correct? Is there a better way?
CLD Certified 2014
0 Kudos
Message 7 of 18
(3,170 Views)

Hi Drexel,

 

Thanks for posting.  This article describes in detail how to implement producer/consumer design pattern.  And there is a great example attached at the bottom of it. 

 

I hope this helps!  Let us know your progress.

 

 

Tejinder Gill
National Instruments
Applications Engineer
Visit ni.com/gettingstarted for step-by-step help in setting up your system.
Message 8 of 18
(3,168 Views)

Hi Tejinder,

 

I was able to successfully use the produce/consumer design using that article for reference. One thing that I am having difficulties in deals with timing. I want to be able to find the elapsed time or the amount of time each button was on. Here is what I have been trying to do.

Message Edited by ADrexelDragon on 03-26-2010 05:00 PM
CLD Certified 2014
0 Kudos
Message 9 of 18
(3,136 Views)

One way to do this is to use something like the elapsed time express VI.  The attached VI is an example of how this VI works.  Perhaps you can then implement something similar, whereby this VI is called based on your button being on and stopped when your button is off. 

 

block diagram.JPG

Message Edited by Tejinder G. on 03-26-2010 06:07 PM
Message Edited by Tejinder G. on 03-26-2010 06:08 PM
Tejinder Gill
National Instruments
Applications Engineer
Visit ni.com/gettingstarted for step-by-step help in setting up your system.
0 Kudos
Message 10 of 18
(3,124 Views)