VMC related HAL questions.
I am happy for you that your machine is running.
Could you post your configuration files here?
This might help me and others.
greetings from Germany
Peter
Please Log in or Create an account to join the conversation.
Many thanks
Please Log in or Create an account to join the conversation.
linuxcnc.org/docs/devel/html/man/man9/carousel.9.html
If you type man carousel.comp you should get this document.
Please Log in or Create an account to join the conversation.
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.[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?
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.
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"?
In the example, config, yes. It could be handles with classic ladder, or with a Python remap, but anything that requires axis movement or M19 spindle orient is most readily done with a G-code remap.
Is the cited post the correct instructions for implementing the tool change sequence?
I just need to set an output for spindle origination.
I think it is close to what you seem to need.
If your spindle drive controls orient internally then you can use the M19 outputs to control the orient. (ignoring the angle output, just handshaking with spindle.0.orient and spindle.0.is-oriented )
Please Log in or Create an account to join the conversation.
Have some problems.
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)
net pos-is-empty-mag hm2_7i92.0.7i77.0.0.input-29 motion.digital-in-05 #Carousellposempty
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.
Then the carousel continues to position when the emergency stop is reset.
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?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.
That's odd. Can you check what pocket number the carousel comp is getting at its input pin with halmeter?
Which version of carousel are you using? (ie, from which LinuxCNC version?)
Please Log in or Create an account to join the conversation.
I use carousel from the following post:
post=67358
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.
you shoudt be going with the system internal
depending on what system you are on 2.7 -2.9
you may be better up
as lots of changes appear to the system and comps do use this new feathers
Please Log in or Create an account to join the conversation.
Has 2.7.14 installed
Found this thread may be the same problem ..
forum.linuxcnc.org/24-hal-components/310...unent-debounce#75712
Please Log in or Create an account to join the conversation.