G33.1 - no position reset when index detects

More
08 Jan 2020 17:42 #154327 by Cynas
#*******************
#  SPINDLE S
#*******************

setp   pid.s.Pgain     [SPINDLE_9]P
setp   pid.s.Igain     [SPINDLE_9]I
setp   pid.s.Dgain     [SPINDLE_9]D
setp   pid.s.bias      [SPINDLE_9]BIAS
setp   pid.s.FF0       [SPINDLE_9]FF0
setp   pid.s.FF1       [SPINDLE_9]FF1
setp   pid.s.FF2       [SPINDLE_9]FF2
setp   pid.s.deadband  [SPINDLE_9]DEADBAND
setp   pid.s.maxoutput [SPINDLE_9]MAX_OUTPUT
setp   pid.s.error-previous-target true

net spindle-index-enable  <=> pid.s.index-enable
net spindle-enable        =>  pid.s.enable
net spindle-vel-cmd-rpm-abs     => pid.s.command
net spindle-vel-fb-rpm-abs      => pid.s.feedback
net spindle-output        <=  pid.s.output

# ---digital potentionmeter output signals/setup---

setp   hm2_7i76e.0.7i76.0.0.spinout-minlim    [SPINDLE_9]OUTPUT_MIN_LIMIT
setp   hm2_7i76e.0.7i76.0.0.spinout-maxlim    [SPINDLE_9]OUTPUT_MAX_LIMIT
setp   hm2_7i76e.0.7i76.0.0.spinout-scalemax  [SPINDLE_9]OUTPUT_SCALE

net spindle-output      => hm2_7i76e.0.7i76.0.0.spinout
#net spindle-enable      => hm2_7i76e.0.7i76.0.0.spinena

net spindle-enable => or2.0.in0
net spindle-enable-oriented => or2.0.in1

net spindle-enable-or2.0 or2.0.out      => timedelay.1.in
net opoznienie-spindle-enable timedelay.1.out => hm2_7i76e.0.7i76.0.0.spinena

net spindle-ccw         => hm2_7i76e.0.7i76.0.0.spindir


# ---Encoder feedback signals/setup---

setp    hm2_7i76e.0.encoder.00.counter-mode 1
setp    hm2_7i76e.0.encoder.00.filter 1
setp    hm2_7i76e.0.encoder.00.index-invert 0
setp    hm2_7i76e.0.encoder.00.index-mask 0
setp    hm2_7i76e.0.encoder.00.index-mask-invert 0
setp    hm2_7i76e.0.encoder.00.scale  [SPINDLE_9]ENCODER_SCALE

net spindle-revs             <=   hm2_7i76e.0.encoder.00.position
net spindle-vel-fb-rps       <=   hm2_7i76e.0.encoder.00.velocity
net spindle-index-enable     <=>  hm2_7i76e.0.encoder.00.index-enable


# ---setup spindle control signals---

net spindle-speed-cmd-rps      <=  motion.spindle-speed-cmd-rps

net spindle-vel-cmd-rps        <=  motion.spindle-speed-out-rps
net spindle-vel-cmd-rps-abs    <=  motion.spindle-speed-out-rps-abs
net spindle-vel-cmd-rpm        <=  motion.spindle-speed-out
net spindle-vel-cmd-rpm-abs    <=  motion.spindle-speed-out-abs
net spindle-enable             <=  motion.spindle-on
net spindle-cw                 <=  motion.spindle-forward
net spindle-ccw                <=  motion.spindle-reverse
net spindle-brake              <=  motion.spindle-brake
net spindle-revs               =>  motion.spindle-revs
net spindle-at-speed           =>  motion.spindle-at-speed
net spindle-vel-fb-rps         =>  motion.spindle-speed-in
net spindle-index-enable      <=>  motion.spindle-index-enable

net spindle-orient 		<= motion.spindle-orient
net spindle-is-oriented 	=> motion.spindle-is-oriented
net spindle-locked 		<= motion.spindle-locked

# ---Setup spindle at speed signals---

sets spindle-at-speed true
The following user(s) said Thank You: Clive S

Please Log in or Create an account to join the conversation.

Time to create page: 0.177 seconds
Powered by Kunena Forum