GMOCCAPY spindle rpm issue
- santiagoe
- Topic Author
- Offline
- New Member
Less
More
- Posts: 14
- Thank you received: 0
28 Feb 2023 18:36 #265591
by santiagoe
GMOCCAPY spindle rpm issue was created by santiagoe
hi all, I am having an issue trying to use a folinn (fuling) BD600 VFD via RS485 with vfdmod, I copied the configuration given in this
thread
and it helped me to get it going to run the spindle CW, CCW and stopping, but I am having an issue with the set RPM, the spindle I am using is 800Hz 24000 RPM, everytime I execute Linuxcnc, the speed defaults to the maximum 800hz and it can not be modulated using the +- buttons (the bar moves but the speed is the same) and when I send a command like M03 S1000 or S10 the spindle will go to the maximum velocity and the VFD also to 800hz, lastly the feedback_bar and at_speed_led are not working not sure why, I am using 2.8.0 version on a raspberry pi 4.
vfd.hal
BD600.ini
CNC.ini
CNC.hal
custom_postgui.hal
also the VFD is configured with the correct parameters according to the next page in the thread I linked above, thank you in advance for your help.
vfd.hal
loadusr -W vfdmod BD600.ini --debug
net spindle-vel-cmd-rpm => vfdmod.spindle.rpm-in
net spindle-at-speed <= vfdmod.spindle.at-speed
net spindle-cw => vfdmod.control.run-forward
net spindle-ccw => vfdmod.control.run-reverse
BD600.ini
[Common]
MaxSpeedRPM=24000
MinSpeedRPM=100
AtSpeedThreshold=0.05
[RS485]
SlaveAddress=1
SerialDevice=/dev/ttyUSB0
BaudRate=9600
LoopDelay=500
ProtocolDelay=6
IsConnectedDelay=10
ConnectionErrorList=110
ConnectionDelay=500
[Control]
Address=0x1000
RunForwardValue=0x0001
RunReverseValue=0x0002
FaultResetValue=0x0007
StopValue=0x0006
[SpindleRpmIn]
FunctionCode=0x06
Address=0x3000
Multiplier=100
Divider=1
[SpindleRpmOut]
Address=0x3001
Multiplier=1
Divider=100
[freq-running]
FunctionCode=0x03
Address=0x3001
PinType=float
PinName=freq-running
Divider=1
[bus-voltage]
FunctionCode=0x03
Address=0x3002
PinType=float
PinName=bus-voltage
[output-voltage]
FunctionCode=0x03
Address=0x3003
PinType=float
PinName=output-voltage
[output-current]
FunctionCode=0x03
Address=0x3004
PinType=float
PinName=output-current
Divider=100
[output-torque]
FunctionCode=0x03
Address=0x3006
PinType=float
PinName=output-torque
[run-speed]
FunctionCode=0x03
Address=0x3007
PinType=float
PinName=run-speed
[spindle-load-speed]
FunctionCode=0x03
Address=0x300F
PinType=float
PinName=spindle-load-speed
[power-on-time]
FunctionCode=0x03
Address=0x301A
PinType=float
PinName=power-on-time
[spindle-run-time]
FunctionCode=0x03
Address=0x301B
PinType=float
PinName=spindle-run-time
[fault-code]
FunctionCode=0x03
Address=0x8000
PinType=float
PinName=fault-code
CNC.ini
[EMC]
MACHINE = CNC
DEBUG = 0
VERSION = 1.1
[DISPLAY]
DISPLAY = gmoccapy
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
MAX_FEED_OVERRIDE = 2.000000
MAX_SPINDLE_OVERRIDE = 1.000000
MIN_SPINDLE_OVERRIDE = 0.100000
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5
PROGRAM_PREFIX = /home/pi/linuxcnc/nc_files
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
POSITION_FEEDBACK = ACTUAL
DEFAULT_LINEAR_VELOCITY = 6.000000
MAX_LINEAR_VELOCITY = 25.000000
MIN_LINEAR_VELOCITY = 0.500000
DEFAULT_ANGULAR_VELOCITY = 12.000000
MAX_ANGULAR_VELOCITY = 180.000000
MIN_ANGULAR_VELOCITY = 1.666667
EDITOR = gedit
GEOMETRY = xyz
[HAL]
HALUI = halui
HALFILE = CNC.hal
HALFILE = vfd.hal
HALFILE = custom.hal
POSTGUI_HALFILE = custom_postgui.hal
POSTGUI_HALFILE = postgui_call_list.hal
SHUTDOWN = shutdown.hal
[SPINDLE_0]
P = 0
I = 0
D = 0
FF0 = 1
FF1 = 0
FF2 = 0
BIAS = 0
DEADBAND = 0
MAX_OUTPUT = 2000
CNC.hal
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
# ---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---
sets spindle-at-speed true
#******************************
# connect miscellaneous signals
#******************************
# ---HALUI signals---
net axis-select-x halui.axis.x.select
net jog-x-pos halui.axis.x.plus
net jog-x-neg halui.axis.x.minus
net jog-x-analog halui.axis.x.analog
net x-is-homed halui.joint.0.is-homed
net axis-select-y halui.axis.y.select
net jog-y-pos halui.axis.y.plus
net jog-y-neg halui.axis.y.minus
net jog-y-analog halui.axis.y.analog
net y-is-homed halui.joint.1.is-homed
net axis-select-z halui.axis.z.select
net jog-z-pos halui.axis.z.plus
net jog-z-neg halui.axis.z.minus
net jog-z-analog halui.axis.z.analog
net z-is-homed halui.joint.2.is-homed
net jog-selected-pos halui.axis.selected.plus
net jog-selected-neg halui.axis.selected.minus
net spindle-manual-cw halui.spindle.0.forward
net spindle-manual-ccw halui.spindle.0.reverse
net spindle-manual-stop halui.spindle.0.stop
net machine-is-on halui.machine.is-on
net jog-speed halui.axis.jog-speed
net MDI-mode halui.mode.is-mdi
custom_postgui.hal
net spindle-speed-fb <= gmoccapy.spindle_feedback_bar
net spindle-at-speed <= gmoccapy.spindle_at_speed_led
also the VFD is configured with the correct parameters according to the next page in the thread I linked above, thank you in advance for your help.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19463
- Thank you received: 6529
28 Feb 2023 18:39 #265594
by tommylight
Replied by tommylight on topic GMOCCAPY spindle rpm issue
No double posting.
The other topic deleted.
The other topic deleted.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23162
- Thank you received: 4860
03 Mar 2023 00:25 #265751
by andypugh
Replied by andypugh on topic GMOCCAPY spindle rpm issue
You have a pid for the spindle, but it seems to be unused, so it isn't that, I don't think.
Possibly the VFD expects a frequency input and you are passing RPM?
I don't know how to start Halshow ("show hal configuration") from Gnoccapy, but if there isn't a way to open it built-in, you can always start it with "halshow" at the command line.
That wll allow you to explore what values are on the various HAL pins, and you can trace the numbers through.
Possibly the VFD expects a frequency input and you are passing RPM?
I don't know how to start Halshow ("show hal configuration") from Gnoccapy, but if there isn't a way to open it built-in, you can always start it with "halshow" at the command line.
That wll allow you to explore what values are on the various HAL pins, and you can trace the numbers through.
Please Log in or Create an account to join the conversation.
- RobC
- Offline
- Junior Member
Less
More
- Posts: 25
- Thank you received: 5
03 Mar 2023 14:06 #265777
by RobC
Replied by RobC on topic GMOCCAPY spindle rpm issue
In BD600.ini change your rpm multipliers to 3 and 1 then 1 and 3 instead of 100. If that doesn't behave as expected try 30 instead of 100. My vfd is a 400hz / 24k rpm and my settings are 6 and 1, 1 and 6. When set correctly, the vfd at start up should show the frequency required for your minimum speed set in the ini file. I have my minimum set at 4800 rpm, so a frequency of 80 is where it starts by default.
[SpindleRpmIn]
FunctionCode=0x06
Address=0x3000
Multiplier=3
Divider=1
[SpindleRpmOut]
Address=0x3001
Multiplier=1
Divider=3
[SpindleRpmIn]
FunctionCode=0x06
Address=0x3000
Multiplier=3
Divider=1
[SpindleRpmOut]
Address=0x3001
Multiplier=1
Divider=3
Please Log in or Create an account to join the conversation.
- santiagoe
- Topic Author
- Offline
- New Member
Less
More
- Posts: 14
- Thank you received: 0
11 Mar 2023 06:54 #266378
by santiagoe
Replied by santiagoe on topic GMOCCAPY spindle rpm issue
hi, thank you for your suggestion, for example when I set like this:
[SpindleRpmIn]
FunctionCode=0x06
Address=0x3000
Multiplier=3
Divider=1
[SpindleRpmOut]
Address=0x3001
Multiplier=1
Divider=3
the VFD goes automatically to 24 Hz, which I think would be the maximum for this values, the way I calculated multiplier and divider was that I set the value of both to 1 and saw the value the VFD went up to, in this case it showed 8 Hz on the vfd, then I divided the theoretical max with the current maximum value I am getting so I would get the number I needed, so 800/8, this is why I choose 100 as multiplier, but in my case regardless of the multiplier and divider values, the VFD always goes to the max Hz possible, not to the minimum set as you mention, not sure how to accomplish this, may be you can share your configuration files to see if something is different please.
[SpindleRpmIn]
FunctionCode=0x06
Address=0x3000
Multiplier=3
Divider=1
[SpindleRpmOut]
Address=0x3001
Multiplier=1
Divider=3
the VFD goes automatically to 24 Hz, which I think would be the maximum for this values, the way I calculated multiplier and divider was that I set the value of both to 1 and saw the value the VFD went up to, in this case it showed 8 Hz on the vfd, then I divided the theoretical max with the current maximum value I am getting so I would get the number I needed, so 800/8, this is why I choose 100 as multiplier, but in my case regardless of the multiplier and divider values, the VFD always goes to the max Hz possible, not to the minimum set as you mention, not sure how to accomplish this, may be you can share your configuration files to see if something is different please.
Please Log in or Create an account to join the conversation.
- santiagoe
- Topic Author
- Offline
- New Member
Less
More
- Posts: 14
- Thank you received: 0
29 Apr 2023 04:20 #270163
by santiagoe
Replied by santiagoe on topic GMOCCAPY spindle rpm issue
Hello again, I managed to get the right Frequency on the VFD by using this values
but I am having an issue with the displayed RPM, in the picture attached you can see that it shows s50 RPM but the spindle is currently at 24000 RPM, I have tried to take look at halshow but I was not able to figure it out, in the picture you can also see the values of some pins on the halshow, any suggestions would be greatly appreciated, thank you.
[SpindleRpmIn]
FunctionCode=0x06
Address=0x3000
Multiplier=400
Divider=2
[SpindleRpmOut]
Address=0x3001
Multiplier=2
Divider=400
but I am having an issue with the displayed RPM, in the picture attached you can see that it shows s50 RPM but the spindle is currently at 24000 RPM, I have tried to take look at halshow but I was not able to figure it out, in the picture you can also see the values of some pins on the halshow, any suggestions would be greatly appreciated, thank you.
Please Log in or Create an account to join the conversation.
- santiagoe
- Topic Author
- Offline
- New Member
Less
More
- Posts: 14
- Thank you received: 0
29 Apr 2023 04:23 #270164
by santiagoe
Replied by santiagoe on topic GMOCCAPY spindle rpm issue
Attachments:
Please Log in or Create an account to join the conversation.
- rodw
- Away
- Platinum Member
Less
More
- Posts: 10785
- Thank you received: 3552
29 Apr 2023 08:10 #270171
by rodw
Replied by rodw on topic GMOCCAPY spindle rpm issue
Part of the problem is tha linuxcnc expects the speed command in revs per sec and VFDMOD outputs RPM so you need to scale it.
Something like this.
You also need to set the vfdmod SpindleRpmOut to spindle.0.speed-in
You might need another scale component or alter your vfdmod.ini
Something like this.
# Spindle output speed
loadrt scale names=scale_to_rps
addf scale_to_rps servo-thread
setp scale_to_rps.gain 0.01666667
net spindle-rpm-out vfdmod.spindle.rpm-out => scale_to_rps.in
net spindle_rps_out scale_to_rps.out
net spindle_rps_out => spindle.0.speed-in
You also need to set the vfdmod SpindleRpmOut to spindle.0.speed-in
You might need another scale component or alter your vfdmod.ini
Please Log in or Create an account to join the conversation.
Time to create page: 0.076 seconds