Weird debugging / startup behavior



  • 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



  • ... 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...


  • administrators

    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