
ICPDAS
I-8092F Software User Manual
172
sm7Data = i8092_GET_SM7(1, 0x1);
Demo Program:
When the X axis is passing through the position 10000, the Y axis
direction fixed-pulse drive.
Parameters:
cardNo=1, ProvocativePulse=15000, ActivePulse=30000;
TotalAxis=0x3 (AXIS_XY), ProvocativeAxis=0x1 (AXIS_X), ActiveAxis=0x2 (AXIS_Y)
CompValue=10000
// Set parameters s for total axes or you can also set for individual axis
i8092_SET_SV(cardNo, TotalAxis, 100);
i8092_SET_V(cardNo, TotalAxis, 3000);
i8092_SET_A(cardNo, TotalAxis, 160);
// Set output pulse for the provocative axis
i8092_SET_PULSE(cardNo, ProvocativeAxis, ProvocativePulse);
// Set output pulse for active axis
i8092_SET_PULSE(cardNo, ActiveAxis, ActivePulse);
// Set a boundary condition COMP+ in the provocative axis
i8092_SET_CP(cardNo, ProvocativeAxis, CompValue);
// Disable the software limit
for(i=0;i<4;i++)
{
i8092_SET_WR2(cardNo, 1<<i, Reg[cardNo].WR2[i]&~0x0003);
}
// Provocative factor: P>=C+
i8092_SYNC_MODE(cardNo, ProvocativeAxis, 0x2001, 0x0);
i8092_COMMAND(cardNo, ProvocativeAxis, 0x20);
// Action of the active axis +direction fixed-pulse drive
i8092_SYNC_MODE(cardNo, ActiveAxis, 0x0, 0x0001);
i8092_COMMAND(cardNo, ActiveAxis, 0x20);