Microsoft Word - lsi2104e.docShitsu, Taipei, Taiwan, R.O.C.
TEL886-2-2647-6936 FAX886-2-2647-6940
http://www.automation.com.tw
[email protected]
7. External wiring diagram
..................................................................................................................................13
8. Hardware settings
............................................................................................................................................14
3
Notes on hardware installation Please follow step by step as you
are installing the control cards.
1. Be sure your system is power off. 2. Be sure your external power
supply for the wiring board is power off. 3. Plug your control card
in slot, and make sure the golden fingers are put in right
contacts. 4. Fasten the screw to fix the card. 5. Connect the cable
between the card and wiring board. 6. Connect the external power
supply for the wiring board. 7. Recheck everything is OK before
system power on. 8. External power on.
Congratulation! You have it.
For more detail of step by step installation guide, please refer
the file “installation.pdf “ on the CD come with the product or
register as a member of our user’s club at:
http://automation.com.tw/ to download the complementary
documents.
4
1. Forward Thank you for your selection of LSI-2104 quadrature
encoder/linear scale interface card. In the field of automation,
encoder and linear scale as feedback or measuring element is common
used in the microprocessor control system. But for the versatile
application in PC based control, only a few selections you can
make. We integrate 4 axes (channels) in one card with the state of
the art technology of FPGA chip and provide photo coupler isolation
and experienced functions such as external triggered latch function
at 32 bit counter length. Low cost and high performance makes this
card a better choice to use in the servo control feedback , 3D
measuring system and other applications may concerning encoder or
linear scale .
Other encoder/linear scale interface card: ENC-9266 3 axes
quadrature encoder/linear scale interface card (ISA bus) LSI-3104 4
axes quadrature encoder/linear scale counter card (PCI bus)
LSI-3123L low cost 3 axes quadrature encoder/linear scale counter
card (no touch probe
trigger latch function) (PCI bus) LSI-3123 3 axes quadrature
encoder/linear scale counter card (PCI bus) LSI-3123A 3 axes
quadrature encoder/linear scale counter card with fast coordinate
rebuild
function (PCI bus) LSI-3134 4 axes quadrature encoder/linear scale
counter card (PCI bus) LSI-3144 axes quadrature encoder/linear
scale counter card with FIFO compare mode (PCI
bus)
Any comment is welcome, please visit our website:
www.automation.com.tw for the up to date information.
5
2.1.3 Four 32-bit counters
2.1.5 Programmable multiply rate at X1, X2, X4
2.1.6 Load preset value to counter by external trigger or software
trigger
2.1.7 Latch counter value by external trigger
2.1.8 Multiple counter reset (homing) modes
2.1.9 Supports DIN rail mounted wiring board
2.2 Din rail mounted wiring board
2.2.1 Dip switch selectable differential or single-end input
signal
2.2.2 LED display for digital I/O
2.2.3 Application specific connectors
6
3.1.2 Isolation Resistance100M Ohm(min)1000Vdc
3.1.3 Data width 16 Bits
3.1.4 Counter width 32 Bits
3.1.5 I/O address length 10 Bits per location selectable on Dip
switch
3.1.6 Per I/O addressing 4 locations
3.1.7 Base address with range 100H to 3FFH increment by 4
3.1.8 Input channel 4 channels X, Y, Z and A, totally 4 compatible
device units can be hooked
3.1.9 Input signal type photo-coupler isolated with Dip switch
selectable differential or single-end input
3.1.10 Input pulse multiply rate X1, X2, X4 programmable
(quadrature signal only)
3.1.11 Input Mode (QUADRATURE)(CLOCK/DIRECTION) (UP CLOCK/ DOWN
CLOCK)
3.1.12 Home input per channel 1 for Home sensor detecting
3.1.13 Latch input per channel 1 for external trigger latched
counter data at buffer
3.1.14 Clear counter input per channel 1
3.1.15 General input per channel 1 ,with general type of
photo-coupler
3.1.16 Clear counter output per channel 1
3.1.17 General output per channel 1
3.1.18 Maximum counter speedMax. 2MHz
3.1.19 Homing (reset) counter method one software trigger mode and
five H/W trigger mode
3.1.20 Interrupt IRQ 3,5,10,11,12,15 software disable/enable and
selectable
7
3.1.23 Operation temp 0 to 70° C
3.1.24 Operation humidity RH5~95%, non-condensing
3.1.25 Dimension 178(W)*122(H)mm, 7.0(W)*4.8(H)in
3.2 ADP-3104DIN Din rail mounted wiring board
3.2.1 External supply DC 24V±4V
3.2.2 Connection cable scsi 68P cable to connect main and wiring
board
3.2.3 Operation temp 0 to 70° C
3.2.4 General input LED 4
3.2.5 General and specific output 8 power MOS (1A 120V DC) with
LED
3.2.6 Single end / differential selectable DIP switch 4 8-bit DIP
switch
3.2.7 Specific encoder/linear scale input connector 4 8-pin
connector
3.2.8 On board build-in s.p.s. DC+5V 500ma (max)
3.2.9 Dimension 86(W) * 204(L) *47(H)mm, 3.39(W) * 8.03(L) *
1.85(H)in
8
4. Layout and dimensions
4.1 LSI-2104 Main card layout This card occupies 4 consecutive
address and not conflict with others.
4.2 LSI-2104 Main card dimension
I/OBASE ADDRESS SETTING
10
5.1 Front view of connector
5.2 Pin definitions PIN DESCRIPTIONS PIN DESCRIPTIONS
1 +24V : External DC +24V supply 35 EXTG : Ground 2 +24V : External
DC +24V supply 36 EXTG : Ground 3 +5V : Regulated +5V out 37 EXTG :
Ground 4 +5V : Regulated +5V out 38 EXTG : Ground 5 X_A+ : encoder
A+ phase input 39 Z_A+ : encoder A+ phase input 6 X_A- : encoder A-
phase input 40 Z_A- : encoder A- phase input 7 X_B+ : encoder B+
phase input 41 Z_B+ : encoder B+ phase input 8 X_B- : encoder B-
phase input 42 Z_B- : encoder B- phase input 9 X_C+ : encoder C+
phase input 43 Z_C+ : encoder C+ phase input 10 X_C- : encoder C-
phase input 44 Z_C- : encoder C- phase input 11 X_H+ : HOME+ input
45 Z_H+ : HOME+ input 12 X_H- : HOME- input 46 Z_H- : HOME- input
13 X_LAH+ : LATCH+ input 47 Z_LAH+ : LATCH+ input 14 X_LAH- :
LATCH- input 48 Z_LAH- : LATCH- input 15 X_CLR+ : clear counter+
input 49 Z_CLR+ : clear counter+ input 16 X_CLR- : clear counter-
input 50 Z_CLR- : clear counter- input 17 Y_A+ : encoder A+ phase
input 51 A_A+ : encoder A+ phase input 18 Y_A- : encoder A- phase
input 52 A_A- : encoder A- phase input 19 Y_B+ : encoder B+ phase
input 53 A_B+ : encoder B+ phase input 20 Y_B- : encoder B- phase
input 54 A_B- : encoder B- phase input 21 Y_C+ : encoder C+ phase
input 55 A_C+ : encoder C+ phase input 22 Y_C- : encoder C- phase
input 56 A_C- : encoder C- phase input 23 Y_H+ : HOME+ input 57
A_H+ : HOME+ input 24 Y_H- : HOME- input 58 A_H- : HOME- input 25
Y_LAH+ : LATCH+ input 59 A_LAH+ : LATCH+ input 26 Y_LAH- : LATCH-
input 60 A_LAH- : LATCH- input 27 Y_CLR+ : clear counter+ input 61
A_CLR+ : clear counter+ input 28 Y_CLR- : clear counter- input 62
A_CLR- : clear counter- input 29 X_IN0general purpose input 63
Z_IN2general purpose input 30 Y_IN1general purpose input 64
A_IN3general purpose input 31 X_OUTgeneral purpose output 65
Z_OUTgeneral purpose output 32 Y_OUTgeneral purpose output 66
A_OUT, general purpose output 33 X_CLRclear counter output 67
Z_CLRclear counter output 34 Y_CLRclear counter output 68
A_CLRclear counter output
11
6. I/O Interface diagram
6.1 Encoder input diagram
(A+/A-,B+/B-,C+/C-,H+/H-,CLR+/CLR-,LAH+/LAH-)
I/O WIRING BOARD LSI-2104 CARD
<ENCODER I/P CIRCUIT>
6.2 General input diagram (IN0~IN3) I/O BOARD LSI-2104 CARD
<GENERAL I/P CIRCUIT>
R el
GND +24V
ZOUT ZCLR_OUT AOUT ACLR_OUT ZACOM
GND +24V
MOSFET Output
wiring board with NMOS output
wiring board with Relay output
* Please set the DIP switch on wiring board to set single-end or
differential I/P mode # Terminal ZAC is Z,A axis common
terminal
14
8. Hardware settings
8.1 I/O Base address settings Refer to sec. 4.1 the 8 bit DIP
switch is used for the base I/O address setting. LSI2104 card needs
4 consecutive address and not conflict with others. SW1 is A9SW2 is
A8 and so forth, any bit set to "0" the corresponding address set
to "0". For example , a card base address "280H" is set as follows:
Example of 280H address setting
8.2 Switch setting of wiring board SW Set ON Set OFF
A- XA+ is SIGNLE END input XA+XA- is DIFFERENTIAL input B- XB+ is
SIGNLE END input XB+XB- is DIFFERENTIAL input C- XC+ is SIGNLE END
input XC+XC- is DIFFERENTIAL input H- XHOME+ is SIGNLE END
XHOME+XHOME- is DIFFERENTIAL
LAH- XLAH+ is SIGNLE END input XLAH+XLAH- is DIFFERENTIAL
input
Switch 1
CLR- XCLR+ is SIGNLE END input XCLR+XCLR- is DIFFERENTIAL input A-
YA+ is SIGNLE END input YA+YA- is DIFFERENTIAL input B- YB+ is
SIGNLE END input YB+YB- is DIFFERENTIAL input C- YC+ is SIGNLE END
input YC+YC- is DIFFERENTIAL input H- YHOME+ is SIGNLE END
YHOME+YHOME- is DIFFERENTIAL
LAH- YLAH+ is SIGNLE END input YLAH+YLAH- is DIFFERENTIAL
input
Switch 2
CLR- CLR+ is SIGNLE END input YCLR+YCLR- is DIFFERENTIAL input A-
ZA+ is SIGNLE END input ZA+ZA- is DIFFERENTIAL input B- ZB+ is
SIGNLE END input ZB+ZB- is DIFFERENTIAL input C- ZC+ is SIGNLE END
input ZC+ZC- is DIFFERENTIAL input H- ZHOME+ is SIGNLE END
ZHOME+ZHOME- is DIFFERENTIAL
LAH- ZLAH+ is SIGNLE END input ZLAH+ZLAH- is DIFFERENTIAL
input
Switch 3
CLR- ZCLR+ is SIGNLE END input ZCLR+ZCLR- is DIFFERENTIAL input A-
AA+ is SIGNLE END input AA+AA- is DIFFERENTIAL input B- AB+ is
SIGNLE END input AB+AB- is DIFFERENTIAL input C- AC+ is SIGNLE END
input AC+AC- is DIFFERENTIAL input H- AHOME+ is SIGNLE END
AHOME+AHOME- is DIFFERENTIAL
LAH- ALAH+ is SIGNLE END input ALAH+ALAH- is DIFFERENTIAL
input
Switch 4
CLR- ACLR+ is SIGNLE END input ACLR+ACLR- is DIFFERENTIAL
input
1 2 3 4 5 6 7 8
0
1
ON
15
9. Basis of operations
9.1 Addressing method LSI2104 use indirect R/W through PC's I/O
port, and the data width is 16 bits. As the following diagram, PC
writes at Base+0 I/O address to set up the index as the address of
on card registers. Any R/W to base+2 may followed to read or write
data from/to the addressed register.
D15
D0
A0
A15
ADDRESS
REGISTERS
DATA
B U F F
9.2 List of registers Index
address R/W Descriptions Mnemonics Ref.
0000H R/W hardware homing register HARD_HOMING 0001H R hardware
clear counter flag R_HARD_CLR_CNTR_FLAG 0002H W software homing
register SOFT_HOMING
13.2
0003H W update counter buffer UPDATE_CNTR 0004H R counter high word
register CNTR_HIGH_WORD 0005H R counter low word register
CNTR_LOW_WORD
13.3
0006H W preload high word to buffer PRELOAD_HIGH_WORD 0007H W
preload low word to buffer PRELOAD_LOW_WORD 0008H W load preset
value to counter LOAD_PRESET_VALUE
13.4
0009H R/W external trigger latch enable LATCH_ENABLE 000AH R/W
external trigger latch/load mode LATCH_MODE 000BH R external
trigger latch/load flag LATCH_FLAG 000CH R high word latch buffer
LATCH_HIGH_WORD 000DH R low word latch buffer LATCH_LOW_WORD
13.5
000EH R/W general input polarity register GENERAL_INPUT_LOGIC 000FH
R general input register GENERAL_ INPUT 0010H R zero input register
ZERO_INPUT 0011H R/W zero input toggle flag ZERO_TOGGLE_FLAG 0012H
R home input register HOME_INPUT 0013H R external trigger/latch
input register LATCH_INPUT 0014H R clr_cntr input register
CLR_CNTR_INPUT
13.6
0015H R/W general output polarity register GENERAL_OUTPUT_LOGIC
0016H R/W general output register GENERAL_OUTPUT 0017H R/W mode
register of clr_cntr out CLR_CNTR_OUT_MODE 0018H R/W second general
output polarity register GENERAL_OUTPUT2_LOGIC 0019H R/W second
general output register GENERAL_OUTPUT2
13.7
001AH R/W counter mode register COUNT_MODE 001BH R/W multiply
register of qudrature mode QUDRATURE_TIMES 13.8
001CH R/W interrupt enable register INTERUPT_ENABLE 001DH R/W
interrupt mode register INTERUPT_MODE 001EH R/W interrupt flag
INTERUPT_FLAG
13.9
001FH R/W register of zero input polarity ZERO_INPUT_LOGIC 0020H
R/W register of home input polarity HOME_INPUT_LOGIC 0021H R/W
register of latch input polarity LATCH_INPUT_LOGIC 0022H R/W
register of clr_cntr input polarity CLR_CNTR_INPUT_LOGIC 0023H R/W
register of a_phase polarity A_PHASE_INPUT_LOG 0024H R/W register
of b_phase polarity B_PHASE_INPUT_LOG 0025H R a_phase input
register READ A_PHASE INPUT 0026H R b_phase input register READ
B_PHASE INPUT 0027H R/W mode register of output1 (only valid for
x,z axis) SET GENERAL OUTPUT1 MODE
0028H R/W high word register of auto increment value (only valid
for x,z axis)
WRITE INCREASE COMPARE VALUE HIGH WORD
0029H R/W low word register of auto increment value (only valid for
x,z axis)
WRITE INCREASE COMPARE VALUE LOW WORD
002AH R/W load preset value from buffer to comparator (only valid
for x,z axis)
LOAD COMPARE VALUE
13.10
00C0H R/W register of irq select IRQ_SELECT 00C1H R/W interrupt
identify register INTERUPT_IDENTIFY 00C2H W eoi register
INTERUPT_EOI
13.11
00C3H R/W register of new security code NEW_SECURITY_CODE 00C4H R/W
register of old security code OLD_SECURITY_CODE 00C5H R/W set
security mode register SET_SECURITY_MODE 00C6H R key status
register KEY_STATUS 00C7H R/W security status SECURITY_STATUS
13.12
17
10. Applications For counting pulses on the fly, such as:
-- Encoder on various kinds of servo motor -- Encoder on DC/AC
motor -- Optical scale output signal -- Magnetic linear scale
output -- Timing disc -- Revolution sprocket -- Proximity
sensor/detector with relative motion -- Timer counter
Pulse signal receiver /display Rhenishaw ext-trigger to latch
position X-Y Table linear Scale F/B
18
11. Programming examples (DEMO.)
11.1 Example 1(Using C) Configure hardware clear counter during
encoder input A,B,Z signals and Home L/S are low. C language
example as follows: ( BASE the I/O base address set) #define
HARD_HOMING 0 //define HARD_HOMING register address
Disable(); //disable interrupt OUTPORTBASE + 0HARD_HOMING; //set up
register index OUTPORTBASE + 20x0001; //write data to HARD_HOMING
register Enable(); //enable interrupt
11.2 Example 2 (Using C) To read the counter data of X axis. C
language example as follows: ( BASE the I/O base address set)
#define UPDATE_CNTR 3 //address of UPDATE_CNTR of X axis #define
CNTR_HIGH_WORD 4 // address of READ_H_WORD of X axis #define
CNTR_LOW_WORD 5 // address of READ_L_WORD of X axis int
Cntr_low_value; //declare Cntr_low_value as integer int
Cntr_hi_value; // declare Cntr_hi_value as integer long Cntr_value;
// declare Cntr _value as long integer Disable(); //disable
interrupt OUTPORT ( BASE + 0UPDATE_CNTR); //setup address of
UPDATE_CNTR OUTPORT ( BASE + 20X0001); //command to update OUTPORT
( BASE + 0CNTR_LOW_WORD ) ;
// setup address of CNTR_LOW_WORD Cntr_low_value =INPORT ( BASE + 2
); //read data from CNTR_LOW_WORD OUTPORT ( BASE + 0CNTR_HIGH_WORD
) ;
// setup address of CNTR_HIGH_WORD Cntr_hi_value = INPORT ( BASE +
2 ); // read data from CNTR_HIGH_WORD Enable(); //enable interrupt
Cntr_value = Cntr_hi_value * 65536 + Cntr_low_value; //caculate to
long integer [Note]: Disable interrupt before read/write is
required to ensure no interruption of the execution of setting of
address of register and read/write its data.
11.3 Example 3(Using assembly language) Write a short paragraph of
assembly language to read the input buffer.RAM. Program is as
follows: ( BASE the I/O base address set)
MOV DXBASE Set Dx as I/O index register
MOV AXGENERAL_ INPUT put address of GENERAL_ INPUT in AX OUT DXAX
write to setup index register MOV DXBASE+2 Set up Dx for data R/W
IN AXDX read data from GENERAL_ INPUT register
19
11.4 Example program using C language // This example use
quadrature mode // to count the input pulse in X axis and // update
the counter reading to screen #include <dos.h> #include
<conio.h> #include <ctype.h> #include <stdio.h>
#define UPDATE_CNTR 3 //address of UPDATE COUNTER BUFFER #define
READ_H_WORD 4 // address of COUNTER HIGH WORD REGISTER
#define READ_L_WORD 5 // address of COUNTER LOW WORD REGISTER
#define PRELOAD_H_W 6 //address of PRELOAD HIGH WORD TO BUFFER
#define PRELOAD_L_W 7 //address of PRELOAD LOW WORD TO BUFFER
#define PRELOAD_CMD 8 //address of LOAD PRESET VALUE TO
COUNTER
#define BASE 0x280 //base I/O address = 280H void main() // program
start { int Cntr_low_value; //declaration of Cntr_low_value as
interger int Cntr_hi_value; // declaration of Cntr_hi_value as
interger long Cntr_value; // declaration of Cntr_value as long
clrscr(); // clear screen printf("Please set base address =
280h\n"); //Request to set Dip switch to 280h getch(); //wait for
keyin printf("Press any key to preset counter value \n");
printf("set counter = 6476936 \n"); getch(); // wait for keyin
outpw( BASE + 0 , PRELOAD_H_W ) ; //set index to PRELOAD_H_W outpw(
BASE + 2 , 0x0062 ) ; //write data // 6476936 D = 62D488 H outpw(
BASE + 0 , PRELOAD_L_W ) ; //set index to PRELOAD_L_W outpw( BASE +
2 , 0xD488 ) ; //write data
outpw( BASE + 0 , PRELOAD_CMD); //set index to PRELOAD_CMD outpw(
BASE + 2 , 0X0001); //load data
// the following are read COUNTER data and display clrscr();
printf("X-CNTR : 00000000 \n"); printf("Press any key to stop
program ! "); _setcursortype(_NOCURSOR); while ( ! kbhit() ) // if
no key stroke read counter data { outpw( BASE + 0 , UPDATE_CNTR);
//set index to UPDATE_CNTR outpw( BASE + 2 , 0X0001); //command to
latch outpw( BASE + 0 , READ_L_WORD ) ; //set index to READ_L_WORD
Cntr_low_value = inpw( BASE + 2 ); //read data outpw( BASE + 0 ,
READ_H_WORD ) ; // set index to READ_H_WORD
Cntr_hi_value = inpw( BASE + 2 ); // read data Cntr_value =
Cntr_hi_value * 65536 + Cntr_low_value; //caculate to result
gotoxy(14,1);cprintf("%08lu",Cntr_value);// print to screen } } //
program end
20
12. Ordering information PRODUCT DESCRIPTIONS
LSI-2104 4-axis Quadrature Encoder Counter Card ADP-3104 DIN(N) DIN
rail mounted wiring board for LSI3134/3104/2104,
General output:8 power N-MOS ADP-3104 DIN(R) DIN rail mounted
wiring board for LSI3134/3104/2104,
General output:2 power N-MOS and 6 Relays M266868150 68-pin SCSI-II
cable 1.5M M266868300 68-pin SCSI-II cable 3.0M
21
13.1 Functions of registers
Collection of function descriptions of LSI2104
=======================================================================
Format Address of registerXXXXH ----->means XXXXH is the address
of register CommandYYYYH ----->means data YYYYH will be read or
write to the register
(addressed by XXXXH) through base I/O address+2
=======================================================================
Address of register for X axis 0000H ~ 002FH Address of register
for Y axis 0030H ~ 005FH (Address of register for X axis +0030H)
Address of register for Z axis 0060H ~ 008FH (Address of register
for X axis +0060H) Address of register for A axis 0090H ~ 00BFH
(Address of register for X axis +0090H) Address of common register
00C0H ~ 00E0H The following examples are based on X axis only , but
you can use for other axis by adding the offset value.
22
Address of register0000H --------- HARDWARE HOMING REGISTER
=======================================================================
Command(READ/WRITE) 0000H-->Normal operation (default)
0001H-->Clear counter while ABZHome signal are "LOW"
simultaneously. 0002H-->Clear counter while home signal has just
inactive and counter up count and
the first time ABZ are "LOW" simultaneously. 0003H--> Clear
counter while home signal has just inactive and counter down
count
and the first time ABZ are "LOW" simultaneously. 0004H-->Clear
counter at the tailing edge of home signal. 0005H--> Clear
counter at CLR_CNTR input active low. 0006H--> Clear counter
while ABZHome signal are "LOW" simultaneously.
Once the counter cleared, this command will also cleared to "0"
(Normal mode).
0007H--> Clear counter while home signal has just inactive and
counter up count and the first time ABZ are "LOW" simultaneously.
Once the counter cleared, this command will also cleared to "0"
(Normal mode).
0008H--> Clear counter while home signal has just inactive and
counter down count and the first time ABZ are "LOW" simultaneously.
Once the counter cleared, this command will also cleared to "0"
(Normal mode).
0009H--> Clear counter at the tailing edge of home signal. Once
the counter cleared, this command will also cleared to "0" (Normal
mode).
000AH--> Clear counter at CLR_CNTR input active low. Once the
counter cleared, this command will also cleared to "0" (Normal
mode).
COMMENTS : NONE
Address of register0001H ----- HARDWARE CLEAR COUNTER FLAG
=======================================================================
Return(READ ONLY) 0000H No function 0001H Hardware clear counter
has been done.(After read the register value will
reset to "0")
Address of register0002H ----- SOFTWARE HOMING REGISTER
=======================================================================
Command(WRITE ONLY) 0000H No function 0001H Clear counter(Once the
counter is cleared the register value will reset to
"0")
23
13.3 Registers concerning counter read (X AXIS)
Address of register0003H ----- UPDATE COUNTER BUFFER
=======================================================================
Command(WRITE ONLY) 0000H No function 0001H UPDATE COUNTER BUFFER.
(Once buffer is updated , the register value
will reset to "0")
Return(READ ONLY) YYYYH High word data from counter buffer.
Address of register0005H ----- COUNTER LOW WORD REGISTER
=======================================================================
Return(READ ONLY) YYYYH Low word data from counter buffer.
24
13.4 Registers concerning counter presetting (X AXIS) Address of
register0006H ----- PRELOAD HIGH WORD TO BUFFER
=======================================================================
Command(WRITE ONLY) YYYYH--> High word data preloaded to buffer
Address of register0007H ----- PRELOAD LOW WORD TO BUFFER
=======================================================================
Command(WRITE ONLY) YYYYH-->Low word data preloaded to buffer
Address of register0008H ----- LOAD PRESET VALUE TO COUNTER
=======================================================================
Command(WRITE ONLY) 0000H-->No function 0001H-->Load preset
value from buffer to counter. (Once counter is loaded, the register
value will be cleared to "0".)
25
13.5 Registers concerning external trigger and data access (X AXIS)
Address of register0009H ----- EXTERNAL TRIGGER LATCH ENABLE
=======================================================================
Return/Command(READ/WRITE ) 0000H--> External trigger latch
disable. 0001H--> External trigger latch enable. (default)
CommentWhile register 000AH (EXTERNAL TRIGGER LATCH/LOAD MODE) has
been set
to 1 or 2and the external trigger/load occurred this register value
will be reset to "0".
Address of register000AH ----- EXTERNAL TRIGGER LATCH/LOAD MODE
=======================================================================
Return/Command(READ/WRITE ) 0000H-->Continuous external trigger
latch (counter)mode.(default) 0001H-->One shot external trigger
latch mode. Once triggered the register
0009H(EXTERNAL TRIGGER LATCH ENABLE) will be reset to "0".
0002H--> Continuous external trigger load (counter) mode.
0003H--> One shot external trigger load mode. Once triggered the
register
0009H(EXTERNAL TRIGGER LATCH ENABLE) will be reset to "0".
Address of register000BH ----- EXTERNAL TRIGGER LATCH/LOAD FLAG
=======================================================================
Return(READ ONLY ) 0000H-->Latch/load has not been occurred.
0001H-->Latch/load has been occurred. (Once readthe value will
be reset to "0")
Address of register000CH ----- HIGH WORD LATCH BUFFER
=======================================================================
Return(READ ONLY) YYYYH-->High word data from latch
buffer.
Address of register000DH ----- LOW WORD LATCH BUFFER
=======================================================================
Return(READ ONLY) YYYYH-->Low word data from latch buffer.
26
Address of register000EH ----- GENERAL INPUT POLARITY REGISTER
=======================================================================
Command/Return(READ/WRITE) 0000H-->Negative polarityactive low.
(default) 0001H-->Positive polarity , active high. Note: There
is only one general input bit for each axis, so only one polarity
bit for it.
Address of register000FH ----- GENERAL INPUT REGISTER
=======================================================================
Return(READ ONLY) 0000H-->Input inactive. 0001H-->Input
active. Note: There is only one general input bit for each
axis.
Address of register0010H ----- ZERO INPUT REGISTER
=======================================================================
Return(READ ONLY) 0000H-->Inactive. 0001H-->Active.
Address of register0011H ----- ZERO INPUT TOGGLE FLAG
=======================================================================
Return/Command(READ/WRITE) Trailing edge of ZERO input toggles bit
0.
Address of register0012H ----- HOME INPUT REGISTER
=======================================================================
Return(READ ONLY) 0000H-->Inactive 0001H-->Active.
Address of register0013H ----- EXTERNAL TRIGGER/LATCH INPUT
REGISTER
=======================================================================
Return(READ ONLY) 0000H-->Inactive 0001H-->Active.
27
28
Address of register0015H ----- GENERAL OUTPUT POLARITY REGISTER
=======================================================================
Command/Return(READ/WRITE) 0000H-->Active low. (default)
0001H-->Active high. Note: There is only one general output bit
for each axis , so only one polarity bit for it.
Address of register0016H ----- GENERAL OUTPUT REGISTER
=======================================================================
Command/Return(READ/WRITE) 0000H-->Inactive. 0001H-->Active.
Note: Only one general output bit for each axis
Address of register0017H -- MODE REGISTER OF CLR_CNTR OUT
=======================================================================
Command/Return(READ/WRITE) 0000H-->Generate an active low output
for about 0.1s. (default) 0001H-->Take CLR_CNTR as second
general output.(Only in this modefunction of
register 0018H and register 0019H is effective )
Address of register0018H --- SECOND GENERAL OUTPUT POLARITY
REGISTER
=======================================================================
Command/Return(READ/WRITE) 0000H-->Active low. (default)
0001H-->Active high
Address of register0019H --- SECOND GENERAL OUTPUT REGISTER
=======================================================================
Command/Return(READ/WRITE) 0000H-->Inactive.
0001H-->Active.
29
13.8 Registers concerning counter's mode (X AXIS)
Address of register001AH ----- COUNTER MODE REGISTER
========================================================================
Command/Return(READ/WRITE) 0000H-->AB phases input quadrature up
count mode(if A lead B).(default) 0001H-->AB phases input
quadrature down count mode(if A lead B). 0002H-->A input is
CLOCKB input is DIRECTIONup count mode. 0003H--> A input is
CLOCKB input is DIRECTIONdown count mode. 0004H-->A input is UP
CLOCKB input is DOWN CLOCKdual clock mode. 0005H-->A input is
DOWN CLOCKB input isUP CLOCKdual clock mode.
Address of register001BH --- MULTIPLY REGISTER OF QUDRATURE MODE
=======================================================================
Command/Return(READ/WRITE) 0000H-->X 4. (default) 0001H-->X
2. 0002H-->X 1.
30
Address of register001CH ----- INTERRUPT ENABLE REGISTER
=======================================================================
Command/Return(READ/WRITE ) 0000H-->Disable interrupt.(default)
0001H-->Enable interrupt.
Address of register001DH ----- INTERRUPT MODE REGISTER
=======================================================================
Command/Return(READ/WRITE ) 0000H--> Interrupt on external
latch/load occurred.(default) 0001H--> Interrupt on hardware
counter clear. 0002H--> Interrupt on counter value equals
counter preset register value. 0003H--> Interrupt on counter
carry occurred. 0004H--> Interrupt on counter borrow occurred.
Address of register001EH ----- INTERRUPT FLAG
=======================================================================
Command/Return(READ/WRITE) 0000H-->No function
0001H-->External trigger latch/load occurred.
0002H-->Hardware counter clear occurred. 0003H--> Counter
value equals counter preset register value occurred. 0004H-->
Counter carry occurred. 0005H--> Counter borrow occurred.
CommentThe register’s value will not be “0” until INTERRUPT EOI
register (00C2H) set to “1”
to confirm end of interrupt. Write the above defined value to this
register will simulate the occurrence of the real
condition and generate interrupt.
Address of register001FH ----- REGISTER OF ZERO INPUT POLARITY
=======================================================================
Command/Return(READ/WRITE) 0000H--> Input pin short to ground,
input buffer reads “1”, else “0”.(default) 0001H--> Input pin
short to ground, input buffer reads “0”, else “1”.
Address of register0020H ----- REGISTER OF HOME INPUT POLARITY
=======================================================================
Command/Return(READ/WRITE) 0000H--> Input pin short to ground,
input buffer reads “1”, else “0”.(default) 0001H--> Input pin
short to ground, input buffer reads “0”, else “1”.
Address of register0021H ----- REGISTER OF LATCH INPUT POLARITY
=======================================================================
Command/Return(READ/WRITE) 0000H--> Input pin short to ground,
input buffer reads “1”, else “0”.(default) 0001H--> Input pin
short to ground, input buffer reads “0”,else “1”
Address of register0022H -- REGISTER OF CLR_CNTR INPUT POLARITY
=======================================================================
Command/Return(READ/WRITE) 0000H--> Input pin short to ground,
input buffer reads “1”, else “0”.(default) 0001H--> Input pin
short to ground, input buffer reads “0”, else “1”.
Address of register0023H ----- REGISTER OF A_PHASE POLARITY
=======================================================================
Command/Return(READ/WRITE) 0000H--> Input pin short to ground,
input buffer reads “1”, else “0”.(default) 0001H--> Input pin
short to ground, input buffer reads “0”, else “1”.
Address of register0024H ----- REGISTER OF B_PHASE POLARITY
=======================================================================
Command/Return(READ/WRITE) 0000H--> Input pin short to ground,
input buffer reads “1”, else “0”.(default) 0001H--> Input pin
short to ground, input buffer reads “0”, else “1”.
32
Address of register0027H – SET GENERAL OUTPUT1 MODE
=======================================================================
Command/Return(READ/WRITE) 0000H--> (default) output1 as general
output 0001H-->when preset compare value = counter value, then
output1 send out a 0.3s
active pulse. ( To use this mode register 06H,07H and 2AH must
configure appropriate value first)
0002H-->when preset compare value = counter value, then output1
send out a 0.3s active pulse and the comparator value auto
increments with preset incremental value (in register 28H,29H). (
To use this mode register 06H,07H 2AH and 28H,29H must configure
appropriate value first) Comment: Only valid for X,Z axis.
Address of register0028H ----- HIGH WORD OF INCREMENTAL VALUE
=======================================================================
Command(WRITE ONLY) YYYYH-->high word of incremental value to be
added to comparator Comment : Only valid for X,Z axis.
Address of register0029H ----- LOW WORD OF INCREMENTAL VALUE
=======================================================================
Command(WRITE ONLY) YYYYH-->low word of incremental value to be
added to comparator Comment : Only valid for X,Z axis.
33
Address of register002AH ----- LOAD COMPARE VALUE
=======================================================================
Command(WRITE ONLY) 0000H-->no function 0001H-->load data
from preset buffer to comparator. (Once the data load, the preset
value will be cleared) Comment : Only valid for X,Z axis.
34
Address of register00C0H ----- REGISTER OF IRQ SELECT
=======================================================================
Command/Return(READ/WRITE ) 0000H-->Disable interrupt IRQ pin
held tri-sate.(default) 0001H--> Set IRQ3 as interrupt pin.
0002H--> Set IRQ5 as interrupt pin. 0003H--> Set IRQ7 as
interrupt pin. 0004H--> Set IRQ10 as interrupt pin. 0005H-->
Set IRQ11 as interrupt pin. 0006H--> Set IRQ12 as interrupt pin.
0007H--> Set IRQ15 as interrupt pin.
Address of register00C1H ----- INTERRUPT IDENTIFY REGISTER
=======================================================================
Command/Return(READ/WRITE) 0000H-->no function BIT0 -->1- X
axis generate interrupt ,else 0. BIT1 -->1- Y axis generate
interrupt ,else 0. BIT2 -->1- Z axis generate interrupt ,else 0.
BIT3 -->1- A axis generate interrupt ,else 0. CommentThe
register’s value will not be cleared until EOI REGISTER (00C2H)
receives a end
of interrupt command. Writing to this register at the corresponding
interrupt bit will generate the interrupt.
Address of register00C2H ----- EOI REGISTER
=======================================================================
Command/Return(WRITE ONLY) 0000H-->no function (default)
0001H-->end of interrupt (EOI). CommentWrite the EOI command
will reset the irq pin to low . Next irq is possible when irq
pin
low.
35
Command/Return(READ/WRITE) YYYYH-->New security code
Address of register00C4H ----- REGISTER OF OLD SECURITY CODE
=======================================================================
Command/Return(READ/WRITE) YYYYH--> OLD SECURITY CODE
Address of register00C5H ----- SET SECURITY MODE REGISTER
=======================================================================
Command/Return(READ/WRITE) 0000H-->normal 0001H-->unlock
0002H-->error 0003H-->lock, if unlock error consecutively
more than 10 times 0004H-->set password
Address of register00C6H ----- KEY STATUS REGISTER
=======================================================================
Return(READ ONLY) 0000H-->key locked. 0001H-->key
unlock.
Address of register00C7H ----- SECURITY STATUS
=======================================================================
Return(READ ONLY) 0000H-->security function not activate
0001H-->security function activate
36
Correction record
3. Specifications
4. Layout and dimensions
4.3 ADP-3104DIN Din rail mounted wiring board layout
4.4 ADP-3104DIN Din rail mounted wiring board dimension
5. Pin definitions for 68P SCSI connector
5.1 Front view of connector
5.2 Pin definitions
6. I/O Interface diagram
6.1 Encoder input diagram
(A+/A-,B+/B-,C+/C-,H+/H-,CLR+/CLR-,LAH+/LAH-)
6.2 General input diagram (IN0~IN3)
6.3 Output diagram
8.2 Switch setting of wiring board
9. Basis of operations
11.4 Example program using C language
12. Ordering information
13.1 Functions of registers
13.3 Registers concerning counter read (X AXIS)
13.4 Registers concerning counter presetting (X AXIS)
13.5 Registers concerning external trigger and data access (X
AXIS)
13.6 Registers concerning input (X AXIS)
13.7 Registers concerning output (X AXIS)
13.8 Registers concerning counter's mode (X AXIS)
13.9 Registers concerning interrupt (XAXIS)
13.10 Complementary function (X AXIS)
13.11 Common control registers of interrupt
13.12 Security control (option)