Hello everyone!
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. 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. Kind regards, Philipp Weishaar function rv = kleineAchse_test % Slave configuration rv.SlaveConfig.vendor = 2; rv.SlaveConfig.product = hex2dec('1C213052'); rv.SlaveConfig.description = 'EL7201-0000'; rv.SlaveConfig.sm = { ... {0, 0, { }}, ... {1, 1, { }}, ... {2, 0, { {hex2dec('1600'), [ hex2dec('7010'), hex2dec('01'), 16; ... %Controlword ]}, ... {hex2dec('1601'), [ hex2dec('7010'), hex2dec('06'), 32; ... %Target velocity ]}, ... }}, ... {3, 1, { {hex2dec('1a00'), [ hex2dec('6000'), hex2dec('11'), 32; ... % Position ]}, ... {hex2dec('1a01'), [ hex2dec('6010'), hex2dec('01'), 16; ... % Statusword hex2dec('6010'), hex2dec('07'), 32; ... % Actual velocity hex2dec('6010'), hex2dec('08'), 16; ... % Actual torque ]}, ... }}, ... }; rv.SlaveConfig.dc = [hex2dec('310'), 250000, 0, 0, 0, 0, 1000000, 0, 0, 0]; % DC values for time-step of 0.001 seconds % SDO rv.SlaveConfig.sdo = { hex2dec('1C12'),-1, 0, [02,00,00,22,01,22]; % hex2dec('1C13'),-1, 0, [04,00,00,26,01,26,02,26,03,26]; % %hex2dec('F081'),hex2dec('01'),32, 1376256; % hex2dec('8011'),hex2dec('11'),32,6000; % Max Current hex2dec('8011'),hex2dec('12'),32,3220; % Rated current hex2dec('8011'),hex2dec('13'),8,4; % Motor pole pairs hex2dec('8011'),hex2dec('15'),16,330; % Commutation Offset hex2dec('8011'),hex2dec('16'),32,50; % Torque constant hex2dec('8011'),hex2dec('18'),32,26; % Rotor moment of inertia hex2dec('8011'),hex2dec('19'),16,7; % Winding inductance hex2dec('8011'),hex2dec('1B'),32,4766; % Motor speed limitation hex2dec('8011'),hex2dec('2D'),16,200; % Motor thermal time constant hex2dec('8010'),hex2dec('12'),16,5; % Current loop integral time hex2dec('8010'),hex2dec('13'),16,83; % Current loop proportional gain hex2dec('8010'),hex2dec('14'),32,150; % Velocity loop integral time hex2dec('8010'),hex2dec('15'),32,46; % Velocity loop proportional gain hex2dec('8010'),hex2dec('19'),32,24000 % Nominal DC link voltage }; % Control word rv.PortConfig.input(1).pdo = [2, 0, 0, 0]; rv.PortConfig.input(1).pdo_data_type = 1016; % Velocity command value rv.PortConfig.input(2).pdo = [2, 1, 0, 0]; rv.PortConfig.input(2).pdo_data_type = 2032; % Actual Position rv.PortConfig.output(1).pdo = [3, 0, 0, 0]; rv.PortConfig.output(1).pdo_data_type = 1032; % Statusword rv.PortConfig.output(2).pdo = [3, 1, 0, 0]; rv.PortConfig.output(2).pdo_data_type = 1016; % Actual velocity rv.PortConfig.output(3).pdo = [3, 1, 1, 0]; rv.PortConfig.output(3).pdo_data_type = 2032; % Actual torque rv.PortConfig.output(4).pdo = [3, 1, 2, 0]; rv.PortConfig.output(4).pdo_data_type = 2016; end
_______________________________________________ etherlab-users mailing list etherlab-users@etherlab.org http://lists.etherlab.org/mailman/listinfo/etherlab-users