- Posts: 12169
- Thank you received: 4153
Please Log in or Create an account to join the conversation.
andypugh wrote:
sspeed33317 wrote: I have a question, I have two tool changers, a side arm and a carousel, the carousel is on the machine now and
is a geneva wheel... In order to make the geneva into a rotary axis i was wondering if i could refit the geneva motor with a servo
and rotary encoder instead of using a grey code on the carousel wheel itself. Effectively turning the carousel into a rotary axis.
You could, but there shouldn't be any need.
The "carousel" HAL component that I have written should operate most forms of carousel without hardware modifications.
Have you tried looking at the files in my sample configuration? There are a few parts to it that need to fit together.
1) The "carousel" HAL component. "sudo comp --install --install-docs carousel.comp" should install that. Then it is available for use if you want to.
2) Add an extra few digital IO lines for G-code, change one line in the HAL file. This change is safe:
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES num_dio=6
3) Put the toplevel.py and remap.py files in your config directory. (You can do this without anything breaking)
4) Get the carousel control HAL file working with your carousel. You should be able to add a the (short) toolchange.hal file to your INI file [HAL] section. You probably need to change the number of pockets etc to suit your machine.
You should then be able to move the carousel from MDI with M68 E0 Q{pocket number} followed by M64 P0 to start the carousel and M65 P0 to stop it.
4) Get the toolchange.ngc G-code routine working on your machine. You can set the G-code parameters #<tool-in_spindle>, #<selected_tool> and #<selected_pocket> in MDI then call O<toolchange>CALL.
Various switches need to be wired up in HAL to move actuators and sense positions. look in toolchange.hal to see what the tol change routine is expecting. As an example the signal for moving the carousel in to the spindle is net arm-act motion.digital-out-02 so if that was a parallel port output 17 you would add net arm-act parport.0.pin-17-out to that HAL file.
5) Once the G-code routine is working you can re-map the M6 command to run the tool change G-code routine. First some extra items in the INI file [RS274NGC] and section and either a new [PYTHON] section or modifications to the existing [PYTHON] section4) Put the toplevel.py and remap.py files in your config directory.Code:[RS274NGC] PARAMETER_FILE = vmc.var SUBROUTINE_PATH = ./ REMAP=M6 modalgroup=6 prolog=change_prolog ngc=toolchange epilog=change_epilog [PYTHON] TOPLEVEL=./toplevel.py PATH_APPEND= ./ PATH_APPEND= /usr/share/linuxcnc/ncfiles/remap_lib/python-stdglue/
And that should be it.
Do you need spindle alignment too?
Please Log in or Create an account to join the conversation.
CNCDoc wrote: Okay then I have misunderstood. Thought it was "carousel.comp" the whole tool change sequence was placed ..
The actual tool change sequence is located in "Toolchanges.ngc"?
Is the cited post the correct instructions for implementing the tool change sequence?
I just need to set an output for spindle origination.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Should this maybe be an L0? Just read the status of the photocell and act accordingly? L3 waits until the pin goes high, but your code will wait 2 seconds if it is low, which seems like a waste of time?CNCDoc wrote: Do not get the photocell to see that there is no tool in the tool changer before the arm goes in to work properly.
The input on 7i77 works.
Has made the following connections:
M66 P5 L3 Q2 ; Check if mag pos is empty change to L0?
o103 if [#5399 EQ -1]
(MSG, Tool in Magazine! 03)
when I use M68 E0 Q {pocket number} M64 P0 to start the carousel and M65 P0 to stop it. Positioned carousel in the correct position but when I use with M6 T1 it stays on T2 instead. Haven't been able to look at so much yet.
Please Log in or Create an account to join the conversation.
andypugh wrote: This version of carousel.comp should work for your turret.
You will need to install it with "sudo halcompile --install carousel.comp"
If you get a message that halcompile does not exist then look for linuxcnc-dev in the synaptic package manager.
In your particular case you will need to connect the input-pin-name....-not HAL pin to the carousel input pins, because your logic is inverted.
loadrt carousel encoding=bcd pockets=16 num_sense=5 bidirectional=2
Please Log in or Create an account to join the conversation.