Menu

ASCII data

2013-01-11
2013-09-27
  • Frank Batzen

    Frank Batzen - 2013-01-11

    Hello,

    I am trying to use comStudio to communicate via a USB-serial adapter with a sensor that uses the modbus-ascii protocol.

    With another terminal program (termite.exe) sending for example the ascii-command :0003018000106C yields the expected answer :00032056312E333928363429204175672030312032303038008E2F8F30E4F531F532AEFE from the sensor.

    I created a maximally simple command in comStudio that has only one subframe of the type "text" that has :0003018000106C as data. When I send this command I do not receive anything in the linked receive frame (which has also only one subframe of the type "text").

    My question is: Does comStudio send the ascii-string :0003018000106C that I put in the command frame or is it sent in a different format? In the Log-window the TX is shown both in hexadecimal and in ascii. Is the command :0003018000106C send as hexadecimal or ascii?
    What can I do to get a response from the sensor with comStudio?

    thank you and best regards
    frank

     

    Last edit: Frank Batzen 2013-01-11
  • Frank Batzen

    Frank Batzen - 2013-01-11

    With a com port sniffer I found that the problem is probably the missing Linefeed and Carriage return data that is appended by termite.exe but not by comStudio. Is there a way for me to append these? \n\r does not work when appended to the :0003018000106C in comStudio.

     

    Last edit: Frank Batzen 2013-01-11
  • Frank Batzen

    Frank Batzen - 2013-01-11

    Appending a second subframe with data "0d 0a" (for "CR LF") and type "HEX" solved the problem.

    Great, really looking forward to using this software. Thank you!

     

    Last edit: Frank Batzen 2013-01-11
  • Gianluigi Forte

    Gianluigi Forte - 2013-09-27

    Ciao,
    I'm sorry but I have read just now your posts. I was convinced that I would receive an email notification upon receiving them, but I probably forgot to set the thing.
    I'm happy that you solve the problem by yourself. And I'm happy also that the flexibility of comStudio was enough to address your needs.
    Let me know if you get some other problems or just if you are still using the program ;)

     

Log in to post a comment.