ICP DAS USA I-8092F User manual

ICPDAS I-8092F Software User Manual1
2-axis Motion Control Module
User Manual
(I-8092F)
(Version 2.3)
Macro Function Library in C++ for
WinCon and I-8000 series PAC controllers

ICPDAS I-8092F Software User Manual2
Warranty
All products manufactured by ICPDAS Inc. are warranted against defective
materials for a period of one year from the date of delivery to the original
purchaser.
Warning
ICPDAS Inc. assumes no liability for damages consequent to the use of this
product. ICPDAS Inc. reserves the right to change this manual at any time without
notice. The information furnished by ICPDAS Inc. is believed to be accurate and
reliable. However, no responsibility is assumed by ICPDAS Inc. for its use, or for
any infringements of patents or other rights of third parties resulting from its use.
Copyright
Copyright 1997-2005 by ICPDAS Inc., LTD. All rights reserved worldwide.
Trademark
The names used for identification only maybe registered trademarks of their
respective companies.
License
The user can use, modify and backup this software on a single machine. The
user may not reproduce, transfer or distribute this software, or any copy, in whole
or in part.

ICPDAS I-8092F Software User Manual3
INDEX
1 PREFACE............................................................................7
1.1 Introduction................................................................................................7
1.2 Basic and Macro functions........................................................................7
1.3 Funciton description..................................................................................8
2 BASIC SETTINGS..............................................................9
2.1 Code numbers for axes..............................................................................9
2.2 Registration of Modules and getting the LIB version............................9
2.3 Resetting Module .....................................................................................12
2.4 Pulse Output Mode Setting.....................................................................12
2.5 Setting the Maximum Speed...................................................................13
2.6 Setting the Active Level of the Hardware Limit Switches...................14
2.7 Setting the Motion Stop Method When Limit Switch Is Sensed.........15
2.8 Setting the Trigger Level of the NHOME Sensor.................................15
2.9 Setting Trigger Level of the Home sensor .............................................16
2.10 Setting and Clearing the Software Limits...........................................16
2.11 Setting the Encoder Related Parameters.............................................17
2.12 Setting the Servo Driver (ON/OFF).....................................................18
2.13 Setting the SERVO ALARM Function................................................19
2.14 Setting the Active Level of the In-Position Signals.............................20
2.15 Setting the Time Constant of the Digital Filter...................................20
2.16 Position Counter Variable Ring............................................................22
2.17 Triangle prevention of fixed pulse driving ..........................................23
2.18 External Pulse Input..............................................................................24
2.18.1 Handwheel (Manual Pulsar) Driving ..............................................................24
2.18.2 Fixed Pulse Driving Mode ..............................................................................25
2.18.3 Continuous Pulse Driving Mode....................................................................26
2.18.4 Disabling the External Signal Input Functions.............................................27
2.19 Configure hardware with pre-defined configuration file...................28
3 READINGAND SETTING THE REGISTERS.............29
3.1 Setting and Reading the Command Position (LP)................................29
3.2 Setting and Reading the Encoder Counter............................................30
3.3 Reading the Current Velocity .................................................................31
3.4 Reading the Current Acceleration..........................................................31
3.5 Reading the DI Status..............................................................................32
3.6 Reading and Clearing the ERROR Status ............................................34
3.7 Setting the general Dinigtal output........................................................35

ICPDAS I-8092F Software User Manual4
4 FRNET FUNCTIONS (FOR I8092F ONLY)..................36
4.1 Read FRnet DI Signals............................................................................36
4.2 Write data to FRnet DO..........................................................................37
5 AUTO HOMING...............................................................38
5.1 Setting the Homing Speed.......................................................................38
5.2 Using an Limit Switch as the HOME sensor.........................................39
5.3 Setting the Homing Mode........................................................................39
5.4 Starting the Homing Sequence ...............................................................41
5.5 Waiting for the Homing sequence to be Completed.............................41
6 GENERAL MOTION CONTROL..................................42
6.1 Independent Axis Motion Control..........................................................42
6.1.1 Setting the Acceleration/Deceleration Mode ..................................................42
6.1.2 Setting the Start Speed.....................................................................................44
6.1.3 Setting the Desired Speed................................................................................44
6.1.4 Setting the Acceleration ...................................................................................45
6.1.5 Setting the Deceleration ...................................................................................45
6.1.6 Setting the Acceleration Rate ..........................................................................47
6.1.7 Setting the Value of the Remaining Offset Pulses .........................................48
6.1.8 Fixed Pulse Output ...........................................................................................49
6.1.9 Continuous Pulse Output.................................................................................50
6.2 Interpolation Commands........................................................................51
6.2.1 Setting the Speed and Acc/Dec Mode for Interpolation ................................51
6.2.2 Setting the Vector Starting Speed ...................................................................55
6.2.3 Setting the Vector Speed..................................................................................55
6.2.4 Setting the Vector Acceleration .......................................................................56
6.2.5 Setting the Vector Deceleration Value.............................................................57
6.2.6 Setting the Vector Acceleration Rate ..............................................................58
6.2.7 Setting the Number of the Remaining Offset Pulses.....................................59
6.2.8 2-Axis Linear Interpolation Motion ..................................................................60
6.2.9 2-Axis Circular Interpolation Motion (an Arc).................................................61
6.2.10 2-Axis Circular Interpolation Motion .............................................................63
6.3 Continuous Interpolation........................................................................65
6.3.1 2-Axis Rectangular Motion...............................................................................65
6.3.2 2-Axis Continuous Linear Interpolation..........................................................66
6.3.3 Multi-Segment Continuous Interpolation (Using Array) ................................68
6.3.4 2-Axis Ratio Motion...........................................................................................69
6.3.5 Mixed Linear and Circular 2-axis motions in Continuous Interpolation ......71
6.4 Set the Interrupt Factors.........................................................................74
6.4.1 Set the Interrupt Factors ..................................................................................74
6.4.2 Interrupt Disabled .............................................................................................76
6.4.3 Read the Interrupt Occurrence ........................................................................77
6.5 Other functions.........................................................................................78

ICPDAS I-8092F Software User Manual5
6.5.1 Holding the Driving Command ........................................................................78
6.5.2 Release the Holding Status, and Start the Driving.........................................78
6.5.3 Waiting until the Motion Is Completed............................................................79
6.5.4 Stopping the Axes.............................................................................................81
6.5.5 Clear the Stop Status ........................................................................................85
6.5.6 End of Interpolation ..........................................................................................85
6.5.7 Setting the COMPARE value ............................................................................86
APPENDIX A (I-8092F BASIC FUNCTIONS).................87
A.1 i8092F Command Set..............................................................................87
A.2 Pulse Output Command.........................................................................88
A.2.1 Signal Types......................................................................................................88
A.2.2 Fixed Pulse Driving ..........................................................................................90
A.2.3 Changing Output Pulse Numbers in Driving .................................................90
A.2.4 Offset Setting for Acceleration/Deceleration Driving....................................90
A.2.5 Continuous Drive Pulse Output ......................................................................92
A.2.6 Constant Speed Driving...................................................................................93
A.3 Profile Acceleration/Deceleration Planning..........................................94
A.3.1 Trapezoidal Driving [Symmetric].....................................................................94
A.3.2 Trapezoidal Driving [Asymmetric] ..................................................................96
A.3.3 Triangle Prevention ..........................................................................................98
A.3.4 S-curve Acceleration / Deceleration [Symmetry]...........................................99
A.4 Pulse Output Commands .....................................................................103
A.4.1 2-Axes Interpolation .......................................................................................103
A.4.2 Circular Interpolation .....................................................................................104
A.4.3 Bit Pattern Interpolation.................................................................................107
A.4.4 Continuous Interpolation...............................................................................109
A.5 Automatic Home Search....................................................................... 111
A.6 Interrupt Control..................................................................................112
A.6.1 Interrupt for Independent axis.......................................................................112
A.6.2 Interrupt for Interpolation ..............................................................................112
A.7 I-8092F Function Library ....................................................................113
A.7.1 Register management functions...................................................................114
A.7.2 Functions for Initial Setting ...........................................................................121
A.7.3 Motion Status Management Functions.........................................................127
A.7.4 Basic Motion Command Functions ..............................................................134
A.7.5 Interpolation Functions..................................................................................145
A.7.6 Automatic Home Search ................................................................................158
A.7.7 Interrupt Function...........................................................................................170
A.7.8 FRnet Related Functions ...............................................................................177
A.8 i8092 Command Lists...........................................................................179
A.8.1 Data Setting Commands ................................................................................179
A.8.2 Data Reading Commands ..............................................................................179
A.8.3 Driving Commands.........................................................................................180
A.8.4 Interpolation Commands ...............................................................................180
A.8.5 Other commands ............................................................................................180

ICPDAS I-8092F Software User Manual6
APPENDIX B: MCX312 REGISTERS............................181
B.1 Command Register: WR0 ....................................................................181
B.2 Mode Register1: WR1...........................................................................182
B.3 Mode Register2: WR2...........................................................................184
B.4 Mode Register3: WR3...........................................................................186
B.5 Output Register: WR4..........................................................................189
B.7 Data Register: WR6/WR7....................................................................190
B.8 Main Status Register: RR0...................................................................190
B.9 Status Register 1: RR1..........................................................................191
B.10 Status Register 2: RR2........................................................................193
B.11 Status Register 3: RR3........................................................................194
B.12 Input Register: RR4 / RR5.................................................................195
B.13 Data-Read Register: RR6 / RR7........................................................195

ICPDAS I-8092F Software User Manual7
1 Preface
1.1 Introduction
This manual provides complete and detailed description of i8092F functions
for users to develop programs for their control of automatic equipments.
Many examples are included in this manual for reference to write efficient
application programs.
This manual includes six chapters and two appendices. This chapter gives a
brief description of this manual. Chapter 2 to 6 is the explanations of macro
functions (MF). Appendices A and B are the descriptions of basic functions
(BF) and the registers of MCX312, respectively.
The functions defined in DLL file are explained here. This DLL can be used on
different developing software platforms, such as eVC++, VB.net, and C#.net,
and different OS systems ( MiniOS7 / WinCE).
1.2 Basic and Macro functions
Basic functions are suitable for those who are familiar with the MCX312
motion chip. These functions can directly read/write the registers of motion
chip. However, users need to know more details about this motion chip.
Macro functions provide a set of much easy-to-use functions that simplify the
programming for users. Some necessary settings, such as speed range and
deceleration point, are calculated inside those functions to ease the loading of
users on having to understand the motion chip. Some useful costumed
functions are provided for users to develop applications efficiently.
If possible, do not mix these two groups of functions together. Some internal
parameters may be changed beyond users'consideration.

ICPDAS I-8092F Software User Manual8
1.3 Funciton description
All functions are listed in following form:
Function_name (parameter1, parameter2, …)
Description: Explanation of this function.
Parameters: Definitions of the parameters and how to use them.
Return: The return value of this function.
Example: Simple example program in C++.
Remark: Comments.

ICPDAS I-8092F Software User Manual9
2 Basic Settings
2.1 Code numbers for axes
The axis assignments follow the definitions listed below: X=1, Y=2. If X and Y
axes are assigned simultaneously, then the code number is 3. An assignment for
either single axis or multiple axes at the same time is possible. Available axis
code numbers are listed below. The type of the axis argument used in the
functions is defined as WORD.
Table 2-1 Axis assignments and their corresponding codes
Axis X Y XY
Code 0x1 0x2 0x3
Name AXIS_X AXIS_Y AXIS_XY
2.2 Registration of Modules and getting the LIB version
BYTE i8092MF_REGISTRATION(BYTE cardNo, BYTE slot)
Description:
This function registers a module that is installed in slot number, slot,by
assigning a card number. Registration must be performed for each I-8092F
motion control module before other functions are called. After registration,
each module can be identified by its corresponding module number.
Parameters:
cardNo: Module number
slot: Slot number
for I-8000: 0~7
for WinCon-8000: 1~7
Return:
YES Normal
NO Abnormal
Example:
//================= for WinCon-8000 ==================

