LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Encoder - NI USB 6229 - Calculation of the position

Hello, 

Spoiler

 

 

 

I am using the NI - USB 6229 Card and a magnetic Encoder from Kübler with a Resolution of 4096 Signals.

To calculate the Postion, i use the counter "0" at Pin 81 (PFI8),83(PFI9),85 (PFI10) and the "Read Encoder VI" from NI.

 

For 0rpm to 300 rpms, the calculation works perfect and i get a sawtooth from 0 to 360 degree.

 

If i use a higher spindle speed, i have the problem, that the sawtooth is less than 360 degree ( approximately 5 to 345/350 degree).

 

Can anybody help me? - i need a spindel speed from 0 to max 3000 rpm`s and a "perfect" reference signal ( sawtooth)

 

With best regards

 

Stefan 

0 Kudos
Message 1 of 5
(1,519 Views)

here is my VI

0 Kudos
Message 2 of 5
(1,518 Views)
0 Kudos
Message 3 of 5
(1,517 Views)

It isn't clear what your plans are for this "perfect" reference signal, but here are the two key reasons you're missing some positions in your data as you speed up your rotation:

 

1. You're task is in software-timed "on-demand" sampling mode rather than using a hardware clock and data buffer.   Counter tasks can't derive their own sample clocks however, so you'll need to generate one elsewhere and "borrow" it.  Typically, you'd configure your other counter to generate a continuous pulse train that you use as a sample clock.

 

2. While in software-timed mode, you've inserted a 10 msec delay in your reading loop.  So you can only nominally read at <= 100 Hz.

    300 RPM = 1800 degrees/sec.  So the nominal movement between readings would be >= 18 degrees.  Crank up the speed to 3000 RPM and that becomes 180 degrees.

 

- You need to do hardware-clocked sampling

- You may or may not actually need to sample at a rate that catches every 1 degree of motion.  Think about your purpose carefully.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 5
(1,488 Views)

Hallo Peter,

 

Thank you for your useful information!. i will try! and post my solution.

 

 

With best regards

 

Stefan

0 Kudos
Message 5 of 5
(1,473 Views)