02-21-2020 11:25 AM
I am a beginner in labview and I have to controll 2 ig220019 dc motors(without the gearbox) and 2 pmodhb5 drivers. One of the motors acts like a motor and the other one acts like a load for the first one. I've mannaged to controll both of them independently, I can measure the current of the motor using a MAX471current sensor, I can measure the RPM, but I can't figure out how to determine the direction of the motor. The motor has 2 hall effect sensor and a magnet, it outputs two square waves 90 degrees phase shifted. I can't figure it out how to measure the phase shift between these two signals. Can anyone help me?
02-22-2020 11:22 AM
I'd start by reading here: https://en.wikipedia.org/wiki/Incremental_encoder#Quadrature_decoder
There's also a LabVIEW forum thread discussing quadrature decoding (which is I think what you want) here: Quadrature Decoding.
GerdW's posts about halfway down the first page give some examples, including references to the Boolean Crossing PtByPt VI in LabVIEW (which allows you to detect and classify boolean changes.
The wikipedia article describes the possible state changes for normal operation (see the images).