help with ethercat and omron drives

More
11 months 2 weeks ago - 11 months 2 weeks ago #338281 by bszoke
Perfect, thank you, that helps me prove some of my suspicions. I have to dig more, seems like I didn't understand the Omron data sheet. Apparently you can select the PDO's you want mapped to SM 2&3, through some registers.

"The PDO mapping to be used is specified in Sync Manager 2 PDO Assignment (1C12 hex) and Sync Manager 3 PDO Assignment (1C13 hex)."

I would be surprised if you don't get "83" errors. I get alot of unmatched datagrams but it will go into "op" mode. It might have to do with the actual PDO assignment register.

Yours might work because you have different PDO's defined, however it also states:
"Since the mappings you changed are not saved in EEPROM, you must specify objects each time you turn ON the power of the G5-series Servo Drive in order to use the mapping other than the default setting."

I did not see any SDOconfig for those registers, so I will assume you have the "default" values, which I will confirm on my drive:

Drive Firmware version v2.14 ( ethercat upload -p3 --type string 0x100a 0)
My Default values are:
Sync Manager 2 PDO Assignment Register readings
ethercat upload -p3 0x1C12 0 = 0
ethercat upload -p3 0x1C12 1 = 0x1701
ethercat upload -p3 0x1C12 2 = 0x0000
Sync Manager 3 PDO Assigment Register readings
ethercat upload -p3 0x1C13 0 = 0x1
ethercat upload -p3 0x1C13 1 = 0x1b01
ethercat upload -p3 0x1C13 2 = 0x0000

So we can see the hal file you are using is incorrect.
Unless you set these up somewhere else, but I wasn't able to see it in the XML settings

yours have 0x1702 & 0x1b04 which are mixed matched, not sure if thats allowed. By default it should be 0x1701 & 0x1b01

Ah so the variable PDO mapping makes sense now. You can assign whatever PDO's you want, you set the Assignment registers to 0x1600 & 0x1A00 respectively. If I can get that to work I will post a xml file for that example as well.
Last edit: 11 months 2 weeks ago by bszoke. Reason: Fix typing errors

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

More
11 months 2 weeks ago #338302 by bszoke
Maybe this is documented already somewhere and I just missed it. The key to all of this is this magical argument in the slave tag
configPdos="true"
This actually does alot of what I described above, however, it works in the XML for "other" reasons. If you look at the dmesg log with "ethercat debug 1" you can see exactly what its doing. The XML is still incorrect. To truly use the configPdos="true" properly you have to use the variable mapped PDO's. The reason the XML "works" is because it sets the PDO assignment register to the address listed in the <PDO idx>, however you will get a bunch of errors because it will try to map the PDO's to read only registers. And you don't truly get a variable assigned PDO, you only get what is in the fixed PDO in the registers selected. So it could be intentional, but if you are going to use it, might as well use the variable mapped PDO so you can pick and choose exactly what PDO's you want. However, I think there is a caveat to this, variable PDO mapping is only available in Firmware version > 2.1. So this could be the "lazy mans" way of setting the Fixed PDO's for SM 2&3.

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

More
11 months 2 weeks ago #338370 by ihavenofish
I get 83 errors when I shut down linuxcnc, but they reset when it turn it back on. So a non issue, although would be good to know the why and fix it.

Also not I have not yet set up the IO on the drives.

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

More
11 months 1 week ago #338949 by bszoke
I think I have seen those 83 errors as well, probably some issue with how it starts/stops but I agree that should not be an issue. I might try that with the "built in" drivers to see if that behaves any better.
Errors that don't really cause any known issues on my end but I did fix is
<pdo idx="0x1702"> to 0x1600
<pdo idx="0x1b04"> to 0x1A00
That maps to the truly variable PDO mapping, the ones you have set are fixed PDO mappings, and when lcec tries to write to them it gets errors and writes them to the dmesg logs. In addition if you use the correct ones you can map whatever PDO's you want.
I am pretty sure with the xml file you used it does not configure DC sync. When I use the built in "driver" type="OmrG5_KN04H" I see a message about the DC sync, when I use the example xml it does not, which makes sense because its not enabled in master.

refClockSyncCycles = "-1" for older versions of linuxcnc_ethercat ( i.e. lcec ) syncToRefClock="true" works for newer versions.

For anyone out there trying to use variable PDO, for some reason my drive does not support 0x60f4. It took me a long time to figure that out.

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

Time to create page: 0.153 seconds
Powered by Kunena Forum