S7− Block for controlling the SEC−AC− via PROFIBUS · 2016. 3. 5. · The functional block...
Transcript of S7− Block for controlling the SEC−AC− via PROFIBUS · 2016. 3. 5. · The functional block...
Description
Functional block S7
TypeSEC−AC−...−PB−S7(version 3.9)
Description538 513en 0408a[688 716]
S7− Block for controlling theSEC−AC−... via PROFIBUS
Contents and general instructions
IFesto P.BE−SEC−AC−PB−S7−EN en 0408a
Original de. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Edition en 0408a. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Designation P.BE−SEC−AC−PB−S7−EN. . . . . . . . . . . . . . . . . . .
E (Festo AG�&�Co. KG, D�73726 Esslingen, Federal Republicof Germany, 2004)Internet: http://www.festo.comE−Mail: [email protected]
The reproduction, distribution and utilization of this docu�ment as well as the communicaton of its contents to otherswithout express authorization is prohibited. Offenders will beheld liable for the payment of damages. All rights reserved inthe event of the grant of a patent, utility module or design.
Contents and general instructions
II Festo P.BE−SEC−AC−PB−S7−EN en 0408a
Contents and general instructions
IIIFesto P.BE−SEC−AC−PB−S7−EN en 0408a
Contents
Designated use V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Basic principles of programmed software VI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Target group VII . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Important user instructions VIII . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1. Function block �SEC−AC controller" V3.9 1−1 . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1 Module functions 1−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.1 Positioning (default operation mode) 1−3 . . . . . . . . . . . . . . . . . . . . . . .
1.1.2 Reference travel (homing) 1−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.3 Jogging 1−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.4 Torque regulation 1−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.5 Synchronous operation 1−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.6 Formal parameters of the function block 1−4 . . . . . . . . . . . . . . . . . . . . .
2. Description of the function block with relevant parameters 2−1 . . . . . . . . . . . .
2.1 General 2−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.1 LADDR_I / LADDR_O 2−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.2 EN_Drive / EN_ok 2−4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.3 feed_constant 2−4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.4 init_flag 2−5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.5 Position_actual_value/current_actual_value/digital_inputs 2−5 . . . . .
2.2 Homing 2−6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.1 Homing methods 2−7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3 Positioning 2−8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3.1 Signal process for synchronisation of positioning jobs with the PLC 2−11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4 Jogging 2−12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.5 Torque regulation 2−13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.6 Synchronous operation 2−14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents and general instructions
IV Festo P.BE−SEC−AC−PB−S7−EN en 0408a
3. Setting parameters 3−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1 Bit mappings of the formal parameters 3−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1.1 8−bit formal parameter �digital_inputs" 3−3 . . . . . . . . . . . . . . . . . . . . . .
3.1.2 16−bit formal parameter �error" 3−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 Notes on PROFIBUS mode 3−4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3 Rotary axis 3−5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3.1 Proceed as follows 3−5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3.2 Instructions on use 3−6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4 Direct access to individual parameters in the controller 3−7 . . . . . . . . . . . . . . . .
A. Technical appendix A−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.1 Standard feed constants of Festo linear drives with Servo motors type MTR−AC... A−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents and general instructions
VFesto P.BE−SEC−AC−PB−S7−EN en 0408a
Designated use
The functional block (FB) is for controlling SEC−AC servo con�trollers via PROFIBUS−DP in a SIMATIC−S7 controller with inte�grated DP master power−on (e.g. CPU315−2DP).With the block the user can directly link the diverse functionsof the axis controller into his program.
Memory requirements FB10 V3.9: load memory RAMFunctional block: 3336 bytes 2846 bytesInstance data block: 388 bytes 186 bytes
Parameters can be set for the block and it is multi−instancecapable.
For multi−axis applications the FB for each axis is called with aseparate instance DP or multi−instance. Additional FBs andDBs are not required. Concurrent use of other FBs controllingthe same controller is not permitted.
The FB uses the system functions SFC14 and SFC15 for con�sistent data transfer.
The block is integrated in the application program and there itis called−up cyclically. An �init_flag" is used for initializationand setting parameters, which must be deleted at the firstcall−up (e.g. via OB100).
Contents and general instructions
VI Festo P.BE−SEC−AC−PB−S7−EN en 0408a
Basic principles of programmed software
Please note that it is not possible with the present state oftechnology to create programmed software which functionswithout problems and is compatible with all applications andcombinations intended by the user.
As a rule the software must therefore be used in the desig�nated manner as specified in the program description and inthe user instructions.
At the moment when the software is transferred or madeavailable, it is in a state in which it will function under normaloperating and application conditions.
Festo does not guarantee that the software will suffice for allapplications and purposes intended by the user, or that it willfunction without problems when used with other programs,or that it is compatible with these programs. The responsibil�ity for the correct selection and the consequences of usingthe software within the scope of use defined by the user, aswell as for the intended and achieved results therefore lieswith the user. The same applies to the written material sup�plied with the software.
The use of the programmed software does not exempt you ascustomer from your duties and responsibility for observingand adhering to technical machine and safety regulations aswell as for a comprehensive functional check.
Contents and general instructions
VIIFesto P.BE−SEC−AC−PB−S7−EN en 0408a
Target group
This manual is addressed to personnel who have been spe�cifically trained in the areas of controller and automationtechnology, erectors, etc.
� who are dealing with digital drive controllers for the firsttime,
� or those who are already familiar with digital drive con�trollers, but who are installing a digital drive controllerlike the SEC−AC for the first time.
Information:You will find your contact for technical support for this prod�uct on the Festo Internet site, at the address:www.festo.com [<country−specific homepage>/Industrial−automation/<Country−code>]
Informationon the function blocks described here, as well as supplemen�tary software for your products (for example GSD−PROFIBUSfiles) is on the Festo Internet site at the address:www.fes�to.com under [Industrial Automation] [Services & Support][Download Area/Software].
Contents and general instructions
VIII Festo P.BE−SEC−AC−PB−S7−EN en 0408a
Important user instructions
Danger categories
This manual contains instructions on the possible dangerswhich may occur if the product is not used correctly. Theseinstructions are marked (Warning, Caution, etc.), printed on ashaded background and marked additionally with a picto�gram. A distinction is made between the following dangerwarnings:
WarningThis means that failure to observe this instruction mayresult in serious personal injury or damage to property.
CautionThis means that failure to observe this instruction mayresult in personal injury or damage to property.
Please noteThis means that failure to observe this instruction mayresult in damage to property.
The following pictogram marks passages in the text whichdescribe activities with electrostatically sensitive compo�nents.
Electrostatically sensitive components may be damaged ifthey are not handled correctly.
Contents and general instructions
IXFesto P.BE−SEC−AC−PB−S7−EN en 0408a
Marking special information
The following pictograms mark passages in the textcontaining special information.
Pictograms
Information:Recommendations, tips and references to other sources ofinformation.
Accessories:Information on necessary or sensible accessories for theFesto product.
Environment:Information on environment−friendly use of Festo products.
Text markings
· The bullet indicates activities which may be carried out inany order.
1. Figures denote activities which must be carried out in thenumerical order specified.
� Hyphens indicate general activities.
Contents and general instructions
X Festo P.BE−SEC−AC−PB−S7−EN en 0408a
Function block �SEC−AC controller" V3.9
1−1Festo P.BE−SEC−AC−PB−S7−EN en 0408a
Chapter 1
1. Function block �SEC−AC controller" V3.9
1−2 Festo P.BE−SEC−AC−PB−S7−EN en 0408a
Contents
1. Function block �SEC−AC controller" V3.9 1−1 . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1 Module functions 1−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.1 Positioning (default operation mode) 1−3 . . . . . . . . . . . . . . . . . . . . . . .
1.1.2 Reference travel (homing) 1−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.3 Jogging 1−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.4 Torque regulation 1−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.5 Synchronous operation 1−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1.6 Formal parameters of the function block 1−4 . . . . . . . . . . . . . . . . . . . . .
1. Function block �SEC−AC controller" V3.9
1−3Festo P.BE−SEC−AC−PB−S7−EN en 0408a
1.1 Module functions
1.1.1 Positioning (default operation mode)
Travelling to a defined position with a defined speed and ac�celeration/braking ramp. The position can be approachedabsolute or relative to the actual position. Profile movementsare also possible through specification of a final speedgreater than zero with direct execution of the next positioningjob.
1.1.2 Reference travel (homing)
Finding or specifying a reference position to reset the positioncounter. There are 15 different methods for this.
1.1.3 Jogging
Movement at variable speed in the selected direction, provid�ing the relevant input is set.
1.1.4 Torque regulation
A defined force can be exerted using the drive without con�sideration of position and speed through the specification ofa variable setpoint torque value.
1.1.5 Synchronous operation
Synchronising the drive to an external encoder signal pro�vided via plug X10 as an additional setpoint position value.
This function can be selected in parallel to positioning mode.
1. Function block �SEC−AC controller" V3.9
1−4 Festo P.BE−SEC−AC−PB−S7−EN en 0408a
1.1.6 Formal parameters of the function block
Inputparameters
Pass−though parameters
LADDR_I
LADDR_O
feed_constant
EN_drive
homing_method
home_offset
homing_speed_switch
homing_speed_zero
homing_acceleration
start_homing
absolute_0_relative_1
change_set_immediately
target_position
profile_velocity
end_velocity
profile_acceleration
profile_deceleration
new_set_point
jogging_velocity
jogging_minus
jogging_plus
hold
fault_reset
enable_torque
target_torque en_OK
enable_sync following_error
encoder_resolution position_ok
encoder_numerator home_complete
encoder_divisor set_point_acknowledge
digital_inputs
position_actual_value
current_actual_value
init_flag error
Outputparameters
Fig.�1/1: Overview of the formal parameters of the DB10
1. Function block �SEC−AC controller" V3.9
1−5Festo P.BE−SEC−AC−PB−S7−EN en 0408a
Example of the module call−up in STL
CALL �SEC_controller� , DB10LADDR_I :=W#16#100 //Start address input area (HEX)LADDR_I :=W#16#100 //Start address output area (HEX)feed_constant :=L#63000 //Tooth belt axis with 63,000 mm feedhoming_method :=B#16#1 //Method 1 (HEX)home_offset :=L#0 //No zero point offsethoming_speed_switch :=L#100000 //Search ref. switch at 0.1 m/shoming_speed_switch :=L#100000 //Leave ref. switch at 0.05 m/shoming_acceleration :=L#4000000 //Accelerate / brake at 4 m/s*sEN_drive :=M20.0 //Drive enablestart_homing :=M20.1 //Start homingabsolute_0_relative_1 :=FALSE //Absolute positioning determinedchange_set_immediately :=FALSEnew_set_point :=M20.2 //Start positioninghold :=M20.3fault_reset :=M20.4jogging_minus :=M20.5jogging_plus :=M20.6enable_torque :=M20.7 // 1)enable_sync :=M21.0 // 2)target_position :=MD40 //Target positionprofile_velocity :=L#1200000 // Positioning speed 1.2 m/send_velocity :=L#0profile_acceleration :=L#4000000 //Acceleration with 4 m/s*sprofile_deceleration :=L#4000000 //Braking with 4 m/s*sjogging_velocity :=L#50000 //Jog speed 0.05 m/sencoder_resolution :=L#4096 // 2)encoder_numerator :=W#16#1A // 2)encoder_divisor :=W#16#2F // 2)target_torque :=W#16#1E6 // 1)digital_inputs :=MB22set_point_acknowledge :=M21.1position_ok :=M21.2home_complete :=M21.3following_error :=M21.4EN_drive_ok :=M21.5position_actual_value :=MD44 //Current actual positioncurrent_actual_value :=MD48 //Actual motor currenterror :=MW12 //Error bitsinit_flag :=M5.0 //Initialization flag
// 1) Only required for torque regulation// 2) Only required for synchronous operation
1. Function block �SEC−AC controller" V3.9
1−6 Festo P.BE−SEC−AC−PB−S7−EN en 0408a
Please noteYou do not need to assign actual parameters to formalparameters that you do not use.
Description of the function block with relevantparameters
2−1Festo P.BE−SEC−AC−PB−S7−EN en 0408a
Chapter 2
2. Description of the function block with relevant parameters
2−2 Festo P.BE−SEC−AC−PB−S7−EN en 0408a
Contents
2. Description of the function block with relevant parameters 2−1 . . . . . . . . . . . .
2.1 General 2−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.1 LADDR_I / LADDR_O 2−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.2 EN_Drive / EN_ok 2−4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.3 feed_constant 2−4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.4 init_flag 2−5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.5 Position_actual_value/current_actual_value/digital_inputs 2−5 . . . . .
2.2 Homing 2−6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.1 Homing methods 2−7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3 Positioning 2−8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3.1 Signal process for synchronisation of positioning jobs with the PLC 2−11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4 Jogging 2−12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.5 Torque regulation 2−13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.6 Synchronous operation 2−14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2. Description of the function block with relevant parameters
2−3Festo P.BE−SEC−AC−PB−S7−E N en 0408a
2.1 General
Formal parameters Type Range Comment
LADDR_I / LADDR_O I WORD Address range Projected I/O start addresses of the slave
EN_drive I BOOL 0/1 1 = drive ON / 0 = drive OFF
EN_ok O BOOL 0/1 Drive is active. No error
feed_constant I DINT 2 . . (231 −1) Feed constant (in �m) see Appendix A.1
init_flag D BOOL 0/1 Must be deleted for initialisation
fault_reset I BOOL 0/1 Reset fault (block and controller)
hold I BOOL 0/1 Hold drive / abort function. Effect dependson operation mode
position_actual_value O DINT (−231)..(231 −1) Current position [in �m]
current_actual_value O WORD (−215)..(215 −1) Current motor current (in 1/1000 x nominalmotor current)
digital_inputs O BYTE 0 . . 255 Digital inputs of the controller (see chapter 3.1)
error O WORD 0 . . 127 Error bits (see chapter 3.1)
2.1.1 LADDR_I / LADDR_O
The slave I/O addresses of the respective controller are auto�matically assigned using Step 7 during configuration of thehardware.
2. Description of the function block with relevant parameters
2−4 Festo P.BE−SEC−AC−PB−S7−E N en 0408a
2.1.2 EN_Drive / EN_ok
The EN_drive input enables the drive and the block functions,or shuts−off the drive via the emergency brake ramp.The prerequisite for this is: The drive enable logic must beparameterised to �Input Din5 plus fieldbus" in the controllerand digital input 5 must be supplied with 24 V.
Output EN_ok indicates: The drive is in operation, no error ispresent.
2.1.3 feed_constant
The feed_constant variable informs the controller of the feeddistance in �m covered by the axis during one motor revol�ution. Any gear conversion ratio must be taken into consider�ation. For standard values see Appendix A.1
Example:
Axis = DGE−25−750−ZR (63 mm feed), motor = MTR−AC−70−GA(i = 4). Feed constant = 15750 �m.The controller uses this information to convert the remainingposition parameters so that the following units can be used:
� Position specifications, actual position = �m
� Speeds = �m/s
� Acceleration = �m/s2
The feed constant is read in once upon initialisation of theblock.
2. Description of the function block with relevant parameters
2−5Festo P.BE−SEC−AC−PB−S7−E N en 0408a
2.1.4 init_flag
A flag is required in order to initialise the block and the asso�ciated controller. This flag must be deleted the first time it iscalled (for example via OB100). Once initialisation has beenperformed the flag is set by the block. Resetting the flag al�lows a re−initialisation to be forced at any time. Re−initialisa�tion occurs after every acknowledged error. This variablemust not be held at �logical 0" by a fixed instruction.
2.1.5 Position_actual_value / current_actual_value / digital_inputs
These output parameters are a constant source of the follow�ing status information:
� the current actual position (in �m)
� the current current (in 1/1000 x nominal motor current)
� the signal status of the controller’s digital inputs.
2. Description of the function block with relevant parameters
2−6 Festo P.BE−SEC−AC−PB−S7−E N en 0408a
2.2 Homing
Formal parameters Type Range Comment
start_homing I BOOL 0/1 Enables and starts homing
homing_method I BYTE 1 . . . 15 Homing method
home_offset I DINT (−231)..(231 −1) Offset of the reference position (in �m)
homing_speed_switch I DINT 0 ... (231 −1) Finds the speed switch [�m/s]
homing_speed_zero I DINT 0 ... (231 −1) Exits the speed switch [�m/s]
homing_acceleration I DINT 0 ... (231 −1) Acceleration / delay [�m/s2]
home_complete O BOOL 0/1 Homing successfully completed
The purpose of homing is to reset the positioning system. It isrequired only once following a power−on, but can be per�formed any number of times. Homing is activated by setting the start_homing input. Thisinput must remain set until homing is complete, otherwisehoming will be aborted. Successful conclusion is indicated with the outputhome_complete. The output is reset with: Start homing, faultbit 0, 1 or 3, new initialisation.
Using the hold input to abort homing results in an errormessage!
The home_offset variable can be used to move the machinezero point in a positive or negative direction relative to thereference point.
There are 15 different ways of determining the referencepoint.
2. Description of the function block with relevant parameters
2−7Festo P.BE−SEC−AC−PB−S7−E N en 0408a
2.2.1 Homing methods
No. Direction Target Connec�tion
Referencepoint for zeroposition
Remarks on zeropulse
1 negative Limit switch (X1.22) Zero pulse The resolver asactual value sensor
2 positive Limit switch (X1.10) Zero pulseactual−value sensorsupplies absolutel i hi
3 positive Reference switch (X1.11) Zero pulse
ppvalues within arevolution.
4 negative Reference switch (X1.11) Zero pulse
revolution.
Thus it is not necessary
5 negative Limit switch (X1.22) Limit switch
Thus it is not necessaryto execute a movementin order to evaluate the
6 positive Limit switch (X1.10) Limit switch
in order to evaluate thezero impulse. Theabsolute value of the
7 positive Reference switch (X1.11) Reference switchabsolute value of theresolver position isi l dd d
8 negative Reference switch (X1.11) Reference switchsimply addeddirection−related to the
9 negative No travel Zero pulse
direction related to thecurrent position oraccepted as the current
10 positive No travel Zero pulse
accepted as the currentactual position.
11 No travel Current actualposition
For method 11 theposition counter is setdirectly to zero
12 positive Stop Stop
directly to zero.
13 negative Stop Stop
14 positive Stop Zero pulse
15 negative Stop Zero pulse
2. Description of the function block with relevant parameters
2−8 Festo P.BE−SEC−AC−PB−S7−E N en 0408a
2.3 Positioning
Formal parameters Type Range Comment
new_set_point I BOOL 0/1 Execute / transfer new positioningprofile
set_point_acknowledge O BOOL 0/1 Handshake: 0 = new profile can be transferred1 = new profile has been transferred,
but not yet executed
change_set_immediately I BOOL 0/1 New positioning profile will beexecuted: 0 = once the current profile has been
processed 1 = immediately; the current profile
will be aborted
absolute_0_relative_1 I BOOL 0/1 0 = absolute positioning, 1 = relative positioning
target_position I DINT (−231)..(231 −1) Positioning profile:target position [�m]
profile_velocity I DINT (−231)..(231 −1) Positioning profile:positioning speed [�m/s]
end_velocity I DINT (−231)..(231 −1) Positioning profile:final speed [�m/s]
profile_acceleration I DINT 0 . . (231 −1) Positioning profile:acceleration [�m/s2]
profile_deceleration I DINT 0 . . (231 −1) Positioning profile: delay [�m/s2]
position_ok O BOOL 0/1 This output is set in the followingsituations:� Drive is in target window� Drive has been enabled with
EN_drive, position control mode isactivated (e.�g. after Emergency−Stop)
� Drive has been brought to astandstill via hold.
following_error O BOOL 0/1 Following error
2. Description of the function block with relevant parameters
2−9Festo P.BE−SEC−AC−PB−S7−E N en 0408a
The new_set_point input must be set before the axis canmove.
It transmits the positioning profile, consisting of the targetposition, positioning speed, final speed, acceleration, anddelay, to the controller. The controller must also be informedof whether the position is absolute or relative (incrementalvalue).
The position_ok output is set once the profile has been pro�cessed and the drive is in the defined target window.
The final speed is usually zero. The speed at which the di�rectly following positioning job is to be executed is only speci�fied here if a so−called profile movement is to be executed.With individual positioning tasks this variable is not relevant.
As soon as one positioning profile has been transferred fromthe controller and executed, the next one can be transferred(set_point_acknowledge output is zero).If the change_set_immediately input is not set, the secondprofile will be executed immediately upon completion of thefirst. If the input is set, the current profile will be aborted andthe new one will be executed immediately.
The following_error output indicates that the difference be�tween the actual position value and the target position valueis too great. The reason for this could include the accelerationbeing too high, the current being too low, or the load on thedrive being too heavy. The following error is indicated exclus�ively via the output; no error message is generated.
Positioning can be aborted using the hold input. The speci�fied profile_deceleration is used here.
2. Description of the function block with relevant parameters
2−10 Festo P.BE−SEC−AC−PB−S7−E N en 0408a
Please notePositioning mode is always active if no other function isselected. This means that the drive is always in positioncontrol mode, provided the drive is enabled and there areno errors.
If another function is activated while a positioning job isactive, it will be aborted immediately.
2. Description of the function block with relevant parameters
2−11Festo P.BE−SEC−AC−PB−S7−E N en 0408a
2.3.1 Signal process for synchronisation of positioning jobs with the PLC
A clean synchronisation between PLC and controller is en�sured when executing positioning jobs, with the followinghandshake procedure.
new_set_point
set_point_acknowledge
position_ok
1 2 3 4
1 The PLC brings a new positive flank on the input new_set_point.
2 The controller answers with a positive flank on the outputset_point_acknowledge, concurrently the output position_ok is reset.
3 The PLC brings a new positive flank on the input new_set_point.
4 The output position_ok can only be queried if the controller has reset theoutput set_point_acknowledge.
For profile movement, in which positioning jobs are seam�lessly linked together, without braking to zero speed betweenjobs, the PLC must always start the next job with the negativeflank of set_point_acknowledge.
The message position_ok only comes when the last job hasbeen executed and the drive is located in the target window.
2. Description of the function block with relevant parameters
2−12 Festo P.BE−SEC−AC−PB−S7−E N en 0408a
By evaluating the position _ok response − first with the nega�tive flank of set_point_acknowledge a then one also gets aunique message, even if the axis does not move at all (theaxis was already on the target position).
2.4 Jogging
Formal parameters Type Range Comment
jogging_minus I BOOL 0/1 Jogging in minus direction
jogging_plus I BOOL 0/1 Jogging in positive direction
jogging_velocity I DINT (−231)..(231 −1) Positioning speed in jogging mode [�m/s]
Setting a jogging_minus or jogging_plus input moves thedrive in the selected direction at a controlled speed.As soon as the respective input is reset, the drive brakes andreturns to position control mode. The positioning profile datais transferred for the acceleration and braking ramps.
The speed in jogging mode is specified dynamically with thevariable jogging_velocity.
CautionA negative value inverts the directional function of thejogging buttons.
This function facilitates manual operation or setting oper�ation. Since the current actual position is always available, itis also a simple way of realising teach−in operation.
The hold input sets the speed to zero.
2. Description of the function block with relevant parameters
2−13Festo P.BE−SEC−AC−PB−S7−E N en 0408a
2.5 Torque regulation
Formal parameters Type Range Comment
enable_torque I BOOL 0/1 Activates torque regulation
target_torque I WORD (−215)..(215 −1) Desired torque value in 1/1000 x nominalmotor torque 1)
1) The rated torque of a motor is derived from the parameterized rated current multiplied by thetorque constant.MTR−AC−55−3S = 0.457 MTR−BSM−50 = 0.75MTR−AC−70−3S = 0.32 MTR−BSM−63 = 0.74MTR−AC−100−3S = 0.711 MTR−BSM−80 = 0.79MTR−AC−100−5S = 1.49 MTR−BSM−90 = 0.79
Example: Example: motor MTR−AC−100−3S parameterized with 2.6 A rated current. Rated torque = 2.6 A × 0,711Nm/A = 1.85 Nm.0.9 Nm should be specified: (1000 / 1.85 Nm) × 0.9 Nm = 486
If the enable_torque input is set, the controller supplies themotor with a constant current which it converts to a constanttorque, without considering speed and position.
The torque value is specified by the target_torque variable in1/1000 x nominal torque.This results in sensible values in the range of �1000 to +1000(1000 = rated torque). Higher values can only have a shorteffect, as the I2t monitoring automatically regulates back tothe rated current. The parameterized peak current cannot beexceeded.
The hold input holds the torque at zero.
The torque setpoint is managed via a ramp generator. Theramp time is 100 ms for a modification of 0 Nm on the ratedtorque.
2. Description of the function block with relevant parameters
2−14 Festo P.BE−SEC−AC−PB−S7−E N en 0408a
At the end of the operating mode, the controller can be resetif Enable is switched off for approx. 100 ms.
WarningAs no speed control or limitation is effective here, the drivecan reach non−permitted high speeds if appropriate torquedoes not have a counter effect.
2.6 Synchronous operation
Formal parameters Byte Range Comment
enable_sync I BOOL 0/1 Activates synchronous operation
encoder_resolution I DINT 4 . . 500000000 Encoder resolution at X10 in incrementsper revolution
encoder_numerator I WORD (−215)..(215 −1) Numerator (conversion factor for encoderto motor revolution)
encoder_divisor I WORD (−215)..(215 −1) Divisor (conversion factor for encoder tomotor revolution)
In synchronous operation, the position controller is suppliedwith an additional desired position value via the connectionX10. This allows the drive to be connected as a slave to a master(by connecting input X10 Slave with output X11 Master), forexample.
A further application is the �flying saw" function. This func�tion is implemented by supplying the signal of an encoder atX10 which is connected to a conveyor belt, for example.
2. Description of the function block with relevant parameters
2−15Festo P.BE−SEC−AC−PB−S7−E N en 0408a
Activating synchronous operation via enable_sync synchron�ises the axis to the movement of the belt. As soon as the driveis in synchronicity with the belt (indicated by the position_okoutput), the saw can be activated. Following the saw stroke,synchronous operation is deactivated once more and the sawis returned to its original position.
The ratio of encoder revolutions to motor revolutions is madeknown to the controller via the encoder_numerator and en�coder_divisor variables so that the encoder can be adapted.The encoder resolution must also be made known via en�coder_resolution.
Since the controller uses 16−bit arithmetic to perform the con�version of the encoder signals, there are certain restrictionswhen it comes to the resolution and the conversion factors.The following points must therefore be observed:The encoder at X10 should have a binary increment, i.e. aresolution of 4096, for example.Decimal increments (e.g. 4000) restrict the conversion factorrange and result in rounding errors.
Synchronous operation is only permissible in parallel withpositioning. No other function can be activated as long assynchronous operation is active. However positioning jobscan be performed while synchronous operation is active.
Please noteThe synchronous operation variables for the encoderresolution and the conversion factor are transferred onceto the controller during initialisation of the block. If theseare changed while the block is active, then it must bere−initialised.
2. Description of the function block with relevant parameters
2−16 Festo P.BE−SEC−AC−PB−S7−E N en 0408a
Setting parameters
3−1Festo P.BE−SEC−AC−PB−S7−EN en 0408a
Chapter 3
3. Setting parameters
3−2 Festo P.BE−SEC−AC−PB−S7−EN en 0408a
Contents
3. Setting parameters 3−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1 Bit mappings of the formal parameters 3−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1.1 8−bit formal parameter �digital_inputs" 3−3 . . . . . . . . . . . . . . . . . . . . . .
3.1.2 16−bit formal parameter �error" 3−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 Notes on PROFIBUS mode 3−4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3 Rotary axis 3−5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3.1 Proceed as follows 3−5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3.2 Instructions on use 3−6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4 Direct access to individual parameters in the controller 3−7 . . . . . . . . . . . . . . . .
3. Setting parameters
3−3Festo P.BE−SEC−AC−PB−S7−EN en 0408a
3.1 Bit mappings of the formal parameters
3.1.1 8−bit formal parameter �digital_inputs"
This formal parameter reflects the status of all digital inputsof the controller.
Bit Function X1−Pin
012
Negative limit switch actuatedPositive limit switch actuatedStatus sample input
Irrespective of normally−open ornormally−closed contactIrrespective of normally−open ornormally−closed contactReference switch
221011
34567
Target selector POS0Target selector POS1Target selector POS2Target selector POS3Start input
The standard functions of these inputsare deactivated in PROFIBUS mode
19720823
3.1.2 16−bit formal parameter �error"
Bit Message
01
Return error SFC14Return error SFC15
Possible causes: incorrect slave address,slave not ready to operate, bus interruption.Specific fault code in Instance−DB, address138 / 140
23456
Hardware input, output stage enable or drive enable missingController in error state (error shown on controller display)Drive enable logic in controller not set to BUSHoming started with invalid methodInvalid feed constant during initialisation
3. Setting parameters
3−4 Festo P.BE−SEC−AC−PB−S7−EN en 0408a
3.2 Notes on PROFIBUS mode
Once a drive has been parameterised, optimised and commis�sioned using the parameterisation software, the PROFIBUS−DPinterface must be activated and the bus address specified.This is also done using the parameterisation software via the�Transfer" command in the �File" menu.
· The following configuration command must be entered inthe Transfer dialog box:BUS:NN:0000:1000Transfer using Enter or �Send"
NN specifies the slave address in hexadecimal form, the value1000 activates the bus.
· The following command must be entered to deactivate thebus:BUS:NN:0000:0000Transfer using Enter or �Send"
The bus configuration can be queried using BUS?
Please noteAfter setting the parameters and successful bus commis�sion, do not forget:
· To save parameters (in the controller) and transfer theparameter record to data media. This means that a sub�stitute controller can be immediately commissioned onthe bus at any time simply by transferring the parameterrecord.
3. Setting parameters
3−5Festo P.BE−SEC−AC−PB−S7−EN en 0408a
3.3 Rotary axis
If a rotary axis is to be dimensioned circularly, this can becarried out with the following two steps:
1. Adapt the feed constant.The feed constant no longer specifies the feed in 1/1000mm but in 1/1000 degrees for a motor revolution. Theunit for positioning is therefore 1/1000 degrees.
2. Limit the positioning range (via RS232).The positioning range is defined by specification of alower and upper limit, e.g. 0 to 360,000 degrees. If a limitvalue is exceeded, the position counter will jump auto�matically to the other limit value.
3.3.1 Proceed as follows
The range limits are defined with Object 607Bxx (application see chapter 3.4).The lower limit with 607B01; the upper limit with 607B02(parameters 32 bits each).The range limits are activated with Object 651020 (parameter 16 bits).The feed constant is transferred to the FB with the formalparameter feed_constant.
Example
A motor with gears i = 4 drives a rotary gripper by means of atoothed belt with the ratio 3 to 1. The total ratio is 3 x 4 = 12;the value 360000 / 12 = 30000 [1/1000 degrees] is specifiedas feed constant (1 motor revolution Z 30,000 degreesgripper revolution).
3. Setting parameters
3−6 Festo P.BE−SEC−AC−PB−S7−EN en 0408a
Limit positioning range by means of RS232 commands
Lower limit (0) =607B01:00000000 Upper limit (360000) =607B02:00057E40 Activate limits =651020:0001 (de−activate) =651020:0000)
Feed rate constant
feed_constant :=L#30000
3.3.2 Instructions on use
If referencing is necessary, a method with a separate refer�ence switch must be selected. Limit switches are not possibleon a rotary axis which moves through more than 360 degrees.As an alternative, the zero impulse can be used as the refer�ence point, providing there is a total ratio of 1.
Absolute positioning can be made within the 360 degrees,whereby the shortest path will automatically be traversed.
With relative positioning, paths of any desired length arepossible (multiples of 360 degrees). The direction of rotationis determined by the sign in front of the length specification.
Positioning over several revolutions with absolute targetwithin the circle must be carried out in two steps: 1. numberof relative revolutions, 2. absolute circle position.
However, if it must be assured that absolute positioning al�ways occurs in the same direction, we recommend that thetotal positioning path be calculated from the current positionand that the complete path be traversed relatively.
3. Setting parameters
3−7Festo P.BE−SEC−AC−PB−S7−EN en 0408a
3.4 Direct access to individual parameters in the controller
The parameters of the controller are addressed via CAN ob�jects. These objects are identified by an index and a sub−index. A listing and description of the objects can be found inthe PROFIBUS−DP product handbook.
These objects can be read and written to via the serial inter�face. For example using the parameterisation software in theTransfer dialog box (menu: File / Transfer . .). This means that objects which cannot be reached via thestandard functions in the parameterisation software or thefunction block can be used.
Written form
Read Object ?XXXXSIWrite Object =XXXXSI:WWWWWWWW
XXXX Index of the object (hexadecimal).SI Sub−index of the object (hexadecimal).
Sub−index 00 is optional.WW Value of the object (8 bit hexadecimal).WWWW Value of the object (16 bit hexadecimal).WWWWWWWW Value of the object (32 bit hexadecimal).
If the bit width of the object value is not known, it is recom�mended to first read out the object. The length is correctlyoutput in the response.
Example Read
?607B01 Answer: =607B01:00004E20?651020 =651020:0001
Example Write
=607D01:80000000=604D:04 (the sub−index 00 does not have to be
specified)
3. Setting parameters
3−8 Festo P.BE−SEC−AC−PB−S7−EN en 0408a
Please note� Modifications entered are effective immediately.
� Incorrect entries or modifications to non−permittedobjects can result in malfunction or serious faults.
� Before issuing a write command, check that the addressis correct (Index, Sub−index), in order that an incorrectobject is not overwritten by mistake.
Please noteif parameters were changed, then they must be backed upso that they remain permanently effective (menu: Para�meters / Backup parameter record).
Technical appendix
A−1Festo P.BE−SEC−AC−PB−S7−EN en 0408a
Appendix A
A. Technical appendix
A−2 Festo P.BE−SEC−AC−PB−S7−EN en 0408a
Contents
A. Technical appendix A−1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.1 Standard feed constants of Festo linear drives with Servo motors type MTR−AC... A−3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A. Technical appendix
A−3Festo P.BE−SEC−AC−PB−S7−EN en 0408a
A.1 Standard feed constants of Festo linear drives with Servo motorstype MTR−AC...
Size Type Motor with/without gears Feed constant [�m]
MTR−AC−...−AMTR−AC−...−G
Spindle axis
18 DGE−18−...−SP−... Without gears 4000
25 DGE−25−...−SP−... Without gears 10000
40 DGE−40−...−SP−... Without gears 20000
DGE−40−...−SP−... With gears i = 4 5000
63 DGE−63−...−SP−... Without gears 30000
DGE−63−...−SP−... With gears i = 4 7500
A. Technical appendix
A−4 Festo P.BE−SEC−AC−PB−S7−EN en 0408a
Size Type Motor with/without gears Feed constant [�m]
MTR−AC−...−AMTR−AC−...−G
Toothed belt axis
18 DGE−18−...−ZR−... Without gears 52000
25 DGE−25−...−ZR−... Without gears 63000
DGE−25−...−ZR−... With gears i = 4 15750
40 DGE−40−...−ZR−... Without gears 100000
DGE−40−...−ZR−... With gears i = 4 25000
63 DGE−63−...−ZR−... Without gears 176000
DGE−63−...−ZR−... With gears i = 4 44000
18 DGEA−18−...−ZR−... Without gears 81000
DGEA−18−...−ZR−... With gears i = 4 20250
25 DGEA−25−...−ZR−... Without gears 81000
DGEA−25−...−ZR−... With gears i = 4 20250
40 DGEA−40−...−ZR−... Without gears 120000
DGEA−40−...−ZR−... With gears i = 4 30000
25 DGE−25−...−RF−... Without gears 90000
DGE−25−...−RF−... With gears i = 4 22500
40 DGE−40−...−RF−... Without gears 125000
DGE−40−...−RF−... With gears i = 4 31250
63 DGE−63−...−RF−... Without gears 232000
DGE−63−...−RF−... With gears i = 4 58000