1.It does not create a real time system
2.Not clear how to install to internal disk
3.How GUI works and how to install
4.Will the system work with other brand Ethercat Servo
In Step 8.1.1
Required below packages are not available
E: Unable to locate package libcapstone3
E: Package ‘python3-crypto’ has no installation candidate
Appears to be these packages are available specific to Debian 10 .
So continued further
~/opencn/agency
./build.sh -t x86
./build.sh -a
It failed to locate the package >>> glpk 4.65
So edited the file ~/opencn/buildroot/package/glpk.mk
GLPK_SITE = FTP archive directory /pub/gnu/glpk/
After this it compiled everything completed without error.
Then tried deploying to USB
~/opencn/agency/
./deploy.sh -f sdb
./deploy.sh -a sdb
It went ok .Created USB disk and boots
uname -a > shows linux buildroot 5.4.44
It looks not a realtime kernal.
lsblk command did not work
So not clear how to carry out step > 8.1.3.1. Copy on internal disk (x86 only)
Say I want to install to partition sda10
I have CTB etherat servos to retrofit a 3axis mill.
Will it work ?
Just exploring OpenCN or Linuxcnc and learn
Thanks you for your interest in OpenCN, also thanks for your detailed answer.
I’m sorry to hear that you have trouble installing OpenCN on x86. We still do lake some documentation on that side and we do need to rearrange it someday …
To answer your different points :
Yes it does not create a realtime system. The way it work is : Build on a debian based system → Format a SDcard or USB flashdrive → Deploy to SD/USB → Plug in on your x86 target PC → boot on device.
Yes, again, we lake some explicit documentation…
GUI is build using agency/usr/build-host.sh. You can then found the executable under agency/usr/build-host/host/user_gui/user-gui. The “tutorial” is located under 9.1. User-Gui — OpenCN 2021.2.0 documentation
For installation :
It’s been a long time I haven’t done it, but once in the console of OpenCN you can run “./install.sh /dev/sda10” for example. Then follow the step of 8.1.3.1. that you mentioned. The installation step is a bit woobly as we didn’t implement an extensive installation script that do everything for you. What is the part you have trouble with exactly ?
About glpk :
I had the same issue recently, we didn’t push the fix to master for now.
A first step would be to run “./ethercat slaves” once you connected the drive. If you see your slaves it’s already a good point Then you can run “./ethercat pdo” and “./ethercat cstruct” to take a look at what the drive output.
Also if you wish to implement it yourself I would happily try to help you in the process.
Hi Sivarah,
No actually, the framework already contains a patched kernel with our custom Xenomai/Cobalt-based adaptations (mainly Cobalt-centric with no I-pipe overhead).
Also I’ve forgot to mention it but installation is not mandatory.
I was already able to run OpenCN on x86 with very cheap USB device, boot on USB, and perfectly run EtherCAT at 10kHz with 2 Triamec TSD80 drive.
The only trouble I had was the sampler (logging component of OpenCN) who would sometimes skip some data randomly. Using a good USB fixed it.
It’s very practical if you are developing new features and want faster iteration
Hi Rossierd
Thanks for your reply.
I am able to build & deploy the OpenCN frmaework to USB .
PC can boot from USB.
But not sure of whether it is a realtime kenel.
After booting from the deployed USB
uname -a > shows linux buildroot 5.4.44 (as in the picture of first post)
Is there a way to confirm running kernel is Xenomai/Cobalt patched kernel
However I read from this post Upgrading the framework to 5.10
that agency has been upgraded with the Linux kernel 5.10
Or it is not relevant to X86 platform
Yes you need another PC to run the GUI as we decided to separate the calculation & render part.
If you already have a disk plugged in your PC you should see it by typing “ls /dev”
Since it’s a custom build it’s likely that we didn’t add some basic command & tool from linux. For example we have “vi”, “nano” and “fdisk”, but not vim and lsblk…
We could add it through the menuconfig of buildroot.
Regarding our question about real-time: OpenCN kernel organization uses a Asymmetric Multi-Processing (AMP) approach. A dedicated CPU (CPU #1) is reserved for RT with Xenomai scheduling.
It is the reason why, with uname you see standard 5.4 kernel.
Just got separate setup motherboard and tried booting with USB.
Its a BCM87QD motherboard with Intel i217/i210
If I connect Ethercat cable to LAN2 (i210) link is up.
I hope Ethercat link is alive
But ./ethercat slave command did not show any slaves
Attached are screenshots
Ok, it seems you have an issue with you NIC (Ethernet card) used for EtherCAT.
Here is a list of possible actions:
This NIC should be an e1000e
The MAC address of it should be placed in the x86 kernel configuration to be used/configured as EtherCAT (NB: this step is only needed for X86 target).
Set Correct MAC address
0. Get the MAC address of the controller
Open agency/linux/arch/x86/configs/x86_defconfig file
Change the line starting with CONFIG_OPENCN_ETHERCAT_MASTER_MAC0
Dear J-P
Thanks for your reply.
In fact I compiled OpenCN on different motherboard
Just tried booting with deployed USB in different motherboard.
May be it might have auto picked a wrong MAC address with compiled setup ?
Booted with deployed USB I did not see any response while connecting Ethercat cable to NIC port i217 (LAN1) which is a e1000e.
Above screen shots are while Ethercat connected to NIC port i210(LAN2) . Obviously it is not a e1000e.
If I compile and deploy in same motherboard , still do I need to manually Set Correct MAC address ?
I read from below link that NIC i217 is a e1000e
So I hope this motherboard should work
or
should I look for another motherboard or RPI will be a better option ?
Dear J-P
I am trying OpenCn whenever I get free time so delay in reply.
Today I tried recompiling with MAC address setting of CONFIG_OPENCN_ETHERCAT_MASTER_MAC0
Then
$ ./build.sh -t x86
$ ./build.sh -kc
$ ./build.sh -a
Deployed and Booted with USB .
With “ifconfig” command
It detects igb (i210) as eth0 and did not detect the e1000e(i217)
Then I tried disabling the igb (i210) in bios and booted with only the e1000e(i217) is enabled
It does not show any ethernet port at all and looks like driver failed to work.
In bios setting LAN1 is i217 (e1000e) and LAN2 is i210 . But in desktop network configuration it auto assigns i210 to eth0 and i217 to eth1 .
Booting from deployed usb failed to detect e1000e