<< mdaqDIOWrite Data acquisition mdaqEncoderRead >>

MicroDAQ toolbox >> MicroDAQ toolbox > Data acquisition > mdaqEncoderInit

mdaqEncoderInit

Initializes quadrature encoder module

Calling Sequence

mdaqEncoderInit(module, initValue)
mdaqEncoderInit(linkID, module, initValue)

Description

This function initializes selected quadrature encoder module (ENC1, ENC2) with provided initial value.

Input arguments

Examples

// mdaqEncoderInit usage example
link_id =  mdaqOpen(); 
// initialize quadrature encoder with 0 
mdaqEncoderInit(link_id, 1, 0); 
// read quadrature encoder module 1
mprintf('Encoder position: %d\n', mdaqEncoderRead(link_id, 1));
mdaqClose(link_id)

See Also


Report an issue
<< mdaqDIOWrite Data acquisition mdaqEncoderRead >>