ICPDAS I-8092F Software User Manual10
//set each module number the same as the slot number, respectively.
//(slot1 ~ slot7)
BYTE cardNo;
BYTE slot;
int Found = 0;
for (slot = 1; slot < 8; slot++)
{
cardNo = slot;
if (i8092MF_REGISTRATION(cardNo, slot) == YES)
{ //slot number begins from 1.
//if a module is found, then it is registered as its slot number.
i8092MF_RESET_CARD(cardNo);
Found++;
}
}
if (Found == 0)
{
//if Wincon cannot find any I-8092F module,
//please add codes to handle the exception here.
return;
}
//=================== for I-8000 ===================
//set the module number the same as the slot number, respectively.
//(slot1 ~ slot7)
BYTE cardNo;
BYTE slot;
int Found = 0;
for (slot = 0; slot < 8; slot++)
{
cardNo = slot + 1;
//slot number begins from 0, but module number begin from 1.
if (i8092MF_REGISTRATION(cardNo, slot) == YES)
{
//if a module is found, then it is registered by giving a number.
i8092MF_RESET_CARD(cardNo);
Found++;
}
}
if (Found == 0)
{
//if Wincon cannot find any I-8092F module,
//please add codes to handle the exception here.
return;
}

ICPDAS I-8092F Software User Manual11
WORD i8092MF_GET_VERSION(void)
Description:
Read the version of current i8092 library.
Parameters:
cardNo: Module number
Return:
Version code:
including information of the year and the month: 0x0000 ~ 0x9999
Example:
WORD VER_No;
VER_No = i8092MF_GET_VERSION();
//Read the version code of i8092.dll
Remark:
If the return value is 0x0607
06 : the year is 2006
07: the month is July.

ICPDAS I-8092F Software User Manual12
2.3 Resetting Module
void i8092MF_RESET_CARD(BYTE cardNo)
Description:
This function resets module using a software command.
Parameters:
cardNo: Module number
Return:
None
Example:
i8092MF_RESET_CARD(1);
//Reset module 1.
2.4 Pulse Output Mode Setting
void i8092MF_SET_PULSE_MODE(BYTE cardNo, WORD axis, BYTE nMode)
Description:
This function sets the pulse output mode as either CW/CCW or PULSE/DIR
for the assigned axes and their direction definition.
Parameters:
cardNo: Module number
axis: Axis or axes (Please refer to Table 2-1)
nMode: Assigned mode (Please refer to Table 2-2)
Return:
None
Example:
i8092_SET_PULSE_MODE(1, AXIS_XYZ, 2);
//set the pulse mode of X, Y, and Z axes as mode 2
i8092_SET_PULSE_MODE(1, AXIS_U, 3);
//set the pulse mode of U axis as mode 3

ICPDAS I-8092F Software User Manual13
Table 2-2 A List of pulse output modes
Pulse output signals
mode
nPP nPM
0 CW (rising edge) CCW (rising edge)
CW / CCW
1 CW (falling edge) CCW (falling edge)
2 PULSE (rising edge)
DIR
(LOW:+dir/ HIGH:-dir)
3 PULSE (falling edge)
DIR
(LOW:+dir/ HIGH:-dir)
4 PULSE (rising edge)
DIR
(HIGH:+dir/ LOW:-dir)
PULSE / DIR
5 PULSE (falling edge)
DIR
(HIGH:+dir/ LOW:-dir)
2.5 Setting the Maximum Speed
void i8092MF_SET_MAX_V(BYTE cardNo, WORD axis, DWORD data)
Description:
This function sets the maximum rate for the output pulses (speed). A
larger value will cause a rougher resolution. For example, when the
maximum speed is set as 8000 PPS, the resolution is 1 PPS; when the
maximum speed is set as 16000 PPS, the resolution is 2 PPS; when
maximum speed is set as 80000 PPS, the resolution is 10 PPS, etc. The
maximum value is 4,000,000 PPS, which means the resolution of speed
will be 500 PPS. This function change the resolution of speed to reach the
desired maximum speed. Since the scale in hardware is changed, other
parameters will be influenced too, such as the starting speed, the
acceleration, and the jerk. It is recommended to set the maximum speed
value as a integral multiplier of 8000.
Parameters:
cardNo: Module number
axis: Axis or axes (Please refer to Table 2-1)
data: The assigned maximum speed of each axis when the
controller performs an interpolation motion. However, setting
the value of axis 1 is enough. For axis 1, the maximum value
is 4,000,000 PPS.
Return:
None

