REMAP M6 FOR GENEVA ATC
(And what is the exact problem that you have?)
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Another option might be to configure the carousel as an axis (to a limited extent) then the position could be saved in the position.txt file automatically.
Unfortunately "carousel" is a realtime module so can't access the file system to save the data.
The G-code sequencing file, however, could save the position to one of the persistent numbered parameters.
linuxcnc.org/docs/2.7/html/gcode/overview.html#gcode:parameters
Please Log in or Create an account to join the conversation.
I used "updown" hal component with my sensor to count pockets.
Please Log in or Create an account to join the conversation.
Also, there isn't really much point using updown _or_ carousel here.
To "home" the carousel you would MDI:
#5390 = current tool
Now you can remap M6 to a tool-change routine. You will need a bunch of other stuff, but the tool cycling seems fairly simple.
Here is an example that uses carousel, but bear with me:
github.com/LinuxCNC/linuxcnc/blob/master...hange/toolchange.ngc
This section of G-code will keep the motor on until it has counted up to the required tool, then stop the motor.
( #<selected_pocket> is set in stdglue.py )
M64 P0 (start the motor)
O100 WHILE #5490 LT #<selected_pocket>
(wait for an index pulse, with a timeout)
M66 P0 L3 Q60 ; wait for carousel finished
O107 if [#5399 LT 0]
(abort, failed to align carousel)
O107 endif
#5390 = [#5390 + 1]
O100 ENDWHILE
M65 P0; stop carousel
Now, this won't work, but I wanted to leave it simple for clarity.
You might well want to have two different versions of the loop to move in two different directions.
There is no wrapping. If you go past tool 20 it will carry on to 21. The fix for this is the MOD operator:
#5390 = [[#5390 + 1] MOD 20]
When you exit linuxCNC #5390 will be saved in the .var file for next time.
Please Log in or Create an account to join the conversation.
---1.
How can i just tell the Carousel that it's homed on startup. I only have the one hall sensor with magnets in between each tool.
---2.
Also, i need to add a small delay between the sensor hit and shutting off the turret motor when the desired tool number is reached.
(Due to the sensor magnets being in between each pocket.)
Please Log in or Create an account to join the conversation.
I think that it might suffice to connect the index to the same HAL pin as the pulse.How can i just tell the Carousel that it's homed on startup. I only have the one hall sensor with magnets in between each tool.
But, really, I don't think that "carousel" does anything useful in this application, you might as well compute the direction and turn the motors on in G-code.
Also, i need to add a small delay between the sensor hit and shutting off the turret motor when the desired tool number is reached.
(Due to the sensor magnets being in between each pocket.)
The G4 command in the routine should be a simple way to do this.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
If you exit LinuxCNC and look in the .vars file you should be able to see the stored value. Is that not happening?
Please Log in or Create an account to join the conversation.