APX-3302 User's Manual (OM110000019A)
-82 -
For instance, if you use starting position as comparison memory 5 value and finish position as comparison
memory 8 value, configure comparison register 2 as "0508h".
Comparison memory No Address Counter set value
Comparison memory 0
5000h
1000
Comparison memory 1
5004h
2000
Comparison memory 2
5008h
3000
Comparison memory 3
500Ch
4000
Comparison memory 4
5010h
5000
Comparison memory 5
5014h
4000
Comparison memory 6
5018h
3000
Comparison memory 7
501Ch
2000
Comparison memory 8
5020h
1000
Table6-8: Starting position and end position of return trip
/////////////////////////////////////////////////////////////////////////////////////
// point 5: Outward trip, finish capturing //
/////////////////////////////////////////////////////////////////////////////////////
// Outward trip: Finish 5 times capturing, then stop capturing and configure return trip.
// Return trip: Specify comparison memory starting position and finish position.
// Stop capturing
AcapGrabStop(ghDev, INPUT_CH);
// Return trip: Specify comparison memory starting position and finish position.
nStartPos = 5;
nEndPos = 8;
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);
// Not to change to CCW, because counter will be count-up at return trip.
//--- Since encoder count is already started, no need to configure here. ---
// Return trip: Start frame number specifying capturing (Capture 4 frames)
AcapGrabStart(ghDev, INPUT_CH, 4);
Outward trip
end position
Outward trip
starting position
Содержание APX-3302
Страница 1: ...APX 3302 User s Manual ...