On Tue, Dec 16, 2008 at 01:22:29PM +0900, Hobin Yoon wrote: > It is quite interesting. Could you give us some more details on how you > invoked 'ethercat'? Because 'ethercat' doesn't seem to provide PDO mapping > and data writing to domain.
Yeah, we're hardcoding certain "commands" to the four slaves, e.g. like this: E=/opt/etherlab/bin/ethercat # Disable sync. sudo $E download -p 0 --type uint16 0x4213 0 0 sudo $E download -p 1 --type uint16 0x4213 0 0 sudo $E download -p 2 --type uint16 0x4213 0 0 sudo $E download -p 3 --type uint16 0x4213 0 0 # Init 1 sudo $E download -p 0 --type uint16 0x6040 0 6 sudo $E download -p 1 --type uint16 0x6040 0 6 sudo $E download -p 2 --type uint16 0x6040 0 6 sudo $E download -p 3 --type uint16 0x6040 0 6 # Init 2 sudo $E download -p 0 --type uint16 0x6040 0 7 sudo $E download -p 1 --type uint16 0x6040 0 7 sudo $E download -p 2 --type uint16 0x6040 0 7 sudo $E download -p 3 --type uint16 0x6040 0 7 # Init 3 sudo $E download -p 0 --type uint16 0x6040 0 15 sudo $E download -p 1 --type uint16 0x6040 0 15 sudo $E download -p 2 --type uint16 0x6040 0 15 sudo $E download -p 3 --type uint16 0x6040 0 15 # Move robot forward with full speed (2200). sudo $E download -p 0 --type int16 0x6042 0 -- 2200 sudo $E download -p 1 --type int16 0x6042 0 -- -2200 sudo $E download -p 2 --type int16 0x6042 0 -- 2200 sudo $E download -p 3 --type int16 0x6042 0 -- -2200 # Wait a bit. sleep 1 # Stop robot. sudo $E download -p 0 --type int16 0x6042 0 0 sudo $E download -p 1 --type int16 0x6042 0 0 sudo $E download -p 2 --type int16 0x6042 0 0 sudo $E download -p 3 --type int16 0x6042 0 0 HTH, Uwe. -- http://www.hermann-uwe.de | http://www.holsham-traders.de http://www.crazy-hacks.org | http://www.unmaintained-free-software.org _______________________________________________ etherlab-users mailing list [email protected] http://lists.etherlab.org/mailman/listinfo/etherlab-users
