Announcement

Collapse
No announcement yet.

Display is freezing every so ofton

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

  • Display is freezing every so ofton

    Hello,
    I have a GEN4-ULCD-70DTconnected to a arduino mega. This setup is in an industrial environment. For some Reason the display wants to freeze up every so often and to fix it i have to reset the arduino and this takes some time that we do not have. When the display freezes the Arduino code still is running because i can still do a full cycle although it runs a bit slower.

    I have put in a new arduino and a new display and still have this issue. See code below, I have a clearpath servo moter hooked in so u will have to skip some.

    Here is also a video https://www.youtube.com/watch?v=bIBgH1YP07k

    Also see attached Code
    Attached Files

  • #2
    Hi,

    Thank you for the video. The setup looks great.

    This usually means that the Arduino has become out of sync with the display. If possible, could you please send me the genie project and I will try them together and hopefully get it to follow the same issue.

    Best regards

    Paul

    Comment


    • #3
      Sure ill do that. It does not happen very often (couple times a day) so it might be tough to get it to freeze but give it a try. thanks!
      Attached Files

      Comment


      • #4
        Hello Paul! Did u figure out the problem? Would be fun to hear of a solution to my problem

        Comment


        • #5
          Hi,

          As yet, it hasn't frozen for me so I intend to keep it running all weekend. I didn't find anything in code that would cause it which isn't a help.

          I am hoping that it will show the same symptons as you with a more prolonged testing time and then I can determine what the frozen state is.

          I will update you again on Monday.

          Best regards

          Paul

          Comment


          • #6
            Hi,

            The only thing that I have noticed and it will be because of no attached hardware, depending on the state of inputs in the move function, the Arduino program will halt until the condition is met, however, operators will still be allowed to press buttons but this doesn't show up as frozen as the buttons still change state on the display. Is this the condition that you get eg button presses will operate visually but no action.

            In my test I press the Multi Width button which takes me to Form 1 and then if I press the Sheet Width +5 button, no further button commands that are processed by the Arduino are accepted after that as the Arduino is halted till the input conditions are met.

            It might be best to look into another way to do this as halting the Arduino program flow can cause issues. maybe if the while functions had a timeout also in case of error.

            Best regards

            Paul

            Comment


            • #7
              Hello sorry for the late reply. Usually I get a email when a new post is here.

              Ya that makes sense. Could write an example while loop with a timeout as i am a but unsure what u mean?

              Thx again

              Comment


              • pauleilio
                pauleilio commented
                Editing a comment
                Hi,

                This is an example of a while loop with a timeout

                unsigned long startedWaiting = millis();
                while(Condition && millis() - startedWaiting <= 1000)
                {
                // Keep waiting for Condition to change
                }

                Using this in your while loop will ensure that it doesn't get stuck if the condition isn't met for some reason.

                Another possibility would be to replace the 'while' with an 'if' if it isn't necessary to pause at that point.

                Best regards

                Paul

            • #8
              Can you? The employees are getting mad

              Comment


              • #9
                One thing that I am really curious about and if its hardware problems like power issues or stray Voltage or software issues

                If it is software issues could I have an external button hooked up so that it re syncs the display without having to reset the arduino?

                The reason I don't like to reset the arduino is because the motor has to do the homing process again and that takes some time.

                Sometimes it only works for about a minute till I have to do a reset and it just gets us on our nerves

                Comment


                • #10
                  Hi,

                  This is an example of a while loop with a timeout

                  unsigned long startedWaiting = millis();
                  while(Condition && millis() - startedWaiting <= 1000)
                  {
                  // Keep waiting for Condition to change
                  }

                  Using this in your while loop will ensure that it doesn't get stuck if the condition isn't met for some reason.

                  Another possibility would be to replace the 'while' with an 'if' if it isn't necessary to pause at that point.

                  Best regards

                  Paul

                  Comment


                  • #11
                    First off thanks. I really don't think it gets stuck in the while loop because I can still press the foot paddle/cycle start and it seems to do the cycle although the screen is not updating

                    One thing I can say and that is if it is in that state there is a small 1 second delay right after the cycle start and also right before it starts to move again

                    If u seIfthe video i posted than u know what I'm talking about

                    Comment


                    • #12
                      Hi,

                      Ok, It's good to know that it seems to carry on from there and doesn't get stuck at that point.

                      Because of the 1 second delay you noticed, It may be worthwhile trying the Visi-Genie Beta library. You can download it from here.

                      https://github.com/4dsystems/ViSi-Ge...o-Library-BETA

                      Best regards

                      Paul

                      Comment


                      • #13
                        Thx.
                        Will the visi-Genie Beta library fix my problem?

                        Would my Idea of adding a hardware push button to "resync" the arduino and screen not work?

                        Comment

                        Working...
                        X