JS Automation LSI-3104 User manual

LSI-3104
ENCODER/LINEAR SCLAE
INTERFACE CARD
USER'S MANUAL (V1.3)
健昇科技股份有限公司
JS AUTOMATION CORP.
台北縣汐止市㆗興路 100 號6樓
6F,NO.100,CHUNG-SHIN RD.
SHI-TSU,TAIPEI,TAIWAN,R.O.C.
TEL
:886-2-2647-6936
FAX
:886-2-2647-6940
http://www.automation.com.tw
E-mail:jsnet@automation.com.tw
jservice@automation.com.tw
Export: control.cards@automation.com.tw

1
Contents
1. FORWARD ...................................................................................................................................2
2. PACKING LIST...........................................................................................................................2
3. FEATURES...................................................................................................................................3
3.1 MAIN CARD.........................................................................................................................3
3.2 DIN RAIL MOUNTED WIRING BOARD...........................................................................3
4. SPECIFICATIONS......................................................................................................................4
4.1 LSI-3104 MAIN CARD.........................................................................................................4
4.2 LSI-3104 WIRING BOARD..................................................................................................4
5. LAYOUT.......................................................................................................................................5
5.1 LSI3104 MAIN CARD LAYOUT.........................................................................................5
5.2 LSI3104 WIRING BOARD LAYOUT..................................................................................5
6. PIN DEFINITIONS FOR 68P SCSI CONNECTOR................................................................6
6.1 FRONT VIEW OF CONNECTOR........................................................................................6
6.2 PIN DEFINITIONS................................................................................................................6
7. I/O INTERFACE DIAGRAM.....................................................................................................7
7.1 ENCODER INPUT DIAGRAM............................................................................................7
7.2 GENERAL INPUT DIAGRAM ............................................................................................7
7.3 OUTPUT DIAGRAM............................................................................................................7
8. EXTERNAL WIRING DIAGRAM............................................................................................9
9. HARDWARE SETTINGS.........................................................................................................10
9.1 CARD ID SETTING............................................................................................................10
9.2 SWITCH SETTING OF WIRING BOARD........................................................................10
10. BASIS OF OPERATIONS.....................................................................................................11
10.1
ADDRESSING METHOD
...................................................................................................11
10.2 LIST OF REGISTERS.........................................................................................................12
11. APPLICATIONS....................................................................................................................13
12. PROGRAMMING EXAMPLES (DEMO.).........................................................................14
12.1
EXAMPLE 1(USING C)
......................................................................................................14
12.2
EXAMPLE 2 (USING C)
.....................................................................................................14
12.3
EXAMPLE 3(USING ASSEMBLY LANGUAGE)
.............................................................15
12.4 EXAMPLE PROGRAM USING C LANGUAGE .............................................................................16
13. DIMENSIONS........................................................................................................................17
13.1 LSI3104 MAIN CARD DIMENSION CARD.....................................................................17
13.2 LSI3104 WIRING BOARD DIMENSION..........................................................................17
14. ORDER INFORMATION.....................................................................................................18
15. COLLECTION OF FUNCTION DESCRIPTIONS...........................................................19
15.1
FUNCTIONS OF REGISTERS
............................................................................................19
15.2
REGISTERS CONCERNING HOMING (X AXIS)
............................................................20
15.3 REGISTERS CONCERNING COUNTER READ (X AXIS).............................................22
15.4
REGISTERS CONCERNING COUNTER PRESETTING(X AXIS)
.................................23
15.5
REGISTERS CONCERNING EXTERNAL TRIGGER AND DATA ACCESS(X AXIS)
.24
15.6
REGISTERS CONCERNING INPUT(X AXIS)
................................................................26
15.7
REGISTERS CONCERNING OUTPUT (X AXIS)
...........................................................28
15.8
REGISTERS CONCERNING COUNTER'S MODE (X AXIS)
........................................30
15.9
REGISTERS CONCERNING INTERRUPT (XAXIS)
......................................................31
15.10 COMPLEMENTARY FUNCTION
(X AXIS)
................................................................32
15.11 COMMON CONTROL REGISTERS OF INTERRUPT................................................35
15.12 SECURITY CONTROL (OPTION)................................................................................36
15.13 COMPLEMENTARY FUNCTION.................................................................................38

