MR350 Technical Reference Guide

Embed Size (px)

DESCRIPTION

MR350 Technical Reference Guide

Citation preview

  • MR350MKII

    Data Collection Terminal

    Technical Reference Manual

    Unitech Electronics Co., Ltd.

    Sep. 2001 V1.3

  • 1-2

    Introduction

    The MR350MKII(MR350 Mark II) is an intelligent data collection terminal which provides many features for sophisticated data collection applications, with good expandability, flexibility, security and maintainability. Data can be collected in an efficient and accurate manner through use of a keypad, bar code scanner, magnetic stripe reader, proximity reader, ICC reader, photo-coupler digital input, and relay digital output. The MR350MKII also provides an easy and flexible method of wall mounting without additional mechanical hardware. The MR350MKII is well suited for the following applications:

    ?? Time and attendance ?? Loyalty ?? Shop floor control and reporting ?? Access control ?? Job status and tracking ?? Library application ?? General data collection

    This manual gives you detailed information about the characteristics of hardware components, an introduction to the MR350MKII system kernel structure, the principle of communications protocol, operation of supervisor mode, site preparation and installation and command set summary for I/O function calls, DOS management function calls, File management function calls and Host ESC commands. Throughout this manual [X] will be used to represent the key which has legend 'X' on the keypad. "ABC" will be used to represent the sequence of key-presses for 'A','B',and 'C'. The MR350MKII system uses the block and underscore cursor to represent if keyboard is in either numeric or alphabetic mode. Press the [SHIFT] key to toggle numeric and alphabetic mode. For example, in the block cursor mode, press the [1/QZ.] key to display '1'. In the underscore cursor mode, press the [1/QZ.] key to display the first character 'Z'.

  • 1-3

    Table of Contents

    Table of Contents............................................................................................................................... 1-3

    Chapter 1. System Overview.............................................................................................................. 1-6 1.1. Hardware/Firmware: ................................................................................................................ 1-6 1.2. Software: ................................................................................................................................. 1-7

    Chapter 2. Hardware........................................................................................................................... 2-8 2.1. MR350MKII Cabinet Dimensions............................................................................................ 2-8 2.2. Front Panel and Security Lock Illustration ............................................................................... 2-8 2.3. Backplate Illustration............................................................................................................... 2-9 2.4. Keypad .................................................................................................................................. 2-10 2.5. Display .................................................................................................................................. 2-10 2.6. Processor Board Components................................................................................................. 2-11

    2.6.1. Component Layout.......................................................................................................... 2-12 2.6.2. Processor Board Component Characteristics and Specifications ...................................... 2-13

    2.7. Terminal Block Adapter ........................................................................................................ 2-19 2.8. Installation Procedures........................................................................................................... 2-22

    2.8.1. Site Preparation Prior to Installation ............................................................................... 2-22 2.8.2. Installing Backup Battery................................................................................................ 2-22 2.8.3. Installing Ethernet Board................................................................................................ 2-25 2.8.4. Installing Modem Board ................................................................................................. 2-26 2.8.5. Installing the Optional Features within the terminal........................................................ 2-26 2.8.6. Reassembling the Terminal............................................................................................. 2-34 2.8.7. Wall Mounting the Terminal........................................................................................... 2-35 2.8.8. Upgrading Memory......................................................................................................... 2-35

    Chapter 3. System Kernel ................................................................................................................ 3-40 3.1. Application Programming Interface ....................................................................................... 3-40 3.2. Keypad Subsystem ................................................................................................................. 3-39 3.3. Display Subsystem ................................................................................................................. 3-40 3.4. Communications Subsystem................................................................................................... 3-40

    3.4.1. Point-to-point mode ........................................................................................................ 3-40 3.4.2. Multi-point mode ............................................................................................................ 3-41

    3.5. Real time clock subsystem...................................................................................................... 3-41 3.6. Relay output and Digital input subsystem............................................................................... 3-41 3.7. Bar code / Magnetic stripe / Wiegand / Smart card ................................................................ 3-41 3.8. Downloading Program in Point-to-point mode ....................................................................... 3-42 3.9. Downloading a Program in Multi-point mode ........................................................................ 3-43

  • 1-4

    Chapter 4. Data Structure ............................................................................................................... .4-48 4.1. Device Control Table ............................................................................................................. 4-47 4.2. Type Definition...................................................................................................................... 4-47 4.3. Barcode Control Table ........................................................................................................... 4-48

    4.3.1. Type Definition............................................................................................................... 4-48 4.4. Communication Control Table of Host port............................................................................ 4-49

    4.4.1. Type Definition............................................................................................................... 4-49 4.5. Terminal Control Table (available for host port only)............................................................. 4-50

    4.5.1. Type Definition............................................................................................................... 4-50

    Chapter 5. Host Communication ..................................................................................................... 5-53 5.1. General Control Commands................................................................................................... 5-52 5.2. Configuration Commands ...................................................................................................... 5-55 5.3. File Transfer Commands........................................................................................................ 5-56 5.4. Multipoint Protocol................................................................................................................ 5-57

    5.4.1. Protocol Operation .......................................................................................................... 5-60 5.4.2. Example Using Host ESC Command .............................................................................. 5-60

    Chapter 6. User Mode....................................................................................................................... 6-62 6.1. Hard Reset ............................................................................................................................. 6-61 6.2. Operating Modes ................................................................................................................... 6-61 6.3. Ready Mode........................................................................................................................... 6-61 6.4. System Commands................................................................................................................. 6-62 6.5. Erase File............................................................................................................................... 6-62 6.6. Run Mode.............................................................................................................................. 6-62 6.7. List Directory of RAM Disc. .................................................................................................. 6-63 6.8. Terminal Emulation Mode..................................................................................................... 6-63 6.9. User Configuration Mode (SET command) ............................................................................ 6-63 6.10. File Transfer Mode ................................................................................................................ 6-65

    Chapter 7. Supervisor Mode ............................................................................................................ 7-67 7.1. Device Configuration ............................................................................................................. 7-67

    7.1.1. RS485/RS232.................................................................................................................. 7-67 7.1.2. BARCODE ..................................................................................................................... 7-68 7.1.3. WIEGAND ..................................................................................................................... 7-69 7.1.4. SECURITY SWITCH ..................................................................................................... 7-69

    7.2. Terminal Configuration ......................................................................................................... 7-69 7.3. Memory Configuration........................................................................................................... 7-70 7.4. Changing Password ............................................................................................................... 7-71 7.5. Auto Exec.............................................................................................................................. 7-72 7.6. Function Key Define.............................................................................................................. 7-72 7.7. System Initialization .............................................................................................................. 7-72 7.8. System Diagnostics ................................................................................................................ 7-72 7.9. UPDATE BIOS and Writee program file to Flash ROM......................................................... 7-73

  • 1-5

    7.9.1. ADD PROGRAM, .......................................................................................................... 7-74 7.9.2. DELETE PROGRAM, .................................................................................................... 7-74 7.9.3. UPDATE BIOS,.............................................................................................................. 7-74

    Chapter 8. Site Preparation.............................................................................................................. 8-76 8.1. Terminal Mounting Preparation............................................................................................. 8-75

    8.1.1. Preparation for standard wall mounting mechanism........................................................ 8-75 8.1.2. Preparation for optional bench mounting kit ................................................................... 8-77

    8.2. Routing the terminal blocks cable ......................................................................................... 8-79 8.3. Network Installation .............................................................................................................. 8-80

    8.3.1. Network Accessory.......................................................................................................... 8-80 8.3.2. Network Cables............................................................................................................... 8-80

  • 1-6

    Chapter 1. System Overview

    1. System Overview In order to meet the requirements of various applications and working environments while still maintaining its ease of use and security characteristics, the following features have been incorporated into the design of the MR350MKII.

    Main Features:

    1.1. Hardware/Firmware: ?? 2-line by 16-character Liquid Crystal Display with high visibility and

    back-light. ?? A 20-key insertion template type membrane keypad with tactile feedback

    include 7 programmable function keys and 4 programmable LED indicators. ?? A selectable built-in bar code badge slot reader interface, MSR interface

    (magnetic stripe reader), wiegand interface or smart card reader. Proximity reader can be MSR interface or Wiegand interface

    ?? A barcode scanner port reads major bar code symbologies with slot, wand, CCD, and laser-diode scanners.

    ?? A selectable external bar code badge slot reader, a magnetic stripe reader or MSR interface proximity reader (exclusive with bar code scanner port)

    ?? An audible peizo electric buzzer indicates good read conditions after successful reading form reader.

    ?? Two serial communication ports; one RS-422/485 and one RS232. ?? Two relay output ports for triggering external devices. ?? Four photocoupler input ports for digital input reading. ?? SRAM with battery backup guarantees that no application program and/or

    transaction data is lost during power outage. ?? A security alarm for preventing unauthorized internal access to main unit. ?? A terminal block adapter for ease of cable wiring and installation. ?? Optional UPS battery allows application to run during a power failure, up to 8

    hours.

  • 1-7

    ?? Standard wall-mounting plate and optional desktop work bench mounting kit. ?? 256 KB Flash ROM --- 128KB for DOS-based system and 128KB for users

    application program.

    1.2. Software: ?? MS/DOS compatible operating system. ?? Programmed in Microsoft/Borland C/C++, IBM Macro Assembler and

    JobGen Pro (a transaction program generator, no programming skill required).

    ?? Fully host controllable ESC commands for remote control by communication. ?? Built-in power-on-test and advanced diagnostic program. ?? Built-in kermit file download/upload utility and terminal emulation program.

  • 2-8

    Chapter 2. Hardware

    2. Hardware This chapter gives you the specifications and characteristics of the MR350MKII major parts and components.

    2.1. MR350MKII Cabinet Dimensions The MR350MKII cabinet is assembled in two major parts: ABS+PC front cover and metal back plate. There are two kind of front cover for different internal reader. One is for Barcode slot reader and Magnetic stripe reader, one is for Proximity reader and Smart card reader.

    magnetic stripe or barcode slot reader Proximity reader or Smart card reader

    2.2. Front Panel and Security Lock Illustration The figure below gives you the dimensions of the MR350MKII cabinet without the bench mounting kit installed.

    Figure 2-1 MR350 Cabinet dimension

  • 2-9

    Figure 2-2 Front panel and security lock illustration

    ? 2-line by 16-character Liquid Crystal Display with backlight

    ? Membrane keypad with 20 alphanumeric/function keys

    ? Optional Bar Code badge reader or magnetic stripe reader or none.

    ? Security lock

    2.3. Backplate Illustration

    Figure 2-1 Rear panel illustration

    ? Scanner port ? RS485 /422 port (Host port) ? Ethernet/Phone Line Jack ? RS232 port (AUX port)

    ?

    ? ? ?

    ? ?

    ?

    ?

    ?

    ?

    ?

    ?

    ?

    ?

  • 2-10

    ? Wall mounting screw hole ? Bench mounting kit screw hole

    ? Terminal block adapter cable routing hole

    2.4. Keypad The MR350MKII provides an insertion template type membrane keypad, user can re-define layout of keypad and customize user own template. All keys on the keypad provide a tactile feel. The size for each key is 17mm by 14mm. It contents 20-key alphanumeric/function membrane keypad with four user controllable indicators and clock-in/out and break-in/out symbols. The figures below present layouts for the keypad. To see the function of each key, please refer to your Getting Started Guide.

    Figure 2-3 A-type layout

    NOTE: Where the code value of symbols: are identical to F1 to F7.

    2.5. Display A 2-line by 16-character liquid crystal display(LCD) with 5x7 dot character font and backlight is used as the display screen of the terminal. The backlight can be enabled or disabled using either the USER COMMAND SET (see Getting Started Guide)

  • 2-11

    or the users application program (see Programming Reference Manual). If the UPS battery is installed and the main power (external AC power) fails, in order to reduce power consumption the MR350MKII will shut off the backlight ignoring the above setting until the main power is recovered. A blinking block cursor represents numeric mode, and a underscore cursor indicates that the keypad is in alphabetic mode.

    2.6. Processor Board Components Use figure 2-5 and 2-6 to locate the major processor board components and connectors that are mentioned in this section.

    Figure 2-4 Processor Board major components front view (component side)

    ? Processor ? User Memory ? Buzzer ? LCD module connector

    ?

    ?

    ?

    ?

  • 2-12

    2.6.1. Component Layout

    Figure 2-5 Processor Board major components bottom view (solder side)

    ? Scanner port ? RS485 port ? Backup battery ? RS232 port ? AC power input ? 9-PIN inline connector ? Keypad connector ? Phone line/Ethernet ? Terminal Block adapter

    connector ? Terminal Block setting

    jumpers ?? Security alarm switch ?? System FLASH ROM ?? 2 / 4 wires jumper

  • 2-13

    2.6.2. Processor Board Component Characteristics and Specifications

    Component Side (1) Processor

    A 16-bit Intel 80188 instruction compatible microprocessor running at 8 MHz and a Real Time Clock (RTC) chip.

    (2) User Memory A standard 128KByte CMOS static RAM is provided to be used as a RAM disc and program execution area. The size of the RAM disc and execution area can be adjusted in supervisor mode to meet your requirements. A 256KByte or 512Kbyte of RAM can be ordered to allow more sophisticated application programs.

    (3) Buzzer The terminal? internal buzzer sounds after the keypad or scanner input is accepted. This audible buzzer can be programmed or controlled by the application program via DOS function calls or built-in supervisor mode. Buzzer characteristics: Piezoelectric buzzer, 100db @ 10cm.

    (4) LCD module connector This 14-pin inline connector is used to connect the to 2-line by 16-character LCD module.

    (5) Flash ROM A 256KB Flash ROM is divided into two 128KB area. One 128KB is stored DOS-based system include all of BIOS/DOS function call and decoder. Other 128KB can be used to stored application program.

  • 2-14

    Solder Side (1) Scanner Port

    The MR350MKII provides a D-sub 9-pin male scanner port for attaching either a pen type (wand emulation) or auto type (laser/CCD emulation) bar code input device. The pin designations are: Scanner Port: (D-sub 9-pin, male)

    Pin No. Signal 1 Start of scan 2 Output data 3 N.C. 4 N.C. 5 Trigger switch 6 Power enable 7 Ground 8 Ground 9 +5V

    Figure 2-6 Scanner port pin designations

    Its mating connector has the following specifications: Plug 9-position D-subminiature male receptacle or socket. Pins Gold-plate over nickel sockets.

    (2) RS422/485 Port The terminal supports an EIA RS422/RS485 compatible interface port (in general,RS422 is defined as 4 wires communication and RS485 is defined as two wires communication). It can act as host or serial port, while as host port it can serve in multi-point or no protocol for data communication. (for detailed information please see the MR350MKII Programming Reference Manual). Up to 32 terminals may be connected to the multi-point communication network operating on one port at speed up to 57600 bits per second (bps), with 8 data bits and none parity, or 7 data bits and odd, even or none parity and with 1 stop bit or 2 stop bits. The maximum cable length of a multi-point network allowed is up to 4000 feet using a twisted pair network cable.

    1 5

    6 9

    D-sub 9-pin, male

  • 2-15

    The pin assignment are: RS485/RS422 Port: (RJ-45 Pin ) Pin No. 4-Wire RS422 2-Wire RS485

    1 RX+(for RS422 /RS485)

    RX+ (for RS485)

    2 RX - (for RS422/RS485)

    RX (for RS485)

    3 TX+(for RS422) N.C. 4 N.C. N.C. 5 N.C. N.C. 6 TX-(for RS422) N.C. 7 AC-HOT AC-HOT 8 AC NEUTRA AC NEUTRA

    Figure 2-7 RJ-45 pin Assignment

    (3) Backup Battery A replaceable memory retention lithium battery with 190mAH capacity and 10-year shelf life provides approximately 15,000 hours of power-down backup for 512 KB of RAM and the RTC chip. Backup battery characteristics: 3V, lithium battery, 190mAH CR2032 The application program downloaded and all data buffers are preserved until power is restored (within the limits of battery life).

    (4) RS232 The terminal provides an EIA RS232 port for direct connection to the host computer or to an auxiliary device which has an RS-232 interface, such as a serial printer, digital scale, full screen video ASCII terminal, or fixed scanner. It can act as host or serial port, while as host it can serve in multi-point or none protocol for data communication. (for detailed information please see the MR350MKII Programming Reference Manual).

    Pin 1

  • 2-16

    The pin designations are: RS232 Port: (RJ11 6-pin)

    Pin No. Signal 1 Ground 2 RXD 3 CTS 4 RTS 5 TXD 6 Ground Figure 2-8 RS232 port pin designations

    Its mating connector has the following specifications: (6) AC Power Input

    An external 13.5V AC/800mA power supply is used as the main operating power source of the MR350MKII. Figure 2-10 illustrates the AC-jack pinout of the power input. You must prepare an appropriate power supply in advance to proceed to the next steps.

    Figure 2-9 DC-jack outline illustration

    Pinout Signal 1 Vac Input1 2 Vac Input2 3 NA

    Figure 2-10 DC-jack pin designations

    3-position circular DIN connector

    1 6

    1 3

  • 2-17

    (7) 9-Pin Inline Connector This 9-pin inline connector is provided for attaching a barcode slot reader

    (visible red or infrared) or single track magnetic stripe reader (track #1, #2 or #3).

    The pin designations are: Pin Barcode slot

    reader Magnetic

    stripe reader Wiegand

    1 +5V +5V +5V 2 Data /Strobe Data 2 3 Ground Ground Ground 4 /Data Data 1 5 /Card present 6 Protective

    ground

    7 8 9

    Figure 2-11 9-pin inline connector pin designations

    The mating connector has the following specifications: Plug 6 pin connector. Pins Gold-plate over nickel pins.

    (8) Keypad Connector This flat type connector is used to attach to the keypad membrane flex cable. CAUTION: When inserting or removing the flex cable into/from the connector,

    sharp bending should be prevented to keep from breaking it. (9) Phone/Etherne Sharing Port: (RJ45-8pin)

    This connector is used to connect to phone line or Ethernet port, if optional modem board or Ethernet board is used.

    Pin No. Ethernet Phone 1 TX+ 2 TX- 3 RX+ 4 Line_T 5 Line_R 6 RX- 7 N.C. 8 N.C.

  • 2-18

    (7) Terminal Block Setting Jumpers The MR350MKII provides eight 3-pin terminal block setting jumpers to allow the terminal to be used in a more convenient and flexible manner. The meanings of the selections are described in the following table.

    Photo 1-input ( Default )

    ? ? pin1 ? ? pin2 pin3 J1 J2 J3 J4 J5 J6 J7 J8

    Group #1

    External Barcode / MAG

    ? ? ? ? J1 J2 J3 J4 J5 J6 J7 J8

    Photo 2-input ( Default )

    ? ? ? ? J1 J2 J3 J4 J5 J6 J7 J8

    Group #2

    Phone Line ? ? ? ? J1 J2 J3 J4 J5 J6 J7 J8

    Photo 3-input ( Default )

    ? ? pin1 ? ? pin2 pin3 J1 J2 J3 J4 J5 J6 J7 J8

    Group #3

    RS232 Port ? ? ? ? J1 J2 J3 J4 J5 J6 J7 J8

    Photo 4-input ( Default )

    ? ? ? ? J1 J2 J3 J4 J5 J6 J7 J8

    Group #4

    External Barcode / MAG

    ? ? ? ? J1 J2 J3 J4 J5 J6 J7 J8

    RS485 Port ( Default )

    ? ? ? ? ? ? ? ? J11 J12 J13 J14

    Group #5

    MR053 Ethernet Board (Optional)

    ? ? ? ? ? ? ? ? J11 J12 J13 J14

    Figure 2-12 Terminal block jumper setting --selection table

  • 2-19

    (8) Terminal Block Adapter Connector The 24-pin terminal block adapter connector is used for attaching the terminal block adapter ribbon cable.

    (9) Security Alarm Switch

    The MR350MKII provides a security alarm switch to prevent unauthorized access to the cabinet. When the security alarm is on (refer to Supervisor Mode on page 7-66), the MR350MKII will sound an alarm if the cabinet is opened.

    (10) System FLASH ROM

    A 256KByte programmable Flash ROM retains the terminal operating system kernel and, built-in utilities and users application program

    (11) RS422/RS485 (2 wires or 4 wires jumper) A 256KByte programmable Flash ROM retains the terminal operating system kernel and, built-in utilities and users application program

    2 Wire J9

    J10

    Pin 1 2 3

    4 Wire J9

    J10 Pin 1 2 3

    2.7. Terminal Block Adapter The MR350MKII provides a terminal block adapter with two relay-output ports, one RS-485 port, one UPS battery power input connector, and four selectable ports for photocoupler or RS-232 port, or secondary magnetic stripe reader, or barcode wand / slot reader, or phone line. When the MR350MKII is installed with the standard wall-mounting plate and configured to use the RS-232 port or barcode wand/slot reader/magnetic slot reader, you may select ports #1, #2 , #3 and #4 for them instead of for photocoupler, factory default. To set of jumpers please refer to Figure 2-23 Terminal block jumper selection table.

  • 2-20

    Figure 2-13 Terminal block pin designations

    Jumper Pin

    Port Name

    Default setting

    Port Name

    Alternative setting 1 Relay #1 Normal Closed N/A 2 Common N/A 3 Normal Open N/A 4 Relay #2 Normal Closed N/A 5 Common N/A 6 Normal Open N/A 7 Photo-couple #1 Anode (+) MSR MAG STROBE 8 Cathode (-) MAG DATA 9 Photo-couple #2 Anode (+) Internal modem

    (MR052M) line-transmitted

    10 Cathode (-) line-received 11 Photo-couple #3 Anode (+) RS-232 port TXD 12 Cathode(-) RXD 13 Photo-couple #4 Anode (+) Wand / slot reader/

    MSR +5Volt

    14 Cathode (-) MAG CARD/ present

    15 Ground N/A 16 12 V/500mA DC

    Output N/A

    17 RS485 port TX(+) Internal Ethernet Board (MR053)

    TX(+)

    18 TX(-) TX(-) 19 RX(+) RX(+) 20 RX(-) RX(-) 21 ACHOT 22 ACNEUTRA

    CN3 UPS Battery CN4 AC Power

  • 2-21

    Relay output characteristics:

    Contact Resistance 100m? max. Operating Time 5msec max. Release Time 2msec max. Insulation Resistance Min. 1,000M? at 500VDC Rated Carrying Current 2A Max. Allowable Voltage AC 270V Max. Allowable Current 5A Max. Allowable Power 625VA, 90W Operating Ambient Temperature -30?C to +55?C Contact Capacity AC 120V 2A DC 24V 2A

    Figure 2-14 Relay output characteristics

    Photocoupler Input Characteristics:

    Figure 2-15 Photocoupler circuit diagram

    Input Terminal

    +5V

    C

    E Vo

    4.7K

    Ii

    2.2k+

    _

    Vi

    Photocoupler

  • 2-22

    INPUT OUTPUT LOGIC 1.1mA < Ii < 10.5mA (3.5V < Vi < 24V )

    Vo > 4.8V HIGH

    Ii < 0.24mA ( Vi < 1.5V )

    Vo < 0.4V LOW

    Reverse Voltage VR(max)= 6V

    Figure 2-16 Photocoupler input characteristics

    2.8. Installation Procedures This chapter contains the installation procedures for the MR350MKII. It includes: ?? Site preparation prior to installation. ?? Installing the backup battery. ?? Installing the optional features within the terminal. ?? Reassembling the terminal. ?? Installing the terminal.

    2.8.1. Site Preparation Prior to Installation The MR350MKII terminal may be mounted to any surface by use of its available mounting kit. For user convenience, the MR350MKII terminal backplate is designed as a standard wall mounting plate. Also a desktop/work bench mounting kit is provided as an accessory. If possible, decide upon, and prepare the mounting location prior to installation. Refer to Site Preparation on page 8-75 to pre-drill any required mounting holes. While planning, please be sure to leave enough room around the terminal to allow easy operation for all functions and devices.

    2.8.2. Installing Backup Battery The MR350MKII is shipped with a backup battery installed and ready for use. Therefore, if you are installing a new MR350MKII, you should skip this procedure.

    CAUTION:DO NOT DISPOSE OF BATTERY IN FIRE. Installation (1) Turn the MR350MKII terminal over, so that the LCD faces down. (2) Unlock the main body (the lock is located on the bottom side), and lift

    the backplate off the front cover.

  • 2-23

    (3) Visually confirm that the backup battery is installed in the holder. Installing a new one by sliding it into its holder under the retaining tab, with its large diameter(+) toward the retaining tab (see figure below).

    Note : Be sure to install a suitable battery.

    Figure 2-17 Installing backup battery

  • 2-24

    2.8.3. Installing Ethernet Board -- MR053 MR053 Ethernet Card is designed for high speed communication within intranet area.

    Installation : (1) Open the MR350MKII terminal. (2) Unlock the main board with care. (3) Connect MR053 with main board (see figure 2-19). (4) Adjust jumper setting : short pin 2 & pin 3 through

    jumper 11 ~ jumper 14 on CPU board. (5) Restore the main board to terminal. (6) From back plate, you could find the Phone-line/Ethernet

    jack.(see figure 2-6). Notice : If the Phone-line/Ethernet jack was covered by wall mounting installation, then connect to Terminal Block RS485 pin connectors (behind back plate) was the other choice.(refer to Figure 2-14 Terminal block pin designations)

    Figure 2-19 Installing MR053 Ethernet Card with MR350MKII main body

    MR053

  • 2-25

    2.8.4. Installing Modem Board -- MR052M MR052M Modem Board is designed for remote communication use through telephone line. Available communication baud rate is up to 33600 bps modem to modem. Installation :

    (1) Open the MR350MKII terminal. (2) Unlock the main board with care. (3) Connect MR052M with main board (see figure 2-20). (4) Adjust jumper setting : short Pin 1 & Pin 2 through jumper 11 ~ jumper

    14 on CPU board. (Default) (5) Restore the main board to terminal. (6) From back plate, you could find the Phone-line/Ethernet jack.

    (see figure 2-6). Notice : If the Phone-line/Ethernet jack was covered by wall mounting installation, then connect to Terminal Block P2A/LNT, P2C/LNR port connectors (behind back plate) was the other choice. (refer to Figure 2-14 Terminal block pin designations)

    Figure 2-20 Installing MR052M modem board with MR350MKII main body

  • 2-26

    2.8.5. Installing the Optional Features within the Terminal This section describes the installation procedures of all the available internal

    optional features for the MR350MKII terminal. They include: ?? Selectable barcode slot reader, magnetic stripe reader, proximity,

    IC card reader . ?? UPS battery ?? Desktop/work bench mounting plate

    2.8.5.1. Installing the slot reader The type of slot reader may be selected when you issue a purchase

    order, or it may be ordered after the terminal is installed as an accessory. If the slot reader is ordered with your new MR350MKII, the reader will

    be installed in the factory and comes ready for use, thus you may skip this procedure and go to next section. Also, if you are not installing any optional slot reader, you may go to the next section.

    If you are going to install this feature, you must open the terminal and use the following instructions.

    If the terminal has already been opened from the previous procedures, begin at step 3.

    Installation Procedure: (1) Turn the terminal over, so that the LCD faces down. (2) Unlock the main body (the lock is located on the bottom side), and lift

    the backplate off the front cover. NOTE: If UPS battery is installed, disconnect the terminal block adapter cable from

    the processor board. (3) Turn the slot reader over, so that the slot faces down. (4) Install the two machine screws that secure the rectangular adapter plate

    to the slot reader (see figure below). CAUTION: YOU MUST USE THE MACHINE SCREWS FOR THIS PROCEDURE TO

    KEEP FROM DAMAGING THE SCREW HOLDER.

    Identify the machine screw

  • 2-27

    Figure 2-21 Security adapter plate to slot reader

    (5) Carefully position the slot reader and its adapter plate onto the slot reader compartment (see figure below).

    Figure 2-182 Inserting slot reader into compartment

  • 2-28

    (6) Install the four tapping screws that secure the adapter plate to the cabinet (see figure below).

    CAUTION: YOU MUST USE THE TAPPING SCREWS FOR THIS

    PROCEDURE TO KEEP FROM DAMAGING THE SCREW HOLDER.

    (7) Connect the slot readers ribbon cable to the 9-pin inline connector (see figure below).

    Figure 2-23 Connecting reader's ribbon cable to 9-pin inline connector

    (8) If you are going to install any other optional internal features, such as the UPS battery, leave the terminal apart for now and go to the next procedure.

    Identify the tapping screw

  • 2-29

    2.8.5.2. Installing the UPS battery (If you are not going to install the UPS battery, you should skip this procedure). The UPS battery is a rechargeable NiCd battery. It is held in place by a narrow retainer and fastened with machine screws on both ends, and its ribbon cable is connected to the terminal block adapter. You must open the terminal to install this feature.

    NOTE: The UPS battery has been discharged before shipment, thus it requires 51~58 hours to fully recharge. It will recharge as long as the MR350MKII is plugged into its power outlet and has DC power. It is recommended that the UPS battery be fully charged before running an application for the first time. The UPS battery will allow the application to run about 8 hours after losing AC power, depending on how many devices are used. If the terminal is already opened from the previous procedures, begin at step 3. Installation Procedure: (1) Turn the terminal over, so that the LCD faces down. (2) Unlock the main body (the lock is located on the bottom

    side), and lift the backplate off the front cover. (3) Detach the terminal block adapter cable from the 24-pin

    connector on processor board. (4) Turn the backplate over, so that the terminal block PCB

    is facing you.

  • 2-30

    (5) Place the UPS battery within the four positioners and the two battery retainer posts (see figure below).

    Figure 2-24 Positioning UPS battery onto backplate

    (6) Install the two machine screws that secure the battery

    retainer to the backplate (see figure below).

    Figure 2-25 Installing UPS battery retainer

  • 2-31

    (7) Plug the UPS battery cable to the connector on the terminal block adapter (see figure below).

    Figure 2-26 Connecting UPS battery cable

    2.8.5.3.Installing desktop/work bench mounting handle The MR350MKII can be mounted on the desktop by using a work bench mounting plate. With this kit the MR350MKII can be placed at upright or flat upon the work bench. Please locate the following items in your work bench mounting kit.

    Work bench mounting plate Two thumb knobs Four machine screws Two metal brackets

    Installation Procedure: (1) Turn the metal backplate over, so that the printed text is facing you.

  • 2-32

    (2) To wall mount the unit or to lay it flat upon the work bench, attach the mount at the upper position. To stand the unit on the work bench, attach the mount at the lower position. (see the two figures below)

    Figure 2-27 Bench mount attachment (standing style)

    Figure 2-28 Bench mount attachment (flat style)

  • 2-33

    (3) Install the four machine screws that secure the two brackets to the metal backplate at the desired position. (see figure below).

    Figure 2-19 Securing brackets to metal backplare for flat style

    (4) Use the two thumb knobs to secure the mount to the brackets. (see figure below).

    Figure 2-29 Securing bench mount to the brackets for flat style

  • 2-34

    2.8.6. Reassembling the Terminal The MR350MKII is well suited for wall mounting, for mounting on flat surface, or for placing on a table. The metal backplate is designed as a back cover, with a wall mounting mechanism, thus you do not have to purchase any additional accessories for wall mounting. If you want to place the MR350MKII on a table or hang it on a wall, a bench mounting kit is available. If you plan to wall mount the MR350MKII terminal, you should skip this section and go to the next section Installing the Terminal on Wall. Installation Procedure: (1) Lay the terminal front cabinet face down on a flat surface. (2) Reconnect the terminal block adapter cable to the 24-pin

    connector on the processor board. (3) Carefully slide the backplate onto the front cabinet so that its

    brackets mesh with the cabinet slots properly (see figure below).

    Figure 2-20 Reassembling terminal using security lock

    (1) Lock the cabinet to secure the backplate to the front cabinet, or; (2) If the security lock is not used, you may install the two screws

    (one is a tapping screw, the other is a machine screw) that secure the backplate to the front cover.

  • 2-35

    Figure 2-21 Reassembling terminal using screws

    2.8.7. Wall Mounting the Terminal This section will instruct you on how to install the MR350MKII on the wall. All clearance dimensions are given in chapter 8 Site Preparation. Installation Procedures: (1) Drill all required holes. (2) Route the signal cable which is attached to the terminal block

    through the rectangular hole and connect it to your communication line or device cable (see figure below)

    Figure 2-22 Routing signal cable through backplate

  • 2-36

    (3) Fasten the four screws that secure the metal backplate to the wall (see figure below).

    Figure 2-23 Securing backplate to wall

    (4) Plug the terminal block adapter cable onto the stick connector. (5) Position the two front cabinet slots facing toward the backplate brackets, then slide the front cabinet onto the backplate (see figure below).

    Figure 2-24 Sildeing the front cabinet onto backplate

    (6) Lock the cabinet to secure the front cabinet to backplate.

    To main PCB terminal block adaptor connector

  • 2-37

    2.8.8. Upgrading Memory 1) To know which PCB version your MR350MKII is first. 2) Follow below diagrams to upgrade memory.

    PCB Version Jumper Setting Version 1 , Version 2 , Version 3 .

    Alternative 128K or 512K memory chip choice for customer.

    NOTICE : If 128K or two 128K memory installed. The jumper 11 and 12 must set to pin 1 & pin 2. If 512K or two 512K memory installed , then the jumper 11 and 12 must set to pin 2 & pin 3.

  • 2-38

    PCB Version Jumper Setting Version 4 , Version 5 .

    PS. We do not recommend you upgrade memory personally. Please send them back to dealer or company for safe upgrade.

    Alternative 128K or 512K memory chip choice for customer.

    NOTICE : If 128K or two 128K memory installed. The weld point must contain resistor R64 and R66. If 512K or two 512K memory installed , then the weld point must contain resistor R65 and R67.

  • 3-39

    Chapter 3. System Kernel

    3. System Kernel 3.1. Application Programming Interface The MR350MKII kernel includes three basic modules: device driver, file manager and DOS manager. The programmer can design the application programs by calling those available functions just as in the PC DOS environment. The ROM based operating system of the terminal provides emulated MS/DOS function calls. The calling and parameter passing conventions are identical to that of MS/DOS. A detailed description of the functions supported by the Terminal's subsystems, I/O interface, DOS manager and File manager are listed in appendixes A and B. The software to be run on the MR350MKII may be programmed by using 16bits Microsoft C/C++ or Borland C/C++, and the IBM PC macro assembler version 1.0 and later versions. Transaction data can be processed interactively with the computer or stored in a file.

    NOTE when using Microsoft C/C++ : When program execution area is assigned less than 64K (see section 4.3) and a program of more than 64K is run, a run time error message, "Not enough space for environment", will be shown. In this case add following statements in main: /* mypgm.c */ _setenvp() { } main() {... ... ... } and link with: >LINK /NOE mypgm

    3.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 keyboard input buffer for program utilization. Note that the [SHIFT] key is not stored in the buffer, it is used to distinguish the alphabetic and numeric mode of associated key positions and provide an alternative key code. The following table shows the key values of each key.

  • 3-40

    Table of Key Values Key Value Key Value Key Value Key Value

    A 41H O 4FH [SP] 20H F1/? 86H B 42H P 50H 0 30H F2/? 87H C 43H Q 51H 1 31H F3/? 88H D 44H R 52H 2 32H F4/? 89H E 45H S 53H 3 33H F5/* 8AH F 46H T 54H 4 34H F6/? 8BH G 47H U 55H 5 35H F7/? 8CH H 48H V 56H 6 36H I 49H W 57H 7 37H J 4AH X 58H 8 38H K 4BH Y 59H 9 39H L 4CH Z 5AH [E] 0DH M 4DH + 2BH [C] 08H N 4EH - 2DH . 2EH Figure 3-1 Table of key values

    3.3. Display Subsystem This subsystem provides the interface functions: Display character, Display string, Set cursor position, and Clear screen display. The display coordinates are organized as follows: Min Min Max Max Row Col Row Col 0 0 1 15 The origin (0,0) is always at the upper left hand corner.

    3.4. Communications Subsystem The MR350MKII terminal communication subsystem consists of

    1) point-to-point connection mode and 2) multi-point connection mode for network processing.

    3.4.1. Point-to-point mode Either RS-232 or RS-485 ports can be used in point-to-point mode. Each port can be configured for input or output data by making DOS calls. To transfer files, a Kermit server can be invoked by selecting option 3) COM in the user command menu or by typing COM in the Ready prompt and a Kermit utility should also be run on the Host side in order to complete the data connection.

  • 3-41

    3.4.2. Multi-point mode Either RS-232 or RS-485 ports can be also used in multi-point mode. When an RS-485 port is assigned to serve in multi-point mode, up to 32 terminals can be accessed per channel, when the RS-232 port is selected, the number of accessible terminals is limited by the number of available RS-232 ports on the host computer. There is also a multi-point communication protocol built into the MR350MKII for data communication in multi-point networking.

    3.5. Real time clock subsystem This subsystem allows the program to set and read the system date and time of the MR350MKII.

    3.6. Relay output and Digital input subsystem The MR350MKII supports two contact relay ports and four photocoupler input ports for digital signal input/output control, where pins #11/12 and pins #13/14 can also be assigned to the RS-232, and barcode scanner port (see Terminal Block Adapter on page 2-19).

    3.7. Bar code / Magnetic stripe / Wiegand / Smart card The MR350MKII has two ports for connecting four different interface reader. One of the two ports, as scanner port, is dedicated to bar code reading via bar code wand, CCD, laser diode scanner, bar code slot reader, and the terminal supports reading of Code 39, Code 128, Codabar, Interleaved 2 of 5, UPC and EAN. Please be noted, the secondary magnetic stripe reader besides the built-in one, is only valid on connecting to the terminal block adapter.

    NOTE: The CCD , laser diode scanner and barcode wand are only supported when connected through the scanner port. If terminal block pins #13/14 are set to scanner port, only the barcode wand or the slot reader are supported.

    The other port, as build-in reader port, is mainly designed for connecting a card reader for bar code, magnetic stripe, proximity and smart card reader. The proximity reader can be magnetic stripe reader(MSR) interface or wiegand interface, it up to customers choice. MR350MKII only can support single track 1, 2 or 3 magnetic card stripe. These two ports can work at the same time.

  • 3-42

    NOTE: Please be noted, the MR350MKII can automatically detect the type of badge reader. If a different type of build-in reader is selected, the first attempt of reading the card will be used to detect the right type and the data will not be accepted. If a right type is selected, the first attempt of swiped data will be accepted immediately.

    NOTE: Terminal wire link for Wiegand interface Wiegand +5V Data1 GND Data0

    ? ? ? ?

    Terminal Block P4A / +5V P1A / M.S GND P1C / M.D

    Remember to make jumper setting, J1/J2/J5/J6 Jumper need change to pin2,3 on main board.

    3.8. Downloading Program in Point-to-point mode Connect the Terminal in point-to-point mode through the RS-232 interface, then follow the steps listed below to download a program to the Terminal: Step 1. Connect a MR350MKII to a PC via the RS232 interface with the proper cable. Step 2. Press [F5/*] to invoke the user command menu. Step 3. Select option 3) COM to enter the Kermit server mode. Step 4 Insert the demonstration diskette that may be obtained from your local distributor into the PC. Step 5. Run KERMIT on the PC. Step 6. Use the send command from the PC to the MR350MKII to download the Demo program, DRV350.EXE.

  • 3-43

    ? MS-Kermit>SEND Downloads an execution file from the PC disk to the MR350MKII RAM area. (program)

    ? MS-Kermit>GET Sends a data file from the MR350MKII RAM area (data) to the PC disk.

    ? MS-Kermit>REMOTE DIR Displays all of the files which are stored in the MR350MKII (Program as well as data files)

    ? MS-Kermit>REMOTE DEL Deletes a program or data file in the MR350MKII.

    Step 7. Press [SHIFT] in conjunction with [F5/*] on the MR350MKII to exit from Kermit server mode to Ready mode. Step 8. Select option 1) RUN in user command menu and press the [? ] key to step

    through the available downloaded executable program, then press [E] to run DRV350.EXE, or type the filename (i.e.DRV350) directly at the Ready prompt. This program allows you to scan barcode data and upload or poll data to send to PC.

    3.9. Downloading a Program in Multi-point mode

    A sample program, 485COM.EXE, in the UTILITY disk is for multi-point mode environment testing. Please note in multi-point mode each terminal should be assigned a unique address ID and consistent communication parameters with the PC. NOTE: Following instructions use Host port to serve multi-point mode. 1) If Host port is RS232, directly connect to RS232 port between PC and

    MR350MKII 2) If Host port is RS485. Install an RS-485 interface card or an RS232/422

    converter to the PC. And cabling the network trunk from RS485 interface to MR350MKII via RS485 port (note a twist-pair cable with 22 or 24 AWG should be used).

    3) Set communication parameters including address ID on each MR350MKII properly. (The default values are, 9600 bps, non-parity, 8 data bits, 1 stop bit, address ID A)

    4) Power up the PC and all terminals. 5) Run the test program, 485COM.EXE, on the PC.

  • 3-44

    CRT screen shall appear the following message: Terminal type 1>350/360 2>700/870/860: Typing 1 for selecting MR350, COM(1-4)?: Typing 1 for selecting COM1, 2 for COM2.

    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.ExeSize f.Font G.Memory H.Reset I.ExFile J.Exist K.Keypad k.Kermit L.Dnload M.Time N.Buzzer O.Auto P.Passwd Q.UplMode R.TrmID T.TrmT U.Upload V.DEV_T X.Exec 3.brk 5.ChgAdr 9.Loop @.Modem ?.320 ~.UPS off F1.Addr F2.Comm_P F3.Retry F4.Disp. F5.Shell F6.Pkt size : Select:

    Item 0). Send a string of characters as message to MR350MKII. 1). Polling data from each terminals. A). Warm start means putting all connected terminals to ready mode, previously running program is stopped. B). Set enable/disable the barcode symbologies C). Set communication control table. D). Remote read the files existed on MR350MKII ram disk. E). Remote delete a specified file which existed on ram disk. F). Change RAM size of executable area (Not available on

    MR350MKII). f). Change font size. (Not available on MR350MKII) G). Get all connected terminals current total RAM size, execution area size, and free size. H). Cold start means initializing the system parameters of all connected terminals to factory default values. I). Get filename of current running program.

  • 3-45

    J). Check if specified file existed or not. K). Set keypad Lock / Unlock / Partial lock. (Not available on

    MR350MKII) k). Enter Kermit server mode (Not available on MR350MKII) L). Download a program or data file to MR350MKII. M). Set connected terminals date and time. N). Set beeper's volume. O). Set a executable object program to be started up automatically after power-up. Q). Inquire Uploading status (Not available on MR350MKII) R). Change terminal's ID. T). Set terminal control table. U). Upload a program or data file from MR350MKII. V). Set device control table. X). Remote run means that starting up an pre-downloaded executable object program on the terminal. 3). Set power saving (Not available on MR350MKII) 5). Set connected terminal address. 9). Loop back testing. @). Dumping terminal and Modem control ?). MR320's setting (Not available on MR350MKII) ~). Disable UPS F1). Set available terminal address to be communicated F2). Set PC's communication parameter F3). Set time period of Time-out/ NAK re-try / ACK F4). Debug mode (display whole received and sent data) F5). Go to DOS shell F6). Set communication packet size (For debug only) [ESC]. Exit 485COM.EXE and back to DOS prompt.

  • 3-46

    7) Select item F1) to key in the address of all connected terminals or some terminals to be tested; for example, if there are three terminals connected with address A, B, C, respectively, type ABC.

    8) Select item L) to download program 350TEST.EXE. This procedure will be repeated till all designated terminals have been downloaded.

    9) Select item X) and input program name, 350TEST, to start up the program on all designated terminals in step 7.

    10) Select item 1) to start getting data, PC screen will appear "." indicating there is no data collected. If any of those terminals starting input data by scanning bar code label, PC screen will show as below:

    A (nn): XXXXXX The first character mean terminal address. Where XXXXXX is the data scanned from all connected barcode input devices or magnetic striper reader and NN is its data length.

    10) Select item 0). to send message to terminals. Key in whether string according to PC screen instruction, and the string pattern will then be displayed on the terminal's LCD as Application data:XXXXX where XXXXX is the string you keyed in from PC keyboard.

    11) You may also select H) and A) to test the Cold-start and Warm-start functions. Or press [ESC] key to end this program.

  • 4-47

    Chapter 4. Data Structure

    4. Data Structure The MR350MKII system control data structures are outlined in the following diagram. The system kernel uses the File Allocation Table (FAT), File Handle Table (FHT), Communication Control Table, Device Control Table and Key Alias Table. The following sections will describe each one of these control tables. The description includes a "typedef" part and the "default" values of the table.

    Terminal Application EXEC Terminal Control Table Device Control Table Key Alias Table

    Kernel

    File Allocation Table File Handle Table Comm Control Table RS232&RS454

    4.1. Device Control Table The device control table contains the MR350MKII peripheral configuration information including barcode scanner port, badge reader port, LCD display, keyboard and buzzer output information. The barcode scanner is controlled by a separate data structure and barcode control table, to be discussed later.

    4.2. Type Definition typedef struct { BYTE scanner; BYTE badge; BYTE lcd_backlight; BYTE buzzer; BYTE keylock; BYTE buzzer_volume; } DEV_CONFIG; scanner: 'N' = enable scanner port 'F' = disable scanner port (default) badge 'B' = enable badge port for barcode slot reader (default) 'M' = enable badge port for magnetic card reader 'D' = disable badge port lcd_backlight: 'N' = set LCD backlight ON

  • 4-48

    'F' = set LCD backlight OFF (default) buzzer: 'N' = set buzzer ON (default) 'F' = set buzzer OFF keylock: 'N' = set keyboard Unlock (default) 'K' = set keyboard Lock 'P' = set keyboard Partial Lock buzzer_volume: 0 = Low volume (default) '5' = Medium volume '9' = High volume 4.3. Barcode Control Table The MR350MKII supports decoding software to automatically discriminate bar code symbologies: Code 39, Code 39 Full ASCII, EAN-8, EAN-13, UPC-A, UPC-E, Code 128, Codabar and Interleaved 2 of 5.

    4.3.1. Type Definition

    typedef struct { BYTE code39; BYTE i2of5; BYTE codabar; BYTE ean_upc; BYTE code128; } BARCODE_CONFIG; code39: 'N' = Enable barcode decoding of Code 39 (default) 'F' = Disable barcode decoding of Code 39 i2of5: 'N' = Enable barcode decoding of Interleaved 2 of 5 (default) 'F' = Disable barcode decoding of Interleaved 2 of 5 codabar: 'N' = Enable barcode decoding of codabar (default) 'F' = Disable barcode decoding of Codabar ean_upc: 'N' = Enable barcode decoding of UPC/EAN (default) 'F' = Disable barcode decoding of UPC/EAN code128: 'N' = Enable barcode decoding of Code 128 (default) 'F' = Disable barcode decoding of Code 128

  • 4-49

    4.4. Communication Control Table of Host port The communication control table is applicable to configure the host port of the MR350MKII. The communication control table specifies all communication parameters between the host system and the MR350MKII. When a hard reset command is issued via keypad input or host command sequence the default communication parameters are restored. The host system may then configure most MR350MKII parameters by issuing host command sequences. The host command sequences will be listed later in appendix B.

    4.4.1. Type Definition typedef struct { BYTE baud_rate; BYTE stop_bit; BYTE data_bit; BYTE parity; BYTE protocol; BYTE address; WORD time-out;

    } COM_CONFIG; The MR350MKII terminal communicates with the host via the host port. The communication baud rate may be programmed from 110 to 38.4K baud (bits per second). baud_rate: '0' = 110 bits per second '1' = 150 '2' = 300 '3' = 600 '4' = 1200 '5' = 2400 '6' = 4800 '7' = 9600 (default) '8' = 19200 '9' = 38400 stop_bit: '1' = one stop bit (default) '2' = two stop bits data_bit: '7' = 7 data bits '8' = 8 data bits (default) parity: 'N' = None parity (default) 'O' = Odd parity 'E' = Even parity protocol: 'M' = Multipoint (default) 'F' = None protocol

  • 4-50

    address: 'A' = terminal address ID for Multipoint mode (default)

    Each MR350MKII must be assigned a unique communication address when it is used in a Multipoint environment. The address is used by a host or concentrator to perform polling functions. Characters 'A'-'Y' and '0'-'6' are used for assigning an address ID of each terminal.

    time-out: '02' = polling time-out two cycle periods (default). '02'-'FF' in hex format.

    The value of this setting is specified for the communication time-out. If the MR350MKII does not receive a response from the host system within the number of time-out cycle periods, the MR350MKII regards the communication as unsuccessful and the transmission is then aborted. If the time-out value is set to zero, no time-out check is performed by the MR350MKII.

    4.5. Terminal Control Table (available for host port only) The terminal control table is meaningful only if the MR350MKII operation switch is set to "terminal mode". All other operational modes ignore the terminal control table.

    4.5.1. Type Definition The terminal control table is defined by the following typedef TERM_CONFIG. There is only one instance of the TERM_CONFIG data structure:

    typedef struct { char terminal_id[8]; /* terminal id */ BYTE online; BYTE echo; BYTE autolf; /* auto LF */ BYTE mode; BYTE linepage; /* line or page block */ BYTE lineterm; /* line terminator */ BYTE pageterm;/* page terminator */

    } TERM_CONFIG; Each MR350MKII "terminal" is identified by an ASCII string. There can be up to seven characters in a terminal identification string. The

  • 4-51

    identification entry in the TERM_CONFIG table must be terminated by a character, ASCII_Z (hex 0), as in C language convention.

    online: 'R' = set to Remote and transmit data to the host port (default) 'L' = set to Local and do not transmit echo: 'N' = set to Echo and transmit displayed data to the host port 'F' = do not transmit

    The above two variables, TERM_online and TERM_echo, are used to control transmission and display of the collected data, respectively. If TERM_online is set to Remote the MR350MKII will transmit data to the host, otherwise it will not transmit. If TERM_echo is set to Echo collected data will be displayed on the MR350MKII LCD, otherwise data will not be displayed.

    autolf: 'N' = set not to append a LF after a CR 'F' = set to append a LF (default)

    This variable instructs the MR350MKII to append a LF character whenever a CR is collected from an input scanning device.

    mode: 'C' = set to Character mode 'B' = set to Block mode (default)

    This parameter specifies either character mode or block mode free-format operation. The aforementioned form caching operation is only applicable when the MR350MKII is set in block mode.

    linepage: 'L' = set line block mode (default) 'P' = set page block mode 'B' = set both line and page block modes

    The linepage parameter is useful only if mode has been specified as 'B'.

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

  • 5-52

    Chapter 5. Host Communication

    5. Host Communication and ESC commands There are three classes of host communication activities:

    (1) Host Sends Control/Configuration Commands to the MR350MKII

    Almost all MR350MKII configurations and operations may be controlled by the host system via control commands. Configuration commands are used to set up system tables such as the communication control table. Control commands are used to abort MR350MKII operations, reset the MR350MKII, instruct the MR350MKII to execute an application program, or perform other functions related to operations. Configuration commands are normally issued by the host system during the initialization process. Control commands, however, may be issued at any time during normal operation or during a recovery action.

    (2) Host Requests Data from the MR350MKII Two kinds of data are usually requested by the host system: MR350MKII system data and application data. Application data is the information which is input through keyboard or bar code scanning, system data is the information which is pertinent only to MR350MKII executives, e.g. file names, system parameters, etc. The MR350MKII transmits data depending on the protocol used.

    (3) File Transfers Between the Host and the MR350MKII Executable files and data files are downloaded to the MR350MKII from the host or uploaded to the host from the MR350MKII. File transfers may use a special file transfer protocol to move data in a point-to-point or multi-point connection.

    In the following sections we will first discuss the host communication commands and briefly describe their functions. Then we will examine in detail the protocol for each function.

    5.1. General Control Commands 1. Hard Reset ( ESC H )

    A hard reset command clears all the MR350MKII RAM memory content. It performs tests on all major hardware devices. Programs or data that have previously accumulated in the MR350MKII or previously been downloaded

  • 5-53

    by the host will be purged from the memory. Default system parameters are restored from the EPROM. The hard reset command does not have any parameter or value. The equivalent keypad invoking sequence is entering the supervisor mode and selecting an initialization command.

    2. Abort ( ESC A ) Abort is the "soft reset" command. The MR350MKII terminates its execution and returns to ready mode. Programs and data that have been stored in the MR350MKII RAM space are preserved. The system parameters remain unchanged. The abort command does not have any parameters or values. The equivalent keypad invoking sequence is pressing the [SHIFT] and [F5/*] keys at the same time.

    3. Execute ( ESC X filename ) The host system may instruct the MR350MKII to execute a program which resides in the MR350MKII RAM. The host issues the execute command with the executable program name as its parameter. The MR350MKII acknowledges with an ACK response if the program exists and starts execution. The execute command has one parameter, the file name. The execute command can also be invoked via the MR350MKII workstation menu.

    4. Directory ( ESC D ) The directory command instructs the MR350MKII to return a list of available files in the RAM of the MR350MKII. The directory command has no parameters. The directory command can also be invoked via the MR350MKII workstation menu. When invoked from the keypad the directory is listed on the LCD display.

    5. Erase ( ESC E filename ) The erase command deletes a file from the MR350MKII RAM. An ACK response will be given if the file existed and was deleted, otherwise an NAK response is generated by the MR350MKII. The erase command has one parameter, the file name. The erase command can also be invoked via the MR350MKII workstation menu.

    6. Autoboot ( ESC O program name ) This command defines an autoboot program name in the MR350MKII. The autoboot program will be executed automatically each time the power is turned OFF and ON.

    7. Password ( ESC P password ) To create or edit a supervisor password.

  • 5-54

    8. Get RAM size (ESC G) Get the MR350MKII? total RAM size, program execution memory, and free memory available for RAM disc.

    9. Get filename of currently executing program (ESC I filename) When the command is received by the MR350MKII, the system will respond with the current executing program name or report that no program is running.

    10. Check file existed and files size(ESC J filename) Check if the file is existed on MR350MKII or not. If file is exist, it will return its size

    11. Set keyboard locking (ESC K state) Set the MR350MKII? keyboard locking state. There are three states allowed: UNLOCK, LOCK, or PARTIAL LOCK.

    12. Change terminal address ID (ESC 5 ID) Assign a new terminal address ID to the terminal. Once the terminal address ID changes, it will take effect immediately without having to reset the terminal.

    13. Deactivate UPS (ESC F) Deactivate the UPS on MR350. Once the command is sent, the UPS will not activate and support the power to the terminal during the main power is outage. This command is useful when the terminal is under maintenance or not used for long period.

    14. Loopback test (ESC 9) The loopback test is used for testing the line communication. The testing

    program run on host sends this command with test data to terminal and terminal echoes back the data to be verified by the program.

  • 5-55

    15. Buzzer Volume (ESC N) This command can remote changing MR350MKII's buzzer sound.

    16. Supervisor password (ESC P) This command can remote changing MR350MKII's buzzer sound.

    17. Get terminal ID (ESC R) This commcand can get terminal ID. The default terminal ID is "MR350"

    18. Get terminal ID and version no (ESC v) This commcand can get terminal ID and version no. The default terminal ID is "MR350 V4.xx".

    5.2. Configuration Commands Configuration commands from the host always follow the standard host command sequence: ESC, cmd, table. The cmd field actually specifies the object to be configured. The table field contains the data organized in a pre-defined format. 1. Terminal Configuration ( ESC T )

    The terminal configuration command has the following format: ESC T termtable

    This command takes the data structure "termtable" from the host and writes it to the MR350MKII internal terminal control table. The structure within "termtable" must conform to the TERM_CONFIG typedef (see section 4.5 on page 4-50) specified in the previous section. The new terminal control table takes effect immediately after the ESC T command has been successfully received.

    2. Communication Configuration ( ESC C ) The communication configuration command has the following format:

    ESC C comtable This command takes the data structure "comtable" from the host and writes it to one of the two MR350MKII internal communication control tables. The structure within "comtable" must conform to the COM_CONFIG typedef (see section 4.4 on page 4-49) specified in the previous section. The new communication control table takes effect immediately after the ESC C command has been successfully received. The MR350MKII will

  • 5-56

    reinitialize the corresponding communication port with its new parameters. For example, if ESC C instructs the RS-232 port to change the baud rate from 9600 to 1200 the MR350MKII will switch to 1200 right after the ESC C command has been received. The next host communication will use 1200 baud.

    3. Device Configuration ( ESC V ) The device configuration command has the following format:

    ESC V devtable This command takes the data structure "devtable" from the host and writes it to the MR350MKII internal device control table. The structure of "devtable" must conform to the DEV_CONFIG typedef (see section 4.1 on page 4-47) specified in the previous section. The new device control table takes effect immediately after the ESC V command has been successfully received.

    4. Date/Time Configuration ( ESC M ) The date/time configuration command has the following format:

    ESC M datetime This command allows the host system to initialize the MR350MKII real time clock function. The parameter datetime is an ASCII character string with the following interpretations: yyyymmddhhmmss. The first four characters represent the year. The next two characters represent the month, where January is 01. The fields after the month field represent the day of the month, hour (24 hour format), minute, and second, respectively. For example, command ESC M 199009262345 will initialize the MR350MKII clock to September 26, 1990. The time is 11:45 PM. The MR350MKII reconfigures the real time clock chip as soon as the ESC M command has been successfully received.

    5.3. File Transfer Commands 1. Download ( ESC L filename )

    The download command is used to transfer a binary executable program or data file from the host system to the MR350MKII. When the MR350MKII receives the download command it sends an ACK response back to the host and immediately puts itself into a file receiving state. The file receiving state is determined by a pre-assigned host protocol Kermit. The host system may start transmission of the file as soon as the ACK response has arrived.

  • 5-57

    The download command has one parameter, the file name. Download can also be invoked via the MR350MKII workstation menu. The upload command performs the opposite function of the download command. It is normally used to transfer a data file from the MR350MKII to the host system. This is the typical means of retrieving collected data in workstation mode.

    2. Upload ( ESC U filename ) When the MR350MKII receives an upload command it puts itself in file transmission state and starts sending the designated data file. The file transfer protocol is determined by a pre-assigned host protocol Kermit. The host system waits for the arrival of the data file after it sends out the upload command. The upload command has one parameter, the file name. The upload command can also be invoked via the MR350MKII workstation menu.

    5.4. Multipoint Protocol In Multipoint operation the MR350MKII uses an asynchronous serial multi-drop protocol for communication with the host computer. Note that to make this protocol operable an RS-232 to RS-485 converter is needed between the host and the MR350MKII. The terminal protocol consists of commands and responses of the following format:

    Symbol Description => Transmission from host to terminal

  • 5-58

    Length of data block = 7 CS = ESC + L + A + . + E + X + E + ADDR + 7 CS1 = high nibble of CS + 40H CS2 = low nibble of CS + 40H

    The ASCII data characters and their values are as follows:

    STX 0x02 ETX 0x03 ACK 0x06 NAK 0x15 DC1 0x11 ESC 0x1B EOT 0x04 The maximum frame size including protocol control characters is 128 bytes. Transparent transmission of protocol control characters STX and ETX is achieved by preceding them with a '\' (backslash) character. Transparent transmission of the '\' character is achieved by sending two '\' characters consecutively.

    Rule of data convention during data transmission: 1) One-byte data converted to two-byte data

    \ convert to \\ 00 hex -- 1F hex convert to \ 80 hex -- \ 9F hex A0 hex -- FF hex convert to \ 20 hex -- \ 7F hex (excluding DC hex) 2) one-byte data transmitted as original data without converting other codes unchanged Host Transmissions Transmission Format Poll STX, ADDR Host Data STX, CMD, data, CS1, CS2, ADDR Acknowledgment ACK

  • 5-59

    Negative ACK NAK Terminal Transmissions Transmission Format Terminal Data STX, data, CS1, CS2, ETX Acknowledgment ACK Negative ACK NAK

    5.4.1. Protocol Operation The terminal protocol operates as a multi-point stop and wait protocol. A station sends only one frame and then stops and waits for a response.

    The following scenarios typify link transmissions: * Terminal has no data for the host: => STX ADDR STX ADDR ACK - if data is received correctly, or NAK - if an error has occurred

    * The host sends a command to and receives a response from the terminal in one poll cycle; it then acknowledges receipt of the terminal command response:

    => STX, CMD, parms, ... CS1, CS2, ADDR

  • 5-60

    5.4.2. Example Using Host ESC Command The following commands are supported for download, diagnostic, and application data transfers. Each command and its parameters will be framed as shown before being transmitted; responses have the same format without the ADDR fields.

    STX, CMD, parms, ... CS1, CS2, ADDR Example:

    ESC H - Hard Reset and initiate power on test => STX ESC H CS1 CS2 ADDR

  • 6-61

    Chapter 6. User Mode

    6. User Mode 6.1. Hard Reset The MR350MKII can be hard reset (Cold Boot) by pressing [3] while turning on power. Since the MR350MKII doesnt provide a power on/off switch, it is suggested to hard reset the terminal by use of option INIT in supervisor mode (refer to next chapter) or host ESC command (more details in appendix B). All system parameters will be reset to factory default values and all programs and data stored in RAM will be cleared after a "Cold Boot" All data stored in RAM of the terminal is backed up by a lithium battery, all the system parameters, programs, and data will be preserved as they were before powering down unless a Cold Boot is made.

    6.2. Operating Modes There are two MR350MKII operating modes: Ready mode and Supervisor mode. The Ready mode can be entered after turning on the MR350MKII's power or by pressing [SHIFT] in conjunction with [F5/*] to abort from the application and return to ready mode. The Supervisor mode can only be entered by authorized personnel after entering the correct password. Key pressing sequence to invoke Ready mode and Supervisor mode: Ready mode:

    1. Power off/on the terminal by disconnecting/re-connecting DC adapter, or

    2. Press [SHIFT] in conjunction with [F5/*] to abort application, and return to Ready mode.

    Supervisor mode: 1. Press and held the key [3] , then turn on the power, or 2. Press [SHIFT] in conjunction with [F5/*] in Ready mode, then 3. Enter password. (Default : None, simply press [E])

    6.3. Ready Mode When a Terminal is turned on, it proceeds with a warm boot and enters Ready mode. Then the LCD shows the screen below, indicating the Terminal is Ready to be used.

  • 6-62

    Figure 6-1 Ready mode prompt

    6.4. System Commands In Ready mode, the user may invoke system commands by inputting a three-character command including "ERA", "RUN", "TER", "COM", "TYP", "DIR" and "SET". Or by pressing [F5/*] to invoke the user command menu.

    Command Description ERA Erase (delete) a file from RAM disk RUN Run a selected program TER Enter terminal mode to emulate the MR350MKII as a dump

    terminal COM Enter Kermit server mode TYP Dump file contents to LCD DIR List directory of RAM disk SET Enter user configuration mode to set the system date and

    time, buzzer volume and backlit on/off

    6.5. Erase File To remove the file from the RAM disc, you may type ERA at the Ready prompt or select 6) ERA in user command menu. The display will show available files name on screen, user can use [? ] or [? ] key to choice destination file name and [E] key to delete it. Type the filename you intend to remove including the file extension name.

    NOTE: Once the file is erased, you are unable to recover the file.

    6.6. Run Mode Users may enter the filename of a program to execute the program directly. Users may select item 1) in the user command menu or enter the "RUN" command to enter Run mode, the file names of the .EXE files stored in the RAM Disk will be shown on

    MR350MKII V X.XX >

    PRESS FILENAME: xxxx.xxx

  • 6-63

    the LCD. You may use the [? ] key to toggle the selection of the program, and press [E] to execute the selected program. The executed program can be aborted by pressing [SHIFT] in conjunction with [F5/*] if necessary.

    6.7. List Directory of RAM Disc. Press DIR in Ready prompt or select 5) DIR in the user command menu. The system will display every two files and pause, user may press any key to continue to display next two files. For example, if only one file ? OINT.EXE is stored in the RAM disc, the display will show as below: Press any key to return to the Ready prompt.

    6.8. Terminal Emulation Mode The MR350MKII provides a built-in terminal emulation utility. You may use this utility to accept data input from the scanner port, build-in reader port or keyboard, and send the data to the host through the host port. The communication protocol corresponds with the settings of the host port. Press TER at the Ready prompt or select 8) TER in the user command menu to invoke the terminal emulation utility. The display will be as below and the terminal will be ready to accept data. Press [F5/*] in conjunction with [SHIFT] to abort the terminal emulation utility and go back to the Ready prompt.

    6.9. User Configuration Mode (SET command) The operator may alter the system calendar/clock, and buzzer volume and turn the backlight on/off to fit their operation environment. Type "SET" in Ready mode or select item 7) in the user command menu to enter the Configuration mode.

    There are 3 setup procedures which will be shown in sequence.

    ?? Setting the system calendar/clock. ?? Selecting speaker volume as HIGH, MEDIUM, or LOW. ?? Selecting LCD backlight or cursor as ON or OFF . ?? Set Keypad input status

    ?

    POINT.EXE

  • 6-64

    DATE/TIME The date format is in YYYY/MM/DD. The time format is in HH:MM:SS. Use the numeric keys to set the date and time, then press [E] to confirm.

    BUZZER Adjust the beep volume of key-presses to three levels: Low, Middle,

    or High. Use [? ] to select the desired beep volume and press [E] to confirm.

    LCD There are two option for this item. The 1st item is to assign backlight ON or OFF for LCD display. Use [? ] to select one and press [E] to confirm.

    NOTE: The MR350MKII will turn the backlight off automatically, regardless of the backlight setting if the external AC power source is lost, and it will remain off until the main power is recovered.

    The 2nd option is to set enable or disable cursor. Use [? ] to select one and press [E] to confirm.

    KEYPAD There are two option for user to easy input Alpha character with upper

    case and lower case ALPHA KET The 1st item is to enable or disable SHIFT lock. The default setting is enable. It means user can input alpha character after press [SHIFT] key and he cannot enter numeric character until press [SHIFT] key again. When SHIFT LOCK is disable, it only allow user to enter one alpha character after pressing [SHIFT] key. ALPHA CHARACTER this item allow user to input upper and lower case character

    1998/01/01 00:00:00

    BUZZER SETUP LOW

    BACKLIT SETUP ON

    CURSOR ON

  • 6-65

    6.10. File Transfer Mode The terminal provides a built-in file transfer utility which uses Kermit protocol. When the host port is assigned to serve through the built-in file transfer utility, the download/upload communication can be made through a built-in Kermit server in the MR350MKII system. The physical RS-232 or RS-422/485 port is selected as the device setting in the supervisor mode. The operator may set the terminal to Kermit server mode by typing COM in Ready mode or by selecting item 3) in the user command menu. The following screen will be shown when entering Kermit server mode: Then the operator should run Kermit communication software on the Host PC. The proper communication parameters should also be defined in the Kermit parameter file, i.e. mskermit.ini. When using Kermit server mode to download a file, the cable for linking the Terminal and Host must have the CTS and RTS wires connected. After file transfer in Kermit server mode, press [SHIFT] in conjunction with [F5/*] to return to Ready mode.

    SERVER MODE

  • 7-66

    Chapter 7. Supervisor Mode

    7. Supervisor Mode The MR350MKII supports a Supervisor Mode to setup system configuration and verify the hardware of the terminal. Follow the procedure below to enter Supervisor Mode:

    1. Turn off the MR350MKII 2. Press [3] and hold the key, then turn on the power, or 3. Press [SHIFT] in conjunction with [F5/*] in Ready mode, then 4. Enter password. (DEFAULT : None, simply press [E])

    The MR350MKII's LCD shows: A supervisor password is used to prevent an unauthorized user from changing the system configuration accidentally. The MR350MKII system will enter Ready mode automatically if a user fails to enter the correct password within 5 tries. The default password is none, simply press [E]. After the password check, the first screen in Supervisor Mode will be the first part of the main menu, as shown below, the user may use [? ] to cycle through the first and second parts of the main menu and select the number corresponding to one of the eight categories to configure the system, reset the system or run diagnostics, or press [F5/*] to go back to Ready mode.

    1) DEVC 2) TERM 5) AUTO 6) PSWD 9) BIOS 3) MEMY 4) FNKY 7) INI 8) DIAG

    First Part Second Part 1) DEVC Device Configuration 2) TERM Terminal Configuration 3) MEMY Memory Configuration 4) FNKY Define Function Key 5) AUTO Set Auto Execution program 6) PSWD Change Password 7) INIT System Initialization (Cold Boot)

    PASSWORD:

  • 7-67

    8) DIAG System Diagnostic 9) BIOS Update Firmware and programming users application program

    into Flash Rom

    7.1. Device Configuration To configure the MR350MKII device parameters, choose option "1) DEVC" in Supervisor mode menu. The MR350MKII will prompt for following parameter setting in sequence, RS485/RS232, BARCODE, WIEGAND and SECURITY. User can use [? ] or [? ] key to select one item and then press [E] key to set it.

    7.1.1. RS485/RS232 The MR350MKII will prompt in sequence to ask to select the COM port of the host, protocol, address , baud rate, number of data bits, parity , number of stop bits and flow control. The available options of each item are listed below and selections can be made by pressing [? ] to cycle through available options and then press [E] to confirm. Factory default values are underline and bold.

    ITEM SELECTION

    COM1 selection RS485 , Ethernet

    HOST PORT RS485 , RS232 or Ethernet, RS232 HOST PROTOCOL MULTI-POINT, NONE HOST Address A~Y or 0 ~ 6 HOST Baud rate 110,150,300,600,1200,2400,4800,9600,19200,38400 HOST Data bits 8 , 7 HOST Parity NONE, EVEN , ODD HOST stop bits 1,2 SERIAL Baud rate 110,150,300,600,1200,2400,4800,9600,19200,38400 SERIAL Data bits 8 , 7 SERIAL Parity NONE, EVEN , ODD SERIAL stop bits 1,2 SERIAL Flow control NONE, XON/XOFF, CTS/RTS (if serial port is RS232)

    < DEVICE SETUP > RS485/RS232

  • 7-68

    NOTE 1. The CTS/RTS option is only available when the RS-232 is assigned as

    a serial port. 2. When XON/XOFF is selected as flow control, it will prompt 2 items

    for user to set ASCII code of XON and XOFF

    7.1.2. BARCODE After press [E] key, the terminal will prompt in sequence to toggle ON or OFF the accepting permission for the following barcode type: CODE39, I 2OF5, CODABAR, UPC-A,UPC-E, EAN-13, EAN-8, CODE128, EAN128, CODE93. The default permission for each type is ON. Press [? ] to toggle ON/OFF and then press [E] to confirm the selection. Below show all detail setting of barcode symbology

    CODE Sub-item Selection Code 39 ENABLE, DISABLE FULL Code 39 ON, OFF START/STOP NO SEND, SEND Check digit OFF, ON & No send, ON & Send I 2 of 5 ENABLE, DISABLE Check digit OFF, ON & No send, ON & Send Codabar ENABLE, DISABLE START/STOP NO SEND, SEND Check digit OFF, ON & No send, ON & Send UPC-A ENABLE, DISABLE LEAD DIGIT NO SEND, SEND Check digit OFF, ON & No send, ON & Send UPC-E ENABLE, DISABLE LEAD DIGIT NO SEND, SEND Check digit OFF, ON & No send, ON & Send ZERO EXPAND OFF, ON EAN-13 ENABLE, DISABLE LEAD DIGIT NO SEND, SEND Check digit OFF, ON & No send, ON & Send EAN-8 ENABLE, DISABLE Check digit OFF, ON & No send, ON & Send Code 128 ENABLE, DISABLE EAN 128 ENABLE, DISABLE Code 93 ENABLE, DISABLE

    NOTE

    < DEVICE SETUP > BARCODE

  • 7-69

    Once the selected type of barcode is set OFF, then the corresponding barcode data will not be accepted by the terminal? decoder.

    7.1.3. WIEGAND After press [E] key, the terminal will prompt in sequence to toggle ENABLE or DISABLE the accepting permission for the following format: 26-Bit, 36 Bit and UNFORMATTE