7i76e VFD, Spindle voltage inverted on reverse
- Robban
- Offline
- Junior Member
Less
More
- Posts: 34
- Thank you received: 2
03 Apr 2020 15:39 #162588
by Robban
7i76e VFD, Spindle voltage inverted on reverse was created by Robban
Hi, trying to setup my new 7i76e and i have got a problem.
When i run the spindle forward everything is ok and i will get +10v at m3s1700 and +0v at m3s1,
but if im running the spindle in reverse i will get +10v at m4s1 and +0v at m4s1700.
What am i doing wrong?
When i run the spindle forward everything is ok and i will get +10v at m3s1700 and +0v at m3s1,
but if im running the spindle in reverse i will get +10v at m4s1 and +0v at m4s1700.
What am i doing wrong?
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17869
- Thank you received: 4776
03 Apr 2020 15:51 - 03 Apr 2020 15:51 #162589
by PCW
Replied by PCW on topic 7i76e VFD, Spindle voltage inverted on reverse
This probably means you have the 7I76E spindle output pin wired (in hal)
to motions signed spindle speed pin, not motions absolute spindle speed pin
to motions signed spindle speed pin, not motions absolute spindle speed pin
Last edit: 03 Apr 2020 15:51 by PCW.
Please Log in or Create an account to join the conversation.
- Robban
- Offline
- Junior Member
Less
More
- Posts: 34
- Thank you received: 2
03 Apr 2020 16:00 #162590
by Robban
Replied by Robban on topic 7i76e VFD, Spindle voltage inverted on reverse
This is the spindle section i have in the hal file.
#*******************
# SPINDLE
#*******************
setp pid.s.Pgain [SPINDLE_0]P
setp pid.s.Igain [SPINDLE_0]I
setp pid.s.Dgain [SPINDLE_0]D
setp pid.s.bias [SPINDLE_0]BIAS
setp pid.s.FF0 [SPINDLE_0]FF0
setp pid.s.FF1 [SPINDLE_0]FF1
setp pid.s.FF2 [SPINDLE_0]FF2
setp pid.s.deadband [SPINDLE_0]DEADBAND
setp pid.s.maxoutput [SPINDLE_0]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 => pid.s.command
net spindle-vel-fb-rpm => pid.s.feedback
net spindle-output <= pid.s.output
# ---digital potentionmeter output signals/setup---
setp hm2_7i76e.0.7i76.0.0.spinout-minlim [SPINDLE_0]OUTPUT_MIN_LIMIT
setp hm2_7i76e.0.7i76.0.0.spinout-maxlim [SPINDLE_0]OUTPUT_MAX_LIMIT
setp hm2_7i76e.0.7i76.0.0.spinout-scalemax [SPINDLE_0]OUTPUT_SCALE
net spindle-output => hm2_7i76e.0.7i76.0.0.spinout
net spindle-enable => 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 0
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_0]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-vel-cmd-rps <= spindle.0.speed-out-rps
net spindle-vel-cmd-rps-abs <= spindle.0.speed-out-rps-abs
net spindle-vel-cmd-rpm <= spindle.0.speed-out
net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs
net spindle-enable <= spindle.0.on
net spindle-cw <= spindle.0.forward
net spindle-ccw <= spindle.0.reverse
net spindle-brake <= spindle.0.brake
net spindle-revs => spindle.0.revs
net spindle-at-speed => spindle.0.at-speed
net spindle-vel-fb-rps => spindle.0.speed-in
net spindle-index-enable <=> spindle.0.index-enable
# ---Setup spindle at speed signals---
net spindle-vel-cmd-rps => near.0.in1
net spindle-vel-fb-rps => near.0.in2
net spindle-at-speed <= near.0.out
setp near.0.scale 1.000000
setp near.0.difference 3.333333
# Use ACTUAL spindle velocity from spindle encoder
# spindle-velocity bounces around so we filter it with lowpass
# spindle-velocity is signed so we use absolute component to remove sign
# ACTUAL velocity is in RPS not RPM so we scale it.
setp scale.spindle.gain 60
setp lowpass.spindle.gain 1.000000
net spindle-vel-fb-rps => scale.spindle.in
net spindle-fb-rpm scale.spindle.out => abs.spindle.in
net spindle-fb-rpm-abs abs.spindle.out => lowpass.spindle.in
net spindle-fb-rpm-abs-filtered lowpass.spindle.out
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17869
- Thank you received: 4776
03 Apr 2020 16:03 #162591
by PCW
Replied by PCW on topic 7i76e VFD, Spindle voltage inverted on reverse
replacing
net spindle-vel-cmd-rpm => pid.s.command
with:
net spindle-vel-cmd-rpm-abs => pid.s.command
should fix the issue
net spindle-vel-cmd-rpm => pid.s.command
with:
net spindle-vel-cmd-rpm-abs => pid.s.command
should fix the issue
Please Log in or Create an account to join the conversation.
- Robban
- Offline
- Junior Member
Less
More
- Posts: 34
- Thank you received: 2
03 Apr 2020 16:12 #162593
by Robban
Replied by Robban on topic 7i76e VFD, Spindle voltage inverted on reverse
Thank you, it works now
Dont know why it happened, i used the pncconf wizard.
Must have done something wrong.
Dont know why it happened, i used the pncconf wizard.
Must have done something wrong.
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17869
- Thank you received: 4776
03 Apr 2020 16:30 - 03 Apr 2020 16:33 #162594
by PCW
Replied by PCW on topic 7i76e VFD, Spindle voltage inverted on reverse
I think its a pncconf bug, but a complete fix is a bit tricky
_if_ the user implements PID spindle speed control
The reason its tricky is because if the PID command is
absolute spindle speed in RPM, the PID feedback needs to
be commensurate (so also absolute spindle speed in RPM)
This feedback signal needs to be created from the signed
speed in RPS (or signed speed in RPM on the latest
LinuxCNC versions)
_if_ the user implements PID spindle speed control
The reason its tricky is because if the PID command is
absolute spindle speed in RPM, the PID feedback needs to
be commensurate (so also absolute spindle speed in RPM)
This feedback signal needs to be created from the signed
speed in RPS (or signed speed in RPM on the latest
LinuxCNC versions)
Last edit: 03 Apr 2020 16:33 by PCW.
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
Time to create page: 0.056 seconds