LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to do fifo in labview?

Hii Dev,

                Here i am attaching u 2 vis, one is Counter.vi and another is Not working.vi, now whenever i ve called the counter.vi into not working.vi, the function of counter.vi is not showing any o/ps in the counter.vi, but if ill open the counter.vi, it is working ok, inside itself,and not giving the output where it is called? can you tell me why such things are happening? it is irretating.

 

Thanks,

Nishant

Download All
Message 21 of 50
(1,175 Views)
Hi Thomas,
 
Here it is in LabVIEW 7.0
 
Regards
 
Dev
 
Message 22 of 50
(1,211 Views)

Hi Nishant,

looked at ur VI,

This is what's happening : When called as a sub Vi, your counter vi vi is executin continously since there is no way you can stop its while loop.

so , remove the outer While loop and place it as a sub VI ( see attached program)

(Note : delay is only to reduce CPU loading)

But then i am not sure if this is the logic you have in mind for your Sub VI to execute.

Regards

Dev

 

Download All
Message 23 of 50
(1,207 Views)
A very elegant way to create a FIFO is using the queue operations.
 
Use the enqueue and dequeue to model a FIFO. If you need more clarifications, let me know and I will post an example.

Kudos are the best way to say thanks 🙂
0 Kudos
Message 24 of 50
(1,215 Views)

Thanks, Maximus

              It is good that if you can post us an example, and i havent work on the queue uptil now, so i dont have any ideas about the queue!Smiley Sad so its good if you can post us an example.

Thanks,

Nishant

Message 25 of 50
(1,210 Views)
I've attached a simple example using queue operations. I am generating few random numbers, and implementing a FIFO buffer of a specified size. Let me know if you have questions.

Kudos are the best way to say thanks 🙂
0 Kudos
Message 26 of 50
(1,191 Views)

Thanks Maximus,

         But here it is giving the error, while trying to open the vi, bcoz u ve created it into the LV 8.0Smiley Surprised, and i dont have the LV8.0, we are running it onto the LV7.1Smiley Mad, so its good that if you can post it on the LV7.1.

Thanks,

Nishant

Message 27 of 50
(1,175 Views)

Hiii,Dev,

         I am again in the problem, the vi you have given is great by the concept and i also want to do the things that way, which is the best option for me in my program, but the problem is in my vi, data is coming as a single row, instead of continous row, so i ve done the things, which is shoen in the vi, and i also think that i have to implement the shift reg, and i also tried so, but it is not working, co can you please help me, i am sending you my vi with this and the drivers for the card, in which drivers are available and take the driverd from it, when loading, so it can help you, to open the vi and you could see the proble, that it is not doing the fifo, but writing the data continuosly, plsSmiley SadSmiley Sadhelp me!!!!!!!!2026vi is a driver, and 2026_Multiscan_AD is a vi, which is i am trying.

 

Download All
Message 28 of 50
(1,154 Views)

Hi Nishant,

Your "2026_ScanMultAD.vi" gives 2 D array output.

so, do you know how many rows or columns will that array contain?

From what i can make out, on your AD config, Your end channel number will configure/acquire that number of channels on the device from channel 0 ( for ex, end channel=2 reads channels 0,1,2 )

Now how will 2026_ScanMultAD give channel wise data??  will be given row-wise or column-wise?

for instance, if scan rate is 100 and number of channels is 3 you will get either an array of '3 rows and 100 columns' or an array of '100 rows and 3 columns'. how do you get it?

Next, how do you want to write this 2D array into file?

regards

Dev

 

0 Kudos
Message 29 of 50
(1,152 Views)
Hiii, Dev,
 
        Actuallly Multiscan AD doesnt consider the scanrate, while give the output, it depends on the samples/ch which is also givenwith multiscanAD. it will give the data column wise mean if the End Channel no is 4 and samples/ch is 10, then it will give 5 rows and 10columns, but i want row wise and thats why i have transpose the 2D array, as you can see in the vi. and i want only 1 sample/ch at a time, so it should be like 5 rows and 1 col only. if anything write 2 me.
 
Thanks,
Nishant 
Message 30 of 50
(1,149 Views)