2
1. FORWARD
Thank you for your selection of our PCI bus LSI-3104 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 which are
concerning encoder or linear scale .
Other
encoder/linear scale interface card:
LSI-2104 ISA bus encoder/linear scale interface card (4 axes)
ENC-9266 ISA encoder/linear scale interface card (3 axes)
Any comment is welcome,
please visit our website:
www.automation.com.tw
for the up to date information.
2. PACKING LIST
2.1 LSI-3104 MAIN CARD 1
2.2 MANUAL CD 1
2.3 DIN RAIL MOUNTED WIRING BOARD 1
2.4 SCSIⅡ68 PINCABLE(1.5m) 1

3
3. FEATURES
3.1 MAIN CARD
3.1.1
PCI plug and play function with card ID for 16 identical cards
3.1.2 High noise immunity with photo-coupler isolation
3.1.3 High speed of receiving pulse up to 2M pps
3.1.4 Each counter possessed 32 bit data width
3.1.5 Presetable temporary buffer to load counter by external trigger or software
trigger
3.1.6 Multiple counter reset (homing) modes
3.1.7 Load counter or latch counter to temporary buffer by external trigger
3.1.8 Programmable multiply rate at X1, X2, X4
3.1.9 Programmable assignment of interrupt to system
3.1.10 Security password blocks illegal copy of software.
3.2 DIN RAIL MOUNTED WIRING BOARD
3.2.1 Dip switch selectable differential or single-end input signal
3.2.2 Jumper selectable relay or transistor output

4
4. SPECIFICATIONS
4.1 LSI-3104 MAIN CARD
4.1.1 Photo coupler Isolation Voltage ―2500 Vac 1 min
4.1.2 Isolation Resistance―100M Ohm(min)1000Vdc
4.1.3 PCI data width ―32 Bits
4.1.4 Counter width
―32 Bits
4.1.5 Card ID
―4 bits
4.1.6 Input channel
―4 channels X, Y, Z and A, totally 4 compatible device units
can be hooked
4.1.7 Input signal type ―photo-coupler isolated with Dip switch selectable
differential or single-end input
4.1.8 Input pulse multiply rate ―X1, X2, X4 programmable (quadrature signal only)
4.1.9 Input Mode
―(QUADRATURE),(CLOCK/DIRECTION),(UP CLOCK/
DOWN CLOCK)
4.1.10 Home input per channel ―1 for Home sensor detecting
4.1.11 Latch input per channel ―1 for external trigger latched counter data at buffer
4.1.12 Clear counter input per channel ―1
4.1.13 General input per channel ―1 ,with general type of photo-coupler
4.1.14 Clear counter output per channel ―1
4.1.15 General output per channel ―1
4.1.16 Maximum counter speed―Max. 2MHz
4.1.17 Homing (reset) counter method ―one software trigger mode and five H/W
trigger mode
4.1.18 Interrupt
―IRQ 3,5,10,11,12,15 software disable/enable and selectable
4.1.19 Polarity
―all input signals are software programmable
4.1.20 External wiring board ―4 channels per board
4.1.21 Dimension
―175(W)*122(H)mm, 6.9(W)*4.8(H)in
4.2 LSI-3104 WIRING BOARD
4.2.1 Connection cable
―scsi 68P cable to connect main and wiring board
4.2.2 Power supply voltage to wiring board ―DC+24V
4.2.3 On board build-in s.p.s. ―DC+5V 500ma (max)
4.2.4 Dimension
―200(W)*72(H)mm, 7.87(W)*2.83(H)in

5
5. LAYOUT
5.1 LSI3104 MAIN CARD LAYOUT
5.2 LSI3104 WIRING BOARD LAYOUT
Card ID

6
6. PIN DEFINITIONS FOR 68P SCSI CONNECTOR
6.1 FRONT VIEW OF CONNECTOR
6.2 PIN DEFINITIONS
PIN
DESCRIPTIONS
PIN
DESCRIPTIONS
1 External DC +24V supply 35 Ground。
2 External DC +24V supply 36 Ground。
3 Regulated +5V out 37 Ground。
4 Regulated +5V out 38 Ground。
5 XA+ input 39 ZA+ input
6 XA- input 40 ZA- input
7 XB+ input 41 ZB+ input
8 XB- input 42 ZB- input
9 XC+ input 43 ZC+ input
10 XC- input 44 ZC- input
11 XHOME+ input 45 ZHOME+ input
12 XHOME- input 46 ZHOME- input
13 XLATCH+ input 47 ZLATCH+ input
14 XLATCH- input 48 ZLATCH- input
15 XCLR_CNTR+ input 49 ZCLR_CNTR+ input
16 XCLR_CNTR- input 50 ZCLR_CNTR- input
17 YA+ input 51 AA+ input
18 YA- input 52 AA- input
19 YB+ input 53 AB+ input
20 YB- input 54 AB- input
21 YC+ input 55 AC+ input
22 YC- input 56 AC- input
23 YHOME+ input 57 AHOME+ input
24 YHOME- input 58 AHOME- input
25 YLATCH+ input 59 ALATCH+ input
26 YLATCH- input 60 ALATCH- input
27 YCLR_CNTR+ input 61 ACLR_CNTR+ input
28 YCLR_CNTR- input
62 ACLR_CNTR- input
29 XE_GENER_IN,general purpose input 63 ZE_GENER_IN,general purpose input
30 YE_GENER_IN,general purpose input 64 AE_GENER_IN,general purpose input
31 XE_GENER_OUT,general purpose output 65 YE_GENER_OUT,general purpose output
32 YE_GENER_OUT,general purpose output 66 YE_GENER_OUT,general purpose output
33 XEXCLR_CNTR,clear counter output 67 ZEXCLR_CNTR,clear counter output
34 YEXCLR_CNTR,clear counter output
68 AEXCLR_CNTR,clear counter output

7
7. I/O INTERFACE DIAGRAM
7.1 ENCODER INPUT DIAGRAM
I/O WIRING BOARD LSI-3104 CARD
<ENCODER I/P CIRCUIT>
7.2 GENERAL INPUT DIAGRAM
I/O BOARD LSI-3104 CARD
<GENERAL I/P CIRCUIT>
7.3 OUTPUT DIAGRAM
1
2
3
4
XOUT
XCLR_OUT
GND
+24V
+24Ve
GND
MOSFET Output
+24Ve
GND

8
<GENERAL OUTPUT CIRCUIT>
Relay Output
YOUT
YCLR_OUT
YCOM 1
2
3
4
5
GND
+24V
Relay
+24Ve
Relay
+24Ve GND
GND
YOUT
YCLR_OUT
YCOM 1
2
3
4
5
GND
+24V
MOSFET Output
1
2
3
4
5
6
7
Relay
+24Ve
Relay
+24Ve
Relay
+24Ve
Relay
+24Ve
ZOUT
ZCLR_OUT
AOUT
ACLR_OUT
ZACOM
GND
+24V
Relay Output GND
GND
GND
GND
1
2
3
4
5
6
7
ZOUT
ZCLR_OUT
AOUT
ACLR_OUT
ZACOM
GND
+24V
MOSFET Output

9
8. EXTERNAL WIRING DIAGRAM
X
+5V
GND
A
B
C
HOME
LAT
CLR
IN0
XOUT
XCLR
+24V
YCOM
ZOUT
ZCLR
AOUT
ACLR
+24V
GND
+5V
GND
INPUT OUTPUT
A PHASE
B PHASE
C PHASE
TO ENCODER POWER
Y
Z
A
+24Vdc Load
+24Vdc Load
RELAY OUTPUT
+24Vdc
Supply in
+5Vdc
Supply out
ZACOM V
Load
Load
Load
Load
YOUT
YCLR
Load
Load
AC/DC
VAC/DC
X axis only
MOSFET
type
X
+5V
GND
A
B
C
HOME
LAT
CLR
IN0
XOUT
XCLR
+24V
YOUT
YCLR
YCOM
GND
ZOUT
ZCLR
AOUT
ACLR
GND
+24V
GND
+5V
GND
INPUT OUTPUT
A PHASE
B PHASE
C PHASE
TO ENCODER POWER
Y
Z
A
+24Vdc Load
+24Vdc Load
MOSFET OUTPUT
Load
Load
MAX 120
V
Load
Load
Load
Load
ZACOM MAX 120
V
+24Vdc
Supply in
+5Vdc
Supply out
X axis only
MOSFET
type

