[Ke...] Posted December 19, 2023 Share Posted December 19, 2023 I am developing a script to where I can start the script it pauses X seconds then takes the first scan (pauses again X seconds) then I can rotate the part on a manual turntable then Scan again looping through the process (I know there are other solutions for this but I want to make a script for practice). The problem that I have is with the measurement. I am using the section below for the measurement portion of the script. If there is any movement the script just stops (example I get request Error: the movement is too high). I would like it to rescan say if the part was still moving if my time was too short. Are there any functions or variables of this command that can be used to accomplish this? I appreciate the help in advance. import gom # loop for automatic measurement repetition GOM_MMT_RETRIES = 10 GOM_MMT_ERROR_CODES = ['MPROJ-0037'] while True : try: gom.script.atos.insert_scan_measurement () except RuntimeError as ex: if GOM_MMT_ERROR_CODES and not ex.args[0] in GOM_MMT_ERROR_CODES : raise GOM_MMT_RETRIES -= 1 if GOM_MMT_RETRIES <= 0 : raise else: break Link to comment Share on other sites More sharing options...
[Ma...] Posted December 20, 2023 Share Posted December 20, 2023 Hello, If I understand your question correctly, you want catch the movement exception. This can be done with MPROJ-0036 - Check Movement. Best regards, Matthias Prinke Link to comment Share on other sites More sharing options...
[Ke...] Posted December 20, 2023 Author Share Posted December 20, 2023 It is catching the movement but I would like it to rescan again instead of giving me an error. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in