[etherlab-users] SDO upload during initialization

Gavin Lambert gavinl at compacsort.com
Thu Dec 11 23:33:48 CET 2014


On 12 December 2014 11:12, quoth Derrill Vezina:
> 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:
[...]
> 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?

You should never try to change these registers manually like this.  Etherlab itself will automatically configure these registers based on the SM configuration you are registering from the cstruct.

Simply change the cstruct definitions to match the PDOs that you want to include in the domain.  If these are different for different firmware versions, then you will need to first determine which version they have (either via autodetection or via a configuration setting) and then register the appropriate cstruct for that version.





More information about the Etherlab-users mailing list