hexagon logo

Error Handling option coding


Hi guys, its been a while ! Need some help....I have the basics down for error handling and have code for one option, part of level 3 pc-dmis training....but want to go one step more....


So, if I wanted it to do something else, rather than increment around 22.5 degrees....then what ?

Lets say I wanted it to flag the operator, pause the program and let him manually measure it avoid a bad spot, then carry on the program again....

Sorry, coding is my weakest link here and I figured someone may have code doing something the same or similar....open to any and all coding examples.....

TIA !
Parents
  • Do/ and UNTIL are red, so you should re-create a do until, then copy / paste the code between them, copy paste the UNTIL case, and delete the first...
    I think your code should do what you are looking for.


    His picture is actually borrowed from the Hex Level 3 training exercise. They printed the Do & Until pair red on purpose to make them stand out.
    In fact they have tons of red as the author's coding style was to hand-type add the first half of the logic pair (so it goes red), then the in-between code, then hand-type complete the logic pair - instead of the way you (and I) like of adding the pairs as a set with the drop-down menus and then adding code between them.

    IMO, that particular lesson is a bit of ridiculous exercise for 99% of real-world applications, because finding bad roundness is normally not something inspection strives to purposefully skip over and ignore.

    The key point to learn from it is the ability to automate changing DCC motion parameters based on conditions found. Jim wanted to include operator actions, so my reply went in that direction with a setup I've employed lots of times: clean the dang part.

    Where I work now we run CMMs in a standardized production environment. While it would seem like adding tons of error-handling logic would be beneficial it turns out that the burden of proving out and then supporting and maintaining the far more complex programs ends up costing us more time and effort than making programs simple and rugged that anyone with Level 1 basic skills can quickly troubleshoot.

    One key point about logic branches in PC-DMIS is that you cannot stop the program and re-start it at that same spot, you usually have to start over from the beginning as all the dynamic/temporary values of variables and True/False results of IF tests completely disappear and nothing works.
Reply
  • Do/ and UNTIL are red, so you should re-create a do until, then copy / paste the code between them, copy paste the UNTIL case, and delete the first...
    I think your code should do what you are looking for.


    His picture is actually borrowed from the Hex Level 3 training exercise. They printed the Do & Until pair red on purpose to make them stand out.
    In fact they have tons of red as the author's coding style was to hand-type add the first half of the logic pair (so it goes red), then the in-between code, then hand-type complete the logic pair - instead of the way you (and I) like of adding the pairs as a set with the drop-down menus and then adding code between them.

    IMO, that particular lesson is a bit of ridiculous exercise for 99% of real-world applications, because finding bad roundness is normally not something inspection strives to purposefully skip over and ignore.

    The key point to learn from it is the ability to automate changing DCC motion parameters based on conditions found. Jim wanted to include operator actions, so my reply went in that direction with a setup I've employed lots of times: clean the dang part.

    Where I work now we run CMMs in a standardized production environment. While it would seem like adding tons of error-handling logic would be beneficial it turns out that the burden of proving out and then supporting and maintaining the far more complex programs ends up costing us more time and effort than making programs simple and rugged that anyone with Level 1 basic skills can quickly troubleshoot.

    One key point about logic branches in PC-DMIS is that you cannot stop the program and re-start it at that same spot, you usually have to start over from the beginning as all the dynamic/temporary values of variables and True/False results of IF tests completely disappear and nothing works.
Children
No Data