CS-Lab Support Forum for CNC Community
Help to run this brand-new forum and stay with us.
Ask your questions, we are here to help!
Problem with my tool length measure script
Quote from carbonkid on 19 March 2023, 19:40I have a problem with my tool length measuring script. It's your script, I just added that it is measured with a rotating spindle because I'm using a laser light barrier. It worked in version 3.4.05. Now I get the following error message:
Traceback (most recent call last):
File "C:\Program Files\simCNC\profiles\CNC\scripts\___INIT.py", line 39, in <module>
exec(open(fileName, encoding='utf-8').read())
File "<string>", line 76, in <module>
File "C:\Program Files\simCNC\profiles\CNC\scripts\___DEVICE.py", line 423, in moveToPosition
self.comm.sendAndWait( "moveToPosition:" + coordMode.name + ':' + str(position[0])+';'+str(position[1])+';'+str(position[2])+';'+str(position[3])+';'+str(position[4])+';'+str(position[5]) + ':' + str(velocity) )
File "C:\Program Files\simCNC\profiles\CNC\scripts\___COMM.py", line 171, in sendAndWait
raise SimCncException(":".join(res[1:]))
___COMM.SimCncException: 'Other error'
Script C:\Program Files\simCNC\screens\carbonkid_vertical_v1.02\scripts\toolLength_RPM.py execution error (Unknown error: 1).
I uploaded the screen with the scripts to my google drive.
I have a problem with my tool length measuring script. It's your script, I just added that it is measured with a rotating spindle because I'm using a laser light barrier. It worked in version 3.4.05. Now I get the following error message:
Traceback (most recent call last):
File "C:\Program Files\simCNC\profiles\CNC\scripts\___INIT.py", line 39, in <module>
exec(open(fileName, encoding='utf-8').read())
File "<string>", line 76, in <module>
File "C:\Program Files\simCNC\profiles\CNC\scripts\___DEVICE.py", line 423, in moveToPosition
self.comm.sendAndWait( "moveToPosition:" + coordMode.name + ':' + str(position[0])+';'+str(position[1])+';'+str(position[2])+';'+str(position[3])+';'+str(position[4])+';'+str(position[5]) + ':' + str(velocity) )
File "C:\Program Files\simCNC\profiles\CNC\scripts\___COMM.py", line 171, in sendAndWait
raise SimCncException(":".join(res[1:]))
___COMM.SimCncException: 'Other error'
Script C:\Program Files\simCNC\screens\carbonkid_vertical_v1.02\scripts\toolLength_RPM.py execution error (Unknown error: 1).
I uploaded the screen with the scripts to my google drive.
Quote from CS-Lab Support on 21 March 2023, 08:38Please send me just the "toolLength_RPM.py" macro.
I don't have it in the first archive, and I don't have access to the second one.
Please send me just the "toolLength_RPM.py" macro.
I don't have it in the first archive, and I don't have access to the second one.
Quote from CS-Lab Support on 21 March 2023, 13:58Your macro has no error.
Test the macro again, only this time switch simCNC to "ENABLE" 😉
Functions that move axes require simCNC to be in the "ENABLE" state; otherwise, they report an error.
Your macro has no error.
Test the macro again, only this time switch simCNC to "ENABLE" 😉
Functions that move axes require simCNC to be in the "ENABLE" state; otherwise, they report an error.
Quote from carbonkid on 21 March 2023, 21:40No, no simCNC was "enable". I approached the reference point and then started the script. Then the coordinates of the tool length sensor were also approached, the spindle switched on and then the error occurs. You can also see in my video. I tested again today and changed a few things on the screen because I thought that might be the reason. But it didn't bring any change. The machine was still 3.4.21, I have now updated that...no change either. Finally, I loaded your default screen and only entered the coordinates of my sensor in your probing macro and didn't change anything else. There is also an error message. I have now packed you videos, the error messages and my profile folder in my google drive. Please check again somewhere but the error must be. Where should the macros for probing be in the profile folder or in the screen folder or does it not matter?
No, no simCNC was "enable". I approached the reference point and then started the script. Then the coordinates of the tool length sensor were also approached, the spindle switched on and then the error occurs. You can also see in my video. I tested again today and changed a few things on the screen because I thought that might be the reason. But it didn't bring any change. The machine was still 3.4.21, I have now updated that...no change either. Finally, I loaded your default screen and only entered the coordinates of my sensor in your probing macro and didn't change anything else. There is also an error message. I have now packed you videos, the error messages and my profile folder in my google drive. Please check again somewhere but the error must be. Where should the macros for probing be in the profile folder or in the screen folder or does it not matter?
Quote from CS-Lab Support on 22 March 2023, 17:15Your macro has no error, I tested it and it works fine.
Check if the soft limits settings do not block axis movement.
Your macro has no error, I tested it and it works fine.
Check if the soft limits settings do not block axis movement.
Quote from CS-Lab Support on 22 March 2023, 17:17>> Where should the macros for probing be in the profile folder or in the screen folder or does it not matter?
It does not matter.
If my soft limits advice doesn't help (I think it will), you will have to send me the following:
- photo of simCNC machine coordinates before running the macro.
- video showing what happens after running the macro.
- exported simCNC profile.
>> Where should the macros for probing be in the profile folder or in the screen folder or does it not matter?
It does not matter.
If my soft limits advice doesn't help (I think it will), you will have to send me the following:
- photo of simCNC machine coordinates before running the macro.
- video showing what happens after running the macro.
- exported simCNC profile.
Quote from carbonkid on 22 March 2023, 20:04Hi, I'm almost embarrassed, but the tip about the soft limits was worth its weight in gold. I actually had -120mm in it for Z and -130mm in the macro for maximum z depth. Stupid mistake, I hope this also serves for others that they don't make the mistake in the first place. Thanks again for your help and perseverance.
Hi, I'm almost embarrassed, but the tip about the soft limits was worth its weight in gold. I actually had -120mm in it for Z and -130mm in the macro for maximum z depth. Stupid mistake, I hope this also serves for others that they don't make the mistake in the first place. Thanks again for your help and perseverance.
Quote from CS-Lab Support on 23 March 2023, 11:41Don't feel embarrassed. It sometimes happens to me too 😊
Don't feel embarrassed. It sometimes happens to me too 😊