Advanced Search

Search Results (Searched for: )

  • Adam Maszynotwór
  • Adam Maszynotwór's Avatar
30 Apr 2025 14:10 - 30 Apr 2025 14:15

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

Category: Advanced Configuration

Hello, I'm starting to restore a lathe from scrap.


My problem is ATC (we'll get to the original ATC when I start the model)
Test model:
Step PIN8 dir PIN9 LPT stepper motor
Microstep 1600
4 pockets
1 gome sensor (pocket 1)
Head lock by left rotation (example video from the web)

Component linuxcnc.org/docs/html/man/man9/carousel.9.html
Basic lathe configuration

Symptoms:

T1M6 after starting linuxcnc looks for HOME and rewinds (strangely but it does rewind)
Each successive tool, e.g. T3M6, no longer rewinds
When I start from T2 M6 it passes HOME (activating it) but no longer rewinds while in position

My observations:
Dir changes but there is no movement. which means that there are no pulses flowing to PIN 8.
M66 waits for READY signal even though nothing is happening. Only after time has elapsed does the DIR state change and then it is READY

all files below
As you know I am not strong in HAL and in English please write as if to a child

O<changetool> sub
(debug, Tool change to T#<_selected_tool>)

M68 E0 Q#<_selected_tool>  ; Wybierz kieszeń
M64 P0                     ; Włącz karuzelę
G4 P2
; Czekaj max 15s na ready (z timeoutem)
M66 P0 L3 Q15

; Jeśli timeout, zatrzymaj karuzelę i zgłoś błąd
O100 if [#5399 EQ 0] (if timeout)
  M65 P0
  (msg, Toolchange FAILED - Timeout)
  M99
O100 endif

M65 P0                     ; Wyłącz karuzelę
(debug, Tool change OK)
O<changetool> endsub
M2

[code][code]loadrt stepgen step_type=0,0,0
loadrt carousel pockets=4 encoding=counts dir=1 num_sense=1

addf carousel.0 servo-thread

setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 35000
setp stepgen.2.dirsetup 35000
setp stepgen.2.maxvel 100
setp stepgen.2.maxaccel 150
setp stepgen.2.position-scale 1
net astep stepgen.2.step => parport.0.pin-08-out
setp parport.0.pin-08-out-reset 1
#net adir stepgen.2.dir => parport.0.pin-09-out
net adir carousel.0.motor-rev => parport.0.pin-09-out
#Konfiguracja carousel

setp carousel.0.scale 400
setp carousel.0.width 10
setp carousel.0.fwd-dc 10
setp carousel.0.rev-dc 100
setp carousel.0.rev-pulse 10
#Połączenie carousel z stepgen


net carousel-pos-cmd carousel.0.counts-target => stepgen.2.position-cmd
net carousel-counts carousel.0.counts <= stepgen.2.counts

net carousel-ready carousel.0.ready => iocontrol.0.tool-changed motion.digital-in-00

#net carousel-dir stepgen.2.dir <= carousel.0.motor-rev
net carousel-enable carousel.0.enable <= motion.digital-out-00
net carousel-enable stepgen.2.enable <= motion.digital-out-00
net carousel-pocket carousel.0.pocket-number <= iocontrol.0.tool-prep-number
net carousel-ready carousel.0.ready => iocontrol.0.tool-changed
net home-signal carousel.0.sense-0 <= parport.0.pin-10-in
#Toolchange
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared



all files below
[/code][/code]
Displaying 16831 - 16831 out of 16831 results.
Time to create page: 0.355 seconds
Powered by Kunena Forum