Viewing 12 reply threads
  • Author
    Posts
    • Michael ForlongMichael Forlong
      Participant
      @mforlong
      Post count: 7

      Hello

      I am current using the Arduino IDE with a Teensy 4.1.

      When I add more than 3 edit widgets to a page that have input_type: int there is more than 200 bytes and I get errors.

      Normally looks like this:

      53 54 3C 10 71 0 F 6F 72 61 6E 67 65 43 6F 75 6E 74 0 0 0 0 3E 45 54 E6 5 legitimate
      53 54 3C 10 71 0 E 67 72 65 65 6E 43 6F 75 6E 74 0 0 0 0 3E 45 54 9D 53 legitimate
      53 54 3C 10 71 0 D 62 6C 75 65 43 6F 75 6E 74 0 0 0 0 3E 45 54 94 6A legitimate
      53 54 3C 10 71 0 F 62 61 74 63 68

      I’ve increase the [RX_LEN] in stone.h to 300 but it seems to be on the HMI side.

      Any suggestions?

    • bowei zhangbowei zhang
      Participant
      @zbw3366
      Post count: 62

      Were these four lines received together at the same time?

    • bowei zhangbowei zhang
      Participant
      @zbw3366
      Post count: 62

      It looks like the first three lines get three receptions, and the fourth line somehow gets half?

    • bowei zhangbowei zhang
      Participant
      @zbw3366
      Post count: 62

      RX_LEN in stone.h is a legitimate length to receive a legitimate frame. If you want the legitimate data in front of the word “legitimate”, it’s a legitimate frame, so changing this is probably useless

    • Michael ForlongMichael Forlong
      Participant
      @mforlong
      Post count: 7

      Hi Bowei

      I have hundreds of different buttons and functions that work fine.  The problem is only when I have more than 3 edit type widgets set to input_type: int on one page/window.  When the page loads it sends cmd lines you see above.  When it exceeds the 200 bytes it becomes truncated or the HMI is timing out.

      Since I can increase the [RX_LEN] to 300, 400 ,500 and it does nothing to fix the problem I am assuming the the internal transmission buffer of the HMI is only 200 bytes.

      Best Regards

    • bowei zhangbowei zhang
      Participant
      @zbw3366
      Post count: 62

      You can try updating the firmware of the HMI, or you can record a video describing the problem,Because I figured if I received data like the above, the actual length might not exceed 200 bytes

    • AndreyAndrey
      Participant
      @andybig
      Post count: 49

      Hmm, and my STWI series display does not send anything when loading a page with editing widgets.

    • Michael ForlongMichael Forlong
      Participant
      @mforlong
      Post count: 7

      Just got Version 1.1.6 This morning.  It fixed the problem.

      Thanks

      • AndreyAndrey
        Participant
        @andybig
        Post count: 49

        O! I want version 1.1.6 too :))))
        What version did you have before?

    • Michael ForlongMichael Forlong
      Participant
      @mforlong
      Post count: 7

      @Andrey

       

      Did you try changing your settings from default input type of text to int?  It doesn’t send anything if its on text.

    • AndreyAndrey
      Participant
      @andybig
      Post count: 49

      Oh sure. I added an edit widget to the new window, changed its type to Int, set an arbitrary numeric value, and copied it 9 more times. When I switch to this window from the main one by pressing a button, I receive only a notification from the display about the button being pressed and that’s it.
      That edit fields are indeed of type Int is confirmed by the fact that when entering a new value into them through the keyboard, only numbers are entered.

    • Michael ForlongMichael Forlong
      Participant
      @mforlong
      Post count: 7

      Problem is still there.  I’ve checked and double checked the transfer buffer on the HMI seems to be 200 bytes.

       

      “The send buffer of the above two solutions is “STONE_TX_BUF”, with a size of 200 bytes. The send
      implementation function has timeout processing. When the user continuously calls the send interface,
      ensure that each Instruction can be sent successfully.”

      How do I avoid overflow how long is the timeout?

       

       

      • AndreyAndrey
        Participant
        @andybig
        Post count: 49

        Where is this quote from? And what display model do you have?

    • Michael ForlongMichael Forlong
      Participant
      @mforlong
      Post count: 7

      I found the solution to the issue:

      Everything works fine until you encounter an Overflow.  An overflow would occur sometimes with functions that are time sensitive.  In order to avoid this you should use:

      stone_recive_free();

      Hence:

      /* Text type data memory allocation function, dynamically created, not automatically freed */
      /* The stone_recive_free() interface can be called to free memory when the user is finished using it
      * If the user does not release the memory, the memory space occupied last time will be released before the next use

      Hope this helps someone in the future

    • AndreyAndrey
      Participant
      @andybig
      Post count: 49

      That’s why I prefer to write my own libraries, rather than using someone else’s 🙂 Often, writing your own library takes even less time than learning a third-party one. And most importantly – I understand how all its mechanisms work 🙂

Viewing 12 reply threads
  • You must be logged in to reply to this topic.