Announcement

Collapse
No announcement yet.

led digits?

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

  • led digits?

    hello

    on workshop is there the possibility of non-zero suppressed significant object "LED digits"

    thank you

  • #2


    Do you have the property LeadingZero set to yes?
    _______________
    Best Regards,
    Howard

    Comment


    • #3


      even if I put a leading zero no I have no variable deletion of zero. " 0.00" if I send " 1.23" with terminal value is "001.23".

      can be always my problem is this variable declared in UDEC5ZB.
      but I can not send a penny to leddigitsdisplay format.

      greetings
      thierry

      Comment


      • #4


        Can you make a table like the following:

        Sent via terminal Shown on Display What I want
        ---------------------------------------------------------
        _______________
        Best Regards,
        Howard

        Comment


        • #5


          yes

          Comment


          • #6


            at monday

            greeting
            thierry

            Comment


            • #7

              hi howard

              here's what I want

              Sent via terminal Shown on Display What I want
              -------------------------------------------------- -------
              z___x, xxx yy (cr lf) xxxxxx yy on led digit

              z = + or - sign

              _ = Space or digit (0 to 9)

              x = digit (0 to 9)

              yy = unit (kg or g or t or pcs or CM or OZ .... etc) one to three characters.

              you see it is not so simple because only cr lf is fixed so it must be synchronized with "\ n" or "= 13" is not it?


              thank
              thierry

              Comment


              • #8


                So, you need negative numbers as well? I don't think ledDigits supports that, but I could be wrong....

                1)what is the largest number you will send?
                2) what is the smallest number you will send?
                3) How do you need to process the actual number? ie what decisions do you need to make base on the value of the numeric portion of the string?
                _______________
                Best Regards,
                Howard

                Comment


                • #9


                  Thinking about this a little more:

                  Signed 32 bits gives you range of +2147483647 to -2147483648. If you need to display three decimal places, then a 10 Digit display configured with three decimal places would give you 2147483.647 to -2147483.648.

                  If this is sufficient range, I would suggest a message format as follows:



                  : Start of message
                  : Byte, LSB of 32 bits, 0x00 to 0xFF
                  : Byte
                  : Byte
                  : Byte, MSB of 32 bits
                  : Byte selector for predefined units to display
                  : Carriage return

                  In this case, we are sending the actual bytes that comprise the 32 bit value. One caveat of this is that the message is no longer in ASCII readable form, but is a heck of a lot easier to process, as all messages will be fixed length (seven bytes).

                  The byte you define in any order you wish, such as:
                  0x00 = Blank
                  0x01 = Kg
                  0x02 = g
                  0x03 = Pcs
                  0x04 = T
                  .....
                  0xFF = anything else you want

                  The byte order to send the 32 bits is significant, as I picked LSB first such that as you stuff the values into memory, it is ordered properly in the 32 bit data structure:

                  val32ptr := str_Ptr(val32); //Point to 32 bit data structure
                  str_PutByte(val32ptr++,i); //Start stuffing bytes in structure LSB first

                  A fixed length message structure makes it much easier to parse the message, vs a variable length structure where (ideally) you would set up a state machine to handle the different elements of the message......

                  Thoughts?
                  _______________
                  Best Regards,
                  Howard

                  Comment


                  • #10


                    salvation
                    to answer the question # 8 a value from 0 to 24 bit is sufficient.

                    one sends untrame balance is not fixed.
                    example, a balance of 30.00 kg 0.01 kg with a graduationde sending the output series of "__0.00 kg +" a "+ _30.00kg" and the same thing with the "-" sign.
                    against by a balance of 10,000 g with a division 1g can send a value "_____1g +", "+ ____10g", "___100g +", "+ __1000g", "+ _10000g" with the sign - so be aware that on certain protocol sign and / or the unit is sent only if the weight value is stable.

                    Comment


                    • #11


                      I am not sure I follow, but if you understand it and it works for you, that's great!

                      Sorry the language barrier has been such a hurdle for me......
                      _______________
                      Best Regards,
                      Howard

                      Comment

                      Working...
                      X