Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

get time with DIO and timer

Hi everybody,

 

I'm new with LabView.

I try to get timestamps when I have a digital input on a NI 6233 card. For that I am using a counter/timer which is synchronising my digital waveform input, like an example shows.

When I calculate the period with two timestamps afterwards I see weird results. (see jpeg)

Does anybody know if this is a software or hardware issue? How can I fix that?´

 

Attached you can find also the vi.

 

 

Download All
0 Kudos
Message 1 of 4
(4,843 Views)

Hi King,

 i took a look at your VI, but I can't  cover your problem. There are a few things, which are very confusing. E.g. insteat of using so many local variables you should use shift register.

 

May you explain your problem again more in-depth? What exactly should be done in your VI? Please specify your problem.

 

Kind regards,

Patrick

0 Kudos
Message 2 of 4
(4,819 Views)

Hi Patrick,

 

I try to measure the period of a rotating part. I am using a proximity sensor to give me a digital high signal for each rotation.

In the vi I am using a counter/timer to syncronize my digital input. Afterwards I am using my data signal twice. Once I am using it to get a boolean which starts a case structure. In there I am using the data signal a second time to get my a timestamp which gets also transformed into seconds. I am saving this value to a tdms file.

With this timestamp I am calculating the period in another program. For some reason the period has descrete values which shows the jpeg.

Do you have a better way to get the timestamp or even the period?

 

Thanks.

0 Kudos
Message 3 of 4
(4,789 Views)

Hi King,

 

If I got it right you want to get the time the rotating part needs for one turn.

In my opinion the easiest way to realize that, is using de express VI "elapsed time". You'll find this express VI in "Functions --> Programmig --> Timing". In this VI you are able to reset the elapsed time every turn and of course measure this time.

Is that what you were looking for?

 

Kind regards,

Patrick

0 Kudos
Message 4 of 4
(4,774 Views)