ICPDAS I-8092F Software User Manual14
Example:
i8092MF_SET_MAX_V(1, AXIS_XY, 200000L);
//The maximum speed for the X and Y axes of module 1 is 200KPPS.
//The resolution of the speed will be 200000/8000 = 25 PPS.
2.6 Setting the Active Level of the Hardware Limit Switches
void i8092MF_SET_HLMT(BYTE cardNo, WORD axis, BYTE nFLEdge,
BYTE nRLEdge)
Description:
This function sets the active logic level of the hardware limit switch inputs.
Parameters:
cardNo: Module number
axis: Axis or axes (Please refer to Table 2-1)
nFLEdge: Active level setting for the forward limit switch.
0 = low active; 1 = high active
nRLEdge: Active level setting for the reverse limit switch.
0 = low active; 1 = high active
Return:
None
Example:
i8092MF_SET_HLMT(1, AXIS_XY, 0, 0);
//set all the trigger levels as low-active for all limit switches
//on module 1.

ICPDAS I-8092F Software User Manual15
2.7 Setting the Motion Stop Method When Limit Switch Is
Sensed
void i8092MF_LIMITSTOP_MODE (BYTE cardNo,WORD axis, BYTE nMode)
Description:
This function sets the motion stop mode of the axes when the
corresponding limit switches are detected.
Parameters:
cardNo: Module number
axis: Axis or axes (Please refer to Table 2-1)
nMode: 0: stop immediately; 1: decelerating to stop
Return:
None
Example:
i8092MF_LIMITSTOP_MODE(1, AXIS_X, 0);
//set X axis to stop immediately if any limit switch on X axis is triggered.
2.8 Setting the Trigger Level of the NHOME Sensor
void i8092MF_SET_NHOME(BYTE cardNo, WORD axis, BYTE nNHEdge)
Description:
This function sets the trigger level of the near home sensor (NHOME).
Parameters:
cardNo: Module number
axis: Axis or axes (Please refer to Table 2-1)
nNHEdge: Active level setting for the near home sensor.
0 = low active; 1 = high active
Return:
None
Example:
i8092MF_SET_NHOME(1, AXIS_XY, 0);
//set the trigger level of NHOME of X and Y axes on module 1 to be active low.

ICPDAS I-8092F Software User Manual16
2.9 Setting Trigger Level of the Home sensor
void i8092MF_SET_HOME_EDGE(BYTE cardNo, WORD axis, BYTE nHEdge)
Description:
This function sets the trigger level of the home sensor (HOME).
Parameters:
cardNo: Module number
axis: Axis or axes (Please refer to Table 2-1)
nHEdge:Active level setting for the home sensor.
0 = low active; 1 = high active
Return:
None
Example:
i8092MF_SET_HOME_EDGE(1, AXIS_XY, 1);
//set the trigger level as high active for all home sensors on module 1.
2.10 Setting and Clearing the Software Limits
void i8092MF_SET_SLMT(BYTE cardNo, WORD axis, long dwFL, long dwRL,
BYTE nType)
Description:
This function sets the software limits.
Parameters:
cardNo: Module number
axis: Axis or axes (Please refer to Table 2-1)
dwFL: Value of the forward software limit
(-2,147,483,648 ~ +2,147,483,647)
dwRL: Value of the reverse software limit
(-2,147,483,648 ~ +2,147,483,647)
nType: Position counter to be compared:
0 = logical position counter (LP), i.e., the command position
1 = encoder position counter (EP), i.e., the real position
Return:
None

ICPDAS I-8092F Software User Manual17
Example:
i8092MF_SET_SLMT(1, AXIS_XY, 20000, -3000, 0);
//set the forward software limit as 20000 and the reverse
//software limit as -3000 for all axes on module 1.
void i8092MF_CLEAR_SLMT(BYTE cardNo, WORD axis)
Description:
This function clears the software limits.
Parameters:
cardNo: Module number
axis: Axis or axes (Please refer to Table 2-1)
Return:
None
Example:
i8092MF_CLEAR_SLMT(1, AXIS_XY);
//clear the software limits for all axes on module 1.
2.11 Setting the Encoder Related Parameters
void i8092MF_SET_ENCODER(BYTE cardNo, WORD axis, BYTE nMode,
BYTE nDivision, BYTE nZEdge)
Description:
This function sets the encoder input related parameters.
Parameters:
cardNo: Module number
axis: Axis or axes (Please refer to Table 2-1)
nMode: Encoder input type: 0 = A quad B; 1 = up/down
nDivision: Division setting for A quad B input signals:
0 = 1/1
1 = 1/2
2 = 1/4
nZEdge: Sets the trigger level for the Z phase
0 = low active; 1 = high active

