- Configuring LinuxCNC
- Configuration Tools
- StepConf Wizard
- Spindle At Speed not working , different units
×
Forum Header
Spindle At Speed not working , different units
- juergen-home
- Offline
- New Member
Less
More
- Posts: 17
- Thank you received: 3
03 Oct 2014 15:05 #51745
by juergen-home
Spindle At Speed not working , different units was created by juergen-home
I use version 2.6.3 like you see in the picture attatched.
Stepconf Wizard generated this code with the exeption of my change:
comment out: #net spindle-velocity => near.0.in2
put in : net spindle-fb-filtered-abs-rpm => near.0.in2
Spindle At Speed was not working because it looked like the 2 values for the near function were "spindle-cmd" in rev/min and "spindle-velocity" in rev/s.
To find out If it worked I made the change mentioned above. In this work around don't work for reverse spindle motion because of "abs". Don't know the right value to put in with that filtered function.
Also attached my config files.
Stepconf Wizard generated this code with the exeption of my change:
comment out: #net spindle-velocity => near.0.in2
put in : net spindle-fb-filtered-abs-rpm => near.0.in2
Spindle At Speed was not working because it looked like the 2 values for the near function were "spindle-cmd" in rev/min and "spindle-velocity" in rev/s.
To find out If it worked I made the change mentioned above. In this work around don't work for reverse spindle motion because of "abs". Don't know the right value to put in with that filtered function.
Also attached my config files.
Please Log in or Create an account to join the conversation.
03 Oct 2014 16:40 #51747
by cncbasher
Replied by cncbasher on topic Spindle At Speed not working , different units
try
net spindle-vel-cmd-rps => near.0.in1
net spindle-vel-fb =>near.0.in2
with
net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
net spindle-vel-fb <= motion.spindle-speed-in
net spindle-vel-cmd-rps => near.0.in1
net spindle-vel-fb =>near.0.in2
with
net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
net spindle-vel-fb <= motion.spindle-speed-in
Please Log in or Create an account to join the conversation.
- juergen-home
- Offline
- New Member
Less
More
- Posts: 17
- Thank you received: 3
04 Oct 2014 00:27 - 04 Oct 2014 00:29 #51764
by juergen-home
Replied by juergen-home on topic Spindle At Speed not working , different units
I tried this changes, but there came an error message.
I'm not shure if I did it right.
# Benutzerdefinierte HAL-Anweisungen können nachfolgend angegeben werden
# Die Befehle in dieser Datei werden nach der AXIS GUI (und PyVCP-Panel) ausgeführt.
# **** Setup of spindle speed display using pyvcp -START ****
# **** 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.0.gain 60
setp lowpass.0.gain 0.003
net spindle-velocity => lowpass.0.in
net spindle-fb-filtered-rps lowpass.0.out => abs.0.in
net spindle-fb-filtered-abs-rps abs.0.out => scale.0.in
net spindle-fb-filtered-abs-rpm scale.0.out => pyvcp.spindle-speed
#new 2 lines
net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
net spindle-vel-fb <= motion.spindle-speed-in
#new 2 lines
net spindle-vel-cmd-rps => near.0.in1
net spindle-vel-fb =>near.0.in2
net spindle-at-speed <= near.0.out
setp near.0.scale 1.5
net spindle-at-speed => pyvcp.spindle-at-speed-led
.
Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/realtime-2.6.32-122-rtai/modules/linuxcnc
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/share/linuxcnc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.5
LINUXCNC - 2.6.3
Machine configuration directory is '/home/linuxcnc/linuxcnc/configs/SX3L'
Machine configuration file is 'SX3L.ini'
INIFILE=/home/linuxcnc/linuxcnc/configs/SX3L/SX3L.ini
PARAMETER_FILE=linuxcnc.var
TASK=milltask
HALUI=halui
DISPLAY=axis
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
Starting TASK program: milltask
Starting DISPLAY program: axis
Shutting down and cleaning up LinuxCNC...
Killing task linuxcncsvr, PID=4535
Killing task milltask, PID=4593
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Debug file information:
custom_postgui.hal:19: Pin 'motion.spindle-speed-in' was already linked to signal 'spindle-velocity'
4535
PID TTY STAT TIME COMMAND
4593
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
Kernel message information:
[ 1736.219703] I-pipe: Domain RTAI registered.
[ 1736.219714] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[ 1736.219718] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[ 1736.219725] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 1736.219728] PIPELINE layers:
[ 1736.219732] efe4ae20 9ac15d93 RTAI 200
[ 1736.219736] c085cb20 0 Linux 100
[ 1736.247979] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 1736.248476] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 1736.248483] RTAI[sched]: hard timer type/freq = APIC/12499638(Hz); default timing: periodic; linear timed lists.
[ 1736.248487] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 3000377000 hz.
[ 1736.248491] RTAI[sched]: timer setup = 999 ns, resched latency = 2943 ns.
[ 1736.248635] RTAI[usi]: enabled.
[ 1736.345636] RTAI[math]: loaded.
[ 1736.450276] config string '0x378 out 0xdfe0 out'
[ 1741.926993] RTAI[math]: unloaded.
[ 1741.996096] SCHED releases registered named ALIEN RTGLBH
[ 1742.013150] RTAI[malloc]: unloaded.
[ 1742.112017] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 1742.116779] I-pipe: Domain RTAI unregistered.
[ 1742.116791] RTAI[hal]: unmounted.
After a bit try and error I skiped out the abs part (oh I forgott to change the ..abs.. name)
# Benutzerdefinierte HAL-Anweisungen können nachfolgend angegeben werden
# Die Befehle in dieser Datei werden nach der AXIS GUI (und PyVCP-Panel) ausgeführt.
# **** Setup of spindle speed display using pyvcp -START ****
# **** 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.0.gain 60
setp lowpass.0.gain 0.010000
net spindle-velocity => lowpass.0.in
net spindle-fb-filtered-rps lowpass.0.out => scale.0.in
#net spindle-fb-filtered-rps lowpass.0.out => abs.0.in
net spindle-fb-filtered-abs-rpm scale.0.out => pyvcp.spindle-speed
#new 2 lines
#net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
#net spindle-vel-fb <= motion.spindle-speed-in
# **** set up spindle at speed indicator ****
net spindle-cmd => near.0.in1
net spindle-fb-filtered-abs-rpm => near.0.in2
#new 2 lines
#net spindle-vel-cmd-rps => near.0.in1
#net spindle-vel-fb => near.0.in2
net spindle-at-speed <= near.0.out
setp near.0.scale 1.500000
net spindle-at-speed => pyvcp.spindle-at-speed-led
so I only had to change the custompanel.xlm to show negative values
<?xml version='1.0' encoding='UTF-8'?>
<pyvcp>
<vbox>
<relief>RIDGE</relief>
<bd>1</bd>
<label>
<text>"Spindle Speed:"</text>
<font>("Helvetica",20)</font>
</label>
<bar>
<halpin>"spindle-speed"</halpin>
<min_>-1750</min_>
<max_>1750</max_>
</bar>
<label>
<text>"Spindle-At-Speed:"</text>
<font>("Helvetica",20)</font>
</label>
<hbox>
<label>
<text>" "</text>
<font>("Helvetica",20)</font>
</label>
<led>
<halpin>"spindle-at-speed-led"</halpin>
<size>30</size>
<on_color>"green"</on_color>
<off_color>"red"</off_color>
</led>
</hbox>
</vbox>
</pyvcp>
For the first I shipped around that problem.
I'm not shure if I did it right.
Warning: Spoiler!
# Benutzerdefinierte HAL-Anweisungen können nachfolgend angegeben werden
# Die Befehle in dieser Datei werden nach der AXIS GUI (und PyVCP-Panel) ausgeführt.
# **** Setup of spindle speed display using pyvcp -START ****
# **** 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.0.gain 60
setp lowpass.0.gain 0.003
net spindle-velocity => lowpass.0.in
net spindle-fb-filtered-rps lowpass.0.out => abs.0.in
net spindle-fb-filtered-abs-rps abs.0.out => scale.0.in
net spindle-fb-filtered-abs-rpm scale.0.out => pyvcp.spindle-speed
#new 2 lines
net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
net spindle-vel-fb <= motion.spindle-speed-in
#new 2 lines
net spindle-vel-cmd-rps => near.0.in1
net spindle-vel-fb =>near.0.in2
net spindle-at-speed <= near.0.out
setp near.0.scale 1.5
net spindle-at-speed => pyvcp.spindle-at-speed-led
.
Warning: Spoiler!
Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/realtime-2.6.32-122-rtai/modules/linuxcnc
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/share/linuxcnc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.5
LINUXCNC - 2.6.3
Machine configuration directory is '/home/linuxcnc/linuxcnc/configs/SX3L'
Machine configuration file is 'SX3L.ini'
INIFILE=/home/linuxcnc/linuxcnc/configs/SX3L/SX3L.ini
PARAMETER_FILE=linuxcnc.var
TASK=milltask
HALUI=halui
DISPLAY=axis
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
Starting TASK program: milltask
Starting DISPLAY program: axis
Shutting down and cleaning up LinuxCNC...
Killing task linuxcncsvr, PID=4535
Killing task milltask, PID=4593
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Debug file information:
custom_postgui.hal:19: Pin 'motion.spindle-speed-in' was already linked to signal 'spindle-velocity'
4535
PID TTY STAT TIME COMMAND
4593
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
Kernel message information:
[ 1736.219703] I-pipe: Domain RTAI registered.
[ 1736.219714] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[ 1736.219718] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[ 1736.219725] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 1736.219728] PIPELINE layers:
[ 1736.219732] efe4ae20 9ac15d93 RTAI 200
[ 1736.219736] c085cb20 0 Linux 100
[ 1736.247979] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 1736.248476] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 1736.248483] RTAI[sched]: hard timer type/freq = APIC/12499638(Hz); default timing: periodic; linear timed lists.
[ 1736.248487] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 3000377000 hz.
[ 1736.248491] RTAI[sched]: timer setup = 999 ns, resched latency = 2943 ns.
[ 1736.248635] RTAI[usi]: enabled.
[ 1736.345636] RTAI[math]: loaded.
[ 1736.450276] config string '0x378 out 0xdfe0 out'
[ 1741.926993] RTAI[math]: unloaded.
[ 1741.996096] SCHED releases registered named ALIEN RTGLBH
[ 1742.013150] RTAI[malloc]: unloaded.
[ 1742.112017] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 1742.116779] I-pipe: Domain RTAI unregistered.
[ 1742.116791] RTAI[hal]: unmounted.
After a bit try and error I skiped out the abs part (oh I forgott to change the ..abs.. name)
Warning: Spoiler!
# Benutzerdefinierte HAL-Anweisungen können nachfolgend angegeben werden
# Die Befehle in dieser Datei werden nach der AXIS GUI (und PyVCP-Panel) ausgeführt.
# **** Setup of spindle speed display using pyvcp -START ****
# **** 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.0.gain 60
setp lowpass.0.gain 0.010000
net spindle-velocity => lowpass.0.in
net spindle-fb-filtered-rps lowpass.0.out => scale.0.in
#net spindle-fb-filtered-rps lowpass.0.out => abs.0.in
net spindle-fb-filtered-abs-rpm scale.0.out => pyvcp.spindle-speed
#new 2 lines
#net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
#net spindle-vel-fb <= motion.spindle-speed-in
# **** set up spindle at speed indicator ****
net spindle-cmd => near.0.in1
net spindle-fb-filtered-abs-rpm => near.0.in2
#new 2 lines
#net spindle-vel-cmd-rps => near.0.in1
#net spindle-vel-fb => near.0.in2
net spindle-at-speed <= near.0.out
setp near.0.scale 1.500000
net spindle-at-speed => pyvcp.spindle-at-speed-led
so I only had to change the custompanel.xlm to show negative values
Warning: Spoiler!
<?xml version='1.0' encoding='UTF-8'?>
<pyvcp>
<vbox>
<relief>RIDGE</relief>
<bd>1</bd>
<label>
<text>"Spindle Speed:"</text>
<font>("Helvetica",20)</font>
</label>
<bar>
<halpin>"spindle-speed"</halpin>
<min_>-1750</min_>
<max_>1750</max_>
</bar>
<label>
<text>"Spindle-At-Speed:"</text>
<font>("Helvetica",20)</font>
</label>
<hbox>
<label>
<text>" "</text>
<font>("Helvetica",20)</font>
</label>
<led>
<halpin>"spindle-at-speed-led"</halpin>
<size>30</size>
<on_color>"green"</on_color>
<off_color>"red"</off_color>
</led>
</hbox>
</vbox>
</pyvcp>
For the first I shipped around that problem.
Last edit: 04 Oct 2014 00:29 by juergen-home.
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Configuration Tools
- StepConf Wizard
- Spindle At Speed not working , different units
Time to create page: 0.076 seconds