From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

quadrature encoder

Anyone know how to measure total pulse of quadrature encoder. My encoder has Data A, Data B and index BAR.

0 Kudos
Message 1 of 10
(3,860 Views)

Hi Marconi,

 

Thanks for the post!

 

Could you please explain a little more what your trying to do?

 

In labVIEW there are shipped examples, Help>>Find Example>>Hardware I/O>> Counter Measurements...

 

Here are some useful resources regarding connections:

 

Quadrature Encoder Measurements: How-To Guide

http://zone.ni.com/devzone/cda/tut/p/id/7109

 

Let me know what you think,

 

Kind Regards, 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 2 of 10
(3,853 Views)

Hi Hillman,

 

Thank you for your interest in helping me. Let me explain what i am trying to do. I have a quadrature encoder. I am try to measure how pulse that encoder generating in one revolution. I have PCI-6251 card. I attached the picture of encoder signal. maybe that give you more detail what I am try to do.

 

Thanks

 

 

0 Kudos
Message 3 of 10
(3,832 Views)

Hi Marconi,

 

So you want to know how many pulses are being generated in one revolution?

 

Kind Regards, 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 4 of 10
(3,810 Views)

Hi Hillman 

 

Yeah, I want to know how many pulses are being generated in one revolution. Do you have any ideal?

 

Thanks

 

 


 

 

0 Kudos
Message 5 of 10
(3,792 Views)

Hi Marconi,

 

Thanks for the reply.

 

Well, the manufacture should be able to tell you this information.

 

Alternatively you could just create a DAQmx task. The example attach calculates positon, but you could just change the CI Count task to count edges - to find out the number of pulses.

 

Let me know what you think,

 

Kind Regards,

*example in labVIEW 8.6

 

 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 6 of 10
(3,783 Views)

Hi Hillman,

 

Thanks for helps! We are manufacture encoders. I am try to create software to test all encoder. Would you convert the example to labview 8.0 for me please? I only have labview 8.0.

 

Thanks 

0 Kudos
Message 7 of 10
(3,776 Views)

Hello marconi,

 

Here is the VI for labVIEW 8.0. Best of luck to you!

 

Cheers!

 

Corby_B

http://www.ni.com/support 

0 Kudos
Message 8 of 10
(3,762 Views)

Thanks for the example, my situation is slightly the same but currently im trying to figure out the time difference between two square wave pulse (PULSE A and PULSE B) from an encoder. I tried to modify your code but fail to capture the zero crossing for each pulse. the pulse only rise to 5V and fall to 0V like normal square wave pulse

 

can you and all of experts here help me out with this?

 

my problem

1) encoder pulse are continous (pulse A and pulse B), how to capture the zero crossing

2) the zero crossing for square wave pulse are many point since th "0V" condition has its own period

 

is there any other suitable method? im totally blur on this oneSmiley Surprised

 

if possible someone show me correct method , Im using LABVIEW 7.1 and Hardware NI SCOPE (PCI 5102)

 

your advice are highly appreciated

0 Kudos
Message 9 of 10
(3,144 Views)

Hello There,

 

Typically, the reading of quadrature encoders is achieved by using counters.  However, since you are using a digitizer, your implementation will be significantly different.  I would recommend using the NI-SCOPE VI's rather than DAQmx.  One particular example (assuming you installed the NI-SCOPE drivers) that lets you identify the period measurement of a signal can be viewed by navigating to Start » All Programs » National Instruments » NI-SCOPE » Examples » <LabVIEW> » niScope EX Measurement Library.vi.  Under the Scalar Measurement control, select Period.  The period calculation is based on the time between the first and third mid reference level crosspoints.  Since you are trying to capture the zero crossing, you may want to set the mid reference level to a significantly low value.  More information about this functionality can be located using the NI High-Speed Digitizers Help (Start » All Programs » National Instruments » NI-SCOPE » Documentation » NI High-Speed Digitizers Help). 

Regards,
Roman Sandoval | National Instruments | RF Systems Engineer
0 Kudos
Message 10 of 10
(3,106 Views)