Announcement

Collapse
No announcement yet.

Is ther a way to multipy an unsigned 32 bit number by 1000 ?

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

  • Is ther a way to multipy an unsigned 32 bit number by 1000 ?

    Is there a way to multiply an unsigned 32 bit number by 1000 ? or multiply two 32 bit numbers ,

    With the integer functions I can add, sub and div 32 bit variables and multiply 2 x16 bit to a 32 bit but not 2 x 32 bit.

    Cheers

    Garry



  • #2
    Hi Garry,

    Unfofrunately no. You best optin maybe is to use the flt commands but they are floating point and may not give you the result you want.

    eg.

    flt_VAL(fl1,"6535");
    flt_VAL(fl2,"100");
    flt_MUL(fl3, fl1, fl2);
    flt_PRINT(fl3, 0);

    Best regards

    Paul

    Comment


    • #3
      Hi Paul
      how can i show the Floating Point result in a Digit, a gauges or in Label.
      The Funktion WriteObject(tLedddigits,0,counter) (counter is integer)
      WriteObject(tCoolgauge,0,counter) works.
      How can i print a varius string in a Label?
      The Funktion WriteObjekt(StaticText,0,text) (text is a string)
      does not work.
      How can I use flt_PRINT(fl3, 0) to bring it in a Label or StaticText.

      Have you any exampel to get a value from Keyboard . In the exampel Keyboard is the Output after enter a string and is compared with a string (Passwort=1234)

      Best regards
      Rainer

      Comment


      • #4
        Hello Rainer,

        I've attached an example on displaying float values ( float test.zip ); in this example, I multiplied the float value by 1000, turned it into an integer, and then I configured the LED Digit and Angular Meter to display three decimal places. For the label, I used a String object instead of a Static text or a Label.

        These Application Notes Might Help Regarding the configuration of the LED Digits and Angular Meter :

        ViSi The LED Digits Object

        https://www.4dsystems.com.au/appnote/4D-AN-00081/


        ViSi Gauges Objects Part I

        https://www.4dsystems.com.au/appnote/4D-AN-00082/


        Regarding the String Object:

        ViSi Displaying Third Party Fonts FAT16

        https://www.4dsystems.com.au/appnote/4D-AN-00080/​​​​​​​



        This might help regarding the Keyboard application:
        ViSi Time Input Validation with Keyboard

        https://forum.4dsystems.com.au/forum/codebase-code-demos-and-examples/staff-codebase-code-examples-to-help-or-inspire/47106-4d-cd-00033-visi-time-input-validation-with-keyboard

        Best Regards,
        Michael
        Attached Files
        Last edited by michael_4D; 14th March 2018, 01:01 PM.
        Michael

        Comment

        Working...
        X