LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I generate a pulse train from shaft encoder?

Hey Jango,

 

From the code you posted it looks like you're trying to use the Z pulse to set the intervals for some type of analog voltage measurement? Are you trying to use the LED to indicate when the encoder has completed a full revolution?

 

Are you trying to read the appropriate PFI line in the Digital I/O tab? How fast is the encoder turning and what is your sample rate set to?

 

Andy C.

Applications Engineering

National Instruments 

0 Kudos
Message 11 of 14
(716 Views)

http://forums.ni.com/t5/Multifunction-DAQ/Beginner-question/m-p/2415124#M76663
I am trying to read the Digital I/O in 1(A) 2(Z) and 3(B) (As mentioned to me in the post).
This is my previous post, I have changed the code, such that Z triggers the sensor on ai0.
My priority is to achive an LED pulse for every Z pulse recieved (that is one full rotation) I plan to align this LED with the Top Centre of my shaft, so that I can measure the Encoder readings from the Top centre. I hope this makes sense.

*I am trying to miss every second z pulse. that is 1 pulse per 2 rev (2048 samples per channel inside the while loop, though I am not sure if this does what I am trying to do.). But this is of low priority.

 

Thanks,

0 Kudos
Message 12 of 14
(698 Views)

Can anyone help me out here?

0 Kudos
Message 13 of 14
(678 Views)

Hey Jango,

 

Since this post was originally devoted to another user's issue, I would ask that you begin a new post with a new problem summary along with a copy of your most recent code. We'll be happy to offer more advice on a fresh thread.

 

Thanks!

 

Andy C.

Applications Engineering

National Instruments 

0 Kudos
Message 14 of 14
(660 Views)