- Posts: 19306
- Thank you received: 0
VMC related HAL questions.
Please Log in to join the conversation.
I'm at the stage that I might get a physical button to do something :lol:
Please Log in to join the conversation.
(And the same for the tool changer)
0) Make a copy of your entire working config folder and rename it, then rename the INI file in that folder.
Make all changes to that folder so that the existing config can be used to run the machine.
1) Move anything spindly out of your existing HAL file into the bottom of the new spindle.hal file
2) Add the complete [SPINDLE] section in the sample iNI file to your INI file
3) Add HALFILE=spindle.hal to the [HAL] section of your INI file.
Now you need to figure out the signals in this section here:
#for a real spindle run by a VFD
# loadrt abs
# addf abs.0.servo-thread
# net spindle-cmd mux2.0.out abs.0.in
# net spindle-cmd-abs abs.0.out pwmgen.0.value
# net spindle-pwm pwmgen.0.pwm parport.0.pin-NN-out
# net spindle-fwd abs.0.is-positive parport.0.pin-NN-out
# net spindle-rev abs.0.is-negative parport.0.pin-NN-out
Looking at your existing spindle stuff should help figure it out.
Keep the exact signal names (ie, the name immediately after the "net" command) from my signal.hal but use the pin names from your HAL file.
Keep and "setp" commands from your HAL file exactly the same.
Delete the line "net spindle-cmd mux2.0.out" and un-comment the block of net commands above (ie, remove the # chars)
I expect that you would end up with something rather like:
loadrt abs
addf abs.0.servo-thread
net spindle-cmd mux2.0.out abs.0.in
net spindle-cmd-abs abs.0.out hm2_5i25.0.7i77.0.analogout-04
net spindle-fwd abs.0.is-positivehm2_5i25.0.7i76.0.0.output-01
net spindle-rev abs.0.is-negative hm2_5i25.0.7i76.0.0.output-02
(You don't need a pwmgen with a 7i76.)
But I am just guessing as I haven't seen your config.
Please Log in to join the conversation.
When there is no tool in the spindle and the spindle moves down to pick up the tool, the drawbar is not released.
It is fine if a tool has just been unloaded, as the drawbar is left released.
This is a minor change to the G-code toolchange routine, but does need to be done.
Please Log in to join the conversation.
linuxcnc.org/index.php/english/forum/10-...nent-g33-works#58914
Please Log in to join the conversation.
- sspeed33317
- Offline
- Senior Member
-
- Posts: 77
- Thank you received: 0
I am going to take another shot at getting my HAAS running soon. I kinda lost interest when it became too difficult but i can't give up.
I think this topic is the way to go for me. I would have liked to try to get Tkamskers component
to work but there is lot of adapting to do to make it work with my Mesa boards...
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.
But with the carousel i still need to move the Z axis... with the side arm will be a big project to fit it , but can be totally controlled with classic ladder.
With the side arm I will gain a few tool holders also.
Please Log in to join the conversation.
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] section
And that should be it.
Do you need spindle alignment too?
Please Log in to join the conversation.
- sspeed33317
- Offline
- Senior Member
-
- Posts: 77
- Thank you received: 0
I will start looking at files.
And yes I need to line up the spindle, I can do it two ways
I want to add a spindle encoder , very easy on my machine since
there are provisions for it.
Or I can use the mechanical method which is the way it was done on my machine.
Spindle would turn at a slow rpm then a shot pin would set and then a prox switch would sense
when the pin dropped and locked the spindle and then sent a signal to the control and VFD a stop signal.
Please Log in to join the conversation.
sspeed33317 wrote: Or I can use the mechanical method which is the way it was done on my machine.
Spindle would turn at a slow rpm then a shot pin would set and then a prox switch would sense
when the pin dropped and locked the spindle and then sent a signal to the control and VFD a stop signal.
That is fairly easy to control with LinuxCNC from the G-code sub.
You probably need to be quite careful to make sure that you can't try to start the spindle with the lock energised, but that sort of interlocking is what HAL is good at.
Please Log in to join the conversation.
- sspeed33317
- Offline
- Senior Member
-
- Posts: 77
- Thank you received: 0
When I removed all the factory wiring there was a harness that led directly up to the spindle from the VFD
and was labeled stop.
Also if i remember correctly the way they did it was power up the spindle 25 rpm, then let it coast , drop the pin and then the stop signal.
Please Log in to join the conversation.
