Page 1
Introduction Fundamental safety instructions Description SIMOTION Program Extension to the command interface Parameter assignment, for AS-Interface master modules Configuring Function Manual Example of an application Error messages / diagnosis Appendix 01/2015...
Page 2
Note the following: WARNING Siemens products may only be used for the applications described in the catalog and in the relevant technical documentation. If products and components from other manufacturers are used, these must be recommended or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and maintenance are required to ensure that the products operate safely and without any problems.
"SIMOTION SCOUT" engineering system. SIMOTION Documentation An overview of the SIMOTION documentation can be found in the SIMOTION Documentation Overview document. This documentation is included as electronic documentation in the scope of delivery of SIMOTION SCOUT.
Page 4
Introduction My Documentation Manager Click the following link for information on how to compile documentation individually on the basis of Siemens content and how to adapt it for the purpose of your own machine documentation: http://www.siemens.com/mdm Training Click the following link for information on SITRAIN - Siemens training courses for automation products, systems and solutions: http://www.siemens.com/sitrain...
Parameter assignment,..........................21 _ASI_cmdInterface function block..................21 Call example for the FB _ASI_cmdInterface................24 Configuring..............................27 Setup and connection......................27 Adding the AS-Interface master modules to the SIMOTION project........30 Example of an application..........................33 General information on the application example..............33 Execution of the example project programs................36 6.2.1 Example program for serving the command interface............36...
Page 6
Table of contents Extension to the command interface for AS-Interface master modules Function Manual, 01/2015...
Siemens recommends strongly that you regularly check for product updates. For the secure operation of Siemens products and solutions, it is necessary to take suitable preventive action (e.g. cell protection concept) and integrate each component into a holistic, state-of-the-art industrial security concept.
Page 8
● Keep the software up to date. Information and newsletters can be found at: http://support.automation.siemens.com ● Incorporate the automation and drive components into a state-of-the-art, integrated industrial security concept for the installation or machine. For more detailed information, go to: http://www.siemens.com/industrialsecurity...
This chapter describes the general differences and the common features of the AS-Interface master modules CP 343-2 P, DP/AS-Interface Link 20E/Link Advanced, and IE/AS- Interface Link PN IO that result from operating a SIMOTION system (as opposed to a SIMATIC system) for data transfer and command interface operation purposes.
Page 10
Description 2.2 Product description You can use the modules to access from the SIMOTION motion control system to the input/ output of the AS-Interface slaves. You can access binary or analog values depending on the slave type. The following AS-Interface slaves can be used: ●...
Page 11
Description 2.2 Product description Figure 2-1 Centralized use of the CP 343-2 P AS-Interface master module on the SIMOTION C2xx device Note For AS-Interface modules, a differentiation is made between active and passive modules. ● Active modules with slave ASIC: It is possible to connect actuators (using a digital or analog output signal) or sensors (using a digital or analog input signal) to active modules.
Page 12
Description 2.2 Product description Figure 2-2 Distributed use of the CP 343-2 P AS-Interface master module with ET 200M on a SIMOTION device Extension to the command interface for AS-Interface master modules Function Manual, 01/2015...
Page 13
6GK7 1415 2AA0 Figure 2-3 Distributed use of the DP/AS-Interface Link 20E AS-Interface master module on a SIMOTION device Note AS-Interface A/B slaves use an extended address area. This allows two A/B slaves to be assigned as a pair to an address on the AS-Interface.
Page 14
Description 2.2 Product description Extension to the command interface for AS-Interface master modules Function Manual, 01/2015...
The application example is included on the "SIMOTION Utilities & Applications" CD-ROM and is available for various SIMOTION hardware platforms. The "SIMOTION Utilities & Applications" CD-ROM is provided free of charge and is part of the SIMOTION SCOUT scope of delivery.
Page 16
3.1 Operating the command interface of the IE/AS-Interface Link PN IO AS-Interface master Addressing the AS-Interface master (IE/AS-Interface Link PN IO) Communication between the SIMOTION device and the AS-Interface master takes place via direct access to the I/O (cyclic data transfer) and data record transfer (acyclic data transfer).
The application example is included on the "SIMOTION Utilities & Applications" CD-ROM and is available for various SIMOTION hardware platforms. The "SIMOTION Utilities & Applications" CD-ROM is provided free of charge and is part of the SIMOTION SCOUT scope of delivery.
(from HW Config). These values are used to create an I/O variable of types ARRAY[0..15] of byte (CP 343-2 P) and ARRAY[0.. (xx-1)] of byte (DP/AS-Interface Link 20E 20E/Link Advanced) in the SIMOTION project for direct write/read access to the I/O.
Page 19
SIMOTION MCC, Motion Control Chart Programming Manual – SIMOTION LAD/FBD, Ladder Diagram and Function Block Diagram Programming – Manual These documents are shipped with SIMOTION SCOUT in electronic form. Extension to the command interface for AS-Interface master modules Function Manual, 01/2015...
Page 20
Program 3.2 Operating the command interface of the AS-Interface master CP 343-2 P, DP/AS-Interface Link 20E/Link Advanced Extension to the command interface for AS-Interface master modules Function Manual, 01/2015...
The following table contains all parameters of the _ASI_cmdInterface. function block Note You can find a comparison of SIMOTION and SIMATIC names in the Appendix SIMOTION and SIMATIC names (Page 45). Extension to the command interface for AS-Interface master modules...
Page 22
Parameter assignment, 4.1 _ASI_cmdInterface function block Table 4-1 FBs _ASI_cmdInterface parameters Name Type Data type Default Meaning execute BOOL FALSE Starting a new request with a rising edge reset BOOL FALSE TRUE = Error acknowledgement/reinitialization (takes pri‐ ority over command processing) periIn BYTE 16#00...
Page 23
Parameter assignment, 4.1 _ASI_cmdInterface function block The status output parameter indicates the processing status of the command and the /reset reinitialization (see the table titled "Error and status messages", Chapter Error and status messages of the FB _ASI_cmdInterface (Page 39)). Note A rising edge at the execute input parameter will not be detected when a command or a reinitialization is being processed (busy = TRUE output parameter).
The call example is a fragment from the provided application example contained on the "SIMOTION Utilities & Applications" CD-ROM. The "SIMOTION Utilities & Applications" CD-ROM is provided free of charge and is part of the SIMOTION SCOUT scope of delivery.
Page 25
Parameter assignment, 4.2 Call example for the FB _ASI_cmdInterface mySendData : ARRAY[0..239] OF USINT; // send buffer with ASI commands and data myReceiveData : ARRAY[0..239] OF USINT; // receive buffer mySendLength : UDINT; // send length myResetAsi : BOOL; // reset ASI master END_VAR PROGRAM ExampleAsiCommand;...
Page 26
Parameter assignment, 4.2 Call example for the FB _ASI_cmdInterface myReceiveData := myAsiCmdInterface.receiveData; ELSIF(myAsiCmdInterface.error=TRUE) THEN // finish with error myDone := FALSE; myError := TRUE; myRequestAsiCmd := FALSE; // reset request myResetAsi := FALSE; // copy error code myErrorID := myAsiCmdInterface.errorID; END_IF;...
"ET 200M Distributed I/O Device" Manual. Steps 1. to 4. are described in detail in the 5. Add the CP 343-2 P AS-Interface master module to the SIMOTION project (see the following section). Extension to the command interface for AS-Interface master modules...
Page 28
Figure 5-1 Loading the AS-Interface slave configuration into the PG 7. Link the function block to the SIMOTION project (refer to Chapter Integrating the _ASI_cmdInterface function block and the application examples in the user project (Page 17)).
Page 29
Interface slaves into your hardware configuration: Figure 5-2 Loading the AS-Interface slave configuration into the PG 7. Link the function block to the SIMOTION project (refer to Chapter Integrating the _ASI_cmdInterface function block and the application examples in the user project (Page 17)).
Requirements The following requirements must be met when networking with PROFIBUS: 1. You have created a project in SIMOTION SCOUT and have inserted a rack with a SIMOTION hardware platform in the hardware configuration. 2. You have configured a PROFIBUS subnet (for distributed use only).
Page 31
5.2 Adding the AS-Interface master modules to the SIMOTION project The following requirements must be met when with PROFINET: 1. You have created a project in SIMOTION SCOUT and have inserted and configured a rack with a PROFINET-compatible SIMOTION device in the hardware configuration.
Page 32
Inserting an IE/AS-Interface Link PN IO AS-Interface master module (distributed use) 1. In SIMOTION SCOUT, open the User Projects dialog box with the Project > Open menu command. In this dialog box, select your project and confirm your choice with OK.
Example of an application General information on the application example Overview The application example for the _ASI_cmdInterface FB is available for the following AS- Interface master modules: ● CP 343-2 P ● DP/AS-Interface Link 20E ● DP/AS-Interface Link Advanced Task The example program for the _ASI_cmdInterface FB shows the call and the parameter settings for the _ASI_cmdInterface FB.
Page 34
Calling the application example The application example can be found on the "SIMOTION Utilities & Applications" CD-ROM. The "SIMOTION Utilities & Applications" CD-ROM is provided free of charge and is part of the SIMOTION SCOUT scope of delivery. 1. Dearchive and open the project containing the application example.
Page 35
Example of an application 6.1 General information on the application example Check the address in the "moduleAddress" variable and, if necessary, change the parameterized addresses of the I/O variables in the example project. AS-Interface analog slaves: If addresses other than the default addresses 4 and 5 are used for the analog AS-Interface slaves, the values of the indexes for the send or receive data array of the _writeRecord/ _readRecord system functions must be adapted in the following variables.
Example of an application 6.2 Execution of the example project programs Execution of the example project programs 6.2.1 Example program for serving the command interface You can use the ExampleAsiCommand example program to transfer AS-Interface commands to the AS-Interface master with the _ASI_cmdInterface FB. You use the following variables to control the program execution: asiCommands : Selection of the AS-Interface command (default: READ_VERSION)
Example of an application 6.2 Execution of the example project programs dataAnaIn1 : Read analog value for channel 1 dataAnaIn2 : Read analog value for channel 2 The following variables indicate the status of the read/write of the analog values: doneAnaWrite : Write analog value (data record transfer) completed without error errorAnaWrite...
Page 38
Example of an application 6.2 Execution of the example project programs Extension to the command interface for AS-Interface master modules Function Manual, 01/2015...
(_readRecord and _writeRecord system functions) and the errors from SIMOTION System Functions/Variables Device . the AS-Interface. The Parameter Manual contains a detailed description of the system functions. This document is shipped with SIMOTION SCOUT in electronic form. Table 7-1 Error messages Error no.:...
SIMOTION device. Events that trigger a diagnostic alarm The criteria (events) that trigger diagnostic alarms in a SIMOTION system are the same as in a SIMATIC system. More information is available in the following manuals: ●...
Page 41
Error diagnosis of the AS-Interface master Pending error messages are processed and evaluated differently in a SIMOTION system than in a SIMATIC system. As default, the diagnosis is not activated. Activate the alarms for the AS- Interface master in the hardware configuration.
Page 42
Error messages / diagnosis 7.2 Diagnosis Figure 7-1 Alarm processing Alarm evaluation In order to evaluate diagnostic information when a diagnostic alarm occurs, you must integrate an appropriate evaluation program into the PeripheralFaultTask. The task start information contains the standard diagnostic data. Extension to the command interface for AS-Interface master modules Function Manual, 01/2015...
Page 43
Error messages / diagnosis 7.2 Diagnosis You can fetch additional diagnostic data using the _readRecord or _readDiagnosticData system functions. Note CP 343-2 P: The _readRecord (data record 1 with length 16) function is called with the parameter logAdress := module address from HW Config. DP/AS-Interface Link 20E/Link Advanced: The _readDiagnosticData function is called with the parameter logAddress := diagnostic address from HW Config.
Page 44
Error messages / diagnosis 7.2 Diagnosis Extension to the command interface for AS-Interface master modules Function Manual, 01/2015...
Appendix SIMOTION and SIMATIC names The table below contains a comparison of SIMOTION and SIMATIC names. Table A-1 SIMOTION and SIMATIC names Name in the SIMOTION system as of V4.0 Name in the SIMATIC system (program library in SCOUT) Function block parameters...
Page 46
Appendix A.2 List of abbreviations Abbreviation Meaning Interface Module (SIMATIC S7-300 interface module) Input parameters IN/OUT In/out parameter Ladder Diagram List of active slaves Output parameter PROFINET Power Supply (SIMATIC S7-300) System Fault System Function Block (SIMATIC) Extension to the command interface for AS-Interface master modules Function Manual, 01/2015...
Index ExampleAsiCommand, 36 ExampleAsiDigital, 37 Addressing CP 343-2 P, 18 Creating I/O variables, 18 Fault diagnostics, 41 DP/AS-Interface Link 20E, 18 FB _ASI_cmdInterface, 21 DP/AS-Interface Link Advanced, 18 Example of an application, 33 Example, 18 Functions, 22 IE/AS-Interface Link PN IO, 16 Integration in the user program, 17 AS-Interface master Task, 21...
Page 48
Index Extension to the command interface for AS-Interface master modules Function Manual, 01/2015...