Huanyang VFD and Mesa 7i76e stuck at 6000 rpm

More
21 Jul 2020 10:40 - 21 Jul 2020 10:40 #175326 by Stran_ge
I edited the Spindle part of my hal as following:
loadrt timedelay count=1
loadrt lincurve personality=4
addf timedelay.0 servo-thread
addf lincurve.0 servo-thread
setp timedelay.0.on-delay 4
setp timedelay.0.off-delay 0


#*******************
#  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

# ---auto rpm: 1-6000 = 6000 / 24000 max
setp lincurve.0.x-val-00 0
setp lincurve.0.y-val-00 0
setp lincurve.0.x-val-01 1
setp lincurve.0.y-val-01 6000
setp lincurve.0.x-val-02 6000
setp lincurve.0.y-val-02 6000
setp lincurve.0.x-val-03 24000
setp lincurve.0.y-val-03 24000

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_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

# ---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-pre		       <=  spindle.0.speed-out-abs		lincurve.0.in
net spindle-vel-cmd-rpm-abs    <=  lincurve.0.out
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			timedelay.0.out
net spindle-vel-fb-rps         =>  spindle.0.speed-in
net spindle-index-enable      <=>  spindle.0.index-enable

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

#sets spindle-at-speed true

When i start my spindle it starts at 9xxx rpm instead of 6000 when i type M3 S24000 i only reach 22xxx rpm and for everything else the values are higher than what i typed in.


This is the Spindle part of my Ini:
[SPINDLE_0]
P = 0.0
I = 0.0
D = 0.0
FF0 = 1.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 24000.0		
OUTPUT_SCALE = 26000
OUTPUT_MIN_LIMIT = 0
OUTPUT_MAX_LIMIT = 24000


I will attach the full hal and ini aswell.

File Attachment:

File Name: configv5_2...7-21.hal
File Size:13 KB

File Attachment:

File Name: configv5_2...7-21.ini
File Size:5 KB
Attachments:
Last edit: 21 Jul 2020 10:40 by Stran_ge.

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

More
21 Jul 2020 13:43 - 21 Jul 2020 14:35 #175334 by Stran_ge
I cant be doing everything wrong here :( , is everyone else controlling their vfd via modbus ??
Last edit: 21 Jul 2020 14:35 by Stran_ge.

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

More
21 Jul 2020 14:52 #175338 by PCW
It sounds like the drive runs at 6000 RPM for 0V input
if so the lincurve values are wrong since you want a
Y value (output) of 0 at a commanded RPM of 6000

Also if you have a output scale of 26000 and a maxoutput of 24000
you can never get full output (these should both be left at 24000)

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

More
21 Jul 2020 15:12 - 21 Jul 2020 15:12 #175340 by Stran_ge
the thing is at m3 s1 where it shouldnt be turning i measure 0.03v and get perfect 6000 rpm
at m3 s6000 i get 2.3 v and 10300 rpm and at m3 s7000 i get 2.7 volt and 11000 rpm

i already changed that output scale back to 24000 but it didnt change anything
Last edit: 21 Jul 2020 15:12 by Stran_ge.

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

More
21 Jul 2020 15:19 #175341 by PCW
Right, so your linscale values are wrong,
Y should be 0 when X is 6000, you have that backwards

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

More
21 Jul 2020 15:26 #175343 by Stran_ge
so it should be this way:

# ---auto rpm: 1-6000 = 6000 / 24000 max
setp lincurve.0.x-val-00 0
setp lincurve.0.y-val-00 0
setp lincurve.0.x-val-01 6000
setp lincurve.0.y-val-01 0
setp lincurve.0.x-val-02 6000
setp lincurve.0.y-val-02 6000
setp lincurve.0.x-val-03 24000
setp lincurve.0.y-val-03 24000

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

More
21 Jul 2020 15:31 - 21 Jul 2020 15:32 #175344 by PCW
Point 02 is wrong and will cause you to get about 2.5V with a 6000 RPM command instead of 0V

Do you get 24000 RPM at 10V?
Last edit: 21 Jul 2020 15:32 by PCW.

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

More
21 Jul 2020 15:34 - 21 Jul 2020 15:38 #175345 by Stran_ge
the maximum is 23xxx rpm at 9.1 volt
Last edit: 21 Jul 2020 15:38 by Stran_ge.

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

More
21 Jul 2020 15:40 #175346 by PCW
So you really only need 3 points for lincurve (you could actually do the same thing with the scale component since you are just offsetting the analog output by 6000 )

setp lincurve.0.x-val-00 0
setp lincurve.0.y-val-00 0
setp lincurve.0.x-val-01 6000
setp lincurve.0.y-val-01 0
setp lincurve.0.x-val-02 24000
setp lincurve.0.y-val-02 24000
The following user(s) said Thank You: Stran_ge

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

More
21 Jul 2020 15:48 - 21 Jul 2020 15:51 #175347 by Stran_ge
i changed the hal part and now when i start the spindle it starts at 6000 but i cant change the speed anymore.

I can start stop and change direction nothing else.

The Output voltage stays the same whatever i input via m3 sxxxxx


i appreciate the help so far, im trying to get this working correctly for the past 2 days
Last edit: 21 Jul 2020 15:51 by Stran_ge.

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

Moderators: cmorley
Time to create page: 0.081 seconds
Powered by Kunena Forum