Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tuning ECAT-drive in CSV-mode - howto set filter gains via SDO, ecattypedsdo() fails
#1
Hi!
Running Beckhoff-dirve EL7211-0010 in CSV-Mode, I need to tune the drives PI-gains before closing position loop on PPMAC.
After activating ECAT I tried writing to the drives velocity P-gain with follwoing command:

p1=ecattypedsdo(0,0,1,$8010,15,0,4)
where
0..master 0
0..slave 0
1..read
$8010..index for dirve amplifier settings
15.. subindex for velocity proportional gain
0..read/write-value
4..# bytes

p1=nan

Any idea?
For now I use the init-table to set those values - but it's quite laborious, since this approach needs many steps (deactivating ECAT, set value inside init-table, loading mapping to PPMAC, issue ecatreset, activating ECAT, agitate motor)
Reply
#2
Try changing the number of bytes between 1,2 and 4. Hopefully there is an option that does not give nan. Is this on Acontis?
Reply
#3
It does look like that subindex is 4 bytes. Still try other sizes as Eric indicated (in case I'm misreading this), but try to also issue the ecattypedsdo command while EtherCAT is disabled.

the drive may be doing something to block you from accessing (even just reading) that parameter to prevent it from being changed on the fly. If it works with EtherCAT disabled, then there may be some other command you need to issue to the drive first to disable it before it lets you change gains, but since it'd be pretty drive specific, I'm not sure what it would be.
Reply
#4
Thank you Eric and Alex!
I tried all but without success. Always nan
The register ist 4 bytes, by the way.

Does anybody know something else?!
Reply
#5
I asked if this is Acontis because we have two SDO functions. ecattypedsdo is preferred for Acontis, but you can also try ecatsdo. The arguments are reordered and it doesn't need a number of bytes.

I would also try Alex's idea of disabling ecat with ECAT[0].Enable=0 before transferring SDOs in case there is a device specific issue.

Beyond those I would use another tool for viewing these registers to make sure index $8010 subindex 15 is correct. Can you view these values in twincat?

Are you sure it isn't more than 4 bytes?

Try listing the subindex as $F
Reply
#6
Yes, I am using Acontis

Both cmds don't work for me, ecatsdo() nor ecattypedsdo()
Also not when ECAT disabled
hex subindex doesn't help either

And yes, it is 4 bytes

Funny thing- in diagnosis mode I can change 0x8010:18, gain for current amplifier
0x8010:15 is not listed their


By time I will try it with TwinCat. There the parameter is listed:


Attached Files Image(s)
   
Reply
#7
From the screen shot, it looks like the sub-index is a hex $15. I'm a little surprised as I never see large sub-index that large numbers.

Try replacing this:
l0=ecattypedsdo(0,0,1,$8010,15,0,4) l0

With this:
l0=ecattypedsdo(0,0,1,$8010,$15,0,4) l0
Reply
#8
Unfortunately no results.
Does not matter if ECAT enabled/disabled.
Tried both functions ecatsdo() ecattypedsdo()
Reply
#9
It doesn't work, even with $15 as the subindex instead of 15? For some reason I spaced out entirely when I was looking into your drive and the correct subindex is absolutely 21 ($15), not 15, which does not appear to exist. Just to be sure, can you re-try these two commands and verify that they both fail?

l0=ecattypedsdo(0,0,1,$8010,$15,0,4) l0

l0=ecattypedsdo(0,0,1,$8010,21,0,4) l0
Reply
#10
I tried it all:

root@10.0.0.103:/opt/ppmac# gpascii
STDIN Open for ASCII Input
l0=ecattypedsdo(0,0,1,$8010,$15,0,4) l0
L0=nan

l0=ecattypedsdo(0,0,1,$8010,$15,0,4) l0
L0=nan

l0=ecattypedsdo(0,0,1,$8010,21,0,4) l0
L0=nan

l0=ecattypedsdo(0,0,1,$8010,21,0,4) l0
L0=nan

&1a

#1k

ecat[0].enable=0

l0=ecattypedsdo(0,0,1,$8010,21,0,4) l0
L0=nan

l0=ecattypedsdo(0,0,1,$8010,21,0,4) l0
L0=nan

l0=ecattypedsdo(0,0,1,$8010,$15,0,4) l0
L0=nan

l0=ecattypedsdo(0,0,1,$8010,$15,0,4) l0
L0=nan

vers
2.5.4.0

cpu
arm,LS1021A

sys.ecattype
Sys.EcatType=1

Reply
#11
I can't think of anything you could be doing wrong. Are you able to read any SDO values?
Reply
#12
I can read registers with ecatregreadwrite(). Eg:

p4=ecatregreadwrite(0,0,1,$92c,0,4) p4
P4=106128631
p4=ecatregreadwrite(0,0,1,$928,0,4) p4
P4=0
p4=ecatregreadwrite(0,0,1,$904,0,4) p4
P4=-239087290

I cannot read anything with ecattypedsod(), like
p4=ecattypedsdo(0,0,1,$92c,0,0,4) p4
P4=nan
p4=ecattypedsdo(0,0,1,$904,0,0,4)
p4
l0=ecattypedsdo(0,0,1,$6000,$11,0,4) l0
L0=nan
Reply
#13
What firmware and IDE version are you using? I might need that info to find answers about how SDO commands can fail.
Reply
#14
PPMAC V2.5.4.0 (with V2.5.0.3 same problems)
IDE V4.3.2.19
Reply
#15
Can you try this command? I'd like to try something a bit more universal to ensure SDOs really are all failing.
Code:
l0=ecattypedsdo(0,0,1,$6060,0,0,1) l0
Reply
#16
Hi Eric!
I gave it a try - both, with ECAT disabled / enabled. No good:

ecat[0].enable=0
l0=ecattypedsdo(0,0,1,$6061,0,0,1) l0
L0=nan
l0=ecattypedsdo(0,0,1,$6061,0,0,1) l0
L0=nan
l0=ecattypedsdo(0,0,1,$6060,0,0,1) l0
L0=nan
l0=ecattypedsdo(0,0,1,$6060,0,0,1) l0
L0=nan

l0=ecatregreadwrite(0,0,1,$6060,0,1) l0
L0=nan
l0=ecatregreadwrite(0,0,1,$6060,0,2) l0
L0=nan
l0=ecatregreadwrite(0,0,1,$6060,0,4) l0
L0=nan

l0=ecatregreadwrite(0,0,1,$92c,0,4) l0
L0=nan

ecat[0].enable=1

l0=ecatregreadwrite(0,0,1,$92c,0,4) l0
L0=-731329157

l0=ecatregreadwrite(0,0,1,$6060,0,1) l0
L0=nan
l0=ecatregreadwrite(0,0,1,$6060,0,2) l0
L0=nan
l0=ecatregreadwrite(0,0,1,$6060,0,4) l0
L0=nan
l0=ecattypedsdo(0,0,1,$6061,0,0,1) l0
L0=nan
l0=ecattypedsdo(0,0,1,$6061,0,0,1) l0
L0=nan
l0=ecattypedsdo(0,0,1,$6060,0,0,1) l0
L0=nan
l0=ecattypedsdo(0,0,1,$6060,0,0,1) l0
L0=nan
Reply
#17
In our experience, Beckhoff implements EtherCAT through two different methods--one following the DS 402 profile, and one that is more similar to I/O, following the MDP 742 profile. Based on the responses, we believe that your unit is programmed to use the MDP 742 profile, and that is causing these issues. If you contact Beckhoff, you should be able to get a file that can be written to the EEPROM of the device to reprogram it for DS 402--it may even be available from their website, but I can't see it. Once you have that, if you contact odt (dash) support (at) omron (dot) com, we can send you a document that can help you load the file onto the device.
Reply
#18
Hi Alex!
That is right - the device is setup with MDP742. I will follow your advice and get back to you by then.
Thank you so long, Anton
Reply
#19
Hi Alex!
I've changed from MDP472 to DS402, but still the same bad result as before. The function ecattypedsdo() returns nan all the way.
???!
Reply
#20
Sutty,

Can you issue the following 3 commands exactly as-is and then post a screen shot of the terminal window/response? The first two may take a little bit to get a response (the second in particular may take a while), so I'd issue them one at a time and wait in between. This would be with EtherCAT disabled (the second command will re-initialize the ethercat stack entirely; if EtherCAT was enabled, this will disable it anyways and may fault slaves).

ecat slaves
ecat reset
l0=ecattypedsdo(0,0,1,$1000,0,0,4) l0
Reply
#21
Hi Alex!
Well the setting changes now and then. At the moment I run 3 drives (EL7211-0011, EL7031, EL7211-0010) and 5 IO-terminals.
Here the results of the 3 cmds:

ecat slaves
0 VID=$00000002 PC=$044C2C52 0:0 OP + Slave_1001 [EK1100]
1 VID=$00000002 PC=$1C2B3052 0:1 OP + Slave_1002 [EL7211-0011]
2 VID=$00000002 PC=$1B773052 0:2 OP + Slave_1003 [EL7031]
3 VID=$00000002 PC=$1C2B3052 0:3 OP + Slave_1004 [EL7211-0010]
4 VID=$00000002 PC=$07D43052 0:4 OP + Slave_1005 [EL2004]
5 VID=$00000002 PC=$07D43052 0:5 OP + Slave_1006 [EL2004]
6 VID=$00000002 PC=$03FA3052 0:6 OP + Slave_1007 [EL1018]
7 VID=$00000002 PC=$03EC3052 0:7 OP + Slave_1008 [EL1004]
8 VID=$00000002 PC=$03EC3052 0:8 OP + Slave_1009 [EL1004]
ecatreset
Stopping ACONTIS communication
Starting ACONTIS communication
Restarting ACONTIS stack

Licenses granted by /opt/etherlab/etc/sysconfig/.ethercat: 8; MACID:00:50:C2:4D:79:9D

Ecat Type: 1; ECAT License for 32 axis

0 VID=$00000002 PC=$044C2C52 0:0 OP + ??v?"
1 VID=$00000002 PC=$1C2B3052 0:1 SAFEOP + ??v?"
2 VID=$00000002 PC=$1B773052 0:2 SAFEOP + ??v?"
3 VID=$00000002 PC=$1C2B3052 0:3 SAFEOP + ??v?"
4 VID=$00000002 PC=$07D43052 0:4 OP + ??v?"
5 VID=$00000002 PC=$07D43052 0:5 OP + ??v?"
6 VID=$00000002 PC=$03FA3052 0:6 OP + ??v?"
7 VID=$00000002 PC=$03EC3052 0:7 OP + ??v?"
8 VID=$00000002 PC=$03EC3052 0:8 OP + ??v?"
l0=ecattypedsdo(0,0,1,$1000,0,0,4) l0
L0=nan
Reply
#22
Interesting. In that case, the slave that's not responding is actually the EK1100, as the ecattypedsdo command as formatted is talking to Slave 0.

Can you try to re-issue the same 3 commands, but with the EL7211-0011 as the only slave device physically connected?
Reply
#23
EK1100 is the ECAT-coupler, and needed absolutely. I could test EK1100 together with EL7211-0011
Reply
#24
Ah, sorry--I forgot that Beckhoff I/O shows up as individual slaves, as opposed to just multiple modules of a single slave, and didn't recognize the coupler part number. Yes, in that case please try with just the EK1100 and the EL7211-0011. If "ecat slaves" shows the EL7211 as Slave 1 instead of Slave 0 as I suspect it will (the 0 in the far left of the response, or the "0:1" in the middle of the response string), please change the second argument of ecattypedsdo to a "1" (so, ecattypedsdo(x,1,x,x,x,x,x) instead of ecattypedsdo(x,0,x,x,x,x,x)).
Reply
#25
Hi Alex!
I set up EK1100 and EL7211-0011 and issued ecatslaves, ecatreset, ecattypedsdo(). Still bad results:

ecatslaves
0 VID=$00000002 PC=$044C2C52 0:0 PREOP + Slave_001
1 VID=$00000002 PC=$1C2B3052 0:1 PREOP + Slave_002
ecatreset
Stopping ACONTIS communication
Starting ACONTIS communication
Restarting ACONTIS stack

Licenses granted by /opt/etherlab/etc/sysconfig/.ethercat: 8; MACID:00:50:C2:4D:79:9D

Ecat Type: 1; ECAT License for 32 axis

0 VID=$00000002 PC=$044C2C52 0:0 PREOP + ?v?"
1 VID=$00000002 PC=$1C2B3052 0:1 PREOP + ?v?"
l0=ecattypedsdo(0,1,1,$8010,$15,0,4) l0
L0=nan
l0=ecattypedsdo(0,1,1,$1000,0,0,4) l0
L0=nan
ECAT[0].Enable=1
ecatslaves
0 VID=$00000002 PC=$044C2C52 0:0 OP + Slave_1001 [EK1100]
1 VID=$00000002 PC=$1C2B3052 0:1 OP + Slave_1002 [EL7211-0011]
l0=ecattypedsdo(0,1,1,$8010,$15,0,4) l0
requested data size: 4 and received data size: 20 do not match
L0=nan
l0=ecattypedsdo(0,1,1,$1000,0,0,4) l0
L0=nan
l0=ecattypedsdo(0,1,1,$8010,$15,0,4) l0
requested data size: 4 and received data size: 20 do not match
L0=nan

??
We could start a remote-session - if that would help to advance here!
Reply
#26
Hi Alex!
I've changed Phase/Servo/RTI from 32/16/4 to 8/2/2 kHz - now ecattypedsdo() reads values:
l0=ecattypedsdo(0,1,1,$1000,$0,0,4) l0
L0=131474
l0=ecattypedsdo(0,1,1,$2002,$14,0,4) l0
L0=150
l0=ecattypedsdo(0,1,1,$2002,$15,0,4) l0
L0=37


But in the motor topology still the drive EL7211-0011 does not show up!!

Will you provide a bugfix for ecattypedsdo() in case of high phase-frequencies (32kHz)?
Reply
#27
To clear up a few misconceptions:

-EtherCAT is based off of the Servo Clock, not the Phase Clock
-As EtherCAT is based off of increments of 62.5uS, it is not expected to work at faster than 16kHz (and even that speed exceeds the limitations of most devices)--I am not sure if this is a limitation of our implementation or if this is a normal EtherCAT spec, but I haven't seen EtherCAT conforming devices rated for faster than 16kHz, and more commonly 8kHz is the fastest I've seen for drives
-I am not sure what speed you are using EtherCAT, but I suspect that you are not properly setting ECAT[i].ServoExtension to accomodate having different values for your servo clock and your EtherCAT clock.

Can you please query:
l0=ecattypedsdo(0,1,1,$492,0,0,4) l0

$492 may not be 32-bit (size = 4), so if that gives nan, please query other sizes. In general, any device that is properly identifying itself as a drive will show up as an option in the system setup. If it's not there, it's either because we can't read the settings from the drive by using ecattypedsdo or that the devices are not properly identifying themselves in registers $1000 (which you queried) and $492.
Reply
#28
Sorry, in my case the ecattypedsdo() function seems not being stable.
I can't get any value from any of those addresses anymore. Also not on lower servo-frequencies.
I will try it next week again.

Is their any advice for savely using this function?!

By the way, of course, ServoExtension was well set since all the time to meet the 1ms cycle time of ECAT.
Reply
#29
In my limited experience, if you type something wrong with ecattypedsdo it will return nan and continue to return nan even on correct parameters until reset.
Reply
#30
Thanks, Jeff!
Do you mean ecatreset or $$$ or $$$***!?
Reply
#31
Hi Jeff!
Now I found the reason for the mailfunction of ecattypedsto() --> ECAT[].ServoExtension
If set to match the ECAT Cycle time (eg 1ms Cycle time, Servo-Freq 16 kHz --> ServoExtension=15) then the function ecattypedsdo() delivers "nan" all the time.
If ServoExtension=3 or less, then the function ecattypedsdo() works correctly and delivers reasonable values all the time.
The lower ServoExtension, the higher its reliability.
Thanks anyway for your efforts!
Reply
#32
Glad its working for you. I have the ecattypedsdo called thousands of times a day on our robot as a check for errors before it does a task. Once and a while, when I'm debugging something else ecat related in the terminal, it will start to receive NaNs. Then I usually do $$$ first, then $$$*** if necessary.

I wonder if the ecatypedsdo reading has to occur between the PDO transfers, so if you're transferring more PDO variables or have shorter update periods due to ECAT[].ServoExtension, you have less time for ecatypedsdo. My mental model of the EtherCAT communication still has a lot of holes.
Reply
#33
That behavior still sounds odd to me such that I'm going to try to look into it in the coming weeks, though admittedly, it's a bit hard to do so as I didn't think to bring any ECAT slaves while working remotely.

As for SDO reads during EtherCAT communication, that's close, Jeff. We typically don't recommend issuing too many SDO commands while EtherCAT is enabled specifically because, depending on the exact timing of it, it can cause interference and problems. I believe it is more related to if an SDO read forces the PDO read to take too long that it rolls over into the next PDO read period. This isn't too likely to happen if you just are reading one SDO every few EtherCAT cycles, but if you start reading too many of them or too frequently, this can break things a bit. Because of this, if someone is reading SDOs very often, we strongly recommend they investigate mapping them as PDOs altogether or possibly lowering their EtherCAT rate.

However, this would be somewhat contradictory to the "fix" sutty found (where a slower EtherCAT rate causes intermittent issues), hence wanting to look into that more.
Reply
#34
Hi Alex!
Take in account that in my case ECAT runs in busshift-mode! Besides everything else is on default-setting.
I need SDOs only for tuning-issues (setting gains) - so as a workaround I can change ServoExtension for that goal, and set it back after each SDO-write-access.
Anyhow, thanks for keeping track on this!!
Reply
#35
Hi Alex!
Did you get to do some testings meanwhile?
Any news?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)