Hardinge CHNC retrofit- Another one on the way!
- Alloy Craft
- Offline
- Premium Member
-
Less
More
- Posts: 97
- Thank you received: 1
29 Jan 2013 04:39 - 10 Feb 2013 14:27 #29237
by Alloy Craft
Replied by Alloy Craft on topic Re:Hardinge CHNC retrofit- Another one on the way!
Last edit: 10 Feb 2013 14:27 by Alloy Craft.
Please Log in or Create an account to join the conversation.
29 Jan 2013 05:40 #29240
by BigJohnT
Replied by BigJohnT on topic Re:Hardinge CHNC retrofit- Another one on the way!
I don't know if this helps but it is the spindle part of my CHNC hal file. The spindle should be disabled when not in use IIRC. This is basically the same as Rob H's CHNC (he gave it to me)
John
#######
#Spindle uses encoder.02 and pwmgen.02
#######
#spindle scales
addf scale.0 servo-thread
addf scale.1 servo-thread
#10v/6000rpm=0.001667
setp scale.0.gain -0.000201
setp scale.1.gain 60
#load abs comp make spindle RPM pos
loadrt abs count=3
addf abs.0 servo-thread
addf abs.1 servo-thread
addf abs.2 servo-thread
#spindle speed out limits
loadrt limit1 count=1
addf limit1.0 servo-thread
setp limit1.0.min -6000
setp limit1.0.max 6000
#set scale and pwm
setp hm2_5i20.0.encoder.02.scale -4096
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.02.output-type 1
net spindle-speed-limit motion.spindle-speed-out => limit1.0.in
net spindle-speed-limit-out limit1.0.out => scale.0.in
net spindle-speed-DAC scale.0.out => hm2_5i20.0.pwmgen.02.value
net spindle-rpm => abs.1.in
net spindle-speed-abs <= abs.1.out
#spindle enable
net spindle-enable-req motion.spindle-on => and2.1.in0
net spindle-brake-sensor hm2_5i20.0.gpio.051.in_not => and2.1.in1
net spindle-enable and2.1.out => hm2_5i20.0.pwmgen.02.enable
# enable spindle drive
net spindle-enable => hm2_5i20.0.gpio.065.out
# force spindle lock pin out
net spindle-enable => hm2_5i20.0.gpio.042.out
# release spindle brake
net spindle-brake-prg not.0.out => or2.2.in0
net spindle-brake-logic motion.spindle-brake => not.0.in
net spindle-brake hm2_5i20.0.gpio.040.out <= or2.2.out
#spindle sync
net spindle-index motion.spindle-index-enable <= hm2_5i20.0.encoder.02.index-enable
net spindle-velocity motion.spindle-speed-in <= hm2_5i20.0.encoder.02.velocity
net spindle-revs motion.spindle-revs <= hm2_5i20.0.encoder.02.position
net spindle-velocity => abs.0.in
net spindle-v-abs abs.0.out => scale.1.in
net spindle-v-abs-out <= scale.1.out
# spindle speed
net spindle-velocity mult2.0.in0
setp mult2.0.in1 60
net spindle-abs abs.2.in mult2.0.out
net spindle-rpm abs.2.out
# spindle at speed
setp near.0.difference 0.15
net spindle-velocity near.0.in1
net com-spindle-vel near.0.in2 <= motion.spindle-speed-out-rps
net spindle-at-speed near.0.out <= motion.spindle-at-speed
# trick Axis
net trick-axis motion.spindle-reverse
#######
#end of spindle
######
John
Please Log in or Create an account to join the conversation.
29 Jan 2013 06:06 #29243
by PCW
Replied by PCW on topic Re:Hardinge CHNC retrofit- Another one on the way!
Its in the manual 1.0V RMS IICRC
Please Log in or Create an account to join the conversation.
- Alloy Craft
- Offline
- Premium Member
-
Less
More
- Posts: 97
- Thank you received: 1
29 Jan 2013 11:18 - 29 Jan 2013 11:21 #29253
by Alloy Craft
Replied by Alloy Craft on topic Re:Hardinge CHNC retrofit- Another one on the way!
The axis resolvers measure in at 0-1.25 V. I suppose the best thing to do is switch the spindle resolver with an extra axis resolver and move all 3 to channel 3,4 and 5 on the 7I49. And then use w2 to drive them with half the reference sine wave voltage.
John thanks for posting your INI file, however since Im using resolvers I dont know how much of it is useable.
John thanks for posting your INI file, however since Im using resolvers I dont know how much of it is useable.
Last edit: 29 Jan 2013 11:21 by Alloy Craft.
Please Log in or Create an account to join the conversation.
29 Jan 2013 21:32 #29260
by andypugh
It even emulates the index-enable behaviour.
Replied by andypugh on topic Re:Hardinge CHNC retrofit- Another one on the way!
Most of it. The resolver code creates pins pretty much identical to the encoder ones, just called "resolver" instead.John thanks for posting your INI file, however since Im using resolvers I dont know how much of it is useable.
It even emulates the index-enable behaviour.
Please Log in or Create an account to join the conversation.
- Alloy Craft
- Offline
- Premium Member
-
Less
More
- Posts: 97
- Thank you received: 1
10 Feb 2013 14:52 #29843
by Alloy Craft
Replied by Alloy Craft on topic Re:Hardinge CHNC retrofit- Another one on the way!
Spent the whole day working on the lathe, and got a lot done. I moved all resolvers to channels 3,4 and 5 and set W1 down. the spindle speed readout is much better but it still varies +/- 20 rpm at steady state. I dont think I can cut threads properly with the speed this unsteady. It would be nice to know how fast the spindle is actually turning, that way I could tell if it was the readout or actual spindle drive causing the problem, however I think it's the readout. I also wish I knew what the stock rapids for this machine were. Righ now I beleive the max rapid is set to 300 ipm, however, the max I can get is around 200 ipm before the following errors stop responding to the PID values. As for the other functions, the turret index's perfetly, the collet closer works, parts chute and coolant all work. Next I need to build my operator panel, learn how to add buttons to axis and learn Gcode!
Please Log in or Create an account to join the conversation.
10 Feb 2013 17:09 #29847
by andypugh
Replied by andypugh on topic Re:Hardinge CHNC retrofit- Another one on the way!
Threading uses spindle position. I don't think you will have any problems. My lathe has a home-made encoder and speed readout varies by a lot more than yours and still cuts perfect threads.dont think I can cut threads properly with the spindle speed this unsteady!
Please Log in or Create an account to join the conversation.
10 Feb 2013 23:51 #29863
by PCW
Replied by PCW on topic Re:Hardinge CHNC retrofit- Another one on the way!
Did you measure the peak cos-cos or sin-sin voltage on the spindle resolver to make absolutely certain that it its no greater than 1V RMS?
You said before that you had 3.7V on the spindle resolver outputs, 1/2 of that is still too high...
You said before that you had 3.7V on the spindle resolver outputs, 1/2 of that is still too high...
Please Log in or Create an account to join the conversation.
- Alloy Craft
- Offline
- Premium Member
-
Less
More
- Posts: 97
- Thank you received: 1
11 Feb 2013 14:40 #29895
by Alloy Craft
Replied by Alloy Craft on topic Re:Hardinge CHNC retrofit- Another one on the way!
I actually changed the spindle resolver out with a spare axis resolver that came with the machine. Sin-sin and cos-cos are 0-.67 volts now on all channels.
Please Log in or Create an account to join the conversation.
- Alloy Craft
- Offline
- Premium Member
-
Less
More
- Posts: 97
- Thank you received: 1
16 Feb 2013 10:41 - 16 Feb 2013 10:42 #30168
by Alloy Craft
Replied by Alloy Craft on topic Re:Hardinge CHNC retrofit- Another one on the way!
I am getting on to designing the controll pendant, and I dont have any experiecne with a CNC lathe. So Im not exactly sure what external buttons would be essential?. The monitor I am using is a 19 inch touch screen so I was hoping to leverage it to minimize external buttons, however some buttons are just easier to use if external. I was thinking about the following external items
1. estop = latching open 2 pole
2. collet open/ close= latching 3 pole
3. Program run = monentary 2 pole
4. Program pause= momentary 2 pole
5. Faunc mpg with axis/increment selector switches
6.??
7.......
Thats about all I can think of.
1. estop = latching open 2 pole
2. collet open/ close= latching 3 pole
3. Program run = monentary 2 pole
4. Program pause= momentary 2 pole
5. Faunc mpg with axis/increment selector switches
6.??
7.......
Thats about all I can think of.
Last edit: 16 Feb 2013 10:42 by Alloy Craft.
Please Log in or Create an account to join the conversation.
Moderators: cncbasher
Time to create page: 0.120 seconds