Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

problem in counting a digital event properly

i am beginner in labview. i got some questions. i am using a USB 6008 to obtain a signal from a gauge rain counter (edge counter), i found an example on the web thats work ok, but the problem is that this example, when is working the counter register 5 for each step, I NEED TO CHANGE THE COUNT TO ONE  ON EACH STEP, i dont know how to do this.
 
one the other hand, i am trying to configure a table to show on one column the time and  on the second the step, for example:
time      step
9:30:15     1    step (from the gauge rain counter)
9:30:37     1
 
I dont know how to do that?
 
to finalize, i am trying  to log the data using >>tolls>>data loging>> log menu, and i got the data but i cant read it or open it correctly, for example i want to read or view the data log using excel, how can i do this???
 
if someone can help me in this matter, i will really appreciate,
 
 
francisco Rivas
0 Kudos
Message 1 of 3
(3,266 Views)

Hello Francisco,

I'm not sure what example you found online, but one of the best places to find examples is in the Example Finder located in Help>>Find Examples.  I will list a few examples that will get you started with the features you will like to have in your application.

1) Count Digital Events.vi - this is a simple event counter that will count either rising or falling edges.  If you find that it gives you more counts than you expect (5 when you expect 1), it could be due to the signal you are receiving.  If it is not a clean signal you could count extra edges.  If this is the case (you are getting extra counts), i recommend viewing the signal by reading it on an analog channel or an oscilloscope.

2)Building Tables.vi - If you want to display your data in a table on your LabVIEW front panel, this will show you how you can format data.  For different data formats search for the Format Into String function and bring up the context help (CTRL+H).

3)Write To Text File.vi - this is an example for writing tab-delimited text files (you can open them with Microsoft Excel).  This example simulates data, however you can apply the same concept to data acquired with hardware.  To get the time you can use a 'Get Date and Time in Seconds' function from the timing pallette. You can format the time into a string before writing to a file. 

The datalogging feature you mentioned is meant to track all indicators/controls on your front panel.  It is not specifically designed for writing just your acquired data to a file. 

Hope this helps,

Jennifer O.
Applications Engineer
National Instruments

 

 

0 Kudos
Message 2 of 3
(3,257 Views)

thank you so much,

yes i am using count digital events example, so i am going to try to do what you recomend to me.

francisco

 

 

0 Kudos
Message 3 of 3
(3,248 Views)