LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fifo

 i have a problem trying to use fifo...

 

i need to get a value in when i pull a value..   is like a push-pull action,..i been trying, but, i guess i need a little help with this

0 Kudos
Message 1 of 8
(2,915 Views)

this images shows what i mean...

Download All
0 Kudos
Message 2 of 8
(2,913 Views)

all the steps in one pic..

0 Kudos
Message 3 of 8
(2,911 Views)

Your images show what you want, except that I do not understand your Pull. Now please post your VI showing what you have tried. Do you need to see the contents of the FIFO as shown on your images? 

 

Is there some reason why a queue does not work for you?

 

Lynn

0 Kudos
Message 4 of 8
(2,902 Views)
Look at using a queue.
0 Kudos
Message 5 of 8
(2,901 Views)

im sorry for my late answer, yes it does not work for me,.. because i want to get the the first in first out, but when it gets to the 12 row do the push - pull function

0 Kudos
Message 6 of 8
(2,834 Views)
0 Kudos
Message 7 of 8
(2,831 Views)

I still do not understand exactly what your problem is.  Please describe what you want it to do when you get to "the 12 row."

 

Your queue has a maximum of 16 elements (hex 10). When the queue has 16 elements an attempt to push another element onto the queue will wait forever (default timeout = -1 = never timeout). The VI will freeze in case 1 waiting for an element to be removed from the queue, but the other parts of the code cannot run until the Enqueue completes.

 

Note that the Pull case (2) has a 1 second timeout so when you attempt to Pull from an empty queue the output string becomes blank after 1 second due to the timeout.  You can Push an empty string into the queue and Pull it back out without the 1 second delay.

 

You should define what the program should do when the queue is full and someone tries to Push and what it should do when the queue is empty and Pull is pressed.  Once you define the behavior for those cases, writing the code to do that should be straightforward.

 

Lynn

Message 8 of 8
(2,811 Views)