ICPDAS I-8092F Software User Manual18
Return:
None
Example:
i8092MF_SET_ENCODER(1, AXIS_XY, 0, 0, 0);
//set the encoder input type as A quad B; the division is 1;
//and the Z phase is low active.
void i8092MF_SET_EN_DIR(BYTE cardNo, WORD axis, BYTE nDir)
Description:
This function sets the encoder input direction.
Parameters:
cardNo: Module number
axis: Axis or axes (Please refer to Table 2-1)
nDir: Encoder input direction: 0=positive dir; 1= negative dir
Return:
None
Example:
i8092MF_SET_EN_DIR(1, AXIS_XY, 0);
//set the encoder input direction to positive direction;
2.12 Setting the Servo Driver (ON/OFF)
void i8092_SERVO_ON(BYTE cardNo, WORD axis)
Description:
This function outputs a DO signal (ENABLE) to enable the motor driver.
Parameters:
cardNo: Module number
axis: Axis or axes (Please refer to Table 2-1)
Return:
None
Example:
i8092_SERVO_ON(1, AXIS_XY);
//enables all drivers on module 1.

ICPDAS I-8092F Software User Manual19
void i8092_SERVO_OFF(BYTE cardNo, WORD axis)
Description:
This function outputs a DO signal (ENABLE) to disable the motor driver.
Parameters:
cardNo: Module number
axis: Axis or axes (Please refer to Table 2-1)
Return:
None
Example:
i8092_SERVO_OFF(1, AXIS_XY);
//disables all drivers on module 1.
2.13 Setting the SERVO ALARM Function
void i8092MF_SET_ALARM(BYTE cardNo, WORD axis, BYTE nMode,
BYTE nAEdge)
Description:
This function sets the ALARM input signal related parameters.
Parameters:
cardNo: Module number
axis: Axis or axes (Please refer to Table 2-1)
nMode: Mode: 0 = disable ALARM function;
1 = enable ALARM function
nAEdge: Sets the trigger level
0 = low active; 1 = high active
Return:
None
Example:
i8092MF_SET_ALARM(1, AXIS_XY, 1, 0);
//enable the ALARM for X and Y axes on module 1 and set them
//as low-active.

ICPDAS I-8092F Software User Manual20
2.14 Setting the Active Level of the In-Position Signals
void i8092MF_SET_INPOS(BYTE cardNo, WORD axis, BYTE nMode,
BYTE nIEdge)
Description:
This function sets the INPOS input signal related parameters.
Note: Sometimes, this signal is used to connect the SERVO READY input
signal. Users should take care of what signal the daughter board is
wired.
Parameters:
cardNo: Module number
axis: Axis or axes (Please refer to Table 2-1)
nMode: Mode: 0 = disable INPOS input;
1 = enable INPOS input
nlEdge: Set the trigger level
0 = low active; 1 = high active
Return:
None
Example:
i8092MF_SET_INPOS(1, AXIS_X, 1, 0);
//enable the INPOS function of the X axis on module 1 and set it to be low-active.
Note: Please refer to the example shown in Fig. 2.12 for wiring of the general DI
input.
2.15 Setting the Time Constant of the Digital Filter
void i8092MF_SET_FILTER(BYTE cardNo, WORD axis, WORD FEn, WORD FLn)
Description:
This function selects the axes and sets the time constant for digital filters of
the input signals.
Parameters:
cardNo: Module number
axis: Axis or axes (Please refer to Table 2-1)
FEn: Enabled filters. The sum of the code numbers (0~31) are used
to select input signals. Please refer to the following table.
Other manuals for I-8092F
2
Table of contents
Other ICP DAS USA Industrial Equipment manuals
Popular Industrial Equipment manuals by other brands

Tach-It
Tach-It 6510-TL Setup and instruction manual

ABB
ABB HT606562 Operation manual

Dorner
Dorner 3100 Series Safety, Setup, Operation & Maintenance Manual

Oxford Instruments
Oxford Instruments Andor Sona and Marana-6 user guide

Heatcraft
Heatcraft Mohave Installation & operation

Bosch
Bosch ADV 82 operating instructions