- Posts: 193
- Thank you received: 57
Ethercat HAL driver
- sirop
- Offline
- Elite Member
-
Less
More
10 years 2 months ago #78907
by sirop
You can also try ethtool.
Such a simple command like
could already make a difference.
I myself use Intel 82583V with e1000e driver.
Replied by sirop on topic Ethercat HAL driver
narogon wrote:
Im going to buy one r8139 and other e1000e. Ana recommendation? Have every Intel card e1000e?
You can also try ethtool.
Such a simple command like
Code:
ethtool -C eth0 rx-usecs 0 rx-frames 1 tx-usecs 0 tx-frames 1
I myself use Intel 82583V with e1000e driver.
Please Log in or Create an account to join the conversation.
- jolli
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
10 years 1 month ago #80912
by jolli
Replied by jolli on topic Ethercat HAL driver
Hi,
I'm having trouble using AX5000 servo drivers. Compiled ethercat-master from sources with github/sittner debianizing and "--enable-sii-assign", linuxcnc-ethercat from github/sittner. Regular terminals (EK1100 with EL*) work a-ok. As linuxcnc-ethercat doesn't support SoE init configuration, I've tried to upload the data with a script using "ethercat soe_write" or by plugging ethercat cable to a machine running TwinCAT in config/freerun state. Loading modules in "halrun" goes fine, but a few seconds after starting lcec the driver goes SafeOP with error F4A5 "Parameter error". The drivers never go OP, no hissing from motors. Stopping and unloading lcec seems to reset the driver, and reading the parameter error list (S-0-0021) shows up empty. SoE IDNs are also "factory defaults" at that point.
Should I extend the lcec state machine to upload the configuration during operation state changes? Or is this some other quirk? Contrary to what's stated earlier in the thread, AX5000 doesn't seem to save the parameters in EEPROM - they seem really volatile - and also I've found no options in TwinCAT to do so.
Best regards, jolli
halrun commands:
ethercat-conf.xml:
SoE IDNs:
Exported from TwinCAT, presumably not relevant here as they should be correct, ie. works with TwinCAT.
I'm having trouble using AX5000 servo drivers. Compiled ethercat-master from sources with github/sittner debianizing and "--enable-sii-assign", linuxcnc-ethercat from github/sittner. Regular terminals (EK1100 with EL*) work a-ok. As linuxcnc-ethercat doesn't support SoE init configuration, I've tried to upload the data with a script using "ethercat soe_write" or by plugging ethercat cable to a machine running TwinCAT in config/freerun state. Loading modules in "halrun" goes fine, but a few seconds after starting lcec the driver goes SafeOP with error F4A5 "Parameter error". The drivers never go OP, no hissing from motors. Stopping and unloading lcec seems to reset the driver, and reading the parameter error list (S-0-0021) shows up empty. SoE IDNs are also "factory defaults" at that point.
Should I extend the lcec state machine to upload the configuration during operation state changes? Or is this some other quirk? Contrary to what's stated earlier in the thread, AX5000 doesn't seem to save the parameters in EEPROM - they seem really volatile - and also I've found no options in TwinCAT to do so.
Best regards, jolli
halrun commands:
Code:
loadrt threads name1=master period1=1000000
loadusr -W lcec_conf ethercat-conf.xml
loadrt lcec
addf lcec.read-all master
addf lcec.write-all master
start
ethercat-conf.xml:
Code:
<masters>
<master idx="0" appTimePeriod="2000000" refClockSyncCycles="1000">
<slave idx="0" type="generic" vid="00000002" pid="14516012" configPdos="false">
<syncManager idx="0" dir="out">
</syncManager>
<syncManager idx="1" dir="in">
</syncManager>
<syncManager idx="2" dir="out">
<pdo idx="0018">
<pdoEntry idx="86" subIdx="00" bitLen="16" halPin="a_masterctrl" halType="bit"/>
<pdoEntry idx="24" subIdx="00" bitLen="32" halPin="a_velcommand" halType="s32"/>
</pdo>
<pdo idx="1018">
<pdoEntry idx="86" subIdx="00" bitLen="16" halPin="b_masterctrl" halType="bit"/>
<pdoEntry idx="24" subIdx="00" bitLen="32" halPin="b_velcommand" halType="s32"/>
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="0010">
<pdoEntry idx="87" subIdx="00" bitLen="16" halPin="a_drivestatusword" halType="bit"/>
<pdoEntry idx="33" subIdx="00" bitLen="32" halPin="a_pos" halType="s32"/>
</pdo>
<pdo idx="1010">
<pdoEntry idx="87" subIdx="00" bitLen="16" halPin="b_drivestatusword" halType="bit"/>
<pdoEntry idx="33" subIdx="00" bitLen="32" halPin="b_pos" halType="s32"/>
</pdo>
</syncManager>
<dcConf assignActivate="730" sync0Cycle="*1" sync0Shift="50000"/>
</slave>
</master>
</masters>
SoE IDNs:
Exported from TwinCAT, presumably not relevant here as they should be correct, ie. works with TwinCAT.
Please Log in or Create an account to join the conversation.
- cgc
- Offline
- Senior Member
-
Less
More
- Posts: 40
- Thank you received: 10
10 years 4 weeks ago #81207
by cgc
Replied by cgc on topic Ethercat HAL driver
Hi Jolli,
is it possible to send the parameters with CoE?
regards Frank
is it possible to send the parameters with CoE?
regards Frank
Please Log in or Create an account to join the conversation.
- jolli
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
10 years 3 weeks ago - 10 years 3 weeks ago #81298
by jolli
Replied by jolli on topic Ethercat HAL driver
Hi,
CoE doesn't seem to be an option for configuration link , only for synchronization.
I had missed an error message while uploading parameters, a problem that has been mentioned a couple times in etherlab-users mailing list. IDN P-0-0150, encoder configuration, is longer than others (228B), and should be sent in two parts. Snooping on TwinCAT, first packet is sent just as SoE packet with FragmentsLeft, and the second one sends rest of data with IDN headers; then, the servo driver acknowledges the transfer. Etherlab-master sends the first part, but second is left out, and when next configuration packet comes the servo driver responds with 7003 Malformed Packet - rightly so.
The mailing list discussions never came to any conclusion on the error, so I'll have to dig on this - any clues?
BR, Jolli
CoE doesn't seem to be an option for configuration link , only for synchronization.
I had missed an error message while uploading parameters, a problem that has been mentioned a couple times in etherlab-users mailing list. IDN P-0-0150, encoder configuration, is longer than others (228B), and should be sent in two parts. Snooping on TwinCAT, first packet is sent just as SoE packet with FragmentsLeft, and the second one sends rest of data with IDN headers; then, the servo driver acknowledges the transfer. Etherlab-master sends the first part, but second is left out, and when next configuration packet comes the servo driver responds with 7003 Malformed Packet - rightly so.
The mailing list discussions never came to any conclusion on the error, so I'll have to dig on this - any clues?
BR, Jolli
Last edit: 10 years 3 weeks ago by jolli.
Please Log in or Create an account to join the conversation.
- jolli
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
10 years 2 weeks ago #81673
by jolli
Replied by jolli on topic Ethercat HAL driver
Update regarding IDN writing:
As the first part was sent a-ok with ethercat-tool but second part never
appeared, I tried sending first more than fragment-length of the data, and
then the second part in another call. The first part quits with timeout,
but after second part the write can be confirmed full and successful with
'ethercat soe_read'. (ethercat-tool has been patched to accept hex-ascii)
Following part is for reference for anyone else dealing with this:
Commands, data cut:
dmesg, rather intresting value for timeout:
As the first part was sent a-ok with ethercat-tool but second part never
appeared, I tried sending first more than fragment-length of the data, and
then the second part in another call. The first part quits with timeout,
but after second part the write can be confirmed full and successful with
'ethercat soe_read'. (ethercat-tool has been patched to accept hex-ascii)
Following part is for reference for anyone else dealing with this:
Commands, data cut:
Code:
ethercat soe_write -t hex_ascii 0 S-0-0150 e000e000070000004861.... ;more than 118 bytes
ethercat soe_write -t hex_ascii 0 S-0-0150 00000000000000000200... ;final 110 bytes
dmesg, rather intresting value for timeout:
Code:
[ 8279.973142] EtherCAT DEBUG 0-0: Scheduling SoE write request.
[ 8279.975524] EtherCAT DEBUG 0-0: Processing SoE request...
[ 8279.975535] EtherCAT DEBUG 0-0: Writing IDN 0x8096 of drive 0 (228 byte).
[ 8279.975544] EtherCAT DEBUG 0-0: SCC write request:
--- 8< data cut 8< ---
[ 8279.983531] EtherCAT ERROR 0-0: Timeout after 17179717 ms while waiting for write response.
[ 8279.983544] EtherCAT ERROR 0-0: Writing IDN 0x8096 failed.
[ 8279.983567] EtherCAT ERROR 0-0: Failed to process SoE request.
[ 8279.983575] EtherCAT DEBUG 0-0: Processing register request...
[ 8279.985273] EtherCAT DEBUG 0-0: Scheduling SoE write request.
[ 8279.987517] EtherCAT DEBUG 0-0: Register request successful.
[ 8279.987537] EtherCAT DEBUG 0-0: Processing SoE request...
[ 8279.987547] EtherCAT DEBUG 0-0: Writing IDN 0x8096 of drive 0 (110 byte).
[ 8279.987565] EtherCAT DEBUG 0-0: SCC write request:
--- 8< data cut 8< ---
[ 8279.999492] EtherCAT DEBUG 0-0: SCC write response:
[ 8279.999499] EtherCAT DEBUG: 04 40 96 80
[ 8279.999512] EtherCAT DEBUG 0-0: Finished SoE request.
[ 8279.999544] EtherCAT DEBUG 0: Finished SoE write request.
Please Log in or Create an account to join the conversation.
- jolli
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
10 years 2 weeks ago - 10 years 2 weeks ago #81674
by jolli
Replied by jolli on topic Ethercat HAL driver
Moving on:
Although the configuration data is (should be) ok, servos still don't go OP. After configuring with ethercat-tool and starting system (start halrun, load modules, load lcec_conf, start) everything else seems to work according to dmesg (ec_master debuglevel set to 1) but synchronising.. well, it's interesting. I plotted all "EtherCAT DEBUG 0-0: Sync after x ms: y ns" output in following picture:
Looks like the system doesn't even try to synchronize? From what I see, I guess the servo configuration is reset and DC is simply not running?
dmesg from the run, until sync messages start:
Although the configuration data is (should be) ok, servos still don't go OP. After configuring with ethercat-tool and starting system (start halrun, load modules, load lcec_conf, start) everything else seems to work according to dmesg (ec_master debuglevel set to 1) but synchronising.. well, it's interesting. I plotted all "EtherCAT DEBUG 0-0: Sync after x ms: y ns" output in following picture:
Looks like the system doesn't even try to synchronize? From what I see, I guess the servo configuration is reset and DC is simply not running?
dmesg from the run, until sync messages start:
Code:
EtherCAT: Requesting master 0...
EtherCAT DEBUG 0: IDLE -> OPERATION.
EtherCAT: Successfully requested master 0.
EtherCAT DEBUG 0: ecrt_master_callbacks(master = 0xf3788000, send_cb = 0xfafcd029, receive_cb = 0xfafcd02e, cb_data = 0xf26de640)
EtherCAT DEBUG 0: ecrt_master_create_domain(master = 0xf3788000)
EtherCAT DEBUG 0: Created domain 0.
EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xf3788000, alias = 0, position = 0, vendor_id = 0x00000002, product_code = 0x14516012)
EtherCAT DEBUG 0: Creating slave configuration for 0:0, 0x00000002/0x14516012.
EtherCAT DEBUG 0 0:0: Attached slave 0.
EtherCAT DEBUG 0 0:0: ecrt_slave_config_dc(sc = 0xf419c000, assign_activate = 0x0730, sync0_cycle = 250000, sync0_shift = 50000, sync1_cycle = 2000000, sync1_shift = 0
EtherCAT DEBUG 0: ecrt_domain_reg_pdo_entry_list(domain = 0xf2ff9fc0, regs = 0xf2e5b0c0)
EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xf3788000, alias = 0, position = 0, vendor_id = 0x00000002, product_code = 0x14516012)
EtherCAT DEBUG 0 0:0: ecrt_slave_config_reg_pdo_entry(sc = 0xf419c000, index = 0x0086, subindex = 0x00, domain = 0xf2ff9fc0, bit_position = 0xfaf811c8)
EtherCAT DEBUG 0: Domain 0: Added 12 bytes, total 12.
EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xf3788000, alias = 0, position = 0, vendor_id = 0x00000002, product_code = 0x14516012)
EtherCAT DEBUG 0 0:0: ecrt_slave_config_reg_pdo_entry(sc = 0xf419c000, index = 0x0024, subindex = 0x00, domain = 0xf2ff9fc0, bit_position = 0xfaf812a8)
EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xf3788000, alias = 0, position = 0, vendor_id = 0x00000002, product_code = 0x14516012)
EtherCAT DEBUG 0 0:0: ecrt_slave_config_reg_pdo_entry(sc = 0xf419c000, index = 0x0086, subindex = 0x00, domain = 0xf2ff9fc0, bit_position = 0xfaf81388)
EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xf3788000, alias = 0, position = 0, vendor_id = 0x00000002, product_code = 0x14516012)
EtherCAT DEBUG 0 0:0: ecrt_slave_config_reg_pdo_entry(sc = 0xf419c000, index = 0x0024, subindex = 0x00, domain = 0xf2ff9fc0, bit_position = 0xfaf81468)
EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xf3788000, alias = 0, position = 0, vendor_id = 0x00000002, product_code = 0x14516012)
EtherCAT DEBUG 0 0:0: ecrt_slave_config_reg_pdo_entry(sc = 0xf419c000, index = 0x0087, subindex = 0x00, domain = 0xf2ff9fc0, bit_position = 0xfaf81548)
EtherCAT DEBUG 0: Domain 0: Added 12 bytes, total 24.
EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xf3788000, alias = 0, position = 0, vendor_id = 0x00000002, product_code = 0x14516012)
EtherCAT DEBUG 0 0:0: ecrt_slave_config_reg_pdo_entry(sc = 0xf419c000, index = 0x0033, subindex = 0x00, domain = 0xf2ff9fc0, bit_position = 0xfaf81628)
EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xf3788000, alias = 0, position = 0, vendor_id = 0x00000002, product_code = 0x14516012)
EtherCAT DEBUG 0 0:0: ecrt_slave_config_reg_pdo_entry(sc = 0xf419c000, index = 0x0087, subindex = 0x00, domain = 0xf2ff9fc0, bit_position = 0xfaf81708)
EtherCAT DEBUG 0: ecrt_master_slave_config(master = 0xf3788000, alias = 0, position = 0, vendor_id = 0x00000002, product_code = 0x14516012)
EtherCAT DEBUG 0 0:0: ecrt_slave_config_reg_pdo_entry(sc = 0xf419c000, index = 0x0033, subindex = 0x00, domain = 0xf2ff9fc0, bit_position = 0xfaf817e8)
EtherCAT DEBUG 0: ecrt_master_activate(master = 0xf3788000)
EtherCAT DEBUG 0: Adding datagram pair with expected WC 3.
EtherCAT 0: Domain0: Logical address 0x00000000, 24 byte, expected working counter 3.
EtherCAT 0: Datagram domain0-0-main: Logical offset 0x00000000, 24 byte, type LRW.
EtherCAT DEBUG 0: Stopping master thread.
EtherCAT DEBUG 0: Master IDLE thread exiting...
EtherCAT 0: Master thread exited.
EtherCAT DEBUG 0: FSM datagram is f3788488.
EtherCAT 0: Starting EtherCAT-OP thread.
EtherCAT DEBUG 0: Operation thread running with fsm interval = 4000 us, max data size=45000
EtherCAT WARNING 0: 248 datagrams UNMATCHED!
EtherCAT DEBUG 0-0: Processing register request...
RTAPI: ERROR: Unexpected realtime delay on task 1
This Message will only display once per session.
Run the Latency Test and resolve before continuing.
EtherCAT DEBUG 0: Datagram f3788520 already queued (skipping).
--- repeated 15 times ---
EtherCAT DEBUG 0: UNMATCHED datagram:
EtherCAT DEBUG: 05 18 01 00 10 09 04 80 00 00 E8 B9 25 04 01 00
--- type repeated 15 times ---
EtherCAT DEBUG 0: Configuration changed (aborting state check).
EtherCAT DEBUG 0-0: Checking system time offset.
EtherCAT DEBUG 0-0: Register request successful.
EtherCAT DEBUG 0-0: DC 32 bit system time offset calculation: system_time=3933703680 (corrected with 4000000), app_time=529501164825473000, diff=454844904
EtherCAT DEBUG 0-0: Setting time offset to 454844904 (was 0)
EtherCAT DEBUG 0: Requesting OP...
EtherCAT DEBUG 0-0: Changing state from PREOP to OP.
EtherCAT DEBUG 0-0: Configuring...
EtherCAT DEBUG 0-0: Now in INIT.
EtherCAT DEBUG 0-0: Clearing FMMU configurations...
EtherCAT DEBUG 0-0: Clearing sync manager configurations...
EtherCAT DEBUG 0-0: Clearing DC assignment...
EtherCAT DEBUG 0-0: Configuring mailbox sync managers...
EtherCAT DEBUG 0-0: SM0: Addr 0x1800, Size 128, Ctrl 0x26, En 1
EtherCAT DEBUG 0-0: SM1: Addr 0x1A00, Size 128, Ctrl 0x22, En 1
EtherCAT DEBUG 0-0: Assigning SII access to PDI.
EtherCAT DEBUG 0-0: Now in PREOP.
EtherCAT DEBUG 0-0: Assigning SII access back to EtherCAT.
EtherCAT DEBUG 0-0: SM2: Addr 0x1000, Size 12, Ctrl 0x24, En 1
EtherCAT DEBUG 0-0: SM3: Addr 0x1100, Size 12, Ctrl 0x22, En 1
EtherCAT DEBUG 0 0:0: FMMU: LogAddr 0x00000000, Size 12, PhysAddr 0x1000, SM2, Dir out
EtherCAT DEBUG 0 0:0: FMMU: LogAddr 0x0000000C, Size 12, PhysAddr 0x1100, SM3, Dir in
EtherCAT DEBUG 0-0: Setting DC cycle times to 250000 / 2000000.
EtherCAT DEBUG 0-0: Checking for synchrony.
EtherCAT DEBUG 0-0: Sync after 0 ms: 48281492 ns
Last edit: 10 years 2 weeks ago by jolli.
Please Log in or Create an account to join the conversation.
Time to create page: 5.978 seconds