Transcription

Application NoteCMMT-AS-PN controlled by SINAPOSfunctions block with Siemens S7 1500controllerThis document describes which control figures are implementedin CMMT-AS-PN drives and how to use it in programmingenvironment of Siemens in TIA portal. Specifically focus on howto use SINAPOS functions block(PtP non-interpolated motion) inSINAMICS Lib for point to point linear motion.100212

Title . CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controllerVersion . 1.30Document no. . 100212Original .enAuthor . FestoLast saved . 17.09.2019Copyright NoticeThis documentation is the intellectual property of Festo AG & Co. KG, which also has the exclusive copyright. Anymodification of the content, duplication or reprinting of this documentation as well as distribution to thirdparties can only be made with the express consent of Festo AG & Co. KG.Festo AG & Co KG reserves the right to make modifications to this document in whole or in part. All brand andproduct names are trademarks or registered trademarks of their respective owners.Legal NoticeHardware, software, operating systems and drivers may only be used for the applications described and only inconjunction with components recommended by Festo AG & Co. KG.Festo AG & Co. KG does not accept any liability for damages arising from the use of any incorrect or incompleteinformation contained in this documentation or any information missing therefrom.Defects resulting from the improper handling of devices and modules are excluded from the warranty.The data and information specified in this document should not be used for the implementation of safetyfunctions relating to the protection of personnel and machinery.No liability is accepted for claims for damages arising from a failure or functional defect. In other respects, theregulations with regard to liability from the terms and conditions of delivery, payment and use of software ofFesto AG & Co. KG, which can be found at www.festo.com and can be supplied on request, shall apply.All data contained in this document do not represent guaranteed specifications, particularly with regard tofunctionality, condition or quality, in the legal sense.The information in this document serves only as basic information for the implementation of a specific,hypothetical application and is in no way intended as a substitute for the operating instructions of therespective manufacturers and the design and testing of the respective application by the user.The operating instructions for Festo products can be found at www.festo.com/sp.Users of this document (application note) must verify that all functions described here also work correctly in theapplication. By reading this document and adhering to the specifications contained therein, users are also solelyresponsible for their own application. (Festo AG & CO. KG, D-73726 Esslingen, 2019)Internet: http://www.festo.com

Table of contents1Components/Software used . 51.1Topology of the tested system . 52Application Description . 63Configuration of parameters in Automation Suite . 73.1Automation Suite related parameters . 74Setting up TIA Portal . 94.1Installing the SINAMICS library to TIA portal . 94.2Making the Hardware Configuration in TIA portal . 94.3Configuring the SINAMICS function blocks . 134.4Compile and Download the program . 164.5Use the SINA POS block with a ‘Watch Table’ . 195Using the SINAMICS function blocks . 215.1Enabling and stopping the Axis . 215.2Activating the Software and Hardware position limits . 215.3Monitoring the Actual speed . 225.4Modes of Operations . 225.5Diagnostic messages . 25

Components/Software used1Components/Software usedType/NameVersion Software/FirmwareDate of manufactureCMMT-AS-C4-3A-PN-S1V015.0.8.38 release--Automation Suite1.1.1.610--CMMT-AS Plug-in1.1.0.110--TIA PortalV14 SP1--SINA POS5.4--Drive Lib S7 1200 1500V5--Table 1.1 : Components/Software used1.1Topology of the tested systemFigure 1.1 : overview of tested systemPlease refer to the picture above and make sure all wires are correctly placed and connectedTo confiture and run the system for commissioning, it is necessary to install named software in the table 1.1above on your laptop or other PC system which you will do commissioning with.Application Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30Page 5 of 25

Application Description2Application DescriptionThis part of the documentation describes a connectivity and configuration of the motor drive CMMT-AS-.-PNwithin a Profinet network controlled via Siemens S7-1500 PLC controller. The used bus protocol within thisApplication Note is an Application Class 3 and Telegram 111 which are specifically defined by Siemens for PtPnon-interpolated motion over Profinet. It is targeted at people who are already familiar with this protocol, FestoAutomation Suite and Siemens TIA Portal software.Page 6 of 25Application Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30

Configuration of parameters in Automation Suite3Configuration of parameters in Automation Suite3.1Automation Suite related parametersOn the Fieldbus tab you can find the parameters that are related to the communication with the host system. Factor Group:These settings allow you to change the resolution of the position, velocity, acceleration and jerk values.They are related to the ‘Current user unit’, for example Meters or RPM.To default settings allow you to control your drive with a resolution of 0,001mm for positioning, whilethe velocity, acceleration and jerk values are with a resolution of 1mm. Reference ValuesThe ‘Base value speed’ doesn’t influence the speed of the drive, but it does change the way the ‘actualspeed’ is displayed. It is a percentage in the SINA POS function block, related to this base value.For controlling the acceleration and deceleration of the drive these reference values are used, also as apercentage in the SINA POS block.Application Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30Page 7 of 25

