LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Correct Way to get frequency from quad encoder?

Labview 8.5

Is this the correct way to measure frequency (to be converted to RPM) from a quad encoder? I am a bit confused as to what the "counter" input is on the Read function. I don't have a board attached to my computer now so I don't know what choices will appear. I want to sample the same A pulse that I use for the analog Read function and use it to determine frequency, compared to the 200kHz onboard clock.

 

Note: I know this vi will not run right because of dropped data in the timeout case. My actual program runs in a loop until "Stop" and all data lines are looped through registers while in a waiting state. I was just trying to present the part of the code that acquires data.

Labview 8.5
Meas Studio 2008
0 Kudos
Message 1 of 11
(3,322 Views)

I forgot to say I want to start the test on the start button, then take initiate data acq on the analog channel on the Z pulse and keep this channel reading for the duration. The index array is to start on the Z pulse and take one reading each revolution (Z pulse). Did I miss setting a trigger for the index pulse?

Labview 8.5
Meas Studio 2008
0 Kudos
Message 2 of 11
(3,294 Views)

I think I was very tired when I did the orig vi (#01). I resubmit it as a vi that I think should work. Please verify or steer me right.

 

Labview 8.5
Meas Studio 2008
0 Kudos
Message 3 of 11
(3,287 Views)

anyone???

Labview 8.5
Meas Studio 2008
0 Kudos
Message 4 of 11
(3,249 Views)

No really I mean it. Anyone???

 

Labview 8.5
Meas Studio 2008
0 Kudos
Message 5 of 11
(3,231 Views)

Pleeeeease???

Labview 8.5
Meas Studio 2008
0 Kudos
Message 6 of 11
(3,217 Views)

What do you plan on using for hardware? Depending on what chassis/card you are going to be using, it will have a different number of counters and this will reflect on your input.

 

Regards,

 

 

Daniel G.
Semiconductor & Wireless
National Instruments
0 Kudos
Message 7 of 11
(3,204 Views)

Hi Daniel,

Analog input thru PCI-6071e. All digital inputs thru PCI-6143 using:

encoder A pulse = PF0, Z pulse = PFI1, counter = ctr1

Boards are coupled with RTSI cable which is identified and linked to both boards in Meas and Automation.

Meas and Auto, when using Test Panels confirms that channels are read properly.

 

THough 2 boards are recundant for this app, I am stuck with it because of existing hdwr interface (data acq board). I had acces to the hdwr yesterday and ran this pgm flow test, in 2 tests. I first split i into 2 pgms to test analog and digital acq. The analog section works correctly, the digital does not.

 

My problem I think is independent of hdwr, it is program logic / flow. I have no experience in digital measurement and my block diagram probably does not do what I am trying to do (measure frequency once each revolution). I don't think I am using the digital inputs and counters correctly and what I have found in the help files does not explain it in a way I can understand.

 

I need to poll the Z pulse and each rev when it goes high I need to measure frequency by reading the period between 2 adjacent A pulses and comparing them to the internal clock to determine frequency. Is this what my block diagram does or is it wrong?

 

 

Labview 8.5
Meas Studio 2008
0 Kudos
Message 8 of 11
(3,189 Views)

Have you tried following the stes on the following article?

 

http://www.ni.com/gettingstarted/setuphardware/dataacquisition/quadratureencoders.htm

Daniel G.
Semiconductor & Wireless
National Instruments
0 Kudos
Message 9 of 11
(3,170 Views)

Yes I did read that article. I have no idea what "stes" means. I found absolutely nothing in that article that pertains to what I am trying to do. Can you please read post #8 which clearly describes the type of measurement I am attempting and tell me if the block diagram I uploaded is right or if it is wrong?

 

I since made one change in the block diag - I rewired the reference trigger source for the encoder from its previous control "Z pulse" to "A pulse". This was previously an error I think.

Labview 8.5
Meas Studio 2008
0 Kudos
Message 10 of 11
(3,162 Views)