Announcement

Collapse
No announcement yet.

Decode serial string

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Decode serial string

    Hello all I have an 32PTU display , (been packed away ) now i have looked for examples on how to decode a incoming serial string,
    now I did find an example by Mark (4D System 2016) , but it will not compile, if was written for an uLCD-70DT display,
    it get stuck on
    flt_VAL(&flts[fn*2], p) ; does not line flt_VAL , I have looked and can not find reference to this PS.. this is the string I wish to decode Sign, 7 numbers with dec point, S1,S2,S3,S4,x3
    Sign = space or negative , S1-S4 a Letter and X3 three letters.

    To start I only with to see the seven digits, but need to find out what this flt_VAR is first.
    Thanks in Advance.

  • #2
    Hi Peter,

    Unfortunately, that example won't work on your 32PTU display and it is because of the flt_VAL function which is for a display with a Diabl processor. The function will convert the string eg '123.456' to a floating point number.

    The Description for flt_VAL which is a Diablo and not a Picaso function is in the Diablo datasheet.
    https://www.soselectronic.com/a_info...ions-R_1_2.pdf page 407

    Best regards

    Paul

    Comment


    • peter1929
      peter1929 commented
      Editing a comment
      Thanks Paul,

      Any suggestions the best way to approach this, only new ?

  • #3
    Hi All ,

    Worked on this a bit , using forum examples, came up with this code, any one help in my next step ? I can send 15 dig serial string, when 15 received COMCHECKMINe.4dg displays on screen, how do I clear the buffer , and then print the next 15 digits coming in ?

    Comment


    • #4
      when you do the serin() the buffer gets cleared, so all you need to do is wait for it to fill to 15 again
      Mark

      Comment


      • peter1929
        peter1929 commented
        Editing a comment
        Hi Mark, I type in 15 x characters , then is displays on screen , then type in say 15 x other letters, screen dose not change ?

    • #5
      The code you posted will only run once (and loop at the repeat forever), you need to 'reorganise' it to get it to work multiple times
      Mark

      Comment

      Working...
      X