Compiling realtime kernel

More
11 Jan 2022 22:37 #231495 by Tady
Replied by Tady on topic Compiling realtime kernel
Yes I tried that. On my jammy the ethercat was wirking.. Now I made a Buster install witm linuxcnc-dev and when I made the install with the online_instaler the system crashed after a reboot.
The kernel starts liading and then I get a black screen with a cursor blinking on the top left corner
The recovery mode also does not work

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

More
11 Jan 2022 23:46 #231499 by rodw
Replied by rodw on topic Compiling realtime kernel

I'm going to start from scratch... Can you advise me on kernel version best for ethecat. I mean what kernel do you use?

Bullseye uses the 5.10 kernel and the preempt-rt version is available on the debian repos so no need to build the kernel.
follow the QTPYVCP instructions.
Follow the ethercat instructions in my repo

If you type ethercat slaves -v it will report the VID and MID so use these in your XML file
There are plenty of examples in my repo of setting SDO's
Just use an online calculator to convert decimal values to hex
The thing to understand is that sdo data is lowbyte hi byte order.
This means that if you want to send a value 0xABCD, thou need to set the string  as "CD AB" in the XML
The following user(s) said Thank You: Tady

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

More
13 Jan 2022 14:25 #231664 by Tady
Replied by Tady on topic Compiling realtime kernel
Rodw
I installed bullseye 11.2 and linuxcnc and ethercat... I got the thing working.. I can read EL1809 and set the EL2809
But I fon't know how to set the analog output volage of a EL4132 analog output card. Did you work with these cards in the past?
And also I installed rt kernel from package manager but I have very poor preformance. Any tips?

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

More
13 Jan 2022 14:54 #231667 by tommylight

For ethercat there is a ready made ISO by Grotius, search the forum or github.
Sorry, on the phone.

forum.linuxcnc.org/18-computer/40328-deb...o-cd-download-1-7-gb

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

More
13 Jan 2022 15:07 #231670 by Tady
Replied by Tady on topic Compiling realtime kernel
I sam that but kernel is 4.19.. I wanted to try 5..
Also I got it working... I just don't know on what pin to send HAL COMMAND in linuxcnc so analog output work...
My Linuxcnc is working with ethercat
Tha issue is also the rt-kernel.
I gonna try on my laptop and i can test the latency there
If it is poor I will try the premade iso from your link
Thank you

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

More
13 Jan 2022 17:55 #231685 by rodw
Replied by rodw on topic Compiling realtime kernel

Rodw
I installed bullseye 11.2 and linuxcnc and ethercat... I got the thing working.. I can read EL1809 and set the EL2809
But I fon't know how to set the analog output volage of a EL4132 analog output card. Did you work with these cards in the past?
And also I installed rt kernel from package manager but I have very poor preformance. Any tips?

Great work. the latency is more to do with BIOS settings than the kernel. Disable all power saving settings and make maximum cstate = 1
Also adding isolcpus=2,3 to GRUB_CMDLINE_LINUX_DEFAULT in grub. (You can install grub_customizer with apt-get to make this easy)
You only have a servo-thread so latency < say 150000 should be OK

I have not used any Beckhoff parts.
Looks like the EL4132 is supported.  Does it show up if you type ethercat slaves?
I would look for it in halshow if you have it in your xml file. I would expect some pins are created so it would just be a matter of setting them to change a value

If you got this far there is not any benefit in adopting grotius's ISO.
The following user(s) said Thank You: Tady

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

More
13 Jan 2022 18:01 #231686 by Tady
Replied by Tady on topic Compiling realtime kernel
Ok i will try these things... Yes ofcourse isolcpus!!! I forgot about that...
Yes yes the card shows up in hal.. I see all four cards.. The fist one is the interface.. I can see the pins.. But if i send a command the output does not respond... I will play with it tomorow
The following user(s) said Thank You: rodw

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

More
13 Jan 2022 18:15 #231688 by rodw
Replied by rodw on topic Compiling realtime kernel
Sorry I can't help further
Looked at the source github.com/sittner/linuxcnc-ethercat/blo...er/src/lcec_el41x2.c
have you setp the enable pin?
Also set the offsets etc.

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

More
13 Jan 2022 18:45 #231694 by Tady
Replied by Tady on topic Compiling realtime kernel
I will try it tomorow.. Thank you!

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

More
14 Jan 2022 07:29 #231732 by Tady
Replied by Tady on topic Compiling realtime kernel
Rodw that was it
For the EL4132 card you first need to setp lcec.0.1.aout-0-enable true
Then you can control the output with a floating point number
setp lcec.0.1.aout-0-value 0.5
The output range is from - 1 to 1 and the output goes from - 10V to 10V
You can probably change that eith setp lcec.0.1.aout-scale
This ethercat stuff is awsome. Now I need a drive to play with positioning

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

Time to create page: 0.117 seconds
Powered by Kunena Forum