Charge Amp Frequency
25 Oct 2014 04:38 #52369
by SteveT
Charge Amp Frequency was created by SteveT
Hi, I am setting up a system that needs a 12KHz signal to trigger the charge amp circuit and I am not sure of the best method of achieving 12KHz. As I understand it LinuxCNC uses 50% of the base thread to give the charge amp frequency or I can use pwmgen to force the servo thread to 12KHz.
The question is which is the best way to turn on the charge amp?
Steve
The question is which is the best way to turn on the charge amp?
Steve
Please Log in or Create an account to join the conversation.
25 Oct 2014 15:48 #52383
by ArcEye
Replied by ArcEye on topic Charge Amp Frequency
Hi
I presume you mean charge pump?
This is the doc page www.linuxcnc.org/docs/devel/html/man/man9/charge_pump.9.html
If you cannot reduce your base thread to suit, without affecting your performance and triggering errors, you can create another thread which solely]
runs the charge pump.
See this thread for details
www.linuxcnc.org/index.php/english/forum...el-port-config#40553
(albeit in that thread the poster had the reverse problem of the charge pump frequency being too high on a low latency base thread setting)
regards
I presume you mean charge pump?
This is the doc page www.linuxcnc.org/docs/devel/html/man/man9/charge_pump.9.html
If you cannot reduce your base thread to suit, without affecting your performance and triggering errors, you can create another thread which solely]
runs the charge pump.
See this thread for details
www.linuxcnc.org/index.php/english/forum...el-port-config#40553
(albeit in that thread the poster had the reverse problem of the charge pump frequency being too high on a low latency base thread setting)
regards
The following user(s) said Thank You: SteveT
Please Log in or Create an account to join the conversation.
25 Oct 2014 18:18 #52385
by SteveT
Replied by SteveT on topic Charge Amp Frequency
Hi
Yes it is Charge Pump
I can follow the logic of setting up a new thread to give the 12Khz signal, but I am struggling on how
to modify the ini and hal files. is it possible for you to give a clear example of what I need to do.
Steve
Yes it is Charge Pump
I can follow the logic of setting up a new thread to give the 12Khz signal, but I am struggling on how
to modify the ini and hal files. is it possible for you to give a clear example of what I need to do.
Steve
Please Log in or Create an account to join the conversation.
25 Oct 2014 18:26 - 25 Oct 2014 18:28 #52386
by ArcEye
Replied by ArcEye on topic Charge Amp Frequency
Hi
Yes, the second post of the thread has the hal and ini file lines I used to demonstrate the thread creation
www.linuxcnc.org/index.php/english/forum...el-port-config#40554
The speed used will not be right, you need to calculate that as shown in the doc page
EDIT - remembering that the fastest thread must be declared first
regards
Yes, the second post of the thread has the hal and ini file lines I used to demonstrate the thread creation
www.linuxcnc.org/index.php/english/forum...el-port-config#40554
The speed used will not be right, you need to calculate that as shown in the doc page
EDIT - remembering that the fastest thread must be declared first
regards
Last edit: 25 Oct 2014 18:28 by ArcEye.
The following user(s) said Thank You: SteveT
Please Log in or Create an account to join the conversation.
30 Oct 2014 01:07 #52551
by SteveT
Replied by SteveT on topic Charge Amp Frequency
Hi Sorry about being a bit slow on this, but I am starting from the ground floor with Hal. I have now read the Hal instructions and the past post now make some sense.
So to get my 12Khz signal I have included the lines given but when staring up LinuxCNC it crashes. Can someone please check over the attached .hal and .ini files
and point me in the right direction please.
Steve
So to get my 12Khz signal I have included the lines given but when staring up LinuxCNC it crashes. Can someone please check over the attached .hal and .ini files
and point me in the right direction please.
Steve
Please Log in or Create an account to join the conversation.
30 Oct 2014 01:37 #52554
by PCW
Replied by PCW on topic Charge Amp Frequency
addf charge-pump base-thread
probably should be
addf charge_pump base-thread
Note, its unlikely that linuxcnc crashed, it probably just aborted on a syntax error
when it does this, the offending hal line is printed (if started from a terminal)
probably should be
addf charge_pump base-thread
Note, its unlikely that linuxcnc crashed, it probably just aborted on a syntax error
when it does this, the offending hal line is printed (if started from a terminal)
The following user(s) said Thank You: SteveT
Please Log in or Create an account to join the conversation.
30 Oct 2014 01:38 #52555
by ArcEye
You have declared threads completely out of order
The names don't really matter, but the speed must increment upwards.
Use base_thread, servo_thread as the 2 fastest threads because the names are hard coded and THEN create a third slower thread.
That is what I did in the example for that very reason.
You need to substitute thread names in the hal file, but that is just a cut and paste
regards
Replied by ArcEye on topic Charge Amp Frequency
EDIT - remembering that the fastest thread must be declared first
You have declared threads completely out of order
The names don't really matter, but the speed must increment upwards.
Use base_thread, servo_thread as the 2 fastest threads because the names are hard coded and THEN create a third slower thread.
That is what I did in the example for that very reason.
You need to substitute thread names in the hal file, but that is just a cut and paste
regards
The following user(s) said Thank You: SteveT
Please Log in or Create an account to join the conversation.
30 Oct 2014 17:38 #52570
by ArcEye
Replied by ArcEye on topic Charge Amp Frequency
I think these 2 files are just about right, but can't test them properly, without hacking them a lot to run as a sim, which won't be the same
See how you get on, run linuxcnc from a terminal and if you get an error, you will get the file and line number that threw it.
regards
See how you get on, run linuxcnc from a terminal and if you get an error, you will get the file and line number that threw it.
regards
The following user(s) said Thank You: SteveT
Please Log in or Create an account to join the conversation.
30 Oct 2014 20:08 #52579
by andypugh
Replied by andypugh on topic Charge Amp Frequency
I would be surprised if the 12kHz charge amp wouldn't work at 10kHz (ie, run it in the 50,000nS base thread)
Have you tried that?
Is 50,000nS absolutely as low as the base thread time can go?
Have you tried that?
Is 50,000nS absolutely as low as the base thread time can go?
The following user(s) said Thank You: SteveT
Please Log in or Create an account to join the conversation.
31 Oct 2014 00:08 - 31 Oct 2014 00:19 #52593
by SteveT
Replied by SteveT on topic Charge Amp Frequency
Hi
I tried using the charge pump on the base thread at 50000us with no luck.
Tried ArcEye's Hal and ini files and I can see the errors I was making but when running LinukCNC I get the errors below.
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-3.4-9-rtai-686-pae/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/steven/linuxcnc/configs/CP_my-mill_test'
Machine configuration file is 'CP_my-mill_test.ini'
INIFILE=/home/steven/linuxcnc/configs/CP_my-mill_test/CP_my-mill_test.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
Shutting down and cleaning up LinuxCNC...
Killing task linuxcncsvr, PID=6198
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Debug file information:
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
Error: could not insert module /usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/threads.ko: Unknown symbol in module
CP_my-mill_test.hal:11: exit value: 1
CP_my-mill_test.hal:11: insmod failed, returned -1
See the output of 'dmesg' for more information.
6198
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
On the positive side I got all the mechanical parts installed on the mill and all 3 axis work well under a basic hal config
This is a very steep learning curve for me but with your help I am sure I will get to the top
Steve
I tried using the charge pump on the base thread at 50000us with no luck.
Tried ArcEye's Hal and ini files and I can see the errors I was making but when running LinukCNC I get the errors below.
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-3.4-9-rtai-686-pae/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/steven/linuxcnc/configs/CP_my-mill_test'
Machine configuration file is 'CP_my-mill_test.ini'
INIFILE=/home/steven/linuxcnc/configs/CP_my-mill_test/CP_my-mill_test.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
Shutting down and cleaning up LinuxCNC...
Killing task linuxcncsvr, PID=6198
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Debug file information:
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
Error: could not insert module /usr/realtime-3.4-9-rtai-686-pae/modules/linuxcnc/threads.ko: Unknown symbol in module
CP_my-mill_test.hal:11: exit value: 1
CP_my-mill_test.hal:11: insmod failed, returned -1
See the output of 'dmesg' for more information.
6198
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
On the positive side I got all the mechanical parts installed on the mill and all 3 axis work well under a basic hal config
This is a very steep learning curve for me but with your help I am sure I will get to the top
Steve
Last edit: 31 Oct 2014 00:19 by SteveT.
Please Log in or Create an account to join the conversation.
Time to create page: 0.076 seconds