How do you configure your drive SDOs?

More
20 Nov 2021 12:14 #227078 by arvidb
Besides the PDOs that are used to communicate with LinuxCNC, there are of course SDOs that needs to be set correctly on each startup to configure the EtherCAT drives.

How do you handle this in a practical way? Lots of "sdoConfig" statements in the lcec xml files? A script with a lot of "ethercat download" commands that you run before starting the machine? Some other way?

Common to both of the above solutions is that they are very error prone - you'd have to fiddle around with a lot of hexadecimal values instead of getting a clear text label for the values. Getting an overview of the settings would be difficult. Some sort of configuration program would be called for, but I guess this would have to be specific to each drive model?

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

More
27 Nov 2021 11:09 #227730 by db1981
Hi,

i am out of time for writing big articles at the moment...
short explanation:

There are at least 3 ways to do sdo communication with lcnc-ethercat:

1:
"sdoConfig" statement in the ethercat_conf.xml

2:
Startup List / initcmds
github.com/sittner/linuxcnc-ethercat/blo...21-xFx0-000x_MDP.xml

3:
Device related in the device specific driver file:
github.com/sittner/linuxcnc-ethercat/blo...er/src/lcec_el7411.c
ecrt_slave_config_sdoXX  , this can be used with clear name for parameter pins or modul_parameter.


Keep in mind that sdo config with etherlab is only usable before the ethercat realtime OP thread has been started, doing rt sdo communication is a lot more difficult. I have implemented this here (the 4. way..)  "class_rt_sdo" github.com/steup-engineering/linuxcnc-et...add-nanotec-pd4e/src  inside the nanopd4e driver, but it is not official yet.
 
The following user(s) said Thank You: arvidb, tommylight

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

More
02 Dec 2021 23:59 - 03 Dec 2021 00:00 #228240 by rollfree
I did it (as a test) in OP-state in the user-space component by calling the "ethercat" program.
It worked. But I'm not sure if it wouldn't want to treat some locks.

Something like:
fp = popen ("/usr/bin/ethercat -p3 -tuint32 upload 0x2109 0", "r");
if (fp) {
fscanf (fp, "%x", &ret_val);
pclose(fp);
}
sdo = ret_val;
Last edit: 03 Dec 2021 00:00 by rollfree.
The following user(s) said Thank You: arvidb

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

More
07 Dec 2021 10:38 - 07 Dec 2021 10:39 #228526 by arvidb
Thank you for your replies! I forgot to subscribe to the topic and so didn't get notifications. Sorry for my late reaction.

Any ideas for how to make this more user friendly? I have some old Yaskawa drives and they can be hooked up to a computer via RS232 and one can configure things like max torque and tuning using a graphical Windows program. I wonder if it'd be possible to create something similar for EtherCAT drives under LinuxCNC... but I have a hard time imagining how it would work. What's the greatest common denominator for EtherCAT configuration? I.e. is there some set of SDOs that are common to all EtherCAT servo drives? E.g. my Omron drives have:

* Realtime autotuning at 0x3002 as INT16, range 0-6 (different modes)
* Speed loop gain 1 at 0x3101 as INT16, range 1-32767, unit 0.1 Hz
* Max torque at 0x6072 as UINT16, range 0-5000 in units of 0.1 % of rated torque.

...etc.

I guess these are generally unique for each drive manufacturer?
Last edit: 07 Dec 2021 10:39 by arvidb.

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

Time to create page: 0.097 seconds
Powered by Kunena Forum