<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;">
<p>Hello everyone!</p>
<p><br>
</p>
<p>Currently I am trying to commission a EL7201-0000 with a AM3111-0300-0001 connected to it. My first step in this process is to get it running under TwinCAT 3. I would like to use the velocity control option and also have the position, velocity and torque
returned to me. Up to this point it works quite nicely and I was able to export the configfile and also took note of the entries for 1C12 and 1C13.</p>
<p><br>
</p>
<p>The next step would be to write a generic slave for the Matlab/Simulink environment. At this point it starts to come apart. I am missing the information for the AssignActivate and DC. Unfortunately the command ethercat xml does not return the information
for the AssignActivate. My question would be, does anyone have some insights that might help me with commissioning this axis? I enclosed the generic slave below.</p>
<p><br>
</p>
<p>Kind regards,</p>
<p><br>
</p>
<p>Philipp Weishaar</p>
<p><br>
</p>
<p></p>
<div>function rv = kleineAchse_test<br>
% Slave configuration<br>
<br>
rv.SlaveConfig.vendor = 2;<br>
rv.SlaveConfig.product = hex2dec('1C213052');<br>
rv.SlaveConfig.description = 'EL7201-0000';<br>
<br>
<br>
rv.SlaveConfig.sm = { ...<br>
{0, 0, {<br>
}}, ...<br>
{1, 1, {<br>
}}, ...<br>
{2, 0, {<br>
{hex2dec('1600'), [<br>
hex2dec('7010'), hex2dec('01'), 16; ... %Controlword<br>
]}, ...<br>
{hex2dec('1601'), [<br>
hex2dec('7010'), hex2dec('06'), 32; ... %Target velocity<br>
]}, ...<br>
}}, ...<br>
{3, 1, {<br>
{hex2dec('1a00'), [<br>
hex2dec('6000'), hex2dec('11'), 32; ... % Position<br>
]}, ...<br>
{hex2dec('1a01'), [<br>
hex2dec('6010'), hex2dec('01'), 16; ... % Statusword<br>
hex2dec('6010'), hex2dec('07'), 32; ... % Actual velocity<br>
hex2dec('6010'), hex2dec('08'), 16; ... % Actual torque<br>
]}, ...<br>
}}, ...<br>
};<br>
<br>
rv.SlaveConfig.dc = [hex2dec('310'), 250000, 0, 0, 0, 0, 1000000, 0, 0, 0]; % DC values for time-step of 0.001 seconds<br>
<br>
% SDO<br>
<br>
rv.SlaveConfig.sdo = {<br>
hex2dec('1C12'),-1, 0, [02,00,00,22,01,22]; %<br>
hex2dec('1C13'),-1, 0, [04,00,00,26,01,26,02,26,03,26]; %<br>
%hex2dec('F081'),hex2dec('01'),32, 1376256; % <br>
hex2dec('8011'),hex2dec('11'),32,6000; % Max Current<br>
hex2dec('8011'),hex2dec('12'),32,3220; % Rated current<br>
hex2dec('8011'),hex2dec('13'),8,4; % Motor pole pairs<br>
hex2dec('8011'),hex2dec('15'),16,330; % Commutation Offset<br>
hex2dec('8011'),hex2dec('16'),32,50; % Torque constant<br>
hex2dec('8011'),hex2dec('18'),32,26; % Rotor moment of inertia<br>
hex2dec('8011'),hex2dec('19'),16,7; % Winding inductance<br>
hex2dec('8011'),hex2dec('1B'),32,4766; % Motor speed limitation<br>
hex2dec('8011'),hex2dec('2D'),16,200; % Motor thermal time constant<br>
hex2dec('8010'),hex2dec('12'),16,5; % Current loop integral time<br>
hex2dec('8010'),hex2dec('13'),16,83; % Current loop proportional gain<br>
hex2dec('8010'),hex2dec('14'),32,150; % Velocity loop integral time<br>
hex2dec('8010'),hex2dec('15'),32,46; % Velocity loop proportional gain<br>
hex2dec('8010'),hex2dec('19'),32,24000 % Nominal DC link voltage<br>
};<br>
<br>
% Control word<br>
rv.PortConfig.input(1).pdo = [2, 0, 0, 0];<br>
rv.PortConfig.input(1).pdo_data_type = 1016;<br>
<br>
% Velocity command value<br>
rv.PortConfig.input(2).pdo = [2, 1, 0, 0];<br>
rv.PortConfig.input(2).pdo_data_type = 2032;<br>
<br>
% Actual Position<br>
rv.PortConfig.output(1).pdo = [3, 0, 0, 0];<br>
rv.PortConfig.output(1).pdo_data_type = 1032;<br>
<br>
% Statusword<br>
rv.PortConfig.output(2).pdo = [3, 1, 0, 0];<br>
rv.PortConfig.output(2).pdo_data_type = 1016;<br>
<br>
% Actual velocity<br>
rv.PortConfig.output(3).pdo = [3, 1, 1, 0];<br>
rv.PortConfig.output(3).pdo_data_type = 2032;<br>
<br>
% Actual torque<br>
rv.PortConfig.output(4).pdo = [3, 1, 2, 0];<br>
rv.PortConfig.output(4).pdo_data_type = 2016;<br>
<br>
end</div>
<br>
<p></p>
</div>
</body>
</html>