Jump to content

CRO_Tomislav

Members
  • Content Count

    36
  • Joined

  • Last visited

Everything posted by CRO_Tomislav

  1. Dear all. I have a small experminet of reading of RFID tags information's using a RFID reader and attached .dll. Function is: Function Inventory(var ComAdr : byte; var State : byte; var AFI : byte; DSFIDAndUID : pchar; var CardNum : byte; frmComPortindex : integer): LongInt; stdcall; external 'RR3036.dll'; I can call successfully function which is reading some data from RFID tags in a range ( I get positive result of this function and number of tag’s): Get_UID_RFID_Tag_Data_Status:=Inventory(fComAdr, State, AFI, DSFIDAndUID, CardNum,frmcomportindex); With this function I read set of data called DSFIDAndUID which are declared: var DSFIDAndUID: array[0..8000] of Char; In a reader manual description of: DSFIDAndUID is --> Output. Pointed to array storing the function result. The unit of the array is 9 bytes including a 1 byte DSFID and 8 bytes of UID. The volume of the results is CardNum*9 bytes with least significant byte first for UID. CardNum is --> Output. Point to a number of tags detected. The maximum number of tags one time collected is 16 Problem is in DSFIDAndUID – I do not understand how to decode data from that array to get ASCII values of DSFID and UID. With my function’s I all way's get a wrong data and I do not have any more idea… I am reading only one RFID tag at a time… Thx in advance Tomislav
  2. CRO_Tomislav

    HELP: Decoding of data stored in array of char - RFID tag's

    Hi. Thx for answers... I still get this error so the problem is not in conversion... You help me a lot. Big THX once more Best regards Tom
  3. CRO_Tomislav

    HELP: Decoding of data stored in array of char - RFID tag's

    Hello. Still doesn't solved... It's killing me... I have a function form .dll (from manual): Function GetSystemInformation(var ComAdr : byte; var State : byte; UIDI : PChar; var InformationFlag : byte; UIDO : pchar; var DSFID : byte; var AFI : byte; MemorySize : pchar; var ICReference : Byte; var ErrorCode : byte; frmComPortindex : integer): LongInt; stdcall;external 'RR3036.dll'; Description of UIDI: Input, Pointed to 8 bytes of tag's UID value with least segnificant byte first I change in function UIDI: Byte So I need to call the function with: Get_Designated_tag_info_status:= GetSystemInformation(fComAdr, State, DSFIDAndUID[0].UIDasBytes, InformationFlag, UIDO, DSFID, AFI, MemorySize, ICReference, errorCode,frmcomportindex); This is obviously that this will not work because DSFIDAndUID[0].UIDasBytes is array of bytes (0..7), but what ever I try it doesn’t work...
  4. CRO_Tomislav

    HELP: Decoding of data stored in array of char - RFID tag's

    Hmm... From a code above: I get UID in Uint64 and this is OK for a rest of my code but: I need to pass this UID to a function as a byte (8 bytes) or Pchar but I get function error It seams that I am making some mistake in conversions. Is there some function or similar for make this conversion correctly? Tom
  5. CRO_Tomislav

    HELP: Decoding of data stored in array of char - RFID tag's

    Hello. It's working, but it seams that I get a UID value in reversed order... For "fast test" I use IntToHEX(DSFID,2) + ' - ' + IntToHEX(UID,2); result is reversed by two HEXs: Example: I get as result. E004020056486E86 It should be: 866E4856000204E00 Manage to solve this... Thx again Tom
  6. CRO_Tomislav

    HELP: Decoding of data stored in array of char - RFID tag's

    Hello. First of all, my apology for late replay. I was a few days out of office with a very limited access to internet (mountains)... I go with a suggested approach and „only unknown” part is: how do I get DSFID and UID values form DSFIDAndUID : TTagBuffer; ? With best regards Tom
  7. CRO_Tomislav

    HELP: Using C++ .dll in Delphi

    Dear all. Please take my apology if I post in a wrong section of this forum... I new to Delphi and I have a problem with a using a C++ .dll from Delphi VCL. In a manual for .dll I have for a next function description: MXIO_GetDllVersion Get the DLL version. C/C++ int MXIO_GetDllVersion (); Visual Basic Declare Function MXIO_GetDllVersion Lib "MXIO.dll" () As Long Arguments: None Return Value: Succeed Return the DLL version. If the value is 0x2000, then the version is 2.0.0.0 I call from Delphi this function as: function MXIO_GetDllVersion : Integer; cdecl; external 'MXIO.dll' name 'MXIO_GetDllVersion'; In a ShowMessage(IntToStr(MXIO_GetDllVersion)); Problem: I get incorrect data. Instead of 21200; I get: 11264 Thx in advance Tom
  8. CRO_Tomislav

    HELP: Using C++ .dll in Delphi

    Hi. It works! BIG THX!!!! With best regards Tomislav
  9. CRO_Tomislav

    HELP: Using C++ .dll in Delphi

    Hi. It works only with stdcall.. Cdecl chrashes... With best regards Tomislav
  10. CRO_Tomislav

    HELP: Using C++ .dll in Delphi

    I have problem with a next function. How to tranlsate it to a delphi code? C/C++ int MXEIO_E1K_Connect( char * szIP, WORD wPort, DWORD dwTimeOut, int * hConnection, char * szPassword); Visual Basic Declare Function MXEIO_E1K_Connect Lib "MXIO.dll" (ByVal szIP As String, ByVal iPort As Integer, ByVal nTimeOut As Long, handle As Long, ByVal szPassword As String) As Long Arguments: szIP IP address of the Ethernet I/O device to be connected.A-OPC Server IP address or ioLogik 1200 IP address wPort TCP port number of Ethernet I/O device. Please use 502 for ioLogik 1200 dwTimeOut Timeout value for establishing a network connection with the ioLogik Ethernet Adapter. The unit is in milliseconds. hConnection Handle for the I/O device connection. szPassword Max length 8 bytes Return Values : Succeed MXIO_OK Fail Refer to Return Codes. I try with: function MXEIO_E1K_Connect(szIP: String; iPort: Integer; nTimeOut: Integer; handle: Integer; szPassword: String): Integer; external 'MXIO.dll' name 'MXEIO_E1K_Connect'; Whene I call this function it crash my app. (Integer overflow). Is it problem in my sintaks or error in .dll?
  11. CRO_Tomislav

    HELP: Using C++ .dll in Delphi

    OMG... It is a long night behind me... Sorry Tom
×