Home
BIS M-870 handheld driver - User`s Manual v1.0
Contents
1. collection of PSION WorkaboutPro he has to add the following file to the project as well e PixSdkCommon dll this is a library containing API functions of PSION WAP In order to user can use the functions of BIS M 870 reader he has to add the driver and the appropriate headers to the project e BIS M WinCE DLL adll BIS M 870 driver for Windows CE 5 0 e BIS M WinCE DLL lib Static library to link the functions in the driver e BlSReader h Contains function type and return value declarations to BIS M 870 reader At runtime user needs only 4 files SIUSBXP LIB dll which is an API collection to SIUSBXP dll driver SIUSBXP dll has to be installed in Windows folder PtxSdkCommon dll and BIS M WinCE DLL dll SIUSBXP reg is the registration file to write the Registry This file will create the entries for the USB driver 3 Header files This chapter contains detailed information about the header and source files in the project 3 1 BlSReader h This header contains the function declarations to use BIS M 870 reader and all the BIS M 870 related types structures enumerations and macros definitions All Balluff Dialog error codes and driver related error codes are defined here User also has to add BIS M WinCE DLL lib static library to the project This library file links the declared functions to the driver 4 Driver functions in details The user communicates with the BIS module via the function calls of the driver The following chapte
2. BIS M 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 00 02 25 2009 sensors worldwide BIS M 870 handheld driver for Windows CE 5 0 User s Manual BIS M 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 00 02 25 2009 sensors worldwide Table of content LM ies o Cio ETE RrR 3 2 Additional files to the project eeeeeeeeeereeeeeneeeeeennn nennen nnns 4 3 ICD dll rer 4 3t n iBISReaderciss e me toc e esci sun m met SR 4 4 Driver functions In details ciini ccc cust adn cudsoka cured a rxr Yo oct dover ain conabor eredi 4 4 1 BIS GombPortStale ede eet eo oe ne c e Ee hne A ee 5 42 BIS OpenGOMIPOILL it oe E rt x Eee rai ne ade a ted d E ance 5 4 3 BIS OBOnBssder cesa Dd on rer oberen ala pua onte rere focttie sae tt ean tse SEKAS oft 5 44 BIS CloseBeadet i ine t d NE ee 5 4 5 BIS CIOSCCOMPOMS ccccccccccscsssessesesececeeeceeceseesaeseseuseescseceeeeeeeesesseseseaeaeaseeeeeseeeeseeseeaes 6 46 BIS InitReader or i m o ert RU re teg ER Cft Pes 6 4 7 BlS ReadData ini v even Det e c eR deese Fe ea d 6 48 BiszhesdlagulD cssc ko ti aM E LAT e M 7 4 9 BIS WriteData iine iecit eee dere re PE Toe Urbes a reve ave kuin heed 7 4 10 BIS Write Pate ae aa tan eaen paa raean tn aaa an Eana KA aaan A Ean nennen Ea aaa sia arare at daana senes nnns ann 7 4 41 BIS InitDataCarrier ann aae r a a cens a r a etian 8 4 2 BIS Res
3. Connection Handle Prototype int BIS ResetReader CONNHND ConnHnd Parameters 1 ConnHnd pointer to a connection handle variable Return value ERR NOERROR ERR UNKNOWN ERR HEAD COMMUNICATION ERR NO ANSWER ERR READ 4 13 BIS ChangeTagKey Changes the key of the data carrier in front of the BIS read write head accordingly the Connection Handle Warning If the code tag has a different key than the read write head the function fails Prototype int BIS ChangeTagKey CONNHND ConnHnd TCHAR NewKey Parameters 1 ConnHnd pointer to a connection handle parameter 2 NewKey pointer to the new key data array Return value ERR NOERROR ERR WRITE 4 14 BIS ChangeReaderKey Changes the key of the BIS read write head accordingly the Connection Handle Warning After call of this function only code tags which have the same key as the read write head can be accessed Prototype int BIS ChangeReaderKey CONNHND ConnHnd TCHAR wNewKey Page 8 12 BIS M 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 00 02 25 2009 sensors worldwide Parameters 1 ConnHnd pointer to a connection handle variable 2 NewKey pointer to the new key data array Return value ERR NOERROR ERR_WRITE 4 15 BIS AntennaPowerOn Turns on the power of the given BIS module accordingly the Connection Handle Prototype int BIS AntennaPowerOn CONNHND ConnHnd Pa
4. F sensors worldwide For parameter details see chapter 4 5 6 Change key of the Code Tag Call the appropriate function with the new key which has to be 6 characters BIS ChangeTagKey MyConnection L NEWKEY Page 12 12
5. etHead6r ann sete tec i ede a E ECRIRE ERI aaa Ed 8 At BIS ChargeTagisBy acier it te rode he ce aaae e epe cis PURA Eesti pee EEE 8 4 14 BIS CharngelseaderKgy ioo re ie respecte lada tee deuil rar ate ene o xta tele 8 4 15 BIS AntennaPowerOn eesssssssssssssseseseeeenennn nnn nnnnn nennen nisse sena nisse iaa a inen nnne nennen nnns 9 4 16 BIS AntennaPowerOff cccccccccccssssssssecseceeececeeeceeeseeeeeeeesseceeeeeeeesessesaeaesessaeaeaseeseeeeeseeeees 9 4 47 BIS GetDllVersion ici e tet e teer Ee ed ie t ec pe p ea t Re gt 9 4 18 BIS GetLastError sseeesessssssssesssssseseeeenenn nennen nennen nennen nnn nin snis ri arn n nnn n nennen nnn nn 9 4 19 BIS GetkastErrorlext csc eves onere te ies deca ro E ere a evo en Edu eed a EY adie 10 4 20 BIS UnloadUSB coire doct r ab ese a Ghd ct i ERR ania Raus 10 Ae VBIS eC EOAOUSE Mn c M pcm p RR 10 4 22 BIS PowerOffRW Head ssim enne nennen nnns inna rn nnn nen nn i ddas 10 5 Usage of the driver examples eeeeeeeeeeer eren nnmnnn 11 5 1 i um E 11 5 2 Open a BIS module on POM sini ecg rasoet eno Fondo pie hend egere avida te coe rn e m Tracer 11 5 3 Read from the code tag ineo itp tea o ane RETE eae RUE Sd d y RYE Set MER nn eaux VE Va EDGE 11 5 4 Write to the code TAG s xe eret oo barata cesi oou e cce Coetus 11 5 5 Head UID ofthe code Bf nieto Reto tiet etit die
6. from the data carrier starting from the given address in the given length accordingly the Connection Handle Prototype int BIS ReadData CONNHND ConnHnd UINT uiStartAddr UINT Datalength TCHAR szDataBuffer Parameters 1 ConnHnd pointer to a connection handle parameter 2 uiStartAddress start address of the data carrier to read from 3 Datalength number of bytes to read max size of the szDataBuffer 4 szDataBuffer pointer to the data buffer where the data arrives back Unicode characters Return value ERR NOERROR ERR READ Page 6 12 BIS M 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 00 02 25 2009 sensors worldwide 4 8 BIS ReadTagUID Reads the ID and type of the data carrier accordingly the Connection Handle It also indicates if the data carrier is not presented Prototype int BIS ReadTagID CONNHND ConnHnd DATACARRIERINFO amp DCInfo Parameters 1 ConnHnd pointer to a connection handle parameter 2 DCInfo reference to the structure where the data carrier information will be stored Return value ERR NOERROR ERR READ 4 9 BIS WriteData Writes data to the data carrier starting from the given address in the given length accordingly the Connection Handle Prototype int BIS WriteData CONNHND ConnHnd UINT uiStartAddr TCHAR DataToWrite UINT Datalength Parameters 1 ConnHnd pointer to a connection handle parame
7. of the antenna of the read write head e AntennaPowerOff turns off power of the antenna of the read write head There are other functions which are not part of the Balluff Dialog protocol but can be called via the driver e ComPortState gets the state of the COM port open closed exist etc e OpenCOMPort opens the port e CloseCOMPort closes the port e OpenHeader initializes and tests the read write head e CloseHeader closes the read write head e GetDLLVersion gets the version info of the driver version number release date BIS system type e GetLastError gets the error number of the last error within the driver e PowerOffRWHead turns off the power of the USB port thus the RW head e UnloadUSB close the USB port but keeps the connection handle to opened BIS e HeloadUSB re opens the USB port to use the original connection handle Page 3 12 BIS M 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 00 02 25 2009 sensors worldwide 2 Additional files to the project As it was mentioned before the driver uses USB driver from Silabs Thus the USB driver has to be added to the project e SIUSBXP all USB driver from Silabs under Windows CE 5 0 e SIUSBXP LIB adll USB driver interface This driver is written specially for pocket PC from PSION Teklogix When user turns on the PC the USB port is not powered thus the driver has to power on the port In order to user can access the API
8. r describes these functions In order to the user can use the drivers functionalities he has to open a port with BzS OpenCOMPort and open the BIS module with BrS OpenReader When functions return without error user has a valid connection handler with which he can access the functions Page 4 12 BIS M 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 00 02 25 2009 sensors worldwide User should never change this connection handler manually because he can t call the other functions after that The following section contains the list of the exported functions 4 14 BIS ComPortState Checks the status of the given port Prototype int BIS ComPortState UINT PortNumber Parameters 1 PortNumber the number of the USB port virtual COM port Return value ERR COMPORT NOT EXIST ERR COMPORT USED ERR COMPORT CLOSED ERR UNKNOWN 4 2 BIS OpenCOMPort Opens the given port and gives back a Connection Handle Prototype int BIS OpenCOMPort UINT PortNumber CONNHND amp ConnHnd Parameters 1 PortNumber the number of the USB port 2 ConnHnd pointer to a connection handle parameter Return value ERR COMPORT CLOSED ERR COMPORT OPENED 4 3 BIS OpenReader Opens the BIS module on the previously opened port and sets the Connection Handle Prototype int BIS OpenReader CONNHND amp ConnHnd bool bCRC16 UINT uiDataCarrierType Parameters 1 ConnHnd poin
9. rameters 1 ConnHnd pointer to a connection handle parameter Return value ERR NOERROR ERR TURN ON ANT 4 16 BIS AntennaPowerOff Turns off the power of the given BIS module accordingly the Connection Handle When user turns off the antenna the power consumption drops down dramatically thus saves energy Prototype int BIS AntennaPowerOff CONNHND ConnHnd Parameters 1 ConnHnd pointer to a connection handle parameter Return value ERR NOERROR ERR TURN OFF ANT 4 17 BIS GetDllVersion Retrieves information about the driver such as date of release version BIS system type Prototype int BIS GetDLLVersion BISVERSION amp Version Parameters 1 Version pointer to the structure where the information will be stored Return value ERR DLL VERSION EXIST not an error 4 18 BIS GetLastError Gives back the last error number after a function fails Prototype int BIS GetLastError Parameters Return value The appropriate error number Page 9 12 BIS M 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 00 02 25 2009 sensors worldwide 4 19 BIS GetLastErrorText Gives back the last error as a character array after a function fails Prototype TCHAR BIS GetLastErrorText Parameters Return value The appropriate error with text 4 20 BIS UnLoadUSB Closes the USB port but keeps the Connection Handle for later use This f
10. reparation Include the main header BlSReader h which contains the driver related definitions and the driver function declarations include BISReader n Before user can use the driver he has to declare a variable type of CONNHND This is a connection handler which contains information about the opened device on the port CONNHND MyConnection 5 2 Open a BIS module on port Before user can use a BIS module he has to open the port and the given device Open the device on port 1 as the USB port can be found on this BIS OpenCOMPort 1 MyConnection BIS OpenReader MyConnection CRC16 NO BIS CT AllTypes 5 3 Read from the code tag Create a DataBuffer type of TCHAR to store the retrieved data and then call the appropriate function TCHAR DataBuffer 1025 BIS ReadData MyConnection 0 1024 ReceivedData For parameter details see chapter 4 5 4 Write to the code tag BIS WriteData MyConnection 0 L Text to write 13 The data has to be Unicode character string The last parameter indicates how many characters are in the buffer less can be given but more may cause runtime errors 5 5 Read UID of the code tag Define and initialize a DClInfo buffer type of DATACARRIERINFO to store the tag information and then call the appropriate function DATACARRIERINFO DCInfo 0 BIS ReadTagID MyConnection DCInfo Page 11 12 BIS M 870 Handheld Driver User s Manual Driver Ver 1 00 02 25 2009 BALLUF
11. ter 2 uiStartAddress start address of the data carrier to write from 3 DataToWrite user data to write onto the data carrier Unicode characters 4 Datalength the number of the desired bytes to write max size of DataToWrite Return value ERR NOERROR ERR WRITE 4 10 BIS WritePattern Writes a constant character to the data carrier starting from the given address in the given length accordingly the Connection Handle Prototype int BIS WritePattern CONNHND ConnHnd UINT uiStartAddr UINT Patternlength TCHAR Pattern Parameters 1 ConnHnd pointer to a connection handle parameter 2 uiStartAddress start address of the data carrier to write from 3 Patternlength the number of the bytes to write 4 Pattern pointer to a char array which contains the pattern Unicode Return value ERR NOERROR ERR WRITE Page 7 12 BIS M 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 00 02 25 2009 sensors worldwide 4 11 BIS InitDataCarrier Initializes a data carrier with all 0 hex values preparing it for use of CRC16 Starts from the given address in the given length accordingly the Connection Handle Prototype int BIS InitDataCarrier CONNHND ConnHnd Parameters 1 ConnHnd pointer to a connection handle parameter Return value ERR NOERROR ERR DATACARRIER INIT FAILED 4 12 BIS ResetReader Resets the given BIS module accordingly the
12. ter to a connection handle parameter 2 bCRC16 true if the BIS module is set to use CRC16 check 3 uiDataCarrierType defines which data carrier types can be used for the reader Return value ERR READER OPENED ERR READER CLOSED 4 4 BIS CloseReader Closes the opened BIS module accordingly the Connection Handle Prototype int BIS CloseReader CONNHND amp ConnHnd Page 5 12 BIS M 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 00 02 25 2009 sensors worldwide Parameters 1 ConnHnd pointer to a connection handle variable Return value ERR READER CLOSED ERR READER OPENED 4 5 BIS CloseCOMPort Closes the opened port accordingly the Connection Handle Prototype int BIS CloseCOMPort CONNHND amp ConnHnd Parameters 1 ConnHnd pointer to a connection handle parameter Return value ERR COMPORT CLOSED ERR COMPORT OPENED 4 6 BIS InitReader Sets some parameters of the given opened BIS module accordingly the Connection Handle Prototype int BIS InitReader CONNHND amp ConnHnd bool bCRC16 UINT uiDataCarrierType Parameters 1 ConnHnd pointer to a connection handle parameter 2 bCRC16 set the module to use CRC16 check 3 uiDataCarrierType set the module to use the chosen data carrier types Return value ERR NOERROR ERR READER INIT FAILED 4 7 BIS ReadData Reads data
13. u irs 11 5 6 Change key of the Code Tag pacer Le ten ete Le eser ne 12 BIS M 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 00 02 25 2009 sensors worldwide 1 Introduction BIS M WinCE DLL dll is a driver written for BIS M 870 which covers the user s command set of Balluff Dialog protocol and also provides some extra functionality to the user under Windows CE environment The driver is written in native C code and designed for Windows CE 5 0 The functions are exported in C format ignoring name mangling It is prepared for use of 2 virtual communication ports VCP which has the driver from Silabs https www silabs com The Read Write head module connects to the handheld via USB port thus the functions of the USB Host like open close read write etc is reached through function calls of the provided USB driver interface SIUSBXP LIB dll Implemented command set of Balluff Dialog e HeaaData read data from data carrier e WriteData write data to data carrier e WritePattern write a constant character to the data carrier e HeadTaglD read UID of the data carrier e dnitDataCarrier init data carrier for CRC16 e InitHeader set configuration of the processor e HesetHeader reset read write processor e ChangeTagkey change the key of the reader or the data carrier e ChangeReaderKey change the key of the reader or the data carrier e AntennaPowerOn turns on power
14. unction has to be called before the Pocket PC goes to Suspended mode because it powers off the USB port If the port stays opened Windows stores its handle and after the user turns on the PSION he can t access the previously opened port During a USB device enumeration user can find 2 devices although only 1 exists in the Windows system Prototype int BIS UnLoadUSB CONNHND ConnHnd Parameters 1 ConnHnd the connection handle parameter Return value ERR NOERROR ERR UNLOAD USB 4 21 BIS ReLoadUSB Re opens the USB port accordingly the Connection Handle This function has to be called after the Pocket PC comes back from Suspended mode This function re opens the previously opened USB port thus user can communicate with the same BIS M 870 module without going through again the opening procedure Prototype int BIS ReLoadUSB CONNHND ConnHnd Parameters 1 ConnHnd the connection handle parameter Return value ERR NOERROR ERR RELOAD USB 4 22 BIS PowerOffRWHead This functions turns off the power on USB port thus powers off the BIS 870 module Prototype int BIS PowerOffRWHead Parameters Return value ERR NOERROR Page 10 12 BIS M 870 Handheld Driver User s Manual BALLUFF Driver Ver 1 00 02 25 2009 sensors worldwide 5 Usage of the driver examples In the following chapter the reader can find some code snippets how to use the driver properly 5 1 P
Download Pdf Manuals
Related Search
Related Contents
Lexmark PRO5500 Printer User Manual Philips VR602 User's Manual TRITON Error Codes - Cypress Advantage (VO-8)取扱説明書 [ 900184 COMAND システム plano de manejo da floresta nacional de saracá-taquera Manual de Instruções 6660 / 6680 / 6699 Ficha de producto Operating Instructions Genius FaceCam 1000 Copyright © All rights reserved.
Failed to retrieve file