Cannot convert float NaN to integer

Basic Information:

Printer Model: Custom
klippy.log (86.6 KB)
winch.txt (4.7 KB)
kin_winch.txt (1.4 KB)
Greetings. I am building a custom 3D-printer. Currently I am using “winch” kinematics, although it’s somewhat different comparing to other kinematics. My printer uses 4 carriages. To move base along the x axis all of them should move in sync…

Describe your issue:

I am trying to set up parking using “winch” kinematics. Parking along x axis finishes just fine, but along other axes (y and z) the program stops and returns an error “cannot convert float NaN to integer”. I found out, that in file variable mcu_pos = nan. I don’t understand why is it this way. If you have any ideas why and how to fix this error please tell me. The files of kinematics and programs are attached.

What is “winch kinematics"?
Some pictures might help to understand your problem. Call me stupid, but I have no clue what you are talking about :stuck_out_tongue_winking_eye:

Good luck, hcet14

The Klipper has cable winch kinematics, I just changed the file a bit for my printer. My printer kinematics moves on four carriages. If you need to move on the x-axis all carriages should move simultaneously to the left or right, on the y-axis the first and second carriages move towards each other, the third and fourth carriages move apart or vice versa, on the z-axis all carriages move towards each other. if you need a video i can send you, but for now i think a picture and explanation of the movement should be enough.
I have the delta kinematics code for my printer, but it has the same error.
delta.txt (13.9 KB)

1 Like

Moved to the developer category.

Unfortunately, @koconnor is currently unavailable, and he is definitely the authority on this. You will need to be patient until he returns.

Interesting. Alas, I can’t provide any meaningful help on errors produced with modified code. If you can produce the error with unmodified code then I can take a look at it, otherwise the likely explanation is that something in the new code is the cause of the problem.