05-13-2018 09:44 AM - edited 05-13-2018 09:53 AM
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
05-13-2018 12:42 PM
05-13-2018 01:34 PM
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
05-13-2018 03:41 PM
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
05-14-2018 02:22 AM
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.
05-14-2018 07:37 AM
@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
05-14-2018 03:38 PM
Hi Gerd
can you please modify my VI with your answer.
Thanks in advance.