Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

convert signal encoder to rpm using USB 6251.vi

Hi, NI

 

Please solve my problem,

 

i ve a problem with measuring rpm motor DC using USB 6251..

 

Pls how procedure that i use?

 

Can i use function DAQ counter and display this in rpm?(please give an vi example using USB 6251)

 

Pls reply..

 

Thanks

 

 

0 Kudos
Message 1 of 18
(10,788 Views)
0 Kudos
Message 2 of 18
(10,763 Views)

Hi, user.


i've a problem with my vi

i get TTL signal from my optocoupler sensor and i connect it to PFI 8 dan DI Ground. But data output which i get is 0 and 1 value..

and i hope i get number of pulses(count pulse) as encoding type i used(X1 Encoding).

 

Is it wrong? whether this fault by its sensor? is it different using optocoupler and encoder as long as signal that i get is TTL(0 and 1)

 


So, how can i convert this value into (number of pulses/fixed time) and later RPM data?

Here, i include my vi..

 

Please give me a respond of my work..

i'll appreciate this..

 

Thanks.

 

Best Regards,

 

Ariawan 

l

0 Kudos
Message 3 of 18
(10,749 Views)

Hello Araiwan,

 

If you're only measuring frequency try the following example.


DAQmx Measure Frequency with a Counter Input


Regards,
Glenn
0 Kudos
Message 4 of 18
(10,727 Views)

Hello, Glen and all

 

i've measured degree out from my optocoupler using edge count signal..

 

but i still difficult to convert this value(degree) to rpm(degree per fixed time)..

 

 

what i want is like this:

 

Time |  Position  | Rpm

 

1       46     14 rpm

2       76     13.5 rpm

3       96      14 rpm

 

and after this, i want to display the rpm value with waveform chart...

 

Here i attach my work recently...

i hope i can get the answer...

 

With Sincerely,

 

Ariawan

 

0 Kudos
Message 5 of 18
(10,707 Views)
How deterministic to do you need the rpm values to be? Judging from your code it heavily relies on software timing. If measurments are taken very minute, you can probably get away with using your existing code and using shift registers to hold onto the last value of the last loop iteration.

Regards,
Glenn
0 Kudos
Message 6 of 18
(10,688 Views)

Sorry, i absolutely don't understand what the statement that u said..

 

May be, can u give me some clue easier..or with some example program..

 

i just want to know how get the pulses(degree value) in fixed time..how hard i am is to implement the fixed time so that i can convert the degree/fixed time into velocity(rpm)..

 

Pls..give me some advice...

 

Thanks...

0 Kudos
Message 7 of 18
(10,678 Views)
0 Kudos
Message 8 of 18
(10,661 Views)

Hi ALL,,

 

i've seen the link that u give to me..

 

As my picture below..

I've gotten a position value in single sample..

 

When i use your advice(it's a N sample method that is formed in array and of course it uses sample clock method by ither counter)

 

So how can i easily develop RPM(velocity) value by its position? and even i get fixed time interval i can't..

 

 

~my optocoupler just has 2 output:

 

TTL signal and ground 

 

Any comment would be appreciated..Thank

 

Ariawan. 

 

 

buat ni.jpg
0 Kudos
Message 9 of 18
(10,602 Views)

Hi Ariawan,

 

I think the attached VI might clear things up a bit--this should be what you need, it uses the 2nd counter to generate a clock for the first so you have a deterministic amount of time between sampling the count. 

 

The VI subtracts the previous count from the current one on every loop iteration.  Since we are using a sample clock, we know exactly how much time passes between each sample so from this we can calculate RPM.  I hope this helps!

 

 

Best Regards,

John Passiak
0 Kudos
Message 10 of 18
(10,586 Views)