10
9. HARDWARE SETTINGS
9.1 CARD ID SETTING
Since PCI cards have plug and play function, the card ID is required for programmer
to identify which card he/she will control without knowing the physical address
assigned by the Windows. A 4 bits DIP switch for extinguishing the 16 identical card.
The following example sets the card ID at 12.
DIP SW SETTING:(ID=12)
9.2 SWITCH SETTING OF WIRING BOARD
SW Set ON Set OFF
A- XA+ is SIGNLE END input XA+ and XA- is DIFFERENTIAL input
B- XB+ is SIGNLE END input XB+ and XB- is DIFFERENTIAL input
C- XC+ is SIGNLE END input XC+ and XC- is DIFFERENTIAL input
H- XHOME+ is SIGNLE END XHOME+ and XHOME- is DIFFERENTIAL
LAH- XLAH+ is SIGNLE END input XLAH+ and XLAH- is DIFFERENTIAL input
Switch 1
CLR- XCLR+ is SIGNLE END input XCLR+ and XCLR- is DIFFERENTIAL input
A- YA+ is SIGNLE END input YA+ and YA- is DIFFERENTIAL input
B- YB+ is SIGNLE END input YB+ and YB- is DIFFERENTIAL input
C- YC+ is SIGNLE END input YC+ and YC- is DIFFERENTIAL input
H- YHOME+ is SIGNLE END YHOME+ and YHOME- is DIFFERENTIAL
LAH- YLAH+ is SIGNLE END input YLAH+ and YLAH- is DIFFERENTIAL input
Switch 2
CLR- CLR+ is SIGNLE END input YCLR+ and YCLR- is DIFFERENTIAL input
A- ZA+ is SIGNLE END input ZA+ and ZA- is DIFFERENTIAL input
B- ZB+ is SIGNLE END input ZB+ and ZB- is DIFFERENTIAL input
C- ZC+ is SIGNLE END input ZC+ and ZC- is DIFFERENTIAL input
H- ZHOME+ is SIGNLE END ZHOME+ and ZHOME- is DIFFERENTIAL
LAH- ZLAH+ is SIGNLE END input ZLAH+ and ZLAH- is DIFFERENTIAL input
Switch 3
CLR- ZCLR+ is SIGNLE END input ZCLR+ and ZCLR- is DIFFERENTIAL input
A- AA+ is SIGNLE END input AA+ and AA- is DIFFERENTIAL input
B- AB+ is SIGNLE END input AB+ and AB- is DIFFERENTIAL input
C- AC+ is SIGNLE END input AC+ and AC- is DIFFERENTIAL input
H- AHOME+ is SIGNLE END AHOME+ and AHOME- is DIFFERENTIAL
LAH- ALAH+ is SIGNLE END input ALAH+ and ALAH- is DIFFERENTIAL input
Switch 4
CLR- ACLR+ is SIGNLE END input ACLR+ and ACLR- is DIFFERENTIAL input
1234
0
1
ON
1248 Weighting

11
10. BASIS OF OPERATIONS
10.1 ADDRESSING METHOD
LSI3104 use indirect R/W through PC's I/O port, and the data width is 16 bits.
Due to LSI3104 is a PCI BUS card; the base address is assigned by BIOS or Windows system.
However we still offer a library for get base address (G_pci_adr.h,G_adr_s.obj) in DOS mode,
whereas in Windows system we support DLL for application link.
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 follow to read or write data from/to the
addressed register.
D15
D0
A0
A15
ADDRESS
REGISTERS
DATA
I
N
D
E
X
B
U
F
F
R
I/O BASE+0
I/O BASE+2
DATA
DATADATA
DATA
DATA
DATADATA
DATA

12
10.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
15.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
15.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
15.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
15.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
15.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
15.7
001AH R/W
counter mode register
COUNT_MODE
001BH R/W
multiply register of qudrature mode
QUDRATURE_TIMES
15.8
001CH R/W
interrupt enable register
INTERUPT_ENABLE
001DH R/W
interrupt mode register
INTERUPT_MODE
001EH R/W
interrupt flag
INTERUPT_FLAG
15.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
15.10
00C1H R/W
interrupt identify register
INTERUPT_IDENTIFY
00C2H W
eoi register
INTERUPT_EOI
15.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
15.12
00C8H R/W
common trigger mode register SET_X_LAT_ALL
15.13

13
11. APPLICATIONS
11.1 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
11.2 Pulse signal receiver /display
11.3 Rhenishaw ext-trigger to latch position
11.4 X-Y Table linear Scale F/B

14
12.
PROGRAMMING EXAMPLES (DEMO.)
12.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(); //disableinterrupt
OUTPORT
(
BASE + 0
,
HARD_HOMING
)
; //set up register index
OUTPORT
(
BASE + 2
,
0x0001
)
; //write data to HARD_HOMING register
Enable(); //enableinterrupt
12.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 //addressofUPDATE_CNTRofXaxis
#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; //declareCntr_low_valueasinteger
int Cntr_hi_value; //declareCntr_hi_valueasinteger
long Cntr_value; //declareCntr_valueaslonginteger
Disable(); //disableinterrupt
OUTPORT ( BASE + 0
,
UPDATE_CNTR)
; //
setup address of UPDATE_CNTR
OUTPORT ( BASE + 2
,
0X0001)
; //
command to update
OUTPORT ( BASE + 0
,
CNTR_LOW_WORD
) ;
// setup address of
CNTR_LOW_WORD
Cntr_low_value =INPORT ( BASE + 2 ); //read data from
CNTR_LOW_WORD
OUTPORT ( BASE + 0
,
CNTR_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.

15
12.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 DX
,
BASE
;
Set Dx as I/O index register
MOV AX
,
GENERAL_ INPUT
;
put address
of GENERAL_ INPUT
in AX
OUT DX
,
AX
;
write to setup index register
MOV DX
,
BASE+2
;
Set up Dx for data R/W
IN AX
,
DX
;
read data from
GENERAL_ INPUT
register

16
12.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; //declarationofCntr_low_valueasinterger
int Cntr_hi_value; //declarationofCntr_hi_valueasinterger
long Cntr_value; //declarationofCntr_valueaslong
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(); //waitforkeyin
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
}
} //programend

17
13.
DIMENSIONS
13.1 LSI3104 MAIN CARD DIMENSION CARD
13.2 LSI3104 WIRING BOARD DIMENSION

18
14. ORDER INFORMATION
PRODUCT DESCRIPTIONS
LSI-3104 4 channels encoder/linear scale interface card
LSI-3104 DIN DIN rail mounted wiring board with 4 channels on the board
LSI-3104 DMO Demo program of LSI-3104 card for DOS (free with user manual)
LSI-3104 WIN Dll (VB/VC/C++ Builder) of LSI-3104 card for Win95/98/NT
LSI-3104 LBV Vi of LSI-3104 card for LabVIEW

19
15. COLLECTION OF FUNCTION DESCRIPTIONS
15.1 FUNCTIONS OF REGISTERS
Collection of function descriptions
of LSI3104
=======================================================================
Format
:
Address of register
:
XXXXH ----->means XXXXH is the address of register
Command
:
YYYYH ----->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)
Addressofcommonregister 00C0H~00E0H
The following examples are based on X axis only , but you can use for other axis by adding the
offsetvalue.
Table of contents
Other JS Automation Motherboard manuals

JS Automation
JS Automation IMBA-H610 User manual

JS Automation
JS Automation FA-Q670 User manual

JS Automation
JS Automation JD50SHB120 User manual

JS Automation
JS Automation FA-C2060 User manual

JS Automation
JS Automation PCIE-Q670 User manual

JS Automation
JS Automation FA-G41A User manual

JS Automation
JS Automation WSB-H610 User manual