Reads quadrature encoder
[position, direction] = mdaqEncoderRead(module) [position, direction] = mdaqEncoderRead(linkID, module)
This function reads current value of quadrature encoder (ENC1, ENC2) position register on selected ENC module. Function returns current position and rotation direction. Value of direction indicates rotation direction (0 - no motion, 1 - CW, 2 - CCW).
The quadrature encoder pulse (ENC) module is used for direct interface with a linear or rotary incremental encoder to get position, direction, and speed information from a rotating machine for use in a high-performance motion and position-control systems.
linkID: Valid connection link ID (optional)
module: Quadrature encoder module (1|2)
linkID: Valid connection link ID (optional)
position: Current quadrature encoder position value
direction: Current rotation direction (0 - no motion, 1 - CW, 2 - CCW)