Configuration of parameters in Automation Suite Dynamic valuesUsing Telegram 111 the ‘Jerk’ of the movement can be modified under the ‘Dynamic values’, theacceleration and deceleration values have no function here.Connection Parameters / Connection PropertiesThese parameters are Read Only from the Automation Suite, they have to be set from TIA portal.Page 8 of 25Application Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30

Setting up TIA Portal4Setting up TIA Portal4.1Installing the SINAMICS library to TIA portalDownload the latest version of the SINAMICS Drivelib from the Siemens website here:Link to SINAMICS DrivelibSINAMICS Blocks DriveLib for the control in the TIA PortalMake sure TIA portal is closed and execute the downloaded .MSI.4.2Making the Hardware Configuration in TIA portal1.Create a new project and add your PLC:2.Go the the ‘Device Configuration’ tab, select ‘Network View’ and search for the CMMT in the HardwareCatalog. Drag and drop this to the middle screen:Application Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30Page 9 of 25

Setting up TIA Portal3.To connect the CMMT with the PLC, click on ‘Not Assigned’ and select the Profinet interface. After this, agreen line will show the connection between the PLC and CMMT:4. Double click on the CMMT to get into the ‘Device View’ tab. Here we can select the different Telegrams.To use the CMMT in Point-to-Point mode with the SINAMICS Drivelib we need to select:Siemens telegram 111, PZD-12/125.(Drag and drop to the second empty slot)Select the telegram you just dropped in and go to ‘Properties’ on the bottom of that screen. Make noteof the ‘Hardware identifier’ value that has been given to this Telegram, as we will need it later.Hardware identifier: 267 (e.g.)Page 10 of 25(make sure you select the Telegram first!)Application Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30

Setting up TIA Portal6.Right click on the CMMT and select ‘Assign Device Name’. For this you need to have access to either thewhole Profinet network or the X19 port on the CMMT.7.Select the correct interface and click on ‘Update List’:Application Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30Page 11 of 25

Setting up TIA Portal8.The CMMT should appear with the status ‘Device name is different’. Select the CMMT and click on‘Assign name’9.After the status switched to ‘OK’, close the dialog:Page 12 of 25Application Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30

Setting up TIA Portal4.3Configuring the SINAMICS function blocksMake sure you first installed the SINAMICS DriveLib to your TIA portal, explained in part 4.1 of this document. From the Project Tree select ‘Add new block’ and create a Function Block. Fill in the name (e.g.CMMT Function Blocks), select ‘Function block’ and click ‘OK’. After creating the function block it jumps straight into it. We now want to open the ‘Libraries’ tab (on theright), open the ‘Drive Lib S7 1200 1500’ and open the sub-folder ‘03 SINAMICS’.Drag and drop the ‘SINA POS’ function block to a network.Application Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30Page 13 of 25

Setting up TIA Portal To automatically create the required data blocks, click ‘OK’: Festo strongly advises to enable the Software Limit monitoring by the CMMT. To do this, change thedefault ‘ConfigEPos’ value from ‘16#0000 0003’ to ‘16#0000 000F’ (activating bit 2 and bit 3). Moreinformation on this can be found in part 5.2 of this document. The function block requires the ‘Hardware identifier’ we made note of in part 4.2.4. You can also find thevalue in the ‘Default tag table’ -- ‘System constants’.Page 14 of 25Application Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30

Setting up TIA Portal Set the value to both ‘HWIDSTW’ and ‘HWIDZSW’ on the SINA POS block To make sure the function blocks will be executed we need to call it in the main task. Double click on the‘Main [OB1]’:Application Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30Page 15 of 25

Setting up TIA Portal 4.4 Now drag and drop the ‘CMMT Function Blocks [FB1]’ to Network 1, upon asked to create the DataBlock click ‘OK’:Compile and Download the programRight click on the PLC 1 and select ‘Download’ -- ‘Hardware and software (only changes)’:Page 16 of 25Application Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30

Setting up TIA Portal Start searching for the PLC: Select the PLC and load the project:Application Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30Page 17 of 25

Setting up TIA Portal Select ‘Load’ on the Load preview and ‘Finish’ on the dialog that comes after. While still selecting PLC 1 in the Project tree, go online: Make sure the Profinet Network is up and running by checking if all is green and with checkmarks:Page 18 of 25Application Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30

Setting up TIA Portal4.5Use the SINA POS block with a ‘Watch Table’ Double click on ‘Add new watch table’: Start typing the name ‘SINA POS DB’ and select it by pressing the ‘Tab’-key: Type ‘ModePos’ and press the ‘Enter’-key:Application Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30Page 19 of 25

