Commit 5718f0bb authored by electrolab's avatar electrolab

Atv-vfd connections

correcting threading
adding relays for hydraulics and lubrication
parent d88e207c
loadrt mult2 names=ATV_coef
addf ATV_coef servo-thread
# ---magic constant to uncompensate slip---
net spindle-vel-cmd-rpm ATV_coef.in0
setp ATV_coef.in1 0.97
# ---setup spindle control signals---
net spindle-vel-cmd-rps spindle.0.speed-out-rps
......@@ -16,6 +25,6 @@ net spindle-index-enable spindle.0.index-enable
net state-op atv_vfd.enable
net MachineIsOn atv_vfd.machine-on
net spindle-vel-cmd-rpm atv_vfd.speed-command
net ATV_correct_speed ATV_coef.out atv_vfd.speed-command
net spindle-enable atv_vfd.spindle-on
net Estop atv_vfd.is-estop
\ No newline at end of file
net Estop atv_vfd.is-estop
......@@ -36,7 +36,7 @@ G4 P2 ; Wait to reach speed
#<height> = [0.86603 * #<pitch>]
#<majorflat> = [#<height> * 0.125]
#<minorflat> = [#<height> * 0.250]
#<threaddepth> = [#<height> * 0.625]
#<threaddepth> = [#<height> -0.06]
;(DEBUG,#<height> #<majorflat> #<minorflat> #<threaddepth>)
O200 if [#<_metric>]
......@@ -71,14 +71,14 @@ G95 F#<flatfeed> ; Feed-Per-Rev Mode
; cut the major diameter
(DEBUG,EXTERNAL Threading thread dia-#<X_coord> startZ-#<starting_Z> finishZ-#<Z_coord> Pitch-#<pitch> Tool-#<tool_number> MF #<majorflat>)
G0 Z #<starting_Z>
G0 X #<X_coord>
G1 X [#<X_coord> - #<majorflat>]
G1 Z #<Z_coord>
G0 X #<X_coord>
G0 X [#<X_coord> +1]
;G1 X [#<X_coord> - #<majorflat>]
;G1 Z #<Z_coord>
;G0 X #<X_coord>
G0 Z #<starting_Z>
G96 D1000 S#<feed_rpm> ; limit RPM in threading mode
G4 p2
G76 P#<pitch> Z#<Z_coord> i[-#<majorflat>] j#<cutdepth> k#<threaddepth> H3 R1.5 Q29.5 E0 L0
;G96 D1000 S#<feed_rpm> ; limit RPM in threading mode
G97 S1000
G76 P#<pitch> Z#<Z_coord> i-1 j#<cutdepth> k#<threaddepth> H2 R1.5 Q29.5 E0 L0
G0 X [#<X_coord> + 0.5]
O300 endif
;(DEBUG,Test4)
......
......@@ -13,6 +13,7 @@ loadrt weighted_sum wsum_sizes=4,4,2
loadrt conv_s32_float count=3
loadrt scale names=FeedScale,RapidScale,SpindleScale
loadrt and2 names=EstopAnd
loadrt not names=EstopNot
loadusr atv_vfd -r 38400 -p even
......@@ -26,6 +27,7 @@ addf FeedScale servo-thread
addf RapidScale servo-thread
addf SpindleScale servo-thread
addf EstopAnd servo-thread
addf EstopNot servo-thread
#loadusr halui -ini maurice.ini
#loadusr io
......@@ -35,7 +37,8 @@ addf EstopAnd servo-thread
net state-op => EstopAnd.in0
net STBEstop EstopAnd.in1
net Estop-and-out EstopAnd.out iocontrol.0.emc-enable-in
net Estop-and-out EstopAnd.out iocontrol.0.emc-enable-in EstopNot.in
net Estop EstopNot.out
#==========================================
......
......@@ -206,7 +206,8 @@ HAL_MAP_PIN=ChuckOpen, 1, bit, 5
HAL_MAP_PIN=MachineReady, 2, bit, 0
HAL_MAP_PIN=ServoPower, 2, bit, 1
#HAL_MAP_PIN=test2, 3, bit, 0
HAL_MAP_PIN=HydraulicPump, 3, bit, 0
HAL_MAP_PIN=LubricationPump, 3, bit, 0
MAX_UPDATE_RATE=0.0
DEBUG=1
......@@ -5,7 +5,7 @@ loadrt mux8 names=mpg
loadrt abs count=1
loadrt near names=atspeed
addf hm2_5i24.0.read servo-thread
addf hm2_5i24.0.read servo-thread
addf hm2_5i24.0.write servo-thread
addf mpg servo-thread
addf atspeed servo-thread
......@@ -40,7 +40,7 @@ addf abs.0 servo-thread
#net spindle-vel-cmd-rpm hm2_5i24.0.pwmgen.00.value
#net spindle-enable hm2_5i24.0.pwmgen.00.enable
setp hm2_5i24.0.encoder.00.scale 4096
setp hm2_5i24.0.encoder.00.scale 4096
net spindle-revs hm2_5i24.0.encoder.00.position
net spindle-vel-fb-rps hm2_5i24.0.encoder.00.velocity
net spindle-vel-fb-rpm abs.0.in hm2_5i24.0.encoder.00.velocity-rpm
......@@ -73,4 +73,4 @@ net JogScale mpg.out
setp hm2_5i24.0.encoder.01.scale 4
net JogCount hm2_5i24.0.encoder.01.count
net JogScale joint.0.jog-scale joint.2.jog-scale
net JogCount joint.0.jog-counts joint.2.jog-counts
\ No newline at end of file
net JogCount joint.0.jog-counts joint.2.jog-counts
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment