# LabVIEW

cancel
Showing results for
Did you mean:

## Position and speed reading form two signal?

Hello i need to modify this program to know how to know speed the direction of the two signals ?

I have two wave form shifted by 90 degree i need to know the speed and direction.

thanks

Message 1 of 7
(1,080 Views)

## Re: Position and speed reading form two signal?

Hi Mohammed,

the "speed" is determined by the loop iteration rate in your image…

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
Message 2 of 7
(1,040 Views)

## Re: Position and speed reading form two signal?

And the direction is determined by the 90 degree phase shift.

By the way,  XOR(x, TRUE) is exactly the same as NOT just more code

"Should be" isn't "Is" -Jay
Message 3 of 7
(1,035 Views)

## Re: Position and speed reading form two signal?

Are you trying to simulate a Stepper Motor driven by a pair of phase-shifted pulse trains?  Generally, each pulse moves the stepper one "step" (defined by the motor), and the phase difference of the two pulse trains determines the direction of the movement.  The frequency of the pulse train essentially gives the velocity of the movement, as it is in "steps/(pulse period)" = "steps * pulse frequency".  To get Position, you need to define a known position (or have an encoder that reports the position) and simply count the steps (knowing whether you are moving in the positive or negative direction).

Bob Schor

Message 4 of 7
(1,027 Views)

## Re: Position and speed reading form two signal?

It sounds like you are trying to decode the signal from a Quadrature Encoder. I suggest you use that term as a search phrase in the forums (and possibly Google). There have been many posts on this topic.

Message 5 of 7
(991 Views)

## Re: Position and speed reading form two signal?

@SteveD123 wrote:

... decode the signal from a Quadrature Encoder.

Thank you -- I was wracking my brains (what remains of them) for this term ...

Bob Schor

Message 6 of 7
(984 Views)

Hi Gerd