![background image](http://html2.mh-extra.com/html/icp-das-usa/i-8092f/i-8092f_user-manual_3531635173.webp)
ICPDAS
I-8092F Software User Manual
173
Fig. A-42 Synchronous action example 1
Demo Program:
At first the X,Y axes continuous drive,
when the X axis is passing
through the position -10000, the Y axis stops.
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, AXIS_X, 100);
i8092_SET_V(cardNo, AXIS_X, 3000);
i8092_SET_A(cardNo, AXIS_X, 160);
i8092_SET_SV(cardNo, AXIS_Y, 100);
i8092_SET_V(cardNo, AXIS_Y, 2000);
i8092_SET_A(cardNo, AXIS_Y, 80);
// 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 provocative axis
i8092_SET_CM(cardNo, ProvocativeAxis, CompValue);
// Disable the software limit
for(i=0;i<4;i++)
{
i8092_SET_WR2(cardNo, 1<<i, Reg[cardNo].WR2[i]&~0x0003);
}
// -Direction continuous drive for the provocative axis
i8092_COMMAND(cardNo, ProvocativeAxis, 0x21);
// Action of the active axis ---> Stop
i8092_SYNC_MODE(cardNo, ActiveAxis, 0x0, 0x0010);
// +Direction continuous drive for the active axis
i8092_COMMAND(cardNo, ActiveAxis, 0x21);