Hi, I have been working with the EL6021 card for some time now with no issues regarding communications for RS485 using the default PDO/SDO parameters that come stock with the firmware version 04 (thanks to the communities help). Beckhoff has recently started rolling out newer firmware for the EL6021 that has a different default PDO mapping for all of the data bytes / status registers in which the PDO mappings are different per firmware version (they are stored in 0x1C12 and 0x1C13). I am using the fixed structures from the cstruct output using the ethercat user space tool.
To fix this, I was able to use the ethercat userspace tool with the upload / download commands to set 0x1C12/0x1C13 to the desired PDO bank (0x1604/0x1A04), but it seems these parameters are in volatile memory, which gets reset on power cycle. Here are the commands I am using with the ethercat tool binary to get the registers correct before running my application in realtime: ./ethercat download -p 7 -t uint8 0x1C12 0x00 0x00 ./ethercat download -p 7 -t uint16 0x1C12 0x01 0x1604 ./ethercat download -p 7 -t uint8 0x1C12 0x00 0x01 ./ethercat download -p 7 -t uint8 0x1C13 0x00 0x00 ./ethercat download -p 7 -t uint16 0x1C13 0x01 0x1A04 ./ethercat download -p 7 -t uint8 0x1C13 0x00 0x01 This has to be done before I run my users pace application for the pdo mapping / sync managers to be correct. I tried to use some of the the user space library functions from my application with ecrt_slave_config_sdoX() but the registers do not change which causes a failure during domain registration. The startup routine I am using does the following: 1. Complete non real-time SDO transactions 2. Get slave configurations 3. Configure sync managers 4. Create domain and Register domain pros 5. Activate master … Here is what I have for the EL6021 device in step 1: if ((error = ecrt_slave_config_sdo8(config(), 0x1C12, 0x00, 0x00))) return false; if ((error = ecrt_slave_config_sdo16(config(), 0x1C12, 0x01, 0x1604))) return false; if ((error = ecrt_slave_config_sdo8(config(), 0x1C12, 0x00, 0x01))) return false; if ((error = ecrt_slave_config_sdo8(config(), 0x1C13, 0x00, 0x00))) return false; if ((error = ecrt_slave_config_sdo16(config(), 0x1C13, 0x01, 0x1A04))) return false; if ((error = ecrt_slave_config_sdo8(config(), 0x1C13, 0x00, 0x01))) return false; Do the SDO’s only get written when the master is activated when using ecrt_slave_config_sdoX? Is there some other process that could be done other than calling into the ethercat tool using system() or using a pipe with popen() that would set these registers if the ecrt_slave_config_sdox isn’t working? Derrill Vezina Electrical Engineer Caron Engineering Inc. Office: 207-646-6071 ext. 360 Cell: 207-251-9072
_______________________________________________ etherlab-users mailing list [email protected] http://lists.etherlab.org/mailman/listinfo/etherlab-users
