Hal, twopasses and ethercat lcec
24 Jan 2019 02:42 #124707
by Nico2017
Hal, twopasses and ethercat lcec was created by Nico2017
Hi,
I have been trying to use the twopass feature of hal ( linuxcnc.org/docs/html/hal/twopass.html ) to get an easier to develop and debug file architecture and hal code. However it does not seem to function with the ethercat component
My files project work fine when not using two passes and when I go into twopasses option, moving the loadrt of the POSTGUI_HAFILE into a HALFILE called before I got:
twopass:found ./postgui_load_hal.hal
HAL: ERROR: bad position: 0
twopass: Error in file ./lam-v1.hal:
addf failed
Note: Using POSIX realtime
LCEC: lcec_conf is not loaded
lcec: rtapi_app_main: Invalid argument (-22)
twopass: load_the_modules cmd=<orig_loadrt lcec>
waitpid failed /usr/bin/rtapi_app lcec
/usr/bin/rtapi_app exited without becoming ready
insmod for lcec failed, returned -1
Note: Using POSIX realtime
HAL: ERROR: function 'lcec.read-all' not found
twopass: Error in file ./lam-v1.hal:
addf failed
I think the issue can come from those lines:
loadusr -W lcec_conf lam-ethercat-v1.xml
loadrt lcec
addf lcec.read-all servo-thread
addf lcec.write-all servo-thread
loaded in my first HALFILE which might need to be moved around if using twopasses.
Any rules or recommendation to make the hal and lcec ethercat working with twopasses option of HAL?
Thank you,
Nicolas
I have been trying to use the twopass feature of hal ( linuxcnc.org/docs/html/hal/twopass.html ) to get an easier to develop and debug file architecture and hal code. However it does not seem to function with the ethercat component
My files project work fine when not using two passes and when I go into twopasses option, moving the loadrt of the POSTGUI_HAFILE into a HALFILE called before I got:
twopass:found ./postgui_load_hal.hal
HAL: ERROR: bad position: 0
twopass: Error in file ./lam-v1.hal:
addf failed
Note: Using POSIX realtime
LCEC: lcec_conf is not loaded
lcec: rtapi_app_main: Invalid argument (-22)
twopass: load_the_modules cmd=<orig_loadrt lcec>
waitpid failed /usr/bin/rtapi_app lcec
/usr/bin/rtapi_app exited without becoming ready
insmod for lcec failed, returned -1
Note: Using POSIX realtime
HAL: ERROR: function 'lcec.read-all' not found
twopass: Error in file ./lam-v1.hal:
addf failed
I think the issue can come from those lines:
loadusr -W lcec_conf lam-ethercat-v1.xml
loadrt lcec
addf lcec.read-all servo-thread
addf lcec.write-all servo-thread
loaded in my first HALFILE which might need to be moved around if using twopasses.
Any rules or recommendation to make the hal and lcec ethercat working with twopasses option of HAL?
Thank you,
Nicolas
Please Log in or Create an account to join the conversation.
24 Jan 2019 03:45 #124710
by dgarrett
Replied by dgarrett on topic Hal, twopasses and ethercat lcec
I'm not familiar with lcec and cannot guess what is in a
configuration's ini and hal files if they are not posted.
This is a rare error:
this error is found in src/hal/hal_lib.c
Ref for 2.7: github.com/LinuxCNC/linuxcnc/blob/2.7/src/hal/hal_lib.c#L1997
'bad position' refers to use of addf with a seldom used 'position'
parameter (having a value of 0 in the reported case):
A quick test shows using addf with position 0 is *never* allowed
(not a twopass issue) so that is likely a secondary error.
Rereading, the hal_lib.c codes states that 'zero is not
allowed'
Yes, I'm guessing this message indicates the problem:
This is likely a consequent error:
It says clearly that an attempt is made to load a
non-existent function named 'lcec.read-all"
So I would suggest running halrun (cd to the ini directory)
by itself and verifying the commands:
and
work independent of LinuxCNC -- e.g., verify that
you configure so that there is an executable named
'lcec_conf' that is in the PATH and exports a hal
component named 'lcec_conf'. Similarly, a module
named lcec.so or.ko must be in the expected location.
It is also probably necessary that a file named
lam-ethercat-v1.xml is in the ini directory since a fullpath
is not shown.
As a guess, it may be the lcec_conf is not in the PATH
Test if its properly found using:
I can't help anymore unless you post a complete
configuration -- a tar or zip file of the directory.
Also post the output of the command 'linuxcnc_info'
I don't understand how the non-realtime program 'lcec_conf'
requested with 'loadusr' relates to the realtime
module 'lcec'. There may be a timing race if one
depends on the other.
#
NOTE: The master branch (2.8~pre) includes provisions for
excluding problematic halfiles in order to isolate
problems or handle loadrt lines that are foreign to
the usual parameter-specifying methods.
linuxcnc.org/docs/devel/html/hal/twopass...#_exluding_hal_files
linuxcnc.org/docs/devel/html/hal/twopass.html
Ref: github.com/LinuxCNC/linuxcnc/commit/a7ca8053a
configuration's ini and hal files if they are not posted.
This is a rare error:
twopass:found ./postgui_load_hal.hal
HAL: ERROR: bad position: 0
twopass: Error in file ./lam-v1.hal:
addf failed
this error is found in src/hal/hal_lib.c
if (position == 0) {
/* zero is not allowed */
rtapi_mutex_give(&(hal_data->mutex));
rtapi_print_msg(RTAPI_MSG_ERR, "HAL: ERROR: bad position: 0\n");
return -EINVAL;
}
Ref for 2.7: github.com/LinuxCNC/linuxcnc/blob/2.7/src/hal/hal_lib.c#L1997
'bad position' refers to use of addf with a seldom used 'position'
parameter (having a value of 0 in the reported case):
$ halrun
halcmd: help addf
addf functname threadname [position]
Adds function 'functname' to thread 'threadname'. If
'position' is specified, adds the function to that spot
in the thread, otherwise adds it to the end. Negative
'position' means position with respect to the end of the
thread. For example '1' is start of thread, '-1' is the
end of the thread, '-3' is third from the end.
A quick test shows using addf with position 0 is *never* allowed
(not a twopass issue) so that is likely a secondary error.
Rereading, the hal_lib.c codes states that 'zero is not
allowed'
I think the issue can come from those lines:
loadusr -W lcec_conf lam-ethercat-v1.xml
loadrt lcec
Yes, I'm guessing this message indicates the problem:
LCEC: lcec_conf is not loaded
lcec: rtapi_app_main: Invalid argument (-22)
This is likely a consequent error:
HAL: ERROR: function 'lcec.read-all' not found
twopass: Error in file ./lam-v1.hal:
addf failed
It says clearly that an attempt is made to load a
non-existent function named 'lcec.read-all"
So I would suggest running halrun (cd to the ini directory)
by itself and verifying the commands:
loadusr -W lcec_conf lam-ethercat-v1.xml
loadrt lcec with_its_required_parms_if_any
work independent of LinuxCNC -- e.g., verify that
you configure so that there is an executable named
'lcec_conf' that is in the PATH and exports a hal
component named 'lcec_conf'. Similarly, a module
named lcec.so or.ko must be in the expected location.
It is also probably necessary that a file named
lam-ethercat-v1.xml is in the ini directory since a fullpath
is not shown.
As a guess, it may be the lcec_conf is not in the PATH
Test if its properly found using:
$ which lcec_conf
I can't help anymore unless you post a complete
configuration -- a tar or zip file of the directory.
Also post the output of the command 'linuxcnc_info'
I don't understand how the non-realtime program 'lcec_conf'
requested with 'loadusr' relates to the realtime
module 'lcec'. There may be a timing race if one
depends on the other.
#
NOTE: The master branch (2.8~pre) includes provisions for
excluding problematic halfiles in order to isolate
problems or handle loadrt lines that are foreign to
the usual parameter-specifying methods.
linuxcnc.org/docs/devel/html/hal/twopass...#_exluding_hal_files
linuxcnc.org/docs/devel/html/hal/twopass.html
Ref: github.com/LinuxCNC/linuxcnc/commit/a7ca8053a
The following user(s) said Thank You: Nico2017
Please Log in or Create an account to join the conversation.
24 Jan 2019 20:07 #124758
by Nico2017
Replied by Nico2017 on topic Hal, twopasses and ethercat lcec
Hi, thank you for your answer.
I managed to reproduce the problem on a case provided as a sim configuration to make it simpler instead of posting my working configuration which starts to be more complicated. Attached are the two folders of the same default simulation axis where I added ethercat:
Unfortunately debugging ethercat is hard if you have not got the hardware connected as it will gives you an error. In this simple example I just used two modules EL1008 and EL2008 as described in the ethercat xml files.
Thank you,
Nicolas
I managed to reproduce the problem on a case provided as a sim configuration to make it simpler instead of posting my working configuration which starts to be more complicated. Attached are the two folders of the same default simulation axis where I added ethercat:
- works fine as long as you have your ethercat configured and running with the physical hardware connected. So this is working well to me as in my current configuration at the moment.
- is the same case but I just added the twopass feature in the axis.ini HAL section. This gives me an error and I aslo get and
Unfortunately debugging ethercat is hard if you have not got the hardware connected as it will gives you an error. In this simple example I just used two modules EL1008 and EL2008 as described in the ethercat xml files.
Thank you,
Nicolas
Please Log in or Create an account to join the conversation.
24 Jan 2019 20:58 #124762
by dgarrett
Replied by dgarrett on topic Hal, twopasses and ethercat lcec
As asked before:
post the output of the command 'linuxcnc_info'
and result of:
post the output of the command 'linuxcnc_info'
and result of:
$ which lcec_conf
The following user(s) said Thank You: Nico2017
Please Log in or Create an account to join the conversation.
24 Jan 2019 22:25 #124768
by dgarrett
Replied by dgarrett on topic Hal, twopasses and ethercat lcec
It looks like the module lcec depends on state
created by the user space lcec_conf but with
twopass managing loads, the sequencing is
not in the order required by the dependency.
Since you are using a master branch deb, you can
load lcec_conf and lcec outside of the loading
managed by twopass processing.
Ref: linuxcnc.org/docs/devel/html/hal/twopass...#_exluding_hal_files
Try the following:
1) remove the load statements for both lcec and lcec_conf
in lcec_ini.hal
2) create a file excluded from twopass processing named
lcec_load.hal like:
3) in your sim config (axis.ini), order halfiles like:
created by the user space lcec_conf but with
twopass managing loads, the sequencing is
not in the order required by the dependency.
Since you are using a master branch deb, you can
load lcec_conf and lcec outside of the loading
managed by twopass processing.
Ref: linuxcnc.org/docs/devel/html/hal/twopass...#_exluding_hal_files
Try the following:
1) remove the load statements for both lcec and lcec_conf
in lcec_ini.hal
2) create a file excluded from twopass processing named
lcec_load.hal like:
$ cat lcec_load.hal
# NOTWOPASS
# load and wait for the user component lcec_conf
loadusr -W lcec_conf ethercat-conf.xml
loadrt lcec
show pin lcec
show funct lcec
3) in your sim config (axis.ini), order halfiles like:
[HAL]
TWOPASS = on
HALFILE = lcec_load.hal
HALFILE = core_sim.hal
HALFILE = lcec_ini.hal
HALFILE = sim_spindle_encoder.hal
HALFILE = axis_manualtoolchange.hal
HALFILE = simulated_home.hal
HALFILE = check_xyz_constraints.hal
POSTGUI_HALFILE = postgui.hal
The following user(s) said Thank You: Nico2017
Please Log in or Create an account to join the conversation.
24 Jan 2019 22:29 - 24 Jan 2019 22:37 #124769
by Nico2017
Replied by Nico2017 on topic Hal, twopasses and ethercat lcec
Here are the output of the linuxcnc.info (by the way the .info extension cannot be uploaded on the forum):
and the other command is:
which lcec_conf
/usr/bin/lcec_conf
Will try your suggestion and keep you posted,
Thank you,
Nicolas
and the other command is:
which lcec_conf
/usr/bin/lcec_conf
Will try your suggestion and keep you posted,
Thank you,
Nicolas
Attachments:
Last edit: 24 Jan 2019 22:37 by Nico2017.
Please Log in or Create an account to join the conversation.
24 Jan 2019 22:45 - 24 Jan 2019 22:45 #124771
by Nico2017
Replied by Nico2017 on topic Hal, twopasses and ethercat lcec
Ok following your instructions makes the ethercat with two passes hal features working.
Brillant!
Thank you so much.
Nicolas
Brillant!
Thank you so much.
Nicolas
Last edit: 24 Jan 2019 22:45 by Nico2017.
Please Log in or Create an account to join the conversation.
24 Jan 2019 23:19 #124776
by dgarrett
Replied by dgarrett on topic Hal, twopasses and ethercat lcec
Please Log in or Create an account to join the conversation.
24 Sep 2019 05:09 - 24 Sep 2019 06:00 #146035
by Nico2017
Replied by Nico2017 on topic Hal, twopasses and ethercat lcec
Hi,
the two passes was working on a simple etherCAT config, but as I have advanced in my project and trying again the Twopasses, as I want to use names instead of counts, it no longer works:
I am currently having in my ini file, with lamgui my glade and python files for the machine I want to work on:
[DISPLAY]
DISPLAY = lamgui
[HAL]
TWOPASS = on
#Use loadusr -W if TWOPASS activated
HALUI = halui
HALFILE = loadrt_lcec_threads.hal
HALFILE = loadrt_addf_setp.hal
HALFILE = lam-v1.hal
POSTGUI_HALFILE = postgui.hal
Only the loadrt_lcec_threads.hal and loadrt_addf_setp.hal
I have therefore several specific things used with TWOPASS:
Here is the resulting cmd line: apparently linuxcnc gets shut down but I am unable to kill the process.
When I do:It stays like that forever
I have removed the get from my comment which apparently was creating an error when used in a comment with TWOPASS. I still got the same kind of results being locked without being able not to do anything on the terminal.
I enventually made it work as in my loadrt_lcec_threads.hal I had:
TO make the TWOPASS work I need:
Apparently when using TWOPASS the hal parsing loose the ability to read some variables from the ini file: here it was [KINS]KINEMATICS [EMCMOT]BASE_PERIOD. This is a bit strange as I have # NOTWOPASS in the file containing those lines.
the two passes was working on a simple etherCAT config, but as I have advanced in my project and trying again the Twopasses, as I want to use names instead of counts, it no longer works:
I am currently having in my ini file, with lamgui my glade and python files for the machine I want to work on:
[DISPLAY]
DISPLAY = lamgui
[HAL]
TWOPASS = on
#Use loadusr -W if TWOPASS activated
HALUI = halui
HALFILE = loadrt_lcec_threads.hal
HALFILE = loadrt_addf_setp.hal
HALFILE = lam-v1.hal
POSTGUI_HALFILE = postgui.hal
Only the loadrt_lcec_threads.hal and loadrt_addf_setp.hal
I have therefore several specific things used with TWOPASS:
- the custom made display loaded which contains a h = hal.component("passthrough") hal component with plenty of pins define din the python file
- the halui, which I am not sure how it reacts compared to the TWOPASS and the POSTGUI_HALFILE.
- the POSTGUI_HALFILE for hich I have set up # NOTWOPASS to see if it was making a difference or not
- I am using the message hal component in my loadrt_addf_setp.hal
Here is the resulting cmd line: apparently linuxcnc gets shut down but I am unable to kill the process.
Warning: Spoiler!
LINUXCNC - 2.9.0~pre0
Machine configuration directory is '/home/machine/linuxcnc/configs/LAMGUI_Table3'
Machine configuration file is 'lam.ini'
Starting LinuxCNC...
(time=1569301267.040486,pid=2898): Registering server on TCP port 5005.
(time=1569301267.040870,pid=2898): running server for TCP port 5005 (connection_socket = 3).
iocontrol: machine: 'Test' version 'unknown'
twopass:invoked with <> options
twopass:found ./loadrt_lcec_threads.hal
twopass:Sourcing ./loadrt_lcec_threads.hal WITHOUT twopass processing
twopass:found ./loadrt_addf_setp.hal
hal_to_tcl:NOTE: in file ./loadrt_addf_setp.hal, line 463: "gets" conflicts with haltcl usage,
prepended with 'hal' for compatibility
463:<addf or2.7 servo-thread #Activate the buzzer if either X or Y gets activated>
Note: Using POSIX realtime
./loadrt_lcec_threads.hal:24: Component 'threads' ready
./loadrt_lcec_threads.hal:24: Program '/usr/bin/rtapi_app' started
./loadrt_lcec_threads.hal:24: Realtime module 'threads' loaded
./loadrt_lcec_threads.hal:27: Ini variable '[KINS]KINEMATICS' not found.
./loadrt_lcec_threads.hal:28: Ini variable '[EMCMOT]BASE_PERIOD' not found.
HAL: ERROR: function 'motion-command-handler' not found
./loadrt_lcec_threads.hal:29: addf failed
HAL: ERROR: function 'motion-controller' not found
./loadrt_lcec_threads.hal:30: addf failed
twopass:found ./lam-v1.hal
twopass:Sourcing ./lam-v1.hal WITHOUT twopass processing
./loadrt_lcec_threads.hal:33: Realtime module 'threads' unloaded
./lam-v1.hal:3: Pin 'siggen.0.clock' does not exist
./lam-v1.hal:5: Pin 'iocontrol.0.tool-prepare' linked to signal 'tool-prep-loop'
./lam-v1.hal:5: Pin 'iocontrol.0.tool-prepared' linked to signal 'tool-prep-loop'
./lam-v1.hal:6: Pin 'iocontrol.0.tool-change' linked to signal 'tool-change-loop'
./lam-v1.hal:6: Pin 'iocontrol.0.tool-changed' linked to signal 'tool-change-loop'
./lam-v1.hal:9: Pin 'lcec.0.6.ain-0-val' does not exist
./lam-v1.hal:10: Pin 'lcec.0.6.ain-1-val' does not exist
./lam-v1.hal:11: Pin 'lcec.0.7.ain-0-val' does not exist
./lam-v1.hal:14: Pin 'timedelay.3.in' does not exist
./lam-v1.hal:16: Pin 'timedelay.3.out' does not exist
./lam-v1.hal:21: Pin 'sim-encoder.0.speed' does not exist
./lam-v1.hal:22: Pin 'sim-encoder.1.speed' does not exist
./lam-v1.hal:29: Pin 'lcec.0.10.enc-0-ina' does not exist
./lam-v1.hal:30: Pin 'lcec.0.10.enc-0-inb' does not exist
./lam-v1.hal:31: Pin 'lcec.0.10.enc-1-inb' does not exist
./lam-v1.hal:32: Pin 'lcec.0.10.enc-1-ina' does not exist
./lam-v1.hal:37: Pin 'encoder.0.rawcounts' does not exist
./lam-v1.hal:38: Pin 'conv-s32-float.0.out' does not exist
./lam-v1.hal:39: Pin 'ddt.4.out' does not exist
./lam-v1.hal:40: Pin 'scale.16.out' does not exist
./lam-v1.hal:41: Pin 'encoder.1.rawcounts' does not exist
./lam-v1.hal:42: Pin 'conv-s32-float.1.out' does not exist
./lam-v1.hal:43: Pin 'ddt.5.out' does not exist
./lam-v1.hal:44: Pin 'scale.17.out' does not exist
./lam-v1.hal:49: Pin 'joint.0.motor-pos-cmd' does not exist
./lam-v1.hal:50: Pin 'joint.1.motor-pos-cmd' does not exist
./lam-v1.hal:51: Pin 'joint.0.pos-cmd' does not exist
./lam-v1.hal:53: Pin 'joint.0.motor-pos-fb' does not exist
./lam-v1.hal:54: Pin 'joint.1.motor-pos-fb' does not exist
./lam-v1.hal:56: Pin 'joint.0.homing' does not exist
./lam-v1.hal:57: Pin 'joint.1.homing' does not exist
./lam-v1.hal:58: Pin 'encoder.0.position' does not exist
./lam-v1.hal:60: Pin 'encoder.1.position' does not exist
./lam-v1.hal:62: Pin 'sum2.14.out' does not exist
./lam-v1.hal:63: Pin 'sum2.15.out' does not exist
./lam-v1.hal:65: Pin 'sum2.22.out' does not exist
./lam-v1.hal:66: Pin 'sum2.23.out' does not exist
./lam-v1.hal:73: Pin 'joint.0.vel-cmd' does not exist
./lam-v1.hal:74: Pin 'pid.0.output' does not exist
./lam-v1.hal:75: Pin 'mux2.6.out' does not exist
./lam-v1.hal:76: Pin 'abs.VelX.sign' does not exist
./lam-v1.hal:77: Pin 'abs.VelX.is-positive' does not exist
./lam-v1.hal:78: Pin 'abs.VelX.is-negative' does not exist
./lam-v1.hal:79: Pin 'or2.4.out' does not exist
./lam-v1.hal:80: Pin 'abs.VelX.out' does not exist
./lam-v1.hal:81: Pin 'scale.0.out' does not exist
./lam-v1.hal:83: Pin 'joint.1.vel-cmd' does not exist
./lam-v1.hal:84: Pin 'pid.1.output' does not exist
./lam-v1.hal:85: Pin 'mux2.7.out' does not exist
./lam-v1.hal:86: Pin 'abs.VelY.sign' does not exist
./lam-v1.hal:87: Pin 'abs.VelY.is-positive' does not exist
./lam-v1.hal:88: Pin 'abs.VelY.is-negative' does not exist
./lam-v1.hal:89: Pin 'or2.5.out' does not exist
./lam-v1.hal:90: Pin 'abs.VelY.out' does not exist
./lam-v1.hal:91: Pin 'scale.1.out' does not exist
./lam-v1.hal:92: Pin 'or2.7.out' does not exist
./lam-v1.hal:94: Pin 'oneshot.0.out' does not exist
./lam-v1.hal:95: Pin 'not.30.out' does not exist
./lam-v1.hal:99: Pin 'pid.0.command' does not exist
./lam-v1.hal:100: Pin 'joint.1.pos-cmd' does not exist
./lam-v1.hal:103: Pin 'pid.0.command-deriv' does not exist
./lam-v1.hal:104: Pin 'pid.1.command-deriv' does not exist
./lam-v1.hal:106: Pin 'limit3.3.in' does not exist
./lam-v1.hal:107: Pin 'limit3.2.out' does not exist
./lam-v1.hal:108: Pin 'limit3.3.out' does not exist
./lam-v1.hal:109: Pin 'sim-encoder.2.phase-A' does not exist
./lam-v1.hal:110: Pin 'sim-encoder.2.phase-B' does not exist
./lam-v1.hal:111: Pin 'sim-encoder.3.phase-A' does not exist
./lam-v1.hal:112: Pin 'sim-encoder.3.phase-B' does not exist
./lam-v1.hal:115: Pin 'encoder.2.position' does not exist
./lam-v1.hal:116: Pin 'encoder.3.position' does not exist
./lam-v1.hal:128: Pin 'encoder.0.velocity' does not exist
./lam-v1.hal:129: Pin 'deadzone.0.out' does not exist
./lam-v1.hal:130: Pin 'lowpass.0.out' does not exist
./lam-v1.hal:132: Pin 'encoder.1.velocity' does not exist
./lam-v1.hal:133: Pin 'deadzone.1.out' does not exist
./lam-v1.hal:134: Pin 'lowpass.1.out' does not exist
./lam-v1.hal:137: Pin 'or2.6.in0' does not exist
./lam-v1.hal:138: Pin 'or2.6.in1' does not exist
./lam-v1.hal:141: Pin 'ddt.0.out' does not exist
./lam-v1.hal:142: Pin 'ddt.1.out' does not exist
./lam-v1.hal:143: Pin 'ddt.2.out' does not exist
./lam-v1.hal:144: Pin 'ddt.3.out' does not exist
./lam-v1.hal:146: Pin 'hypot.0.out' does not exist
./lam-v1.hal:147: Pin 'hypot.1.out' does not exist
./lam-v1.hal:172: Pin 'comp.8.out' does not exist
./lam-v1.hal:173: Pin 'not.21.out' does not exist
./lam-v1.hal:174: Pin 'comp.9.out' does not exist
./lam-v1.hal:175: Pin 'not.22.out' does not exist
./lam-v1.hal:178: Pin 'and2.11.in0' does not exist
./lam-v1.hal:179: Pin 'and2.13.in0' does not exist
./lam-v1.hal:180: Pin 'and2.11.out' does not exist
./lam-v1.hal:181: Pin 'and2.12.out' does not exist
./lam-v1.hal:182: Pin 'and2.13.out' does not exist
./lam-v1.hal:183: Pin 'and2.14.out' does not exist
./lam-v1.hal:192: Pin 'iocontrol.0.user-enable-out' linked to signal 'estop-loop'
./lam-v1.hal:192: Pin 'iocontrol.0.emc-enable-in' linked to signal 'estop-loop'
HAL: ERROR: bad position: 0
twopass: Error in file ./loadrt_addf_setp.hal:
addf failed
Shutting down and cleaning up LinuxCNC...
Note: Using POSIX realtime
rtapi_app: caught signal 8 - dumping core
(time=1569301267.560787,pid=2898): Deleting 5 channels from the NML_Main_Channel_List.
(time=1569301267.560831,pid=2898): Deleting emcCommand NML channel from NML_Main_Channel_List.
(time=1569301267.560843,pid=2898): deleting NML (1)
(time=1569301267.560853,pid=2898): delete (CMS *) 0x5654bbc22e90;
(time=1569301267.560873,pid=2898): rcs_shm_close(shm->key=1001(0x3E9),shm->size=8192(0x2000),shm->addr=0x7f654298b000)
(time=1569301267.560905,pid=2898): deleting CMS (emcCommand)
(time=1569301267.560919,pid=2898): free( data = 0x5654bbc239d0);
(time=1569301267.560931,pid=2898): Leaving ~CMS()
(time=1569301267.560941,pid=2898): CMS::delete(0x5654bbc22e90)
(time=1569301267.560951,pid=2898): CMS::delete successful.
(time=1569301267.560960,pid=2898): Leaving ~NML()
(time=1569301267.560969,pid=2898): NML channel deleted from NML_Main_Channel_List
(time=1569301267.560979,pid=2898): Deleting emcStatus NML channel from NML_Main_Channel_List.
(time=1569301267.560988,pid=2898): deleting NML (2)
(time=1569301267.560997,pid=2898): delete (CMS *) 0x5654bbc28e20;
(time=1569301267.561008,pid=2898): rcs_shm_close(shm->key=1002(0x3EA),shm->size=16384(0x4000),shm->addr=0x7f6542987000)
(time=1569301267.561029,pid=2898): deleting CMS (emcStatus)
(time=1569301267.561048,pid=2898): free( data = 0x5654bbc29940);
(time=1569301267.561058,pid=2898): Leaving ~CMS()
(time=1569301267.561067,pid=2898): CMS::delete(0x5654bbc28e20)
(time=1569301267.561077,pid=2898): CMS::delete successful.
(time=1569301267.561087,pid=2898): Leaving ~NML()
(time=1569301267.561110,pid=2898): NML channel deleted from NML_Main_Channel_List
(time=1569301267.561126,pid=2898): Deleting emcError NML channel from NML_Main_Channel_List.
(time=1569301267.561150,pid=2898): deleting NML (3)
(time=1569301267.561169,pid=2898): delete (CMS *) 0x5654bbc2e020;
(time=1569301267.561190,pid=2898): rcs_shm_close(shm->key=1003(0x3EB),shm->size=8192(0x2000),shm->addr=0x7f6542985000)
(time=1569301267.561225,pid=2898): deleting CMS (emcError)
(time=1569301267.561243,pid=2898): free( data = 0x5654bbc2eb50);
(time=1569301267.561253,pid=2898): Leaving ~CMS()
(time=1569301267.561262,pid=2898): CMS::delete(0x5654bbc2e020)
(time=1569301267.561273,pid=2898): CMS::delete successful.
(time=1569301267.561288,pid=2898): Leaving ~NML()
(time=1569301267.561299,pid=2898): NML channel deleted from NML_Main_Channel_List
(time=1569301267.561317,pid=2898): Deleting toolCmd NML channel from NML_Main_Channel_List.
(time=1569301267.561336,pid=2898): deleting NML (4)
(time=1569301267.561353,pid=2898): delete (CMS *) 0x5654bbc311a0;
(time=1569301267.561371,pid=2898): rcs_shm_close(shm->key=1004(0x3EC),shm->size=1024(0x400),shm->addr=0x7f6542984000)
(time=1569301267.561395,pid=2898): deleting CMS (toolCmd)
(time=1569301267.561413,pid=2898): free( data = 0x5654bbc31c50);
(time=1569301267.561432,pid=2898): Leaving ~CMS()
(time=1569301267.561450,pid=2898): CMS::delete(0x5654bbc311a0)
(time=1569301267.561460,pid=2898): CMS::delete successful.
(time=1569301267.561470,pid=2898): Leaving ~NML()
(time=1569301267.561479,pid=2898): NML channel deleted from NML_Main_Channel_List
(time=1569301267.561488,pid=2898): Deleting toolSts NML channel from NML_Main_Channel_List.
(time=1569301267.561498,pid=2898): deleting NML (5)
(time=1569301267.561507,pid=2898): delete (CMS *) 0x5654bbc326d0;
(time=1569301267.561521,pid=2898): rcs_shm_close(shm->key=1005(0x3ED),shm->size=8192(0x2000),shm->addr=0x7f6542982000)
(time=1569301267.561540,pid=2898): deleting CMS (toolSts)
(time=1569301267.561552,pid=2898): free( data = 0x5654bbc33180);
(time=1569301267.561562,pid=2898): Leaving ~CMS()
(time=1569301267.561571,pid=2898): CMS::delete(0x5654bbc326d0)
(time=1569301267.561580,pid=2898): CMS::delete successful.
(time=1569301267.561589,pid=2898): Leaving ~NML()
(time=1569301267.561598,pid=2898): NML channel deleted from NML_Main_Channel_List
(time=1569301267.561610,pid=2898): deleting NML (1)
(time=1569301267.561619,pid=2898): Leaving ~NML()
(time=1569301267.561629,pid=2898): NML::operater delete(0x5654bbc22c20)
(time=1569301267.561639,pid=2898): NML channel deleted from Dynamically_Allocated_NML_Objects
(time=1569301267.561650,pid=2898): deleting NML (2)
(time=1569301267.561659,pid=2898): Leaving ~NML()
(time=1569301267.561668,pid=2898): NML::operater delete(0x5654bbc28c50)
(time=1569301267.561678,pid=2898): NML channel deleted from Dynamically_Allocated_NML_Objects
(time=1569301267.561688,pid=2898): deleting NML (3)
(time=1569301267.561698,pid=2898): Leaving ~NML()
(time=1569301267.561706,pid=2898): NML::operater delete(0x5654bbc2ddf0)
(time=1569301267.561716,pid=2898): NML channel deleted from Dynamically_Allocated_NML_Objects
(time=1569301267.561726,pid=2898): deleting NML (4)
(time=1569301267.561735,pid=2898): Leaving ~NML()
(time=1569301267.561743,pid=2898): NML::operater delete(0x5654bbc30fd0)
(time=1569301267.561753,pid=2898): NML channel deleted from Dynamically_Allocated_NML_Objects
(time=1569301267.561762,pid=2898): deleting NML (5)
(time=1569301267.561771,pid=2898): Leaving ~NML()
(time=1569301267.561780,pid=2898): NML::operater delete(0x5654bbc32500)
(time=1569301267.561790,pid=2898): NML channel deleted from Dynamically_Allocated_NML_Objects
Machine configuration directory is '/home/machine/linuxcnc/configs/LAMGUI_Table3'
Machine configuration file is 'lam.ini'
Starting LinuxCNC...
(time=1569301267.040486,pid=2898): Registering server on TCP port 5005.
(time=1569301267.040870,pid=2898): running server for TCP port 5005 (connection_socket = 3).
iocontrol: machine: 'Test' version 'unknown'
twopass:invoked with <> options
twopass:found ./loadrt_lcec_threads.hal
twopass:Sourcing ./loadrt_lcec_threads.hal WITHOUT twopass processing
twopass:found ./loadrt_addf_setp.hal
hal_to_tcl:NOTE: in file ./loadrt_addf_setp.hal, line 463: "gets" conflicts with haltcl usage,
prepended with 'hal' for compatibility
463:<addf or2.7 servo-thread #Activate the buzzer if either X or Y gets activated>
Note: Using POSIX realtime
./loadrt_lcec_threads.hal:24: Component 'threads' ready
./loadrt_lcec_threads.hal:24: Program '/usr/bin/rtapi_app' started
./loadrt_lcec_threads.hal:24: Realtime module 'threads' loaded
./loadrt_lcec_threads.hal:27: Ini variable '[KINS]KINEMATICS' not found.
./loadrt_lcec_threads.hal:28: Ini variable '[EMCMOT]BASE_PERIOD' not found.
HAL: ERROR: function 'motion-command-handler' not found
./loadrt_lcec_threads.hal:29: addf failed
HAL: ERROR: function 'motion-controller' not found
./loadrt_lcec_threads.hal:30: addf failed
twopass:found ./lam-v1.hal
twopass:Sourcing ./lam-v1.hal WITHOUT twopass processing
./loadrt_lcec_threads.hal:33: Realtime module 'threads' unloaded
./lam-v1.hal:3: Pin 'siggen.0.clock' does not exist
./lam-v1.hal:5: Pin 'iocontrol.0.tool-prepare' linked to signal 'tool-prep-loop'
./lam-v1.hal:5: Pin 'iocontrol.0.tool-prepared' linked to signal 'tool-prep-loop'
./lam-v1.hal:6: Pin 'iocontrol.0.tool-change' linked to signal 'tool-change-loop'
./lam-v1.hal:6: Pin 'iocontrol.0.tool-changed' linked to signal 'tool-change-loop'
./lam-v1.hal:9: Pin 'lcec.0.6.ain-0-val' does not exist
./lam-v1.hal:10: Pin 'lcec.0.6.ain-1-val' does not exist
./lam-v1.hal:11: Pin 'lcec.0.7.ain-0-val' does not exist
./lam-v1.hal:14: Pin 'timedelay.3.in' does not exist
./lam-v1.hal:16: Pin 'timedelay.3.out' does not exist
./lam-v1.hal:21: Pin 'sim-encoder.0.speed' does not exist
./lam-v1.hal:22: Pin 'sim-encoder.1.speed' does not exist
./lam-v1.hal:29: Pin 'lcec.0.10.enc-0-ina' does not exist
./lam-v1.hal:30: Pin 'lcec.0.10.enc-0-inb' does not exist
./lam-v1.hal:31: Pin 'lcec.0.10.enc-1-inb' does not exist
./lam-v1.hal:32: Pin 'lcec.0.10.enc-1-ina' does not exist
./lam-v1.hal:37: Pin 'encoder.0.rawcounts' does not exist
./lam-v1.hal:38: Pin 'conv-s32-float.0.out' does not exist
./lam-v1.hal:39: Pin 'ddt.4.out' does not exist
./lam-v1.hal:40: Pin 'scale.16.out' does not exist
./lam-v1.hal:41: Pin 'encoder.1.rawcounts' does not exist
./lam-v1.hal:42: Pin 'conv-s32-float.1.out' does not exist
./lam-v1.hal:43: Pin 'ddt.5.out' does not exist
./lam-v1.hal:44: Pin 'scale.17.out' does not exist
./lam-v1.hal:49: Pin 'joint.0.motor-pos-cmd' does not exist
./lam-v1.hal:50: Pin 'joint.1.motor-pos-cmd' does not exist
./lam-v1.hal:51: Pin 'joint.0.pos-cmd' does not exist
./lam-v1.hal:53: Pin 'joint.0.motor-pos-fb' does not exist
./lam-v1.hal:54: Pin 'joint.1.motor-pos-fb' does not exist
./lam-v1.hal:56: Pin 'joint.0.homing' does not exist
./lam-v1.hal:57: Pin 'joint.1.homing' does not exist
./lam-v1.hal:58: Pin 'encoder.0.position' does not exist
./lam-v1.hal:60: Pin 'encoder.1.position' does not exist
./lam-v1.hal:62: Pin 'sum2.14.out' does not exist
./lam-v1.hal:63: Pin 'sum2.15.out' does not exist
./lam-v1.hal:65: Pin 'sum2.22.out' does not exist
./lam-v1.hal:66: Pin 'sum2.23.out' does not exist
./lam-v1.hal:73: Pin 'joint.0.vel-cmd' does not exist
./lam-v1.hal:74: Pin 'pid.0.output' does not exist
./lam-v1.hal:75: Pin 'mux2.6.out' does not exist
./lam-v1.hal:76: Pin 'abs.VelX.sign' does not exist
./lam-v1.hal:77: Pin 'abs.VelX.is-positive' does not exist
./lam-v1.hal:78: Pin 'abs.VelX.is-negative' does not exist
./lam-v1.hal:79: Pin 'or2.4.out' does not exist
./lam-v1.hal:80: Pin 'abs.VelX.out' does not exist
./lam-v1.hal:81: Pin 'scale.0.out' does not exist
./lam-v1.hal:83: Pin 'joint.1.vel-cmd' does not exist
./lam-v1.hal:84: Pin 'pid.1.output' does not exist
./lam-v1.hal:85: Pin 'mux2.7.out' does not exist
./lam-v1.hal:86: Pin 'abs.VelY.sign' does not exist
./lam-v1.hal:87: Pin 'abs.VelY.is-positive' does not exist
./lam-v1.hal:88: Pin 'abs.VelY.is-negative' does not exist
./lam-v1.hal:89: Pin 'or2.5.out' does not exist
./lam-v1.hal:90: Pin 'abs.VelY.out' does not exist
./lam-v1.hal:91: Pin 'scale.1.out' does not exist
./lam-v1.hal:92: Pin 'or2.7.out' does not exist
./lam-v1.hal:94: Pin 'oneshot.0.out' does not exist
./lam-v1.hal:95: Pin 'not.30.out' does not exist
./lam-v1.hal:99: Pin 'pid.0.command' does not exist
./lam-v1.hal:100: Pin 'joint.1.pos-cmd' does not exist
./lam-v1.hal:103: Pin 'pid.0.command-deriv' does not exist
./lam-v1.hal:104: Pin 'pid.1.command-deriv' does not exist
./lam-v1.hal:106: Pin 'limit3.3.in' does not exist
./lam-v1.hal:107: Pin 'limit3.2.out' does not exist
./lam-v1.hal:108: Pin 'limit3.3.out' does not exist
./lam-v1.hal:109: Pin 'sim-encoder.2.phase-A' does not exist
./lam-v1.hal:110: Pin 'sim-encoder.2.phase-B' does not exist
./lam-v1.hal:111: Pin 'sim-encoder.3.phase-A' does not exist
./lam-v1.hal:112: Pin 'sim-encoder.3.phase-B' does not exist
./lam-v1.hal:115: Pin 'encoder.2.position' does not exist
./lam-v1.hal:116: Pin 'encoder.3.position' does not exist
./lam-v1.hal:128: Pin 'encoder.0.velocity' does not exist
./lam-v1.hal:129: Pin 'deadzone.0.out' does not exist
./lam-v1.hal:130: Pin 'lowpass.0.out' does not exist
./lam-v1.hal:132: Pin 'encoder.1.velocity' does not exist
./lam-v1.hal:133: Pin 'deadzone.1.out' does not exist
./lam-v1.hal:134: Pin 'lowpass.1.out' does not exist
./lam-v1.hal:137: Pin 'or2.6.in0' does not exist
./lam-v1.hal:138: Pin 'or2.6.in1' does not exist
./lam-v1.hal:141: Pin 'ddt.0.out' does not exist
./lam-v1.hal:142: Pin 'ddt.1.out' does not exist
./lam-v1.hal:143: Pin 'ddt.2.out' does not exist
./lam-v1.hal:144: Pin 'ddt.3.out' does not exist
./lam-v1.hal:146: Pin 'hypot.0.out' does not exist
./lam-v1.hal:147: Pin 'hypot.1.out' does not exist
./lam-v1.hal:172: Pin 'comp.8.out' does not exist
./lam-v1.hal:173: Pin 'not.21.out' does not exist
./lam-v1.hal:174: Pin 'comp.9.out' does not exist
./lam-v1.hal:175: Pin 'not.22.out' does not exist
./lam-v1.hal:178: Pin 'and2.11.in0' does not exist
./lam-v1.hal:179: Pin 'and2.13.in0' does not exist
./lam-v1.hal:180: Pin 'and2.11.out' does not exist
./lam-v1.hal:181: Pin 'and2.12.out' does not exist
./lam-v1.hal:182: Pin 'and2.13.out' does not exist
./lam-v1.hal:183: Pin 'and2.14.out' does not exist
./lam-v1.hal:192: Pin 'iocontrol.0.user-enable-out' linked to signal 'estop-loop'
./lam-v1.hal:192: Pin 'iocontrol.0.emc-enable-in' linked to signal 'estop-loop'
HAL: ERROR: bad position: 0
twopass: Error in file ./loadrt_addf_setp.hal:
addf failed
Shutting down and cleaning up LinuxCNC...
Note: Using POSIX realtime
rtapi_app: caught signal 8 - dumping core
(time=1569301267.560787,pid=2898): Deleting 5 channels from the NML_Main_Channel_List.
(time=1569301267.560831,pid=2898): Deleting emcCommand NML channel from NML_Main_Channel_List.
(time=1569301267.560843,pid=2898): deleting NML (1)
(time=1569301267.560853,pid=2898): delete (CMS *) 0x5654bbc22e90;
(time=1569301267.560873,pid=2898): rcs_shm_close(shm->key=1001(0x3E9),shm->size=8192(0x2000),shm->addr=0x7f654298b000)
(time=1569301267.560905,pid=2898): deleting CMS (emcCommand)
(time=1569301267.560919,pid=2898): free( data = 0x5654bbc239d0);
(time=1569301267.560931,pid=2898): Leaving ~CMS()
(time=1569301267.560941,pid=2898): CMS::delete(0x5654bbc22e90)
(time=1569301267.560951,pid=2898): CMS::delete successful.
(time=1569301267.560960,pid=2898): Leaving ~NML()
(time=1569301267.560969,pid=2898): NML channel deleted from NML_Main_Channel_List
(time=1569301267.560979,pid=2898): Deleting emcStatus NML channel from NML_Main_Channel_List.
(time=1569301267.560988,pid=2898): deleting NML (2)
(time=1569301267.560997,pid=2898): delete (CMS *) 0x5654bbc28e20;
(time=1569301267.561008,pid=2898): rcs_shm_close(shm->key=1002(0x3EA),shm->size=16384(0x4000),shm->addr=0x7f6542987000)
(time=1569301267.561029,pid=2898): deleting CMS (emcStatus)
(time=1569301267.561048,pid=2898): free( data = 0x5654bbc29940);
(time=1569301267.561058,pid=2898): Leaving ~CMS()
(time=1569301267.561067,pid=2898): CMS::delete(0x5654bbc28e20)
(time=1569301267.561077,pid=2898): CMS::delete successful.
(time=1569301267.561087,pid=2898): Leaving ~NML()
(time=1569301267.561110,pid=2898): NML channel deleted from NML_Main_Channel_List
(time=1569301267.561126,pid=2898): Deleting emcError NML channel from NML_Main_Channel_List.
(time=1569301267.561150,pid=2898): deleting NML (3)
(time=1569301267.561169,pid=2898): delete (CMS *) 0x5654bbc2e020;
(time=1569301267.561190,pid=2898): rcs_shm_close(shm->key=1003(0x3EB),shm->size=8192(0x2000),shm->addr=0x7f6542985000)
(time=1569301267.561225,pid=2898): deleting CMS (emcError)
(time=1569301267.561243,pid=2898): free( data = 0x5654bbc2eb50);
(time=1569301267.561253,pid=2898): Leaving ~CMS()
(time=1569301267.561262,pid=2898): CMS::delete(0x5654bbc2e020)
(time=1569301267.561273,pid=2898): CMS::delete successful.
(time=1569301267.561288,pid=2898): Leaving ~NML()
(time=1569301267.561299,pid=2898): NML channel deleted from NML_Main_Channel_List
(time=1569301267.561317,pid=2898): Deleting toolCmd NML channel from NML_Main_Channel_List.
(time=1569301267.561336,pid=2898): deleting NML (4)
(time=1569301267.561353,pid=2898): delete (CMS *) 0x5654bbc311a0;
(time=1569301267.561371,pid=2898): rcs_shm_close(shm->key=1004(0x3EC),shm->size=1024(0x400),shm->addr=0x7f6542984000)
(time=1569301267.561395,pid=2898): deleting CMS (toolCmd)
(time=1569301267.561413,pid=2898): free( data = 0x5654bbc31c50);
(time=1569301267.561432,pid=2898): Leaving ~CMS()
(time=1569301267.561450,pid=2898): CMS::delete(0x5654bbc311a0)
(time=1569301267.561460,pid=2898): CMS::delete successful.
(time=1569301267.561470,pid=2898): Leaving ~NML()
(time=1569301267.561479,pid=2898): NML channel deleted from NML_Main_Channel_List
(time=1569301267.561488,pid=2898): Deleting toolSts NML channel from NML_Main_Channel_List.
(time=1569301267.561498,pid=2898): deleting NML (5)
(time=1569301267.561507,pid=2898): delete (CMS *) 0x5654bbc326d0;
(time=1569301267.561521,pid=2898): rcs_shm_close(shm->key=1005(0x3ED),shm->size=8192(0x2000),shm->addr=0x7f6542982000)
(time=1569301267.561540,pid=2898): deleting CMS (toolSts)
(time=1569301267.561552,pid=2898): free( data = 0x5654bbc33180);
(time=1569301267.561562,pid=2898): Leaving ~CMS()
(time=1569301267.561571,pid=2898): CMS::delete(0x5654bbc326d0)
(time=1569301267.561580,pid=2898): CMS::delete successful.
(time=1569301267.561589,pid=2898): Leaving ~NML()
(time=1569301267.561598,pid=2898): NML channel deleted from NML_Main_Channel_List
(time=1569301267.561610,pid=2898): deleting NML (1)
(time=1569301267.561619,pid=2898): Leaving ~NML()
(time=1569301267.561629,pid=2898): NML::operater delete(0x5654bbc22c20)
(time=1569301267.561639,pid=2898): NML channel deleted from Dynamically_Allocated_NML_Objects
(time=1569301267.561650,pid=2898): deleting NML (2)
(time=1569301267.561659,pid=2898): Leaving ~NML()
(time=1569301267.561668,pid=2898): NML::operater delete(0x5654bbc28c50)
(time=1569301267.561678,pid=2898): NML channel deleted from Dynamically_Allocated_NML_Objects
(time=1569301267.561688,pid=2898): deleting NML (3)
(time=1569301267.561698,pid=2898): Leaving ~NML()
(time=1569301267.561706,pid=2898): NML::operater delete(0x5654bbc2ddf0)
(time=1569301267.561716,pid=2898): NML channel deleted from Dynamically_Allocated_NML_Objects
(time=1569301267.561726,pid=2898): deleting NML (4)
(time=1569301267.561735,pid=2898): Leaving ~NML()
(time=1569301267.561743,pid=2898): NML::operater delete(0x5654bbc30fd0)
(time=1569301267.561753,pid=2898): NML channel deleted from Dynamically_Allocated_NML_Objects
(time=1569301267.561762,pid=2898): deleting NML (5)
(time=1569301267.561771,pid=2898): Leaving ~NML()
(time=1569301267.561780,pid=2898): NML::operater delete(0x5654bbc32500)
(time=1569301267.561790,pid=2898): NML channel deleted from Dynamically_Allocated_NML_Objects
When I do:
LINUXCNC - 2.9.0~pre0
Machine configuration directory is '/home/machine/linuxcnc/configs/sim.axis'
Machine configuration file is 'axis.ini'
LinuxCNC is still running. Restart it? [Y/n] Y
Cleaning up old LinuxCNC...
Shutting down and cleaning up LinuxCNC...
Waiting for other session to finish exiting...lockfile still not removed
I have removed the get from my comment which apparently was creating an error when used in a comment with TWOPASS. I still got the same kind of results being locked without being able not to do anything on the terminal.
Warning: Spoiler!
LINUXCNC - 2.9.0~pre0
Machine configuration directory is '/home/machine/linuxcnc/configs/LAMGUI_Table3'
Machine configuration file is 'lam.ini'
Starting LinuxCNC...
(time=1569303099.360088,pid=2115): Registering server on TCP port 5005.
(time=1569303099.360459,pid=2115): running server for TCP port 5005 (connection_socket = 3).
iocontrol: machine: 'Test machine' version 'unknown'
twopass:invoked with <> options
twopass:found ./loadrt_lcec_threads.hal
twopass:Sourcing ./loadrt_lcec_threads.hal WITHOUT twopass processing
twopass:found ./loadrt_addf_setp.hal
Note: Using POSIX realtime
twopass:found ./lam-v1.hal
twopass:Sourcing ./lam-v1.hal WITHOUT twopass processing
./loadrt_lcec_threads.hal:24: Component 'threads' ready
./loadrt_lcec_threads.hal:24: Program '/usr/bin/rtapi_app' started
./loadrt_lcec_threads.hal:24: Realtime module 'threads' loaded
./loadrt_lcec_threads.hal:27: Ini variable '[KINS]KINEMATICS' not found.
./loadrt_lcec_threads.hal:28: Ini variable '[EMCMOT]BASE_PERIOD' not found.
HAL: ERROR: function 'motion-command-handler' not found
./loadrt_lcec_threads.hal:29: addf failed
HAL: ERROR: function 'motion-controller' not found
./loadrt_lcec_threads.hal:30: addf failed
./lam-v1.hal:3: Pin 'siggen.0.clock' does not exist
./lam-v1.hal:5: Pin 'iocontrol.0.tool-prepare' linked to signal 'tool-prep-loop'
./lam-v1.hal:5: Pin 'iocontrol.0.tool-prepared' linked to signal 'tool-prep-loop'
./lam-v1.hal:6: Pin 'iocontrol.0.tool-change' linked to signal 'tool-change-loop'
./lam-v1.hal:6: Pin 'iocontrol.0.tool-changed' linked to signal 'tool-change-loop'
./lam-v1.hal:9: Pin 'lcec.0.6.ain-0-val' does not exist
./lam-v1.hal:10: Pin 'lcec.0.6.ain-1-val' does not exist
./lam-v1.hal:11: Pin 'lcec.0.7.ain-0-val' does not exist
./lam-v1.hal:14: Pin 'timedelay.3.in' does not exist
./lam-v1.hal:16: Pin 'timedelay.3.out' does not exist
./loadrt_lcec_threads.hal:33: Realtime module 'threads' unloaded
./lam-v1.hal:21: Pin 'sim-encoder.0.speed' does not exist
./lam-v1.hal:22: Pin 'sim-encoder.1.speed' does not exist
./lam-v1.hal:29: Pin 'lcec.0.10.enc-0-ina' does not exist
./lam-v1.hal:30: Pin 'lcec.0.10.enc-0-inb' does not exist
./lam-v1.hal:31: Pin 'lcec.0.10.enc-1-inb' does not exist
./lam-v1.hal:32: Pin 'lcec.0.10.enc-1-ina' does not exist
./lam-v1.hal:37: Pin 'encoder.0.rawcounts' does not exist
./lam-v1.hal:38: Pin 'conv-s32-float.0.out' does not exist
./lam-v1.hal:39: Pin 'ddt.4.out' does not exist
./lam-v1.hal:40: Pin 'scale.16.out' does not exist
./lam-v1.hal:41: Pin 'encoder.1.rawcounts' does not exist
./lam-v1.hal:42: Pin 'conv-s32-float.1.out' does not exist
./lam-v1.hal:43: Pin 'ddt.5.out' does not exist
./lam-v1.hal:44: Pin 'scale.17.out' does not exist
./lam-v1.hal:49: Pin 'joint.0.motor-pos-cmd' does not exist
./lam-v1.hal:50: Pin 'joint.1.motor-pos-cmd' does not exist
./lam-v1.hal:51: Pin 'joint.0.pos-cmd' does not exist
./lam-v1.hal:53: Pin 'joint.0.motor-pos-fb' does not exist
./lam-v1.hal:54: Pin 'joint.1.motor-pos-fb' does not exist
./lam-v1.hal:56: Pin 'joint.0.homing' does not exist
./lam-v1.hal:57: Pin 'joint.1.homing' does not exist
./lam-v1.hal:58: Pin 'encoder.0.position' does not exist
./lam-v1.hal:60: Pin 'encoder.1.position' does not exist
./lam-v1.hal:62: Pin 'sum2.14.out' does not exist
./lam-v1.hal:63: Pin 'sum2.15.out' does not exist
./lam-v1.hal:65: Pin 'sum2.22.out' does not exist
./lam-v1.hal:66: Pin 'sum2.23.out' does not exist
./lam-v1.hal:73: Pin 'joint.0.vel-cmd' does not exist
./lam-v1.hal:74: Pin 'pid.0.output' does not exist
./lam-v1.hal:75: Pin 'mux2.6.out' does not exist
./lam-v1.hal:76: Pin 'abs.VelX.sign' does not exist
./lam-v1.hal:77: Pin 'abs.VelX.is-positive' does not exist
./lam-v1.hal:78: Pin 'abs.VelX.is-negative' does not exist
./lam-v1.hal:79: Pin 'or2.4.out' does not exist
./lam-v1.hal:80: Pin 'abs.VelX.out' does not exist
./lam-v1.hal:81: Pin 'scale.0.out' does not exist
./lam-v1.hal:83: Pin 'joint.1.vel-cmd' does not exist
./lam-v1.hal:84: Pin 'pid.1.output' does not exist
./lam-v1.hal:85: Pin 'mux2.7.out' does not exist
./lam-v1.hal:86: Pin 'abs.VelY.sign' does not exist
./lam-v1.hal:87: Pin 'abs.VelY.is-positive' does not exist
./lam-v1.hal:88: Pin 'abs.VelY.is-negative' does not exist
./lam-v1.hal:89: Pin 'or2.5.out' does not exist
./lam-v1.hal:90: Pin 'abs.VelY.out' does not exist
./lam-v1.hal:91: Pin 'scale.1.out' does not exist
./lam-v1.hal:92: Pin 'or2.7.out' does not exist
./lam-v1.hal:94: Pin 'oneshot.0.out' does not exist
./lam-v1.hal:95: Pin 'not.30.out' does not exist
./lam-v1.hal:99: Pin 'pid.0.command' does not exist
./lam-v1.hal:100: Pin 'joint.1.pos-cmd' does not exist
./lam-v1.hal:103: Pin 'pid.0.command-deriv' does not exist
./lam-v1.hal:104: Pin 'pid.1.command-deriv' does not exist
./lam-v1.hal:106: Pin 'limit3.3.in' does not exist
./lam-v1.hal:107: Pin 'limit3.2.out' does not exist
./lam-v1.hal:108: Pin 'limit3.3.out' does not exist
./lam-v1.hal:109: Pin 'sim-encoder.2.phase-A' does not exist
./lam-v1.hal:110: Pin 'sim-encoder.2.phase-B' does not exist
./lam-v1.hal:111: Pin 'sim-encoder.3.phase-A' does not exist
./lam-v1.hal:112: Pin 'sim-encoder.3.phase-B' does not exist
./lam-v1.hal:115: Pin 'encoder.2.position' does not exist
./lam-v1.hal:116: Pin 'encoder.3.position' does not exist
./lam-v1.hal:128: Pin 'encoder.0.velocity' does not exist
./lam-v1.hal:129: Pin 'deadzone.0.out' does not exist
./lam-v1.hal:130: Pin 'lowpass.0.out' does not exist
./lam-v1.hal:132: Pin 'encoder.1.velocity' does not exist
./lam-v1.hal:133: Pin 'deadzone.1.out' does not exist
./lam-v1.hal:134: Pin 'lowpass.1.out' does not exist
./lam-v1.hal:137: Pin 'or2.6.in0' does not exist
./lam-v1.hal:138: Pin 'or2.6.in1' does not exist
./lam-v1.hal:141: Pin 'ddt.0.out' does not exist
./lam-v1.hal:142: Pin 'ddt.1.out' does not exist
./lam-v1.hal:143: Pin 'ddt.2.out' does not exist
./lam-v1.hal:144: Pin 'ddt.3.out' does not exist
./lam-v1.hal:146: Pin 'hypot.0.out' does not exist
./lam-v1.hal:147: Pin 'hypot.1.out' does not exist
./lam-v1.hal:172: Pin 'comp.8.out' does not exist
./lam-v1.hal:173: Pin 'not.21.out' does not exist
./lam-v1.hal:174: Pin 'comp.9.out' does not exist
./lam-v1.hal:175: Pin 'not.22.out' does not exist
./lam-v1.hal:178: Pin 'and2.11.in0' does not exist
./lam-v1.hal:179: Pin 'and2.13.in0' does not exist
./lam-v1.hal:180: Pin 'and2.11.out' does not exist
./lam-v1.hal:181: Pin 'and2.12.out' does not exist
./lam-v1.hal:182: Pin 'and2.13.out' does not exist
./lam-v1.hal:183: Pin 'and2.14.out' does not exist
./lam-v1.hal:192: Pin 'iocontrol.0.user-enable-out' linked to signal 'estop-loop'
./lam-v1.hal:192: Pin 'iocontrol.0.emc-enable-in' linked to signal 'estop-loop'
Note: Using POSIX realtime
rtapi_app: caught signal 8 - dumping core
Machine configuration directory is '/home/machine/linuxcnc/configs/LAMGUI_Table3'
Machine configuration file is 'lam.ini'
Starting LinuxCNC...
(time=1569303099.360088,pid=2115): Registering server on TCP port 5005.
(time=1569303099.360459,pid=2115): running server for TCP port 5005 (connection_socket = 3).
iocontrol: machine: 'Test machine' version 'unknown'
twopass:invoked with <> options
twopass:found ./loadrt_lcec_threads.hal
twopass:Sourcing ./loadrt_lcec_threads.hal WITHOUT twopass processing
twopass:found ./loadrt_addf_setp.hal
Note: Using POSIX realtime
twopass:found ./lam-v1.hal
twopass:Sourcing ./lam-v1.hal WITHOUT twopass processing
./loadrt_lcec_threads.hal:24: Component 'threads' ready
./loadrt_lcec_threads.hal:24: Program '/usr/bin/rtapi_app' started
./loadrt_lcec_threads.hal:24: Realtime module 'threads' loaded
./loadrt_lcec_threads.hal:27: Ini variable '[KINS]KINEMATICS' not found.
./loadrt_lcec_threads.hal:28: Ini variable '[EMCMOT]BASE_PERIOD' not found.
HAL: ERROR: function 'motion-command-handler' not found
./loadrt_lcec_threads.hal:29: addf failed
HAL: ERROR: function 'motion-controller' not found
./loadrt_lcec_threads.hal:30: addf failed
./lam-v1.hal:3: Pin 'siggen.0.clock' does not exist
./lam-v1.hal:5: Pin 'iocontrol.0.tool-prepare' linked to signal 'tool-prep-loop'
./lam-v1.hal:5: Pin 'iocontrol.0.tool-prepared' linked to signal 'tool-prep-loop'
./lam-v1.hal:6: Pin 'iocontrol.0.tool-change' linked to signal 'tool-change-loop'
./lam-v1.hal:6: Pin 'iocontrol.0.tool-changed' linked to signal 'tool-change-loop'
./lam-v1.hal:9: Pin 'lcec.0.6.ain-0-val' does not exist
./lam-v1.hal:10: Pin 'lcec.0.6.ain-1-val' does not exist
./lam-v1.hal:11: Pin 'lcec.0.7.ain-0-val' does not exist
./lam-v1.hal:14: Pin 'timedelay.3.in' does not exist
./lam-v1.hal:16: Pin 'timedelay.3.out' does not exist
./loadrt_lcec_threads.hal:33: Realtime module 'threads' unloaded
./lam-v1.hal:21: Pin 'sim-encoder.0.speed' does not exist
./lam-v1.hal:22: Pin 'sim-encoder.1.speed' does not exist
./lam-v1.hal:29: Pin 'lcec.0.10.enc-0-ina' does not exist
./lam-v1.hal:30: Pin 'lcec.0.10.enc-0-inb' does not exist
./lam-v1.hal:31: Pin 'lcec.0.10.enc-1-inb' does not exist
./lam-v1.hal:32: Pin 'lcec.0.10.enc-1-ina' does not exist
./lam-v1.hal:37: Pin 'encoder.0.rawcounts' does not exist
./lam-v1.hal:38: Pin 'conv-s32-float.0.out' does not exist
./lam-v1.hal:39: Pin 'ddt.4.out' does not exist
./lam-v1.hal:40: Pin 'scale.16.out' does not exist
./lam-v1.hal:41: Pin 'encoder.1.rawcounts' does not exist
./lam-v1.hal:42: Pin 'conv-s32-float.1.out' does not exist
./lam-v1.hal:43: Pin 'ddt.5.out' does not exist
./lam-v1.hal:44: Pin 'scale.17.out' does not exist
./lam-v1.hal:49: Pin 'joint.0.motor-pos-cmd' does not exist
./lam-v1.hal:50: Pin 'joint.1.motor-pos-cmd' does not exist
./lam-v1.hal:51: Pin 'joint.0.pos-cmd' does not exist
./lam-v1.hal:53: Pin 'joint.0.motor-pos-fb' does not exist
./lam-v1.hal:54: Pin 'joint.1.motor-pos-fb' does not exist
./lam-v1.hal:56: Pin 'joint.0.homing' does not exist
./lam-v1.hal:57: Pin 'joint.1.homing' does not exist
./lam-v1.hal:58: Pin 'encoder.0.position' does not exist
./lam-v1.hal:60: Pin 'encoder.1.position' does not exist
./lam-v1.hal:62: Pin 'sum2.14.out' does not exist
./lam-v1.hal:63: Pin 'sum2.15.out' does not exist
./lam-v1.hal:65: Pin 'sum2.22.out' does not exist
./lam-v1.hal:66: Pin 'sum2.23.out' does not exist
./lam-v1.hal:73: Pin 'joint.0.vel-cmd' does not exist
./lam-v1.hal:74: Pin 'pid.0.output' does not exist
./lam-v1.hal:75: Pin 'mux2.6.out' does not exist
./lam-v1.hal:76: Pin 'abs.VelX.sign' does not exist
./lam-v1.hal:77: Pin 'abs.VelX.is-positive' does not exist
./lam-v1.hal:78: Pin 'abs.VelX.is-negative' does not exist
./lam-v1.hal:79: Pin 'or2.4.out' does not exist
./lam-v1.hal:80: Pin 'abs.VelX.out' does not exist
./lam-v1.hal:81: Pin 'scale.0.out' does not exist
./lam-v1.hal:83: Pin 'joint.1.vel-cmd' does not exist
./lam-v1.hal:84: Pin 'pid.1.output' does not exist
./lam-v1.hal:85: Pin 'mux2.7.out' does not exist
./lam-v1.hal:86: Pin 'abs.VelY.sign' does not exist
./lam-v1.hal:87: Pin 'abs.VelY.is-positive' does not exist
./lam-v1.hal:88: Pin 'abs.VelY.is-negative' does not exist
./lam-v1.hal:89: Pin 'or2.5.out' does not exist
./lam-v1.hal:90: Pin 'abs.VelY.out' does not exist
./lam-v1.hal:91: Pin 'scale.1.out' does not exist
./lam-v1.hal:92: Pin 'or2.7.out' does not exist
./lam-v1.hal:94: Pin 'oneshot.0.out' does not exist
./lam-v1.hal:95: Pin 'not.30.out' does not exist
./lam-v1.hal:99: Pin 'pid.0.command' does not exist
./lam-v1.hal:100: Pin 'joint.1.pos-cmd' does not exist
./lam-v1.hal:103: Pin 'pid.0.command-deriv' does not exist
./lam-v1.hal:104: Pin 'pid.1.command-deriv' does not exist
./lam-v1.hal:106: Pin 'limit3.3.in' does not exist
./lam-v1.hal:107: Pin 'limit3.2.out' does not exist
./lam-v1.hal:108: Pin 'limit3.3.out' does not exist
./lam-v1.hal:109: Pin 'sim-encoder.2.phase-A' does not exist
./lam-v1.hal:110: Pin 'sim-encoder.2.phase-B' does not exist
./lam-v1.hal:111: Pin 'sim-encoder.3.phase-A' does not exist
./lam-v1.hal:112: Pin 'sim-encoder.3.phase-B' does not exist
./lam-v1.hal:115: Pin 'encoder.2.position' does not exist
./lam-v1.hal:116: Pin 'encoder.3.position' does not exist
./lam-v1.hal:128: Pin 'encoder.0.velocity' does not exist
./lam-v1.hal:129: Pin 'deadzone.0.out' does not exist
./lam-v1.hal:130: Pin 'lowpass.0.out' does not exist
./lam-v1.hal:132: Pin 'encoder.1.velocity' does not exist
./lam-v1.hal:133: Pin 'deadzone.1.out' does not exist
./lam-v1.hal:134: Pin 'lowpass.1.out' does not exist
./lam-v1.hal:137: Pin 'or2.6.in0' does not exist
./lam-v1.hal:138: Pin 'or2.6.in1' does not exist
./lam-v1.hal:141: Pin 'ddt.0.out' does not exist
./lam-v1.hal:142: Pin 'ddt.1.out' does not exist
./lam-v1.hal:143: Pin 'ddt.2.out' does not exist
./lam-v1.hal:144: Pin 'ddt.3.out' does not exist
./lam-v1.hal:146: Pin 'hypot.0.out' does not exist
./lam-v1.hal:147: Pin 'hypot.1.out' does not exist
./lam-v1.hal:172: Pin 'comp.8.out' does not exist
./lam-v1.hal:173: Pin 'not.21.out' does not exist
./lam-v1.hal:174: Pin 'comp.9.out' does not exist
./lam-v1.hal:175: Pin 'not.22.out' does not exist
./lam-v1.hal:178: Pin 'and2.11.in0' does not exist
./lam-v1.hal:179: Pin 'and2.13.in0' does not exist
./lam-v1.hal:180: Pin 'and2.11.out' does not exist
./lam-v1.hal:181: Pin 'and2.12.out' does not exist
./lam-v1.hal:182: Pin 'and2.13.out' does not exist
./lam-v1.hal:183: Pin 'and2.14.out' does not exist
./lam-v1.hal:192: Pin 'iocontrol.0.user-enable-out' linked to signal 'estop-loop'
./lam-v1.hal:192: Pin 'iocontrol.0.emc-enable-in' linked to signal 'estop-loop'
Note: Using POSIX realtime
rtapi_app: caught signal 8 - dumping core
I enventually made it work as in my loadrt_lcec_threads.hal I had:
loadrt [KINS]KINEMATICS #To be used linux 2.8.x
loadrt motmod base_period_nsec=[EMCMOT]BASE_PERIOD base_thread_fp=0 servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]JOINTS num_dio=20 num_aio=20
TO make the TWOPASS work I need:
loadrt trivkins coordinates=XY kinstype=BOTH #To be used linux 2.8.x
loadrt motmod base_period_nsec=100000 base_thread_fp=0 servo_period_nsec=100000 num_joints=2 num_dio=20 num_aio=20
Apparently when using TWOPASS the hal parsing loose the ability to read some variables from the ini file: here it was [KINS]KINEMATICS [EMCMOT]BASE_PERIOD. This is a bit strange as I have # NOTWOPASS in the file containing those lines.
Last edit: 24 Sep 2019 06:00 by Nico2017.
Please Log in or Create an account to join the conversation.
24 Sep 2019 12:35 #146062
by dgarrett
On most systems, Signal 8 is SIGFPE -- a floating point
fault -- unusual so something is very wrong with that run.
Since LinuxCNC runs several processes, some may remain
running after such a failure and prevent a new start. If
you start in a terminal, you can find the processes with ps
and kill them (you may also need halrun -U). If you don't
know how to do these things, a reboot will work.
Regarding this line that didn't work:[TRAJ]JOINTS is not a supported ini file setting,
[KINS]JOINTS is the proper setting
As a guess, you may have had an error because of this.
You have a complicated configuration so it would better to
post a tar or zip file of the entire configuration and a
complete transcript of the failing terminal session.
Replied by dgarrett on topic Hal, twopasses and ethercat lcec
Your session shut down because of a core dump:It stays like that forever
rtapi_app: caught signal 8 - dumping core
On most systems, Signal 8 is SIGFPE -- a floating point
fault -- unusual so something is very wrong with that run.
Since LinuxCNC runs several processes, some may remain
running after such a failure and prevent a new start. If
you start in a terminal, you can find the processes with ps
and kill them (you may also need halrun -U). If you don't
know how to do these things, a reboot will work.
I enventually made it work...
Regarding this line that didn't work:
loadrt motmod base_period_nsec=[EMCMOT]BASE_PERIOD base_thread_fp=0 servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]JOINTS num_dio=20 num_aio=20
[KINS]JOINTS is the proper setting
As a guess, you may have had an error because of this.
You have a complicated configuration so it would better to
post a tar or zip file of the entire configuration and a
complete transcript of the failing terminal session.
Please Log in or Create an account to join the conversation.
Time to create page: 0.130 seconds