
ICPDAS
I-8092F Software User Manual
70
Return:
None
Example:
i8092MF_RATIO_INITIAL(…);
//Initial setting for i8092MF_RATIO_2D(…) function.
//Please refer to the example of i8092MF_RATIO_2D() function.
BYTE
i8092MF_RATIO_2D(
BYTE
cardNo
,
WORD
nType
,
long
data
,
WORD
nDir
)
Description:
This function performs a two-axis ratio motion.
Parameters:
cardNo
:
Module number
nType
:
0 Perform the ratio motion.
1 Declare the end of ratio motion.
data
:
The pulse number of X-axis
(
-8,388,607 ~ +8,388,607
)
nDir
: Direction
of
the
Y-axis.
0: CW; 1: CCW
Return:
YES
An error has occurred. Use the
i8092MF_GET_ERROR_CODE () function to identify the error.
NO
No
errors.
Example:
BYTE cardNo=1;
//select module 1.
int
sv=300;
//set starting speed to 300 PPS.
int
v=18000;
//set vector speed to 18000 PPS.
long
a=500000;
//set acceleration value to 500K PPS/Sec.
int
loop1, loop2;
i8092MF_SET_MAX_V(cardNo, 0Xf,160000);
//set maximum speed value to 18000 PPS.
i8092MF_RATIO_INITIAL(cardNo, sv, v, a, 0.36);
//The ratio is 0.36.
for
(loop2 = 0; loop2 < 5; loop2++)
{
for
(loop1 = 0; loop1 < 5; loop1++)
{
i8092MF_RATIO_2D(cardNo,
0,
3600,
0);