Unitech MR350 MKII User Manual

Browse online or download User Manual for Bar code readers Unitech MR350 MKII. - UNITECH

  • Download
  • Add to my manuals
  • Print
  • Page
    / 86
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 0
MR350MKII
Data Collection Terminal
Programming Reference Manual
Unitech Electronics Co., Ltd.
September 2001 V1.2
Page view 0
1 2 3 4 5 6 ... 85 86

Summary of Contents

Page 1 - Programming Reference Manual

MR350MKII Data Collection Terminal Programming Reference Manual Unitech Electronics Co., Ltd. September 2001 V1.2

Page 2 - Introduction

1-91.7. Bar code / Magnetic stripe / Proximity / ICC The MR350MKII has two ports for connecting different reader Internal reader and External reader

Page 3 - Table of Contents

1-10 Displays all of the files which are stored in the MR350MKII ( Program as well as data file) ? MS-Kermit>REMOTE DEL <file name> D

Page 4

1-11 6) Then, the screen will display: V2.1 COM2 Address: ESC=1 NAK=3 PARA=9600,1,8,NONE 0.Send 1.Poll A.Stop B.BarT C.ComT D.DIR E.Del F

Page 5

1-12 N). Set beeper's volume. O). Set a executable object program to be started up automatically after power-up. Q). Inquire Uplo

Page 6

1-1310) Select item 1) to start getting data, PC screen will appear "…." indicating there is no data collected. If any of those terminals

Page 7 - 1. System Kernel

2-14Chapter 2. Data Structure 2. Data Structure MR350MKII system control data structures are outlined in the following diagram. The system kernel u

Page 8

2-15 'M' = enable badge port for magnetic card reader 'D' = disable badge port lcd_backlight: 'N' = s

Page 9

2-16 'F' = Disable barcode decoding of Code 128 2.4. Communication Control Table of Host port The communication control table is ap

Page 10

2-17 'O' = Odd parity 'E' = Even parity protocol: 'M' = Multipoint (default) 'F' = None proto

Page 11

2-18 BYTE pageterm;/* page terminator */ } TERM_CONFIG; Each MR350MKII "terminal" is identified by an ASCII string. There can

Page 12

1-1Introduction This manual is a hand book for whom intend to develop an application program on MR350MKII and Host computer or MS-DOS based PC. It w

Page 13

2-19 lineterm: designates the termination character of line block mode (default = null) pageterm: designates the termination character of

Page 14

3-20Chapter 3. I/O Function Calls 3. I/O Function Calls The operating system of the MR350MKII supports BIOS/DOS Function to control LCD display, Ke

Page 15 - 2. Data Structure

3-21void TL_gotoxy(int x,int y) { regs.h.ah = 2; regs.h.dh = (unsigned char)y; regs.h.dl = (unsigned char)x; int86(0x10,&regs,&re

Page 16

3-22 int86(0x21,&regs,&regs); } 3.2. Communication Environment Setup Before placing MR350MKII into the communication environment, you hav

Page 17

3-23void TC_select_host(int status) { regs.h.ah = 0x1C; regs.h.al = (unsigned char)status; regs.h.bh = 0; int86(0x21,&regs,&regs)

Page 18

3-24} 19 Set COM1 port as RS485 or modem This function call is used to set COM1 port as RS485 serial port or modem when you have the internal modem

Page 19

3-25{ regs.h.ah= 0x1C; regs.h.al= status; regs.h.bh= 9; int86(0x21,&regs,&regs); } 5F Read host port Entry Parameters: AH = 0x

Page 20

3-26Returned Values: AL = 0 ;port is available 1 ;port is busy int TC_ready(int wait) { int i; do { regs

Page 21 - 3. I/O Function Calls

3-2702 Output data Entry Parameters: AH = 2 AL = Data character Returned Values: None void TC_232_char_O(unsigned char ch) { regs.h.ah =

Page 22

3-28 0001xxxx 150 baud rate 0010xxxx 300 baud rate 0011xxxx 600 baud rate 0100xxxx 1200 baud rate

Page 23

1-2Table of Contents Table of Contents...

Page 24

3-29 } regs.h.ah = 0; regs.h.al = cc; int86(0x34,&regs,&regs); } 05 Set RTS signal of RS-232 port Entry Parameters: AH = 5

Page 25

3-30 AH = 0 AL = Data character 2) if no character received AH = 1 AL = undefined unsigned char TC_485_c

Page 26

3-31 int86(0x33,&regs,&regs); } 00 Set Communication parameters Entry Parameters: AH = 0 BIT # 76543210 AL = bit 0 xx

Page 27

3-32 default: cc=0x70; break; } switch (parity) { case 0 : break; case 1 : cc=cc|0x04; break; case 2 : cc=cc|0x0c; brea

Page 28

3-3306 Close RS-485 multi-bus (release RS-485 bus) Entry Parameters: AH = 6 Returned Values: None void TC_485_close() { regs.h.ah = 6; int86

Page 29

3-343.5. Relay Output / Digit Input / Buzzer / LED Indicator Set LED indicator ON/OFF INT 09H Entry Parameters: AH = 2 Bit# 76543210

Page 30

3-35 regs.h.ah = (unsigned char)port; regs.h.al = (unsigned char)type; int86(0x08,&regs,&regs); return((int)regs.h.al); } Activat

Page 31

3-361A Set buzzer volume INT 21H Entry Parameters: AH = 0x1A BH = 3 AL = 0 ;set LOW volume 1 ;set MEDIUM volume

Page 32

3-37 regs.h.bh = 8; int86(0x21,&regs,&regs); } 54 Buzzer volume control with user-defined frequency and time INT 21H Entry Parameter

Page 33

3-383.6. Internal/ External reader Port: INT 21H There are two readers can be connected to MR350 MKII --- Internal Reader and External Reader. In

Page 34

1-303 Enable RS-232 port... 3-27 04 Disable RS-232 p

Page 35

3-3950 Read data from external reader(only available for Barcode and Magnetic reader) Entry Parameters: AH = 0x50 Returned Values: DS:DX = buffer

Page 36

3-400x13 : EAN-13 0x14 : EAN-8 CH = 1 :Magnetic data CL = 0 ;from right to left 2 ;from left to right BL = 0x01 : Tra

Page 37

3-41 BH = 5 BL = 0 ; for both 26- and 36-bit formats 26 ; for 26-bit only 36 ; for 36-bit only 0xff ; for un-formatted data

Page 38

3-42 AL = 0 ;assign barcode input 1 ;assign magnetic stripe input Returned Values: None void TD_set_internal_type(int statu

Page 39

3-43Returned Values: AL = 1 ; Lithium battery low 0 ; Normal int TS_lithium_battery() { regs.h.ah= 0x1A; regs.h.bh= 9; int86(0x21,&r

Page 40

3-44void TS_get_interrupt_vector(int vect,unsigned int *es,unsigned int *bx) { regs.h.ah= 0x35; regs.h.al= (unsigned char)vect; int86x(0x21,

Page 41

3-45DS:DX = keyboard map with 128 bytes corresponded to numeric and alphabetic ASCII code table; a NULL for defining unused key.

Page 42

3-46 ASCII code corresponded to scan code in Alphabetic mode Alphabetic mode keyboard layout ASCII code, ASCII code, ASCII code [Scan code, Scan c

Page 43

3-47 DL = 8-bit data Returned Values: None void TS_stdout(unsigned char ch) { regs.h.ah= 2; regs.h.dl= ch; int86(0x21,&reg

Page 44

3-48 if char not ready, Zero = set unsigned char TS_stdin_out(unsigned char ch) { regs.h.ah= 6; regs.h.dl= ch; int86(0x21,&regs,&

Page 45

1-42B Set System date... 3-50 2C Get System cl

Page 46

3-49void TS_stdout_string(unsigned char *str) { segregs.ds = FP_SEG(str); regs.x.dx = FP_OFF(str); regs.h.ah= 9; int86x(0x21,&regs,&a

Page 47

3-50CX = year (1980..2099) DH = month (1..12) DL = day (1..31) void TS_get_date(int *year,int *month,int *day,int *week) { TD_int_

Page 48

3-51 2D Set System clock Entry Parameters: AH = 2D CH = hour (0..23) CL = min (0..59) DH = sec (0..59) Returned Values:

Page 49

3-52 if ((regs.x.cflag & 0x01) == 1) return(-1); else return(regs.x.ax); } 3D Open file The file must exist in the file table. This f

Page 50

3-533F Read file Copy (CX) bytes from current address to DS:DX. Advance the current address (CX) number of bytes. Entry Parameters: AH = 3F

Page 51

3-54 if ((regs.x.cflag & 0x01) == 0) return(regs.x.ax); else return(-1); } 41 Delete file Entry Parameters: AH = 41 DS:DX = seg

Page 52

3-55long TS_seek_file(int hdl,int type,long loc) { union LONG_III aa; regs.h.ah=0x42; regs.h.al=(unsigned char)type; regs.x.bx=hdl; a

Page 53

3-56 segregs.ds = FP_SEG(inf); regs.x.dx = FP_OFF(inf); segregs.es = FP_SEG(outf); regs.x.di = FP_OFF(outf); regs.h.ah=0x56; int86x(

Page 54

3-57This page is blank.

Page 55

4-58Chapter 4. Host ESC Commands 4. Host ESC Commands There are three classes of host communication activities: (1) Host Sends Control/Configurat

Page 56

1-54.5. ESC Commands Added for MV1100 Fingerprint Module ... 4-72 4.5.1. Get Template List (ESC $D).

Page 57

4-59restored from the Flash ROM.The hard reset command will not purge the program files that stored on Flash ROM The hard reset command does not hav

Page 58 - This page is blank

4-606. Autoboot ( ESC O program name ) This command defines an autoboot program name in the MR350MKII. The autoboot program will be executed automa

Page 59 - 4. Host ESC Commands

4-6115. Buzzer Volume (ESC N) This command can remote changing MR350MKII's buzzer sound. 16. Supervisor password (ESC P) This command

Page 60

4-62The new communication control table takes effect immediately after the ESC C command has been successfully received. The MR350MKII will reinitial

Page 61

4-63For example, command ESC M 199009262345 will initialize the MR350MKII clock to September 26, 1990. The time is 11:45 PM. The MR350MKII reconfigur

Page 62

4-64 ADDR Terminal address (A-Y,0-6) + 80H CMD Network command to terminal, 2 bytes, A-F,0-9 CS1 Checksum, first byte CS2 Checksum, s

Page 63

4-65 \ convert to \\ 00 hex -- 1F hex convert to \ 80 hex -- \ 9F hex A0 hex -- FF hex convert to \ 20 hex -- \ 7F hex (excl

Page 64

4-66 => ACK - if data is received correctly, or NAK - if an error has occurred * The host sends a command to and receives a re

Page 65

4-67ESC 5 - Set multipoint address => STX ESC '5' <addr> CS1 CS2 ADDR where <addr> = 'A'~

Page 66

4-68 ESC D - Read directory of RAM disk to host => STX ESC D CS1 CS2 ADDR <= STX ESC D <directory data> CS1 CS2 ETX (or NAK)

Page 67

1-6Chapter 1. System Kernel 1. System Kernel This chapter is used to introduce the system kernel of MR350MKII. Where the system kernel is divided in

Page 68

4-69 ESC G/ROM - Get MR350MKII's Flash ROM size => STX ESC G/ROM CS1 CS2 ADDR <= STX ESC G/ROM <xxx> <zzz> CS1 CS2 ET

Page 69

4-70 ESC K - Set keyboard locking => STX ESC K <state> CS1 CS2 ADDR where state = '0' set keyboard LOCK = '1&apo

Page 70

4-71 ESC O/ROM - Set auto-execution program on ROM => STX ESC O <program name>/ROM CS1 CS2 ADDR <= STX ESC O <Retcode>/ROM

Page 71

4-72 => ACK or NAK ESC v - Get Terminal ID and version no => STX ESC V <devtable> CS1 CS2 ADDR <= STX ESC V &

Page 72

4-73of $Txxxxxxxxxx.yyy, where xxxxxxxxx is the template ID and yyy is the template index. ==> STX ESC $D CS1 CS2 ADDR <== STX ESC $D

Page 73

4-74 ESC $E Erase Template The command erases the specified template on MV1100. ==> STX ESC $E xxxxxxxxxx.yyy CS1 CS2 ADDR <== ST

Page 74

4-75 ESC $G Enroll and Store Template on MV1100 () The command enrolls and stores the template with the specified ID on MV1100. ==> STX ES

Page 75

4-76SCORE is an integer that has a range of ‘000’ – ‘100’ NAK means command format error or checksum error. For the host to verify against the tem

Page 76 - RESULT = ‘0’ ;success

4-77 = ‘1’ ;fail = ‘2’ ;busy = ‘3’ ;timeout NAK means command format error or checksum error. For the host to download the templat

Page 77

4-78 THRESH = ‘1’ ,very high security = ‘2’ ;high security = ‘3’ ;medium security = ‘4’ ;low security = ‘5’ ;v

Page 78

1-71.2. Keypad Subsystem The keypad subsystem scans the key matrix, converts the scan code to its associated key value, and stores the value in the

Page 79

4-79If RESULT = ‘0’, MR350MKII will response with the version field: Kx.xxxx Ay.yyyy where x.xxxx represents the version of the kernal and y.yy

Page 80

5-80Chapter 5. How to programning ? 5. How to to programming There are two major parts for programming – 1. Programming MR350 MKII and 2. Programmi

Page 81 - 5. How to to

5-81 5.1.1. Programming by JobGen PRO The JOB GENerator PROfessional (JobGenPRO) is an MS-DOS based software for developing applications for MR350MK

Page 82

5-82with all MR350MKII? input/output devices. All detailed calling convention and source code are listed behind each BIOS/DOS call in Chapter 3. For

Page 83

5-835.3. Contains of the Demo Disk Below table show whole content of Demo disk C function library for MR350 MKII programming 1) 350LIB.C/OBJ/H C l

Page 84

5-84Appendix A. Standard C Libraries Routine for MR350MKII 1. Buffer Manipulation memccpy() memchr() memcmp() memicmp() memmove() memcpy()

Page 85

5-859. Memory Allocation alloca() calloc() free() halloc() hfree() malloc() msize() realloc() sbrk() stackavail() 10. Porcess C

Page 86

1-81.4. Communication Subsystem The MR350MKII terminal communication subsystem consists of 1) point-to-point connection mode and 2) multi-point co

Comments to this Manuals

No comments