[etherlab-users] Beckhoff AX200
Jens Kotlarski
kotlarski at ifr.uni-hannover.de
Fri Oct 17 18:38:41 CEST 2008
Hallo,
We are still trying to realize a communication block with our Beckhoff
AX200. Thanks to the pre-released of the EtherCAT master 1.4 (thanks a lot
Florian) it seems that we only need the xml-file and perform some settings.
Unfortunately it turned out, that we still have some trouble concerning the
pdo's included in the xml-file. The error we get is:
Error reported by S-function 'ec_slave2' in 'Modelname/Blockname':
Variable context: (null). SyncManager 3 is neither an input nor an
output SyncManager. Choose another PDO index.
We tried to set the pdo's to be used in order to avoid setting any pdo's
that are neither an input nor an output ==> we failed, always the complete
pdo list of the xml-file seems to be used. The Initialization (before using
the ec_slave2.c s-function) of our Simulink-Block (we just adopted an
existing one) is as follows (just the important parts):
masterStr = '';
positionStr = '';
[Address masterStr positionStr] =
getEtherCATAddress(gcb,master,index);
EtherCATInfoFile = 'EtherCATInfo_ax2xxx';
load(EtherCATInfoFile);
IOSpec = [];
SdoConfig = [];
device =
EtherCATInfo_ax2xxx(hex2dec('07d06014'),hex2dec('00001b82'));
SlaveConfig = genSlaveConfig(device);
pdo_entry = [ ...
hex2dec('6041'), hex2dec('0');... % Status Word
hex2dec('606c'), hex2dec('0');... % Current Velocity
hex2dec('6040'), hex2dec('0');... % Control Word
hex2dec('60ff'), hex2dec('0');... % Target Velocity
];
IOSpec.Port(1).PdoEntry = pdo_entry(2,:);
IOSpec.Port(2).PdoEntry = pdo_entry(2,:);
IOSpec.Port(3).PdoEntry = pdo_entry(3,:);
IOSpec.Port(4).PdoEntry = pdo_entry(4,:);
Maybe somebody has an idea about what is going wrong in our case!
Thanks in advance!
Best regards,
Jens
PS: @ Florian: do you additionally have the Simulink block for the Mood
drive? We could just find the s-function files. Maybe it works with this
communication block...
More information about the Etherlab-users
mailing list