Setting up TIA Portal Drag down from the little square in the bottom right, it should show a before dragging:Drag down 34 lines to add all used variable Click on the ‘Monitor all’ button to watch the variables online:Page 20 of 25Application Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30

Using the SINAMICS function blocks5Using the SINAMICS function blocks5.1Enabling and stopping the AxisThe axis is switched on using input bit "EnableAxis" 1. OFF2 and OFF3 are preassigned 1 using input"ConfigEPos" – and do not have to be written to for operation.The axis is ready to start when there is no error – "AxisError" "0" – and no switching on inhibited – "Lockout" "0". Feedback signal "AxisIEnabled" goes to "1" after switching "EnableAxis".The "ModePos" input is decisive for the mode selection. The required operating mode is selected via this input.A simultaneous, multiple mode selection is therefore not possible. However, it is possible to switch betweenvarious subordinate modes within the operating mode.The input signals "CancelTraversing" (reject traversing task) and "IntermediateStop" (intermediate stop) arerelevant for all modes except for jog and must be set to "1" when using EPos.1.If the "CancelTraversing" bit is set to "0" this results in a ramp stop with 100% of the setdeceleration. The task data is rejected and the axis can be assigned a new task from standstill. Amode change is possible in this state.2.If the "IntermediateStop" bit is set to "0" this results in a ramp stop of the axis with the currentlyvalid acceleration values. The task data is NOT rejected so that the axis continues with the motionwhen the bit is set to "1". A mode change is possible at standstill.5.2Activating the Software and Hardware position limitsBy default the SINA POS library deactivates the function of the CMMT to monitor the Software and Hardwareposition limits of the axis. Without this function it’s possible to instruct the drive to move to a position which isbeyond its reachable limit.To ensure a safe operation with Software limitmonitoring, it is required to enable bit 2 on the"ConfigEPos" variable.For activating the Hardware Limit Switches, enable bit3.Since bit 0 and bit 1 are already set, input variable"ConfigEPos" must be set to 16#0000 000F.Please pay attention that the required parameters in the Festo Automation Suite are also correct. These can befound in the ‘Axis’ tab:Application Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30Page 21 of 25

Using the SINAMICS function blocks5.3Monitoring the Actual speedWhere the setpoint velocity is directly set as user units, the actual drive speed is displayed different in theSINA POS function block. The variable "ActVelocity" is used, where the value is scaled from 0 to 100% with40000000hex 100%. The base value can be modified in the Festo Automation Suite, as described in part 3.2.1of this document. It can also be changed using PNU 60000 (which refers to this exact same parameter).5.4Modes of OperationsThe CMMT-PN with the SINA POS function block supports the following modes of operation:ModePos 1: Relative PositioningModePos 2: Absolute Positioning taskModePos 3: Not SupportedModePos 4: Referencing – Reference point approachModePos 5: Referencing - Set reference pointModePos 6: Traversing blocks (record mode)ModePos 7: JogModePos 8: Not Supported Relative Positioning [ModePos 1]1. Requirements:- The mode is selected with "ModePos" 1.- The device is switched on via "EnableAxis"- The axis must be referenced- The axis is at standstill if selected by an operating mode greater than 3. A change within theoperating modes (1,2) is possible at any time.2.Sequence:The traversing path and dynamic responses are specified via the inputs "Position", "Velocity","OverAcc" (acceleration override) and "OverDec" (deceleration override).The operating conditions "CancelTraversing" and "IntermediateStop" must be set to "1". "Jog1"and "Jog2" have no effect and should be set to "0" (false).The direction of travel in relative positioning always results from the sign of the traversing path.Traversing motion is started with a positive edge at "ExecuteMode".The block acknowledges when the end of the traversing path is reached successfully with"AxisPosOk". If an error occurs during the traversing motion, the output signal "Error" is issued.NoteThe current command can be replaced on-the-fly by a new command via "ExecuteMode". This is onlypossible for the "ModePos" 1 and 2.Page 22 of 25Application Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30

