LabVIEW

cancel
Showing results for 
Search instead 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

125873694f.jpg

 

0 Kudos
Message 1 of 7
(1,080 Views)

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
0 Kudos
Message 2 of 7
(1,040 Views)

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
0 Kudos
Message 3 of 7
(1,035 Views)

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

0 Kudos
Message 4 of 7
(1,027 Views)

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.

0 Kudos
Message 5 of 7
(991 Views)

@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

0 Kudos
Message 6 of 7
(984 Views)

Hi Gerd

 

can you please modify my VI with your answer.

 

Thanks in advance.

0 Kudos
Message 7 of 7
(960 Views)