Hal, twopasses and ethercat lcec

More
7 years 9 months ago - 7 years 9 months ago #124771 by Nico2017
Ok following your instructions makes the ethercat with two passes hal features working.
Brillant!

Thank you so much.

Nicolas
Last edit: 7 years 9 months ago by Nico2017.

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

More
7 years 9 months ago #124776 by dgarrett
The following user(s) said Thank You: rodw, Nico2017

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

More
7 years 1 month ago - 7 years 1 month ago #146035 by Nico2017
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:
  • 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!


When I do:
Code:
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
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.

Warning: Spoiler!


I enventually made it work as in my loadrt_lcec_threads.hal I had:
Code:
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:
Code:
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: 7 years 1 month ago by Nico2017.

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

More
7 years 1 month ago #146062 by dgarrett

It stays like that forever

Your session shut down because of a core dump:
Code:
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:
Code:
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
[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.

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

More
5 years 10 months ago #192571 by Nico2017
Hi,
thanks for the indication. I do sometime get the error:

rtapi_app: caught signal 8 - dumping core

which make tricky a direct restart of linuxcnc as it is seen as already running. As suggested I have to manually kill the processes through htop and do a reboot but not really user friendly for an operator.

I would like to get ride of this error but was not able so far. Where this error could come from? Any indication of direction where I could chase this one from would be helpful.

Thank you,

Nicolas

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

More
5 years 10 months ago #192690 by chimeno
Hello @Nico2017

I don't know if it can help much, this error
Code:
rtapi_app: caught signal 8 - dumping core
has happened to me many times, due to duplicating signals in HAL with the same name

Greeting
Chimeno
The following user(s) said Thank You: Nico2017

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

Time to create page: 0.208 seconds
Powered by Kunena Forum