beautypg.com

S2253p_enableencoderasync, S2253p_encoderread – Sensoray 2253 Windows User Manual

Page 41

background image

device id in the system (use 0 with a single board installed).

encoderId

encoder identifier 0 or 1.

value

requested value.

S2253P_EnableEncoderAsync

MID2253_API int __stdcall S2253P_EnableEncoderAsync (

int

devid,

int

encoderId,

int

enable);

This function controls enabling asynchronous encoder count updates internally
on the board. When asynchronous mode is enabled, encoder count on OSD
will update on-the-fly, and encoder reads do not require update first.
devid

device id in the system (use 0 with a single board installed).

encoderId

encoder identifier 0 or 1.

enable

0=disabled, 1=enable asynchronous updates

S2253P_EncoderRead

MID2253_API int __stdcall S2253P_EncoderRead (

int

devid,

int

encoderId,

S2253P_MODE

mode,

int

*value);

This function reads the encoder. This requires two transactions, an “update”
request, and a “read” reply. The transactions may be performed
independently, or together. Any read transaction will cause this function to
block until the reply is received. When asynchronous mode is enabled for an
encoder using S2253P_EnableEncoderAsync, the “update” transaction is not
required and a read should not block.
devid

device id in the system (use 0 with a single board installed).

encoderId

encoder identifier 0 or 1.

mode

41

This manual is related to the following products: