Unitech MR650 Programming Manual

Unitech mr650: user guide
Hide thumbs Also See for MR650:
Table of Contents

Advertisement

Quick Links

MR650 Programming Manual
V 1.12 1/16/2008

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the MR650 and is the answer not in the manual?

Questions and answers

Summary of Contents for Unitech MR650

  • Page 1 MR650 Programming Manual V 1.12 1/16/2008...
  • Page 2: Table Of Contents

    How to download data from building RFID proximity reader ... 8 1.3. COM definition for MR650 ... 8 1.4. Useful Sample program ... 9 USI.DLL - UNITECH SCANNER INTERFACE DLL ... 10 2.1. Register the application to the USI DLL... 10 2.2. Unregister the application from the USI.DLL... 11 2.3.
  • Page 3 2.22. Enable/Disable Scan2Key ... 17 2.23. Send scanner command to decoding chip ... 17 2.24. Only send single command decoding chip... 18 2.25. Send command to decoding chip... 18 CONTROL COMMAND FOR DECODER CHIP... 19 UNITECHAPI.DLL ... 24 4.1. Disable ActiveSync ... 24 4.2.
  • Page 4 5.7.1. Power on/off Camera... 38 5.7.2. Camera Reset... 38 5.8. Watch Dog... 39 5.8.1. Set time out value ... 39 5.8.2. Start the watchdog ... 39 5.8.3. Pause the watchdog ... 39 CAMERA CONTROL - CAMERADLL.DLL ... 40 6.1. Open Camera... 40 6.2.
  • Page 5 7.9. Set FP module’s baudrate... 46 7.10. Get FP module’s Aux Port baudrate ... 47 7.11. Set FP module’s Aux Port baudrate ... 47 7.12. Set FP module’s Aux Port baudrate ... 47 7.13. Get FP version ... 47 7.14. Initialize FP directory ...
  • Page 6 9.9. Write Card’s Block Data ... 55 9.10. Read Card’s Value ... 55 9.11. Write Card’s Value ... 55 9.12. Increase Value ... 55 9.13. Decrease Value... 56 9.14. Read Sector Data... 56 9.15. Read Multi Sectors Data... 56 9.16. Reader Serial Number ...
  • Page 7 FUNCTION KEY SETTING ON REGISTRY ... 65 UPDATE NOTES ... 66...
  • Page 8: Introduction

    MR650. Inside the MR650 there is an advanced decoding chip to control SE900 laser engine and to handle barcode decoding. Below is system diagram for the MR650 barcode: Reader According to the above diagram, the MR650 communicates with Decoder Chip by mean of serial port COM2.
  • Page 9: Useful Sample Program

    1.4. Useful Sample program You can get useful sample program for VC, C# and VB.NET from below URL http://w3.tw.ute.com/pub/cs/software/sample_program/mr650/MR650_Sample_source.zip It includes below functions’ sample program 1. Finger print 2. Camera 3. RS485 4. Audio Wave record and play...
  • Page 10: Usi.dll - Unitech Scanner Interface Dll

    2. USI.DLL - Unitech Scanner Interface DLL 2.1. Register the application to the USI DLL Function Description: Register the application to the USI DLL, so that the DLL can communicate with the application. It will also open and initial scanner port (COM2, for example) and set the scanner to the working mode.
  • Page 11: Unregister The Application From The Usi.dll

    2.2. Unregister the application from the USI.DLL Function Description: Unregister the application from the DLL. It will close the scanner port, and by default it will disable the scanner. Function call: void USI_Unregister(); Return code: None 2.3. Enable / Disable Scanner Function Description: To starts or stop USI function.
  • Page 12: Get Scan Data

    2.7. Get scan data Function Description: Retrieve the scan data into the buffer. Return the length of characters. It also returns the barcode type if type is not NULL. Return 0 means that the buffer is too short to hold the data. USI_GetData should be called when SM_DATAREADY message is received.
  • Page 13: Get Length Of Scanned Data

    2.8. Get length of scanned data Function Description: Return the data length of the scan data. When allocate the memory to hold the scan data, add at least one additional byte for string terminator. Function call: UINT USI_GetDataLength(); Return code: UNIT: 2.9.
  • Page 14: Clear Scan Data System Buffer

    (UPI300.DLL is an example) to turn on and off the LED. If the DLL is not defined or the function is not found, USI will bypass the call of GoodReadLEDOn. [HKEY_LOCAL_MACHINE\SOFTWARE\Unitech America Inc.\Scanner\Settings] "DLLLEDCONTROL"="UPI300.DLL" The function prototype of GoodReadLEDOn is: VOID WINAPI GoodReadLEDOn(BOOL fon);...
  • Page 15: Change Scanner Setting From Specified Setting Profile

    (UPI300.DLL is an example) to start and stop the scanner. If the DLL is not defined or the function is not found, then auto scanning is not available. [HKEY_LOCAL_MACHINE\SOFTWARE\Unitech America Inc.\Scanner\Settings] "DLLSCANNERCONTROL"="UPI300.DLL" The function prototype of SetScannerOn is: VOID WINAPI SetScannerOn(BOOL fon);...
  • Page 16 it is for internal use - send messages.
  • Page 17: Test If Scan2Key Is Enabled

    2.20. Test if Scan2Key is enabled Function Description: Test whether Scan2Key is enabled. Scan2Key routes scanning input from scanner to keypad buffer, so that barcode data can be input as like from keystrokes on keypad. Function call: BOOL S2K_IsEnabled(); Return code: TRUE = enabled FALSE = disable 2.21.
  • Page 18: Only Send Single Command Decoding Chip

    2.24. Only send single command decoding chip Function Description: Send command to decoder chip. This is a variation of command HAM_SendCommand. It sends following command to Hamster: (note, only two bytes without BCC) Esc, 0x80+cmd Function call: BOOL HAM_SendCommand1(BYTE Parameter: (input) cmd: Return code: TRUE = Indicates the command has been successfully sent to queue to output.
  • Page 19: Control Command For Decoder Chip

    3. Control command for decoder chip Important: This chapter describes low level command for scanner control function. If you already USI to do scanner programming, you don't need to care about this chapter. In general, it is not suggested to use level command to control scanner, because there are timing issue on serial communication programming , and it is always need communication expert to do that and it is hard to explain it on document.
  • Page 20 char_delay Esc,0,4,5,m,S1,BCC Function_code Esc,0,4,6,m,S1,BCC No meaning for you Capslock Esc,0,4,7,m,S1,BCC No meaning for you Language Esc,0,4,8,m,S1,BCC No meaning for you Baud_rate Esc,0,4,0D,m,S1,BCC No meaning for you Parity Esc,0,4,0E,m,S1,BCC No meaning for you Data_bits Esc,0,4,0F,m,S1,BCC No meaning for you Handshake Esc,0,4,10,m,S1,BCC No meaning for you Ack_nak Esc,0,4,11,m,S1,BCC...
  • Page 21 Track_selection Esc,0,4,33,m,S1,BCC No meaning for you T2_account_only Esc,0,4,34,m,S1,BCC No meaning for you Separator Esc,0,4,35,m,S1,BCC No meaning for you Must_have_data Esc,0,4,36,m,S1,BCC No meaning for you Track1_sequence Esc,0,L,37,m,S1,…Si,BCC No meaning for you Track2_sequence Esc,0,L,38,m,S1,…Si,BCC No meaning for you Code39_set Esc,0,4,39,m,S1,BCC Code39_enable Esc,0,4,3a,m,S1,BCC Code39_sandard Esc,0,4,3b,m,S1,BCC Code39_cd:...
  • Page 22 Msi_p_enable Esc,0,4,5c,m,S1,BCC Msi_pleasey_cd Esc,0,4,5d,m,S1,BCC Msi_p_cdmode Esc,0,4,5e,m,S1,BCC Msi_pleasey_min Esc,0,4,5f,m,S1,BCC Msi_pleasey_max Esc,0,4,60,m,S1,BCC Code93 Esc,0,4,61,m,S1,BCC Code93_min Esc,0,4,62,m,S1,BCC Code93_max Esc,0,4,63,m,S1,BCC Code11 Esc,0,4,64,m,S1,BCC Code11_enable Esc,0,4,65,m,S1,BCC Code11_cdnumber Esc,0,4,66,m,S1,BCC Code11_cdsend Esc,0,4,67,m,S1,BCC Code11_min Esc,0,4,68,m,S1,BCC Code11_max Esc,0,4,69,m,S1,BCC Codabar_set Esc,0,4,6a,m,S1,BCC Codabar_enable Esc,0,4,6b,m,S1,BCC Codabar_ss Esc,0,4,6c,m,S1,BCC Codabar_cd Esc,0,4,6d,m,S1,BCC Codabar_CLSI Esc,0,4,6e,m,S1,BCC Codabar_min Esc,0,4,6f,m,S1,BCC Codabar_max Esc,0,4,70,m,S1,BCC Label_code...
  • Page 23 Supplement_two Esc,0,4,88,m,S1,BCC Supplement_five Esc,0,4,89,m,S1,BCC Supplement_mh Esc,0,4,8a,m,S1,BCC Supplement_ssi Esc,0,4,8b,m,S1,BCC Delta_code_set Esc,0,4,8c,m,S1,BCC Delta_c_enable Esc,0,4,8d,m,S1,BCC Delta_code_cdc Esc,0,4,8e,m,S1,BCC Delta_code_cds Esc,0,4,8f,m,S1,BCC Get_version Esc,0,3,90,2,BCC DumpSetting Esc,Lh,Ll,91,m,S1...Si,BC EAN128Brace Esc,0,4,92,m,S1,BCC Remove AimingTime Esc,0,4,93,m,S1,BCC Exchange data Esc,Lh,Ll,a3,S1,S2,...,Sn, Note: Hamster save these commands to buffer and do not execute until it receives an Execute command (Esc,ENQ).
  • Page 24: Unitechapi.dll

    ActiveSync program to do communication with PC when RS232 cable is plugged into MR650. However, it will make RS232 port useless if user want to connect MR650 with any device with RS232 interface. RS232Event.DLL provides function call for user to disable ActiveSync function over RS232 port to let user directly control RS232 port.
  • Page 25: Enable Taskbar

    4.5. Enable TaskBar Function Description: This function will show “TaskBar” again after “Disable_TaskBar()” was executed to hide taskbar. Function call: BOOL EnableTaskbar (VOID); Return code: TRUE = OK FALSE = Fail 4.6. Disable Desktop Function Description: This function will hide all icons on desktop, it mean that any short-cut or files cannot be accessed or executed.
  • Page 26: Sysioapi.dll (For Hardware Related Io Control Api)

    5. SysIOAPI.DLL (for Hardware related IO control API) MR650 embeds several IO functions that may not be accessible through standard Windows API functions, such as following, - Four Relay output controls - Four optical isolated inputs - Image - Finger print module...
  • Page 27: Io Device Control Method

    5.1. IO Device Control Method To use those function call, it is necessary to include “ioc_ioctl.h”. Please refer to below method and sample source. 5.1.1. Create IO Device … #include “ioc_ioctl.h” … HANDLE gIOControlDriverHandle; … gIOControlDriverHandle = CreateFile(L”IOC1:”, GENERIC_READ | NULL, OPEN_EXISTING, 0, 0);...
  • Page 28: Access Relays

    5.2. Access Relays 5.2.1. Check Relay Status Function Description: To get current Relay status. Function call: BOOL IOC_GetRelayStatus(DWORD *pStatus); Parameters(Output): pStatus: Return code: TRUE = Success FALSE = Unsupported Note: This macro returns relay status in pStatus, which is a point to a DWORD. Macro RELAY1_BITS… RELAY4_BITS define which bit in the *pStatus corresponds to which relay.
  • Page 29: Set Relay

    5.2.2. Set Relay Function Description: There four macro defined for four relay output. Function call: BOOL IOC_SetRelay1(BOOL On); BOOL IOC_SetRelay2(BOOL On); BOOL IOC_SetRelay3(BOOL On); BOOL IOC_SetRelay4(BOOL On); Parameters(Input): Return code: TRUE = Success FALSE = Unsupported Example: #include “ioc_ioctl.h” … HANDLE gIOControlDriverHandle;...
  • Page 30: Access Optical Isolated Input

    5.3. Access Optical Isolated Input 5.3.1. Get Optical Isolated Input Status Function Description: Get optical isolated status. Function call: BOOL IOC_GetOpticalInput(DWORD *pStatus); Parameters(Output): pStatus: Return code: TRUE = Success FALSE = Unsupported Note: This function is similar to IOC_GetRelayStatus(pStatus), but with optical input status returned. Macro OPTICAL1_BITS …...
  • Page 31: Event For Optical Input Change

    5.3.2. Event for Optical Input Change Function Description: It is more effective if check input only when it changes status. When any input changes it status, a named event, IOCOpticalInputEvent, is generated. Applications can use a thread to catch this event for necessary tasks.
  • Page 32: Get Back Cover Open/Close Status

    Back cover switch is beside UPS battery. This switch will be pressed (close) when back cover is installed into MR650 main body. And switch will be released when back cover is remove from MR650(Open). Application program can detect switch status to see if MR650's back plate is remove or not for security purpose.
  • Page 33 Be aware to release handles when program ends.
  • Page 34: Power Control

    5.5. Power Control 5.5.1. Get Module 1 Power Status Function Description: When system is operated on battery, power saving is necessary. Module 1 power control is assigned to finger printer module in MR650. Function call: BOOL IOC_Module1PowerStatus(DWORD *pStatus); Parameters(Output): pStatus:...
  • Page 35: Control Module 1 Power

    5.5.2. Control Module 1 Power Function Description: When system is operated on battery, power saving is necessary. Module 1 power control is assigned to finger printer module in MR650. Function call: BOOL IOC_PowerModule1(BOOL On); Parameters(Input): pStatus: Return code: TRUE = Success...
  • Page 36: Pcmcia Control

    5.6. PCMCIA Control MR650 provides a build-in CF slot. Using following macros to check/enable/disable this slot. 5.6.1. Check CF Slot Function Description: To check CF slot status. Function call: BOOL GetPCMCIA0Status(DWORD *pStatus); Parameters(Output): pStatus: Return code: TRUE = Success FALSE = Unsupported Example: #include “ioc_ioctl.h"...
  • Page 37: Enable/Disable Cf Slot

    5.6.2. Enable/Disable CF Slot Function Description: Enable/disable CF slot. Function call: BOOL IOC_EnablePCMCIA0(BOOL On); Parameters(Input): Return code: TRUE = Success FALSE = Unsupported Example: #include “ioc_ioctl.h” … DWORD dwStatus; HANDLE gIOControlDriverHandle; … gIOControlDriverHandle = CreateFile(L”IOC1:”, GENERIC_READ | NULL, OPEN_EXISTING, 0, 0); If (gIOControlDriverHandle == INVALID_HANDLE_VALUE) // IO device not found, function not supported, // error process...
  • Page 38: Camera Control

    5.7. Camera Control 5.7.1. Power on/off Camera Function Description: Power on/off Camera. Function call: BOOL IOC_Camera_PowerOn(); BOOL IOC_Camera_PowerOff(); Return code: TRUE = Success FALSE = Unsupported 5.7.2. Camera Reset Function Description: Reset Camera. Function call: BOOL IOC_Camera_Reset(); Return code: TRUE = Success FALSE = Unsupported Example: #include “ioc_ioctl.h”...
  • Page 39: Watch Dog

    5.8. Watch Dog 5.8.1. Set time out value Function Description: Set a watchdog timeout value. After this function being called, it will not take effect until “StartWatchdog” is called. Function call: void SetWatchdogTimeout(DWORD mSecs); Parameters(Input): mSecs: 5.8.2. Start the watchdog Function Description: Start the watchdog.
  • Page 40: Camera Control - Cameradll.dll

    6. Camera Control - CameraDLL.DLL This DLL is used to control MR650’s internal CCD camera. p.s. Camera’ power on/off control functions are put on SysIOAPI.DLL because it is related to H/W function. Please refer to Section 5.6 6.1. Open Camera Function Description: To open Camera.
  • Page 41: Get Color Key

    6.6. Get color key Function Description: Get drawing background color of the preview screen. Function call: DWORD GetColorKey(); Return code: DWORD: 6.7. Set color key Function Description: Set drawing background color of the preview screen. Function call: void SetColorKey(UINT8 red, UINT8 green, UINT8 blue); Parameters(Input): red: green:...
  • Page 42: Video Playback Function

    6.10. Video playback function The following 8 functions are for the video playback. After EndVideoCapture(), there will be a .m4v(raw mpeg4) video file created, it can be playbacked on the demo application using the following APIs, NOTICE THAT these function must be called after StopPreview(). 6.10.1.
  • Page 43: Check If Playback

    6.10.7. Check if playback Function Description: Check to see if play back is finished. Function call: BOOL IsPlaybackEnded(); Return code: TRUE = Finished 6.11. Convert raw MPEG to standard MPEG Function Description: Convert .m4v(raw format) to .mp4(standard mpeg4 container), which is playable on quicktime, divx, xvid players.
  • Page 44: Finger Print Control Bioiddll.dll

    7. Finger print control BIOIDDLL.DLL Below API maybe useful for you to control MR650. 7.1. Start Finger print function Function Description: Start MR650 finger print function, include allocate and initialize COM port data structure. Function call: LPCOMMDATA BioID_Create(void); Return code: LPCOMMDATA structure P.S.
  • Page 45: Setup Finger Print Module Communication Type

    _tagCONFIG { WORD Type, Baud; Return code: WORD: 130 LPCOMMDATA : refer to BioID_Create() WORD : Module’s port (always 1 for MR650) DWORD : Module’s baud rate WORD : Stop bit WORD : Parity LPCOMMDATA : refer to BioID_Create()
  • Page 46: Set Module's Communication Type

    7.7. Set module’s communication type Function Description: Set FP module’s communication port type(1 for RS232, 2 for RS485). Function call: WORD BioID_SetType(LPCOMMDATA CommData, LPCONFIG lpConfig); Parameters(Input): CommData: lpConfig: typedef struct _tagCONFIG { WORD Type, Baud; Return code: WORD: 130 7.8. Get FP module’s baudrate Function Description: Get FP module’s baudrate and save into lpConfig->Baud.
  • Page 47: Get Fp Module's Aux Port Baudrate

    7.10. Get FP module’s Aux Port baudrate Function Description: Get FP module’s Aux port baudrate save into lpConfig->Baud. Function call: WORD BioID_GetBaudAux(LPCOMMDATA CommData, LPCONFIG lpConfig); Parameters(Input): CommData: Parameters(Output): lpConfig: Return code: WORD: 130 7.11. Set FP module’s Aux Port baudrate Function Description: Set FP module’s Aux port baudrate.
  • Page 48: Initialize Fp Directory

    7.14. Initialize FP directory Function Description: Initialize directory cursor to the first record. Function call: WORD BioID_Dir_Init(LPCOMMDATA CommData); Parameters(Input): CommData: Return code: WORD: 130 7.15. Read FP directory Function Description: Read the next record and save it in *Id and *Index. Function call: WORD BioID_Dir_Read (LPCOMMDATA CommData, DWORD* Id, WORD* Index);...
  • Page 49: Send Template To Fp Module

    7.17. Send template to FP module Function Description: Send one finger print template to module’s memory. Function call: WORD BioID_DnLoad (LPCOMMDATA CommData, DWORD dwSize, LPBYTE lpTemplate); Parameters(Input): CommData: dwSize: lpTemplate: Return code: WORD: 137 (=CmdMemoSysErr) 130 (=CmdErrTime) 7 (=CmdNO) 6 (=CmdYES) 7.18.
  • Page 50: Set Globe Threshold From Fp Module

    7.20. Set globe threshold from FP module Function Description: The function set the globe verification value to FP module. Function call: WORD BioID_SetThresh(LPCOMMDATA CommData, BYTE nThresh); Parameters(Input): CommData: nThresh: Return code: WORD: 130 (=CmdErrTime) 7 (=CmdNO) 6 (=CmdYES) 7.21. Enroll FP template into FP module Function Description: Enroll finger print template into module.
  • Page 51: Verify Fp Template

    7.23. Verify FP template Function Description: The function requests to verify the fingerprint against the template(s) with the specified ID. Function call: WORD BioID_Verify(LPCOMMDATA CommData, DWORD Id, LPDWORD lpdwVerify, LPDWORD lpdwScore); Parameters(Input): CommData: Parameters(Output): lpdwVerify: lpdwScore: Return code: WORD: 130 (=CmdErrTime) 7 (=CmdNO) 6 (=CmdYES) 7.24.
  • Page 52: Useful Function Call - Without Include Sysioapi.dll

    8. Useful function call - without include SysIOAPI.DLL Below API maybe useful for you to control MR650. 8.1. Warm-boot, Cold-boot and power off #include <pkfuncs.h> #include "oemioctl.h" Warn boot KernelIoControl(IOCTL_HAL_REBOOT, NULL, 0, NULL, 0, NULL); // Cold boot KernelIoControl(IOCTL_COLD_BOOT, NULL, 0, NULL, 0, NULL);...
  • Page 53: Mifare Reader Library

    9. Mifare Reader Library This library “MifareDll.dll” is used to control Mifare reader on MR650. Please download the sample program from below link. http://w3.tw.ute.com/pub/cs/software/Sample_Program/MR650/MifareDemo.zip 9.1. Connect to Mifare Reader Function Description: To create a connection with the reader before control it.
  • Page 54: Write Key To Eeprom

    9.5. Write Key to EEPROM Function Description: Save the key to EEPROM. Function call: int Mifare_WriteKeyToEEPROM (int nKeyMode, int nSector, char *szKey); Parameters: nKeyMode: nSector: szKey: Return code: Please refer to chapter 10.21. 9.6. Load Key from EEPROM Function Description: Load the key from EEPROM.
  • Page 55: Write Card's Block Data

    9.9. Write Card’s Block Data Function Description: Write data to card's block. Function call: int Mifare_WriteCardData(char *szData, int nKeyMode, int nSector, int nBlock, char *szKey); Parameters: szData: nKeyMode: nSector: nBlock: szKey: Return code: Please refer to chapter 10.21. 9.10. Read Card’s Value Function Description: Read the data form card’s block with value type.
  • Page 56: Decrease Value

    9.13. Decrease Value Function Description: Decrease the value in the card. Function call: int Mifare_DecrementValue(UINT nValue, int nKeyMode, int nSector, int nBlock, char *szKey); Parameters: nValue: nKeyMode: nSector: nBlock: szKey: Return code: Please refer to chapter 10.21. 9.14. Read Sector Data Function Description: Read a sector data in the card and it will return 3 blocks(48 bytes) data.
  • Page 57: Start Read Card Serial Number

    9.17. Start Read Card Serial Number Function Description: Start read card serial number and if reader gets a data then the library will create an event “EVENT_MIFARE_GET_DATA”. Function call: int Mifare_StartRead(); Parameters: None. Return code: Please refer to chapter 10.21. 9.18.
  • Page 58: Error Code

    9.21. Error Code ERR_SUCCESS ERR_TIMEOUT ERR_FAIL ERR_PARAMETER_ERROR ERR_NO_DATA ERR_BUFFER_TOO_SMALL ERR_WRITE_KEY_TO_EEPROM_FAI ERR_LOAD_KEY_FAIL ERR_WRITE_CARD_ERROR ERR_WRITE_VALUE_ERROR ERR_INCREMENT_ERROR ERR_DECREMENT_ERROR ERR_READING ERR_WRITE ERR_READ Name Value 0X0000 0X0001 0X0002 0X0003 0X0004 0X0005 0X0006 0X0007 0X0008 0X0009 0X000A 0X000B 0X000C 0X0EE 0X0FFF Description The API works Successfully No response from reader.
  • Page 59: Get Device Id

    10. Get Device ID In MR650, a unique ID had been burnt into terminal, user can check it by pressing "Func"+"9". The sample code for read device ID as follow, //////////////////////////////////////////////////////////////// HWND hDeviceId = GetDlgItem(hWnd, IDC_DEVICEID); PDEVICE_ID pDeviceID = NULL;...
  • Page 60: Flash Configuration Manager - Flashconfigmanager.dll

    The Flash Configuration Manager is a tool to allow third party developers to retain special settings on a Unitech device, which will survive a Cold Boot. The settings are saved in flash memory and accessible via the FlashConfigManager.dll functions described in this document. In general the configuration functions as a way to maintain settings that may or may not be application specific.
  • Page 61: Deleting A Configuration Entry

    11.4. Deleting A Configuration Entry Function Description: This function will delete any entry you send the name of. It will not be possible to recover the entry in any way. Function call: BOOL RmConfigEntry (char *name); Parameters(Input): name: remove. Useful mainly when uninstalling an application as the entry will never be accessible again unless created anew.
  • Page 62: Rs485 Communication

    12. RS485 communication 12.1. Why RS485? RS485 is a special implementation of the serial standard. It requires two lines total, with transmit and receive sharing a wire physically. RS485 provides several benefits over standard RS232 communication in terms of the distance data can travel without corruption, and the wide voltage range supported. Since RS485 signaling is differential (difference between the two wires is what defines the signal) it's immunity to electromagnetic interference is relatively high (interference will affect both equally.) This makes RS485 a good choice for many sensor or motor control applications as the distance between the sensor and the...
  • Page 63: Setting The Com Port Parameters

    12.3.2. Setting the Com Port Parameters Function Description: Com Port communication has a variety of different possible settings with regards to speed, data correction, flow control, and more. It is necessary to match settings on both ends of the communication for proper correspondence, and for RS485 it is necessary to be able to change the RTS line between sending and receiving data.
  • Page 64: Reading Data From The Comm Port

    12.3.4. Reading Data From The Comm Port Function Description: Set the scanner to the working mode, and reset the communication control. Function call: BOOL ReadFile (HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped); Parameters(Input): hFile: nNumberOfBytesToRead: read from the data stream. The function will pause until this number or a timeout is reached. lpOverlapped: Parameters(Output): lpBuffer:...
  • Page 65 13. Function Key setting on registry There are 4 function keys on MR650 and they can launch pre-define program when pressed. User can modify registry to define those program. Below are default registry setting for function ;------------------------------------------- ; Registry for Function Key ;-------------------------------------------...
  • Page 66: Update Notes

    14. Update notes V1.1 Format define error on Section 10 Get Device ID Minor spelling correction. V1.2 Camera supporting Finger print supporting. V1.4 Add camera, finger print and wave sample source code V1.5 Add C# sample program link V1.6 Add section 5.4 for Back cover status V1.7 Add chapter 12 for function key RS485 program on chapter 11...

Table of Contents