Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    4 Star Lounger
    Join Date
    May 2002
    Posts
    410
    Thanks
    1
    Thanked 0 Times in 0 Posts

    hex to ascii program

    I have a sensor which is sending hexadecimal strings to a datalogger.

    Can anyone recommend a program that will convert the hexadecimal strings to ascii. I'd like to open a file and have the software translate for me.


    Thanks.

  2. #2
    4 Star Lounger
    Join Date
    Feb 2006
    Location
    Cape Cod, Massachusetts, USA
    Posts
    408
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: hex to ascii program

    One solution is to put your data into Excel and use one of the the convert functions, HEX2DEC, for example.

    Paul

  3. #3
    4 Star Lounger
    Join Date
    May 2002
    Posts
    410
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: hex to ascii program

    tried it in several different fashions and it wouldnt work

    sample file attached
    Attached Files Attached Files

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: hex to ascii program

    Is that the output of the sensor? It doesn't consist of hexadecimal strings, but some kind of binary output with a few "ERROR 01"s thrown in.

  5. #5
    4 Star Lounger
    Join Date
    May 2002
    Posts
    410
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: hex to ascii program

    well, my ignorance is shwoing.
    I was told it was hex, and took that on good faith.
    I'll go back to the manufacturer and see what kind of binary code it is, so I can debug it

    thanks for the help

    It's Friday and I'm going home......

  6. #6
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: hex to ascii program

    I don't know what it is and therefore don't know about the "strings" part, but here's what a snippet of the file looks like.
    Attached Images Attached Images

  7. #7
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: hex to ascii program

    It seems to me that the problem isn't the format in which the data is being generated (since hex is just a more compact version of binary!), but what the data actually means. Surely there will be a program available from the manufacturer which interprets the data into a meaningful form?

    John

    PS I doubt the data as shown in Al's post has any character meaning, since above 0x80 you would have to say what Code Page it was using, 0x7F is 'del', 0x72 is 'r' and 0x57 is 'W'. ox65 is 'e'. 0x6c is 'l' and 0x73 is 's'...
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: hex to ascii program

    Interesting - this is what it looks like to me (it doesn't matter whether I open it in Notepad, Wordpad or Word).
    Attached Images Attached Images
    • File Type: png x.png (2.1 KB, 0 views)

  9. #9
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: hex to ascii program

    I opened the file with a binary editor called, appropriately enough, BINEDIT which is a few years old and found here: MyHomePage - Bob Peiffer. I'm sure there are a gazillion others out there by now.

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: hex to ascii program

    OK, thanks. I was wondering why it looked so different.

  11. #11
    4 Star Lounger
    Join Date
    May 2002
    Posts
    410
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: hex to ascii program

    The sensor does come with a program to read the file - IF the sensor is directly connection to the serial port (DB9) of a computer. Attached is a snippet of what has been recorded. Unfortunately, the sensor will be placed at the bottom of a lake with a datalogger in a buoy, thereby eliminating the possibility of connecting directly to, and recording to, a computer. Which leads to a question: the data is stored on a COmpact Flaschcard. Would there be a way to stream the data from a flashcard to a computer? Then the sensor's program could read the data as if it were coming from the sensor.

    # t[s] flow[ul/min]
    396.1600 -3184.7778
    396.8000 -3184.7778
    397.4400 -3184.8889
    398.0800 -3184.7778
    398.7200 -3184.8889
    399.3600 -3184.8889
    400.0000 -3184.8889
    400.6400 -3184.7778

  12. #12
    4 Star Lounger
    Join Date
    Feb 2006
    Location
    Cape Cod, Massachusetts, USA
    Posts
    408
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: hex to ascii program

    We are working here with very little information, so only general answers seem appropriate now. So my answer is yes, if the data logger can correctly transfer data to the flash card and the flash card can be read by the computer then, with sufficient and correct information, one can derive the measured values from the resulting data file. In general terms, the raw file may have to be edited, parsed and converted to give what you want. I suggest contacting the data logger manufacturer for tech support.
    Paul

  13. #13
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: hex to ascii program

    Maybe the vendor can help with this. You can't be the only customer who would want this capability to store and process data later. Certainly they don't want their product to end up as just a boat anchor. <img src=/S/wink.gif border=0 alt=wink width=15 height=15>

  14. #14
    4 Star Lounger
    Join Date
    May 2002
    Posts
    410
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: hex to ascii program

    as the sensor is about the size of a pack of cards, it's going to be a real small boat........

  15. #15
    4 Star Lounger
    Join Date
    Feb 2006
    Location
    Cape Cod, Massachusetts, USA
    Posts
    408
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: hex to ascii program

    Would you mind saying what parameters in the lake are being measured and also the make and model of the sensor? This query is not related to your problem, but is one of personal interest since I am involved with some local fresh water testing and evaluation.
    Paul

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •