NULL in Readed String

Help
2012-01-03
2013-04-30
  • Michael Schröer

    Hello,

    currently i'm having a problem handle RFID-Tags which contains the Value NULL  these Values where not delivered correctly to the Application. Instead of:

    FB 00 21 41 10 00 00 01 10 01 00 0C 74 65 78 74 61 67 20 4D 00 00 01 9A 0A 2F FE (Length: 27)
    i receive the following:
    FB 21 41 10 01 10 01 0C 74 65 78 74 61 67 20 4D 01 09 0A 2F FE (Length: 21)

    Can you please tell me what i'm doing wrong or what i have to do to receive the plain string or array?

     
  • Brian Gochnauer

    Brian Gochnauer - 2012-01-03

    Before I can say what your doing wrong, you would have to say what you are doing!

    What version of Delphi, version of Comport, what the function and procedure calls you are using to retrieve or send the data, what specific components you are using in comport

     
  • Michael Schröer

    Oh - Sorry.
    I'm using Delphi XE with the latest CPort-Komponents (4.11?) .
    We would like to process the code in the event OnRxFlag. When we here want to know how long the data is, the InputCount returns the length of 21 instead of 27. The read() or readStr() methods return the above-mentioned data:

    FB 21 41 10 01 10 01 0C 74 65 78 74 61 67 20 4D 01 09 0A 2F FE (Length: 21)

     
  • Brian Gochnauer

    Brian Gochnauer - 2012-01-04

    Have you reviewed the example applications included with the component?
    I don't believe the onRxFlag event is suppose to used for retrieving data.
    Read() comes very close to a direct read using the WIN32 api, so If you get bad data with Read() then you're using the wrong data structure variable in the Read() call , use an array of char or array of byte.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks