Advanced Search

Search Results (Searched for: )

  • andypugh
  • andypugh's Avatar
03 May 2025 10:13 - 06 May 2025 11:28

Is there a bug in the carousel component or am I doing it wrong ATC Denford

Category: Advanced Configuration

I don't think that counts mode _can_ work with a Boxford style of toolchanger as the number of steps lost when the motor stalls against the endstop is unknown.

It could be modified to work, but it might be easier to start from scratch as a single-sensor position-mode stepgen changer wasn't really considered when the component was written.

You could even consider doing all the control in the G-code subroutine:

1) Scale the stepgen so that a position shift of 1 is one pocket.
2) Connect motion.analog-in-00 to the stepgen.2.position-fb
3) Connect motion.analog-out-01 to the stepgen.2.posiiton-cmd
4) Connect the home sensor to motion.digital-in-02
(Actually, you can use any numberered analog/digital IO, you would probably use in, out and digital 00 in practice, but I made them different for clarity)

toolchange.ngc:
O<toolchange> SUB
O100 IF [#<_carousel_homed> EQ 0] ; Do we need to home?
M66 E0 L0 ; read current stepgen pos into #5399
M68 E1 Q[10 + #5399] ; set the carousel in motion, by more than the number of pockets past the current pos
M66 P2 L1 Q20 ; Wait for the home pin
O200 IF [#5399 LT 0]
(abort, home timeout)
O200 ENDIF ; end of timeout check
M66 E0 L0 ; read home pin pos into #5399
M68 E1 Q[#5399] ; goto home pin, might need an offset here
G4 P5 ; wait for stop
#<_carousel_homed> = 1 ; mark homing as done
O100 ENDIF ; end of homing

(Normal toolchange without homing)

M66 E0 L0 ; read current stepgen pos into #5399
#1 = #<_selected+pocket> - #<_current_pocket> ; calculate move distance
O300 IF [#1 LT 0] if moving to a lower number
#1 = [#1 + 8] ; for an 8-pocket changer
O300 ENDIF
M68 E1 Q[#1 + #5399] ; move the requisite number of pockets
G4 P10 ; Wait (should really wait-on-input on a stepgen-in-position signal)
M68 E1 Q[#1 + #5399 - 1] ; move back against the stop
G4 P2 ; wait to stall against the stop
M6 T<_selected_tool> G43 ; change the tool, set offsets
O<toolchange> ENDSUB ; Done
Displaying 16666 - 16666 out of 16666 results.
Time to create page: 0.505 seconds
Powered by Kunena Forum