Using the SINAMICS function blocks Absolute Positioning [ModePos 2]1.Requirements:- The mode is selected with "ModePos" 2- The device is switched on via "EnableAxis"- The axis must be referenced- The axis is at standstill if selected by an operating mode greater than 3. A change within theoperating modes (1,2) is possible at any time.2.Sequence:The traversing path and dynamic responses are specified via the inputs "Position", "Velocity","OverAcc" (acceleration override) and "OverDec" (deceleration override).The operating conditions "CancelTraversing" and "IntermediateStop" must be set to "1". "Jog1"and "Jog2" have no effect and must be set to "0".Traversing motion is started with a positive edge at "ExecuteMode".The block acknowledges when the end of the traversing path is reached successfully with"AxisPosOk". If an error occurs during the traversing motion, the output signal "Error" is issued.NoteThe current command can be replaced on-the-fly by a new command via "ExecuteMode". This is onlypossible for the "ModePos" 1 and 2 Referencing - Reference point approach [ModePos 4]The Referencing – reference point approach mode enables the reference point approach of the axis,selected in the Automation Suite.1.Requirements:- The mode is selected with "ModePos" 4- The device is switched on using "EnableAxis".- The axis is at standstill2. Sequence:All required parameters for homing (homing mode, velocity, etc) are set in the Automation Suite.The reference point approach is started with a positive edge at "ExecuteMode".Output signal "AxisRef" is set if the reference point is appropriately found and evaluated. If an erroroccurs during traversing motion, the output signal "Error" is issued. Referencing – Set reference point [ModePos 5]The Referencing – set reference point mode enables the referencing of the axis at the current position.1.Requirements:- The mode is selected with "ModePos" 5- The axis can be in closed-loop control, but must be at a standstill.2. Sequence:The axis is at standstill and the reference point is set with a positive edge at "ExecuteMode".If an error occurs while setting the reference point, the output signal "Error" is issued.Application Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30Page 23 of 25

Using the SINAMICS function blocks Traversing blocks (record mode) [ModePos 6]The Traversing blocks mode is implemented via the "Traversing blocks" drive function. It enables thecreation of automatic programs, velocity mode, force mode, travel to fixed stop and outputs to be setand reset. It uses the records that are created in the ‘Record list’ tab in the Automation Suite.1.Requirements:- The mode is selected with "ModePos" 6- The device is switched on using "EnableAxis"- The axis is at standstill- The axis must be referenced2. Sequence:The selection of the traversing task to be started is set via the "Position" input. The value refers to therecord list and can be between 0 and 127.The operating conditions "CancelTraversing" and "IntermediateStop" must be set to "1". "Jog1" and"Jog2" have no effect and should be set to "0".Traversing motion is started with a positive edge at "ExecuteMode".The block displays the current command processing with "AxisEnabled" and acknowledges when thetarget position is reached successfully or the last task step completed with "AxisPosOk". If an erroroccurs during the traversing motion, the output signal "Error" is issued. Jog [ModePos 7]1.Requirements:- The mode is selected with "ModePos" 7.- The device is switched on using "EnableAxis"- The axis is at standstill2. Sequence:"Jog1" and "Jog2" are the signal sources for the jog mode in EPos. The "ExecuteMode" signal is notrequired in this mode."Jog1" Positive"Jog2" NegativeThe dynamic values for jogging are set in the Automation Suite on the ‘Jog mode’ tab. The correspondingparameters are:-Page 24 of 25Velocity (slow)Acceleration (slow)Jerk (slow)Application Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30

5.5Diagnostic messagesThe function block can give multiple types of diagnostic messages. The following chapter will explain how tohandle or solve them. Drive ErrorWhen the drive is in error, the output "ActFault" of the function block SINA POS will provide a messagenumber. This message number relates to the same number which is shown in the Festo AutomationSuite.After elimination of the fault, the error must be acknowledged using the bit "AckError" before enablingthe axis again. Drive WarningWhen the drive has a warning message, the output "ActWarning" will provide a message number.After elimination of the warning the message number will disappear. Function block faultsWhen an error on the function block has been detected, the "Error" group error and the "ErrorId" areset. The following errors are monitored:Error numberStatusCauseRemedy16#7002No error--16#8600Interruption of the communication tothe SINAMICS drive: Error DPRD DATCheck the communication connections /settings (see DiagId)16#8601Interruption of the communication tothe SINAMICS drive: Error DPWR DATCheck the communication connections /settings (see DiagId)16#8202Incorrect operating mode selectedSet "ModePos" from 1 to 816#8203Incorrect parameterization of theoverride inputsCheck the settings of the override inputs16#8204Invalid traversing block numberEnter a traversing block number from 0 to12716#8401Alarm message(s) in the SINAMICSdriveEvaluation of the error code at the"ActFault" output16#8402Switching on inhibited of theSINAMICS drive activeCheck whether axis/encoder is parked,safety functions active, Parameter p10 016#8403Flying referencing could not bestartedCheck for pending alarms/faults in thedrive,The following settings will help for text-transfer:OptionsSettingsPasting within the same documentKeep Source FormattingPasting between documentsUse Destination StylesPasting between documents when style definitionsconflictUse Destination StylesPasting from other programsUse Destination StylesTable 5.1: Word OptionsApplication Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30Page 25 of 25

Components/Software used Application Note – CMMT-AS-PN controlled by SINAPOS functions block with Siemens S7 1500 controller – 1.30 Page 5 of 25 1 Components/Software used Type/Name Version Software/Firmware Date of manufacture CMMT-AS-C4-3A-PN-S1 V015.0.8.38_release -- A