fbpx

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! 

 

Please or Register to create posts and topics.

Problem with my tool length measure script

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.

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.

I put the file in my google drive.

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.

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?

Your macro has no error, I tested it and it works fine.
Check if the soft limits settings do not block axis movement.

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

carbonkid has reacted to this post.
carbonkid

ok thanks first I will test and then report.

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.

Don't feel embarrassed. It sometimes happens to me too 😊

PARTNERS:

 

USA

Germany

Slovenia / Bosnia

Spain

South Africa

UNI-CAM

The Netherlands

Portugal

Greece

  Distrib milionis logo

Hungary

Distrib logot

Bulgaria

Master

Kenya

Proteq Automation

Egypt

Germanelectronix

China

Jun Ma

Serbia

ALCO

Italy

LVL tech r

Denmark

Varntoft Dania

Finland

×

Hello!

Click one of our contacts below to chat on WhatsApp

× How can I help you?