• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Weird debugging / startup behavior

    Mervis
    2
    3
    705
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • _
      _andi_ last edited by

      So,

      I added a function block in mervis. When I deploy my solution, the plc starts up in some stopped state and I have to connect to it via debug and do right-click, resume normal tasks. WTF?

      Also, the HMI is working just as normal, acception new values, no error messages whatsover.

      How do I turn this off/is there some documentation for this feature somewhere out there?

      Andi

      1 Reply Last reply Reply Quote 0
      • _
        _andi_ last edited by

        ... so, the trigger for this behavior was a division by zero on the first call to the function block (getdeltatime4...). Combined with the "stop on exception" setting the plc does just that, which is fine. Annoying though is that neither IDE nor HMI bat an eye on that, you have to go to "system status" and then to the very bottom to see that your plc just stopped all operations. Is there any way to catch such errors? I'd love to get an email when something like this happens...

        Martin Kudláček 1 Reply Last reply Reply Quote 0
        • Martin Kudláček
          Martin Kudláček administrators @_andi_ last edited by

          Hi @_andi_,
          that's great you have been able to debug your problem by yourself - this one is not so easy to find.

          Mervis has an ability to execute program upon exception. Double click on the PLC, switch to the Tasks tab and add new task with the Category "Execution error". Then select the program which you want to execute upon the error:

          0_1550129182011_e6795c6f-b159-4020-9173-126b6fef3cee-image.png

          1 Reply Last reply Reply Quote 0
          • First post
            Last post