Announcement

Collapse
No announcement yet.

Slow displaying string from host

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

  • Slow displaying string from host

    Hi

    Wonder if you can point me in the right direction please.
    I'm using a Diablo display and a ARM F7 dev board to display some static text created within 4D workshop and sending a string from the host.

    I need to send a string from the host to allow for changes
    I find that displaying them to be slow the coms i'm using is 115200 but for some reason my host above this speed and i loose coms

    i'm trying to create a menu system with text (string) and a button behind the text but this is not acceptable to the eye (attached video)
    Can this text be displayed before i call for the form so it's then instantly displayed ?

    Is there a better fast way to display dynamic text from the host but virtually instantly ?

    Thank you.
    Attached Files

  • #2
    Hi markavo, welcome to the forum.

    Can I ask what environment you are using? Is it ViSi-Genie or ViSi?
    Also, about the string controlled by the host, is it constantly updated at a given time or only at an instance when the form is being activated?

    If it is done instantaneously, you can create a buffer in the host and collect first all data needed before updating the dynamic string in the display.

    Best regards,
    Vince_4D

    Comment


    • #3
      Hi Thank you.

      I'm using Visi-Genie, no constant update it's only sent once just after the form is activated.
      Can you give me a example please of first loading the chars into the buffer then call from the buffer to display all the data.

      Thanks.

      Comment


      • #4
        Hi markavo,

        You will only be updating 1 dynamic string.

        Below is the Pseudo code for the implementation.

        Code:
        If Program button pressed,
        Report event to host
        If host receive Program button report event
        Append data STRs to buffer STR Go to Program Form Write buffer STR to dynamic String
        If you're familiar with Arduino, attached is the files needed for the implementation.


        Hope this will help.
        Attached Files
        Vince_4D

        Comment


        • #5
          Thank you.

          Sorry its taken me a little time to get back to this.

          I have looked at the code but not tested will this not just concatenate all the strings and then display all in one go at 0, 0 but i see no formatting for example line 1 string then this string on line 2, that string on line 3 (with line i mean position 50,100 etc for example ).

          What i'm wanting to create is several lines of text but to be displayed in one go and not one after another.

          Or am i missing something please.
          Thank you.

          Comment


          • #6
            How long are the strings? you can change the size limit in workshop options at the cost of extra memory usage. to send out the strings on separate lines in the same stringbox you can add ā€˜\nā€™ into your string when you want a new line entered

            Comment


            • #7
              Thanks tonton81

              Behind the string there is a button ideally the string would need its own line but the maximum length is only 20 chars, the text and button behind the text will be used to navigate different forms and display different information or change settings etc.. It all works with the button but displaying each string can be seen.

              At the moment i send string 1 then 2 then 3 etc but not ideal for a menu system.

              Thanks.

              Comment


              • #8
                if you are using fixed strings you can put them in the string book of workshop and they can be shown given the index command from genie. if theyre also fixed you can photoshop the text into a picture and use it as an image widget or a button as well

                Comment


                • #9
                  Thanks tonton81
                  That was my first call but i also have some dynamic strings that will be used and data called from a eeprom to populate the string sent for the menu creation.

                  Comment


                  • #10
                    Hello,

                    You may use multiple string widgets to display the strings sent from the host if you want each string to have individual position.
                    I made a sample project utilizing multiple string widgets and got the strings to display simultaneously once form1 is activated.
                    Note that I used an Arduino Mega.
                    For reference, I attached the project below. I also attached a video to show how fast the strings are displayed.

                    Best Regards,
                    Kimberly
                    Attached Files

                    Comment


                    • #11
                      Thanks Kimberly
                      This is pretty much what i'm doing now but instead of holding the string in a var i'm processing the chars of the string and calculating the checksum then sending to the display i'm doing this for each string sent this must be slowing me down but i'm using ARM NUCLEO-F746ZG (so did not think this would be the issue) i will try and process hold in var then push all the strings at once as i can see from the video its instant.

                      Thank you .

                      Comment


                      • #12
                        No worries!
                        Keep us posted on your progress and if you encounter any more issues, don't hesitate to ask.

                        Best Regards,
                        Kimberly

                        Comment


                        • #13
                          Hi

                          Ok i have been checking this out a little more and no other code within the host (except the very minimum) and no other images within workshop except string widgets.

                          I did two test:

                          1st test was to do as above and send a string from the host to the display.
                          2nd test was to assign a static string within workshop 4 and disconnect the host.

                          I compared the speeds to display using 8 lines of text at 10 chars long.

                          The speed was comparable and you could see the populating of the text as it was executed as in my previous video. I then changed the text from 40 to the default of 12 and it was virtually instantly displayed.

                          The display i'm using is the gen4-uLCD-50DCT-CLB with a resolution of 800 x 480 is this capable of doing what i require please as this experiment tells me maybe the larger the text slower the draw at this resolution.

                          Any ideas please. Thank you.



                          Comment


                          • #14
                            Hello again,

                            Thank you for getting back to us regarding this.

                            Keep in mind that strings are sent and drawn to the display one at a time and never simultaneously. However, they may appear to be displayed at the same time if drawn fast enough. This can be affected by factors such as the speed capacity of the display to receive and display the received characters. Also, it may depend on the font size. The larger the text, the longer it takes to be displayed.

                            If you want, you can try dimming the display before changing forms, then write the strings. Then give the display some time to update all strings before turning the contrast back up.

                            Best Regards,
                            Kimberly

                            Comment


                            • #15
                              Hello Kimberly

                              Thanks again for your response and help its much appreciated.
                              What a good idea never thought of that, that should work for me change form, dim display, send text, brighten display.

                              Even though 40 is not a large font size (not sure on the pixel count it needs to draw) but i will be honest i would expect it to handle that daw of text (maybe the next gen processors will help with this speed), small text is instant (or looks to be close to an instant / fast draw) i guess this is also due to the resolution of 800 x 480 with a higher pixel count.

                              Will give this a try and thank you again for your advise.

                              Comment

                              Working...
                              X