LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Samples Counter

I can read data fine from my instrument connected on my serial port. I want to measure the number of data samples i acquire per second from my instrument. At present i do it by enclosing the complete VI in a while loop and count the number of iteration in 10 seconds with the help of an external StopWATCH!!!. How can i do it in labview...???
0 Kudos
Message 1 of 6
(3,222 Views)
The little i in the bottom corner of your while loop is a loop counter.
If you put a tick count outside your loop and one inside, one subtracted from the other will give the number of ms your program has been running. (divide by 100 to get seconds)
Simply divide your loop counter by your tick counter and attach an indicator = number of samples per second !
ddanskin@slb.com if you need more help.
0 Kudos
Message 2 of 6
(3,222 Views)
Thanks. the thing worked:)
0 Kudos
Message 3 of 6
(3,222 Views)
Good idea and that's the way that I would do it, except that you should divide by 1000, to get seconds from milliseconds.

Rob
0 Kudos
Message 4 of 6
(3,222 Views)
Thank you Robert 😉
I'm pleased someone reads my posts in enough detail to see my typos.
Dan
0 Kudos
Message 5 of 6
(3,222 Views)
True Rob, It have to be divided by 1000 to get value in seconds. THX
0 Kudos
Message 6 of 6
(3,222 Views)