09-13-2013 06:16 PM
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
09-13-2013 06:19 PM
this images shows what i mean...
09-13-2013 06:28 PM
all the steps in one pic..
09-13-2013 06:44 PM
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
09-13-2013 06:46 PM
09-15-2013 02:21 PM
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
09-15-2013 02:25 PM
here is the VI
09-15-2013 04:30 PM
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