APX-3302 User's Manual (OM110000019A)
-83 -
/////////////////////////////////////////////////////////////////////////////////////
// point 6 - point 8: Return trip, start capturing //
/////////////////////////////////////////////////////////////////////////////////////
// When absolute count reaches "4000", coincidence pulse is generated and capture 1 time.
// After that, capture when counting reaches "3000","2000" or "1000".
// It captures 5 times in total.
// You can get latest value of comparison memory by 10
th
argument of "AcapGetEncoder" function,
// and can get current value by "ACL_ENC_ABC_COUNT".
ULONG ulCompMem, ulAbsCount;
// Get the latest value of comparison memory
AcapGetEncoder(hDev, INPUT_CH, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &ulCompMem, NULL);
// Get the value of absolute position encoder count
AcapGetInfo(hDev, INPUT_CH, ACL_ENC_ABS_COUNT, 0, &ulAbsCount);
/////////////////////////////////////////////////////////////////////////////////////
// point 9: Return trip, finish capturing //
/////////////////////////////////////////////////////////////////////////////////////
// Return trip: Finish 4 times capturing, then stop capturing and configure return trip.
// Outward trip: Specify comparison memory starting position and finish position.
// Stop capturing
AcapGrabStop(ghDev, INPUT_CH);
// Outward trip: Specify comparison memory starting position and finish position.
nStartPos = 0;
nEndPos = 4;
dwRegVal = (0x000000FF & nStartPos) << 8;
dwRegVal | = 0x000000FF & nEndPos;
// Configure comparison memory starting position and finish position.
AcapSetInfo(ghDev, INPUT_CH, ACL_ENC_COMPARE_2, 0, dwRegVal);
//--- Since encoder count is already started, no need to configure here. ---
// Outward trip: Start frame number specifying capturing (Capture 5 frames)
AcapGrabStart(ghDev, INPUT_CH, 5);
Summary of Contents for APX-3302
Page 1: ...APX 3302 User s Manual ...