Navigation

  • Page 1

    7,Brief description 1 9,Detailed description 2 283,Supplementary conditions 3 285,Examples 4 287,Data lists 5SINUMERIK SINUMERIK 840D/840Di/810D Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual 11/2006 6FC5397-0BP10-2BA0 Valid for Control SINUMERIK 840D sl/8...

  • Page 2

    Safety Guidelines This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert symbol, notices referring only to property damage ...

  • Page 3

    Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 3 Table of contents 7,1 7,Brief 7, description......................................................................................................................................... 7,7 ...

  • Page 4

    Table of contents Basic logic functions: PLC Basic program powerline (P3 pl) 4 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 81,2.9.4 81,Assignment: Timers .................................................................................................................... 81,81 81,2.10 81,...

  • Page 5

    Table of contents Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 5 272,2.14 272, 272,Programming tips 272, with STEP 7.................................................................................................. 272,272 272,2.14....

  • Page 6

    Table of contents Basic logic functions: PLC Basic program powerline (P3 pl) 6 Function Manual, 11/2006, 6FC5397-0BP10-2BA0

  • Page 7

    Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 7 Brief description 1General The PLC basic program organizes the exchange of signals and data between the PLC user program and the NCK (Numerical Control Kernel), HMI (Human-Machine Interface)...

  • Page 8

    Brief description Basic logic functions: PLC Basic program powerline (P3 pl) 8 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Event-driven signal exchange PLC → NCK An "eventdriven signal exchange PLC → NCK" takes place whenever the PLC passes a request to the NCK (e.g., traversal...

  • Page 9

    Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 9 Detailed description 22.1 Key PLC CPU data for 810D, 840D and 840Di The tables below show the performance range of the PLC CPUs and the scope of the basic PLC program relative to the variou...

  • Page 10

    Detailed description 2.1 Key PLC CPU data for 810D, 840D and 840Di Basic logic functions: PLC Basic program powerline (P3 pl) 10 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 810D / 840D 810D / 840D 810D / 840D Inputs/outputs 1) (addressing) - digital - analog Subrack 0 is not available for I/...

  • Page 11

    Detailed description 2.1 Key PLC CPU data for 810D, 840D and 840Di Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 11 840Di 810D 840D Clock memories 8 8 8 Program/data blocks OB FB FC DB 1, 10, 20, 35, 40, 80-82, 85-87, 100, 121-122 ...

  • Page 12

    Detailed description 2.1 Key PLC CPU data for 810D, 840D and 840Di Basic logic functions: PLC Basic program powerline (P3 pl) 12 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Types of control: 840Di and 840D Key CPU data 840Di 840D PLC CPU MLFB Integrated PLC 317-2DP master/slave 6FC5 317-2A...

  • Page 13

    Detailed description 2.1 Key PLC CPU data for 810D, 840D and 840Di Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 13 840Di 840D DP master system no. MPI/DP 2 N/A programmable block communication PBK Yes Yes Consistent Data to standard...

  • Page 14

    Detailed description 2.1 Key PLC CPU data for 810D, 840D and 840Di Basic logic functions: PLC Basic program powerline (P3 pl) 14 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 PLC versions In SW 3.5 and higher on the 840D, version 6 (version code 35.06.03) is installed with PLC 314 and version 3 ...

  • Page 15

    Detailed description 2.1 Key PLC CPU data for 810D, 840D and 840Di Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 15 810 D, 840D The tables below show the key data of the OPI interface and the PLC basic program functionality with referenc...

  • Page 16

    Detailed description 2.2 Reserve resources (timers, FC, FB, DB, I/O) Basic logic functions: PLC Basic program powerline (P3 pl) 16 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.2 Reserve resources (timers, FC, FB, DB, I/O) Reserved components The components below are reserved for the basic pr...

  • Page 17

    Detailed description 2.3 Starting up hardware configuration of PLC CPUs Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 17 2.3 Starting up hardware configuration of PLC CPUs General procedure STEP 7 is used to define the hardware configura...

  • Page 18

    Detailed description 2.3 Starting up hardware configuration of PLC CPUs Basic logic functions: PLC Basic program powerline (P3 pl) 18 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 NCU MLFB Comparable SIMATIC CPU MLFB included Selection from STEP7 hardware catalog SINUMERIK 810D CCU2 module ...

  • Page 19

    Detailed description 2.3 Starting up hardware configuration of PLC CPUs Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 19 NCU MLFB Comparable SIMATIC CPU MLFB included Selection from STEP7 hardware catalog SINUMERIK 840D/DE NCU 572.2...

  • Page 20

    Detailed description 2.3 Starting up hardware configuration of PLC CPUs Basic logic functions: PLC Basic program powerline (P3 pl) 20 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 NCU MLFB Comparable SIMATIC CPU MLFB included Selection from STEP7 hardware catalog SINUMERIK 840D NCU 573.2 (P...

  • Page 21

    Detailed description 2.3 Starting up hardware configuration of PLC CPUs Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 21 Note On the SINUMERIK 810D or 840D, SIMATIC subrack 0 is integrated in the NC. The following components are plugg...

  • Page 22

    Detailed description 2.4 Starting up the PLC program Basic logic functions: PLC Basic program powerline (P3 pl) 22 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 MCP (Machine Control Panel) and HHU (HandHeld Unit) (only for SINUMERIK 810D to SW 3.x) If the MCP or HHU is configured (deviation from...

  • Page 23

    Detailed description 2.4 Starting up the PLC program Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 23 STEP7 V1.x The basic program is stored as a compressed file with the name GP840D.EXE (or GP810D.EXE and GPFMNC.EXE) in the main directo...

  • Page 24

    Detailed description 2.4 Starting up the PLC program Basic logic functions: PLC Basic program powerline (P3 pl) 24 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.4.2 Application of basic program A new CPU program (e.g., "Turnma1") must be set up in a project by means of the STEP7 soft...

  • Page 25

    Detailed description 2.4 Starting up the PLC program Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 25 Compatibility with STEP 7 No interdependencies exist between the basic program (including older program versions) and currently valid v...

  • Page 26

    Detailed description 2.4 Starting up the PLC program Basic logic functions: PLC Basic program powerline (P3 pl) 26 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.4.5 Data backup The PLC-CPU does not save any symbolic names, but instead data type descriptions of the block parameters: • VAR_INP...

  • Page 27

    Detailed description 2.4 Starting up the PLC program Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 27 Functions The following functions are available for this expansion: The functions (shown here in VB script) are not available until ser...

  • Page 28

    Detailed description 2.4 Starting up the PLC program Basic logic functions: PLC Basic program powerline (P3 pl) 28 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Use in script If S7Ext.Magic("") < 0 Then Wscript.Quit(1) End If Set Proj1 = s7.Projects("new") set S7Prog =...

  • Page 29

    Detailed description 2.4 Starting up the PLC program Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 29 Overall reset A description of how to perform a general PLC reset appears in the Installation and Startup Guide. However, a general res...

  • Page 30

    Detailed description 2.4 Starting up the PLC program Basic logic functions: PLC Basic program powerline (P3 pl) 30 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.4.9 Troubleshooting This section describes problems which may occur, their causes and remedies and should be read carefully before ha...

  • Page 31

    Detailed description 2.5 Linking PLC CPUs to 810D, 840D Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 31 2.5 Linking PLC CPUs to 810D, 840D 2.5.1 General The AS 300 family is used as the PLC for all systems. The essential difference bet...

  • Page 32

    Detailed description 2.5 Linking PLC CPUs to 810D, 840D Basic logic functions: PLC Basic program powerline (P3 pl) 32 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.5.3 Interface on 810D and 840D with integrated PLC Physical interfaces As the 810D and 840D systems have an integrated PLC, signa...

  • Page 33

    Detailed description 2.5 Linking PLC CPUs to 810D, 840D Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 33 NCK/PLC interface The data exchange NCK/PLC is organized on the PLC-side by the basic program. The Status information stored by the...

  • Page 34

    Detailed description 2.5 Linking PLC CPUs to 810D, 840D Basic logic functions: PLC Basic program powerline (P3 pl) 34 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 MCP/PLC interface, HHU/PLC interface (810D only) Data exchange between MCP/PLC and HHU/PLC takes place via the MPI interface on the...

  • Page 35

    Detailed description 2.5 Linking PLC CPUs to 810D, 840D Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 35 Alarm/Message Number The two least significant digits of Event ID 16# B046 contain the code for the most significant decimal places...

  • Page 36

    Detailed description 2.6 Interface structure Basic logic functions: PLC Basic program powerline (P3 pl) 36 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.6 Interface structure 2.6.1 General Interface data blocks The PLC user interfaces on the 840D and 810D are identical except for the data vol...

  • Page 37

    Detailed description 2.6 Interface structure Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 37 Figure 2-3 PLC/NCK interface Basics Compile-cycle signals In addition to the standard signals exchanged between the PLC and NCK, an interface...

  • Page 38

    Detailed description 2.6 Interface structure Basic logic functions: PLC Basic program powerline (P3 pl) 38 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Signals PLC/NC The group of signals from the PLC to NC includes: • Signals for modifying the highspeed digital I/O signals of the NC • Key...

  • Page 39

    Detailed description 2.6 Interface structure Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 39 Digital/analog inputs/outputs of the NCK The following must be noted with respect to the digital and analog inputs and outputs of the NCK: In...

  • Page 40

    Detailed description 2.6 Interface structure Basic logic functions: PLC Basic program powerline (P3 pl) 40 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Signals PLC/NCK channels The signal groups below must be considered on the interface: • Control/status signals • Auxiliary/G functions •...

  • Page 41

    Detailed description 2.6 Interface structure Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 41 Figure 2-6 PLC/NC channel interface PLC/axis, spindle, drive signals The axis-specific and spindle-specific signals are divided into the foll...

  • Page 42

    Detailed description 2.6 Interface structure Basic logic functions: PLC Basic program powerline (P3 pl) 42 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Figure 2-7 Interface between PLC and axes/spindles/drives 2.6.3 Interface PLC/HMI General The following groups of functions are required for ...

  • Page 43

    Detailed description 2.6 Interface structure Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 43 Machine operation All operator inputs, which lead to response actions on the machine, are monitored by the PLC. Operator actions are usually p...

  • Page 44

    Detailed description 2.6 Interface structure Basic logic functions: PLC Basic program powerline (P3 pl) 44 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 – Evaluation 2;Acquisition of – Error messages A fixed specification exists to define which signals in a group generate an error message w...

  • Page 45

    Detailed description 2.6 Interface structure Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 45 User Program The user PLC program merely needs to call the basic program block FC10 with appropriate parameter settings in the cyclic program ...

  • Page 46

    Detailed description 2.6 Interface structure Basic logic functions: PLC Basic program powerline (P3 pl) 46 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 840D topology On the 840D, the machine control panel is connected to the OPI bus segment (transmission rate 1.5 Mbps) as an active global data...

  • Page 47

    Detailed description 2.6 Interface structure Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 47 810D topology On the 810D, the machine control panel, handheld unit and OP are connected to the MPI (multipoint Interface) of the AS 300. The ...

  • Page 48

    Detailed description 2.6 Interface structure Basic logic functions: PLC Basic program powerline (P3 pl) 48 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Bus addresses The default bus addresses for the standard configurations are entered in the "Connecting the MCP on the 810D" figures....

  • Page 49

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 49 Figure 2-11 Interface to and from machine control panel 2.7 Structure and functions of the basic program 2.7.1 Genera...

  • Page 50

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) 50 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Figure 2-12 Structure of the PLC program

  • Page 51

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 51 2.7.2 Startup and synchronization of NCK PLC Loading the basic program The basic program must be loaded with the S7 to...

  • Page 52

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) 52 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Control/Status signals A shared feature of the control and status signals is that they are bit fields. The basic progr...

  • Page 53

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 53 M decoder M functions can be used to transfer both switching commands and fixed point values. Decoded dynamic signals ...

  • Page 54

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) 54 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.7.4 Time-alarm processing (OB 35) General The user must program OB 35 for time-alarm processing. The default time ba...

  • Page 55

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 55 Signals NCK to PLC The signals sent by the NCK to the PLC are divided into the following groups: • Status signals f...

  • Page 56

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) 56 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.7.7 Functions of the basic program called from the user program General In addition to the modules of the basic prog...

  • Page 57

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 57 Concurrent axes The distinguishing features of concurrent axes are as follows: • They can be traversed either from t...

  • Page 58

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) 58 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Read/Write NC variables NCK variables can be read with FB GET while values can be entered in NCK variables with FB PUT...

  • Page 59

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 59 2.7.8 Symbolic programming of user program with interface DB General Note The files NST_UDT.AWL and TM_UDT.AWL are s...

  • Page 60

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) 60 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Description Abbreviated symbolic names of the interface signals are defined in the two STL files NST_UDT.AWL and TM_UD...

  • Page 61

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 61 Figure 2-13 M decoding acc. to list Activation of the function The number of groups to be evaluated/decoded is indica...

  • Page 62

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) 62 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Structure of decoding list The source file for the decoding list (MDECLIST.AWL) is supplied with the basic program. DB...

  • Page 63

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 63 Example Three groups of M commands are to be decoded in the following example: • · M2 = 1 to M2 = 5 • · M3 = 12 ...

  • Page 64

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) 64 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Structure of FB 1 in the OB100 (enter the number of M groups to be decoded in order to activate the function): Call F...

  • Page 65

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 65 2.7.10 PLC machine data General The user has the option of storing PLCspecific machine data in the NCK. The user can t...

  • Page 66

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) 66 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Note If the number of PLC machine data used is increased later, then DB20 must be deleted beforehand. To prevent such...

  • Page 67

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 67 NCRunupTimeout := S5T#50S; BP parameters (to scan runtime): l gp_par.UDInt; //=4, l gp_par.UDHex; //=2, l gp_par....

  • Page 68

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) 68 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Symbolic accesses An entry is made in the symbol table to allow data access in symbolic form: Symbol Operand Data typ...

  • Page 69

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 69 2.7.11 Configuration of machine control panel, handheld unit General The communications system integrated in the NC pe...

  • Page 70

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) 70 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 MPI switchover, OPI address An existing connection with an MCP (Machine Control Panel) or HHU (HandHeld Unit) can be a...

  • Page 71

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 71 Configuring Essentially, there are two communication mechanisms for transferring data between the MCP/HHU and PLC. The...

  • Page 72

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) 72 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Relevant parameters (FB1) MCP HHU MCP1Stop MCP2Stop BHGRecGDNo MCPBusType=0 BHGRecGBZNo BHGRecObjNo BHGSendGDNo ...

  • Page 73

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 73 Figure 2-16 840D: MPI connection for HHU Relevant parameters (FB1): Communication between the PLC and HHU is impleme...

  • Page 74

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) 74 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Figure 2-17 MPI connection Relevant parameters (FB1) MCP HHU MCPNum=1 or 2 (number of MCPs) BHG=2 (transfer via COM ...

  • Page 75

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 75 Status information Available in Bit No. Description MCP1StatSendMCP2Stat Send BHGStatSend 4 Syntax error in GD packag...

  • Page 76

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) 76 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Relevant parameters (FB1): Communication between the PLC and HHU is implemented through configuring and subsequent loa...

  • Page 77

    Detailed description 2.7 Structure and functions of the basic program Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 77 Relevant parameters (FB1) MCP HHU MCPNum = 1 or 2 (number of MCPs) HHU = 2 (via COM module) MCP1In MCP2In BHGIn MCP...

  • Page 78

    Detailed description 2.8 SPL for Safety Integrated Basic logic functions: PLC Basic program powerline (P3 pl) 78 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.8 SPL for Safety Integrated See: References: /FBSI/Description of Functions, Safety Integrated 2.9 Assignment overview 2.9.1 Assignment...

  • Page 79

    Detailed description 2.9 Assignment overview Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 79 ManualTurn ManualTurn uses FC 30 to 35 and DB 81 to 89. ManualTurn is an operating system for conventional, cyclecontrolled turning machines. T...

  • Page 80

    Detailed description 2.9 Assignment overview Basic logic functions: PLC Basic program powerline (P3 pl) 80 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Overview of data blocks DB no. Designation Name Package 21 - 30 CHANNEL 1 ... n Interface NC channels BP BP 31 - 61 AXIS 1 ... m Interfaces for...

  • Page 81

    Detailed description 2.10 Memory requirements of basic PLC program for 840D Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 81 2.9.4 Assignment: Timers Timer No. Meaning 0 - 9 Reserved for Siemens 10 – 127 User area Note The actua...

  • Page 82

    Detailed description 2.10 Memory requirements of basic PLC program for 840D Basic logic functions: PLC Basic program powerline (P3 pl) 82 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 PLC/NCK, PLC/HMI interface DB 10 PLC/NCK signals Must be loaded 318 262 DB 11 Signals PLC/Mode group Is generat...

  • Page 83

    Detailed description 2.10 Memory requirements of basic PLC program for 840D Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 83 Basic program options FB 4 PI services Load for PI services 334 214 DB o1) PI services One instance DB per FB 4 ...

  • Page 84

    Detailed description 2.11 Supplementary conditions and NC VAR selector Basic logic functions: PLC Basic program powerline (P3 pl) 84 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Block size (bytes) Block type no. Function Remark Load memory Working memory Maximum configuration (2 channels, 4 ...

  • Page 85

    Detailed description 2.11 Supplementary conditions and NC VAR selector Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 85 Minimum Recommendation Operating system Windows 95/98/NT STEP 7 and higher Version 4 Windows 95/98/NT or higher STE...

  • Page 86

    Detailed description 2.11 Supplementary conditions and NC VAR selector Basic logic functions: PLC Basic program powerline (P3 pl) 86 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 • Archiving of utility routines – Allocation of the output statuses of individual blocks – Comparison of blocks...

  • Page 87

    Detailed description 2.11 Supplementary conditions and NC VAR selector Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 87 2.11.2 NC VAR selector 2.11.2.1 Overview General A catalog with an optional catalog name must be set up via the Windo...

  • Page 88

    Detailed description 2.11 Supplementary conditions and NC VAR selector Basic logic functions: PLC Basic program powerline (P3 pl) 88 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Figure 2-19 NC VAR selector After the "NC VAR selector" application has been started, select a list of var...

  • Page 89

    Detailed description 2.11 Supplementary conditions and NC VAR selector Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 89 Note The latest version of the "NC VAR selector" is capable of processing all previous NC software version...

  • Page 90

    Detailed description 2.11 Supplementary conditions and NC VAR selector Basic logic functions: PLC Basic program powerline (P3 pl) 90 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.11.2.2 Description of Functions Overview The figure below illustrates how the NC VAR selector is used within the ST...

  • Page 91

    Detailed description 2.11 Supplementary conditions and NC VAR selector Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 91 Basic display/Basic menu After the NC VAR selector has been selected (started), the basic display with all input opti...

  • Page 92

    Detailed description 2.11 Supplementary conditions and NC VAR selector Basic logic functions: PLC Basic program powerline (P3 pl) 92 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Figure 2-22 Window with selected variables for new project The selected variables are displayed in a window. Opening...

  • Page 93

    Detailed description 2.11 Supplementary conditions and NC VAR selector Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 93 Storing a project The variable list is stored using the "Project", "Save" or "Save As....&qu...

  • Page 94

    Detailed description 2.11 Supplementary conditions and NC VAR selector Basic logic functions: PLC Basic program powerline (P3 pl) 94 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Figure 2-24 Window with selected Complete List The field variables (e.g., axis area, T area data, etc.) are indicate...

  • Page 95

    Detailed description 2.11 Supplementary conditions and NC VAR selector Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 95 Displaying subsets Double-click on any table field (with the exception of variable fields) to display a window in whi...

  • Page 96

    Detailed description 2.11 Supplementary conditions and NC VAR selector Basic logic functions: PLC Basic program powerline (P3 pl) 96 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Alias name The variable names provided can be up to 32 characters in length. To make variables clearly identifiable i...

  • Page 97

    Detailed description 2.11 Supplementary conditions and NC VAR selector Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 97 Variables in multi-dimensional structures If variables are selected from multidimensional structures, then the column...

  • Page 98

    Detailed description 2.11 Supplementary conditions and NC VAR selector Basic logic functions: PLC Basic program powerline (P3 pl) 98 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Storing a selected list Once variables have been selected, they can be stored under a project name. The files are sto...

  • Page 99

    Detailed description 2.11 Supplementary conditions and NC VAR selector Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 99 Generate Under this menu item, the STEP 7 file from the selected variable list with extension ".awl" is set...

  • Page 100

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 100 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.12 Block descriptions 2.12.1 FB 1: RUN_UP Basic program, startup section Description of Functions The synchronization of NCK and PLC is perf...

  • Page 101

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 101 Declaration SINUMERIK 810D, 840D Code Comment FUNCTION_BLOCK FB 1 VAR_INPUT MCPNum: INT:= 1; //0: No MCP //1: 1 MCP (default) //2: 2 MCPs ...

  • Page 102

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 102 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Code Comment BHGSendGDNo: INT:= 2; BHGSendGBZNo: INT:= 1; BHGSendObjNo: INT:= 1; BHGMPI: BOOL:= FALSE; BHGStop: BOOL:= FALSE; BHGNo...

  • Page 103

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 103 Description of formal parameters SINUMERIK 810D, 840D The table below lists all formal parameters of the RUN_UP function for 810D, 840D: Sign...

  • Page 104

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 104 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Signal I/O Type Value range Remark HHU I INT Handheld unit interface: 0: No HHU 1: HHU to MPI with SDB 210 configuration (for SW V3.x): 2: HH...

  • Page 105

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 105 Signal I/O Type Value range Remark BHGNotSend I BOOL 0: Send and receive operation activated 1: Receive HHU signals only (SW 4 and higher) NC...

  • Page 106

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 106 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Signal I/O Type Value range Remark UDHex A INT Number of hexadecimal machine data in DB 20 UDReal A INT Number of real machine data in D...

  • Page 107

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 107 MCP/HHU monitoring (for 810D, 840D) The following status information regarding communication with the machine control panels is output in the ...

  • Page 108

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 108 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 MCP1StatSend := P#A8.0, MCP1StatRec := P#A12.0, MCP1BusAdr := 14, MCP1Timeout := S5T#700MS, MCPMPI:= TRUE, NCCyclTimeout := S5T#200MS, ...

  • Page 109

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 109 2.12.2 FB 2: Read GET NC variable Description of Functions The PLC user program can read variables from the NCK area using FB GET. This functi...

  • Page 110

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 110 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 NCK variables within one group can be combined in a job: range Group 1 C[1] N B A T Group 2 C[2] N B A T Group 3 V[.] H[.] The same r...

  • Page 111

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 111 Column6 : WORD ; Line6 : WORD ; Addr7 : ANY ; Unit7 : BYTE ; Column7 : WORD ; Line7 : WORD ; Addr8 : ANY ; Unit8 : BYTE ; Column8 : W...

  • Page 112

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 112 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Description of formal parameters The table below list all formal parameters of the GET function. Signal Type Type Value range Remark Req I BO...

  • Page 113

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 113 Error identifiers If it was not possible to execute a job, the failure is indicated by "logic 1" on status parameter error. The erro...

  • Page 114

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 114 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Pulse diagram (1) Activation of function (2) Positive acknowledgment: Receive new data (3) Reset function activation after receipt of ac...

  • Page 115

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 115 Parameterization of FB 2 with instance DB 110: DATA_BLOCK DB 110 //Unassigned user DB, as instance for FB 2 FB 2 BEGIN END_DATA_BLOCK Functio...

  • Page 116

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 116 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 END_STRUCT; END_STRUCT; BEGIN END_DATA_BLOCK CALL FB 2, DB 110 ( Req := M 0.0, NumVar := 2, Addr1 := "NCVAR".C1_RP_rpa0_0, Lin...

  • Page 117

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 117 2.12.3 FB 3: PUT write NC variables Description of functions The PLC user program can write variables in the NCK area using FB PUT. Every FB 3...

  • Page 118

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 118 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Machine data, GUD In order to define machine data and GUDs without a password, the protection levels of the data you want to access must be re...

  • Page 119

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 119 Declaration of the function FUNCTION_BLOCK FB 3 VAR_INPUT Req : BOOL ; NumVar : INT ; Addr1 : ANY ; Unit1 : BYTE ; Column1 : WORD ; Lin...

  • Page 120

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 120 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 SD1 : ANY ; SD2 : ANY ; SD3 : ANY ; SD4 : ANY ; SD5 : ANY ; SD6 : ANY ; SD7 : ANY ; SD8 : ANY ; END_VAR Description of formal paramete...

  • Page 121

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 121 Error identifiers If it was not possible to execute a job, the failure is indicated by "logic 1" on status parameter error. The erro...

  • Page 122

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 122 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Pulse diagram (1) Activation of function (2) Positive acknowledgment: variables have been written (3) Reset function activation after re...

  • Page 123

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 123 Call example Writing of three channelspecific machine data of channel 1: Select the three data with NC VAR selector and store in the file DB12...

  • Page 124

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 124 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Example: Variable addressing Writing of two R parameters of channel 1, whose address specifications are stored in DB 120 as the basic type. Th...

  • Page 125

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 125 2.12.4 FB 4: PI_SERV General PI services Description of Functions FB PI_SERV can be used to start program-instance services in the NCK area. A...

  • Page 126

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 126 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 WVar5 : WORD ; WVar6 : WORD ; WVar7 : WORD ; WVar8 : WORD ; WVar9 : WORD ; WVar10 : WORD ; FMNCNo : INT ; //(in FMNC only) END_VAR VAR_...

  • Page 127

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 127 Error identifiers If it was not possible to execute a job, the failure is indicated by "logic 1" on status parameter error. The erro...

  • Page 128

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 128 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.12.4.1 Overview of available PI services Overview of PI services The following section provides an overview of the PI services that can be s...

  • Page 129

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 129 2.12.4.2 General PI services The possible services are described in this section. PI service: ASUB Allocate function interrupt: A program stor...

  • Page 130

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 130 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 PI service: CONFIG Function Reconfiguration: The reconfiguration command activates machine data, which have been entered sequentially by the o...

  • Page 131

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 131 PI service: FINDBL Activate function Search: A channel is switched to block search mode and the appropriate acknowledgment then transmitted. T...

  • Page 132

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 132 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 PI service: NCRES Trigger function NC-RESET: Initiates an NCK RESET. The Unit and WVar1 parameters must be assigned 0. Parameterization Signa...

  • Page 133

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 133 PI service: SETUDT Set function current user data active The current user data, such as tool offsets, basic frames and settable frames are set...

  • Page 134

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 134 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.12.4.3 Tool management services Overview of PI services Available PI services of the function tool management. PI service Function FM-NC 8...

  • Page 135

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 135 PI service: CRCEDN Function Create new cutting edge Create tool edge by specifying the cutting edge number. If the T number of an existing too...

  • Page 136

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 136 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 PI service: CREATO Create function tool: Creation of a tool with specification of a T number. The tool is entered as existing in the tool dire...

  • Page 137

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 137 PI service: DELETO Delete function tool: Deletes the tool assigned to the transferred T number with all cutting edges (in TO, in some cases TU...

  • Page 138

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 138 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Parameter: WVar1 = FunctionNumber This function number represents a PI service: 1: TMCRTO (create tool) 2: TMFDPL (search for empty locatio...

  • Page 139

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 139 PI service: TMCRTO Create function tool: Creating a tool under specification • of an identifier, a Duplo number e.g. with $TC_TP1[y] = Dupl...

  • Page 140

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 140 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 PI service: TMFDPL Function Searching for empty location for loading: (dependent on parameter assignment) Location_number_to = -1, Magazine_n...

  • Page 141

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 141 PI service: TMFPBP Function Searching for empty location (dependent on parameter assignment): For more information please see the description ...

  • Page 142

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 142 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Unload function The tool specified by the tool number is unloaded at the specified loading point/station (location_number_to, magazine_number_...

  • Page 143

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 143 PI service: TMPOSM Function Position magazine location or tool: (dependent on parameter assignment) A magazine location, which has either been...

  • Page 144

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 144 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 PI service: TMPCIT Function Set increment value for workpiece counter: Incrementing the workpiece counter of the spindle tool Parameterizatio...

  • Page 145

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 145 PI service: TRESMO Function Reset monitoring values: This PI service resets the monitoring values of the designated edges of the designated to...

  • Page 146

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 146 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 PI service: TSEARC Function complex search via search screen forms: (dependent on parameter assignment) The PI service allows you to search fo...

  • Page 147

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 147 MagNr From PlaceNr From MagNr To PlaceNr To Search area WVar1 WVar2 WVar3 WVar4 #M1 #P1 #M2 #P2 Locations starting at magazine #M1, location...

  • Page 148

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 148 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Parameterization: Parameterization Signal Type Value range Meaning PIService ANY PI.TSEARC Complex search using search screen forms Unit INT ...

  • Page 149

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 149 Call example Program selection in channel 1 (main program and workpiece program) Entry of PI for DB 16 and STR for DB 124 with the S7 SYMBOL e...

  • Page 150

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 150 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.12.5 FB 5: GETGUD read GUD variable Description of Functions The PLC user program can read a GUD variable (GUD = Global User Data) from the ...

  • Page 151

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 151 Declaration of the function FUNCTION_BLOCK FB 5 //Server name KNOW_HOW_PROTECT VERSION : 3.0 VAR_INPUT Req : BOOL ; Addr: ANY ; //Var...

  • Page 152

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 152 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Description of formal parameters The table below lists all formal parameters of the GETGUD function. Signal I/O Type Value range Remark Req I...

  • Page 153

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 153 Error identifiers If it was not possible to execute a job, the failure is indicated by "logic 1" on status parameter error. The erro...

  • Page 154

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 154 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Pulse diagram (1) Activation of function (2) Positive acknowledgment: variables have been written (3) Reset function activation after re...

  • Page 155

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 155 FB 5 BEGIN END_DATA_BLOCK //A user-defined channel variable from channel 1 must be read //with conversion into a variable pointer to allow...

  • Page 156

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 156 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.12.6 FB 7: PI_SERV2 General PI services Description of Functions A detailed description of the FB 7 is contained in the description of FB 4....

  • Page 157

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 157 Description of formal parameters The following table shows all formal parameters of the function PI_SERV2. Signal Type Type Value range Remar...

  • Page 158

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 158 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 PI service: TMFPBP Function: Search for empty location (dependent on parameter assignment) This service searches the magazine(s) named in the ...

  • Page 159

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 159 Parameterization Signal Type Value range Meaning PIService ANY PI.TMFPBP Empty location search Unit INT 1 ... max. TOA TOA WVar1 INT Magazin...

  • Page 160

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 160 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.12.7 FB 9: MzuN Control unit switchover Description of Functions This block allows switchover between several control units (operator panels...

  • Page 161

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 161 Brief description of a few important functions Active/passive operating mode An online MMC can operate in two different modes: Active mode: O...

  • Page 162

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 162 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Declaration of function FUNCTION_BLOCK FB 9 VAR_INPUT Ack : BOOL ; //Acknowledge interrupts OPMixedMode: BOOL:= FALSE; //Mixed operation wi...

  • Page 163

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 163 Description of formal parameters The table below lists all formal parameters of the M:N function. Formal parameters of M:N function Signal I/...

  • Page 164

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 164 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Example of a call for FB 9 CALL FB 9, DB 109 ( Ack := Error_ack, //e.g. MSTT-RESET OPMixedMode := FALSE, ActivEnable := TRUE, // MCPEna...

  • Page 165

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 165 Example of override switchover // Auxiliary flags used M100.0, M100.1, M100.2, M100.3 // Positive edge of MCP1Ready must check override and a...

  • Page 166

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 166 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.12.8 FB 10: Safety relay (SI relay) Description of Functions The SPL block "Safety relay" for "Safety Integrated" is the...

  • Page 167

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 167

  • Page 168

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 168 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Declaration of the function FUNCTION_BLOCK FB 10 VAR_INPUT In1 : BOOL := TRUE; //Input 1 In2 : BOOL := TRUE; //Input 2 In3 : BOOL := TRUE;...

  • Page 169

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 169 Description of formal parameters The following table shows all formal parameters of the SI relay function. Formal parameters of SI relay func...

  • Page 170

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 170 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.12.9 FB 11: Brake test Description of Functions The braking operation check should be used for all axes, which must be prevented from moving...

  • Page 171

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 171 The brake test is divided into the following steps: Brake test sequence Step Expected checkback Monitoring time value Start brake test DBX 71...

  • Page 172

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 172 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Description of formal parameters The following table lists all of the formal parameters of the brake test function Formal parameters of brake...

  • Page 173

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 173 Error identifiers State Meaning 0 No error 1 Start conditions not fulfilled, e.g., axis not under closedloop control/brake closed/axis disabl...

  • Page 174

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 174 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Example of a call for FB 11: UN M 111.1; //Request to close brake, Z axis of FB = Q 85.0; //Brake control, Z axis OPEN "Axis3"; //...

  • Page 175

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 175 MoveAxis :=M 111.2, Request, initiate traversing motion Done :=M 111.3, //Test successfully completed Error :=M 111.4, //Error has occur...

  • Page 176

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 176 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.12.10 FB 29: Signal recorder and data trigger diagnostics Signal recorder The "diagnostics" FB allows various diagnostic routines ...

  • Page 177

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 177 Declaration of the function FUNCTION_BLOCK FB 29 VAR_INPUT Func : INT ; //Function number: 0 = No function, //1 = Signal recorder, 2 = Data ...

  • Page 178

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 178 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Structure for ring buffer TITLE = //Ring buffer DB for FB 29 VERSION : 1.0 STRUCT Field: ARRAY [0 .. 249 ] OF STRUCT //can be any size of...

  • Page 179

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 179 Description of formal parameters The table below lists all formal parameters of the Diagnostics function: Formal parameters of diagnostics fu...

  • Page 180

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 180 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Call example FUNCTION FC 99: VOID TITLE = VERSION : 0.0 BEGIN NETWORK TITLE = NETWORK CALL FB 29, DB 80 ( Func := 1, Signal_1 :=M 100.0,...

  • Page 181

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 181 Call example As far as the time is concerned, the basic program must be executed before the user program. It is, therefore, called first in OB...

  • Page 182

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 182 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.12.12 FC 3: GP_PRAL Basic program, interruptcontrolled section Description of Functions Blocksynchronized transfers from the NCK to the PLC ...

  • Page 183

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 183 Auxiliary functions Generally, high-speed or acknowledging auxiliary functions are processed with or without interrupt control independently o...

  • Page 184

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 184 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Call example As far as the time is concerned, the basic program must be executed before other interrupt-driven user programs. It is, therefore...

  • Page 185

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 185 2.12.13 FC 7: TM_REV Transfer block for tool change with revolver Description of Functions After a revolver has been changed, the user will ca...

  • Page 186

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 186 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Manual revolver switching If a manual action is used to rotate the revolver, this information must be forwarded to the tool management. The as...

  • Page 187

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 187 Description of formal parameters The table below lists all formal parameters of the TM_REV function. Signal Type Type Value range Remark Star...

  • Page 188

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 188 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Call example CALL FC 7 ( //Tool management transfer of block for revolver Start := m 20.5, //Start := "1 " => transfer trigger C...

  • Page 189

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 189 2.12.14 FC 8: TM_TRANS transfer block for tool management Description of Functions The user calls this block FC TM-TRANS when the position of ...

  • Page 190

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 190 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 The "Start" parameter does not need a signal edge for a subsequent job. This means that new parameters can be assigned with "St...

  • Page 191

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 191 Declaration of the function STL representation FUNCTION FC 8 : VOID //NAME :TM_TRANS VAR_INPUT Start: BOOL ; TaskIdent: BYTE ; TaskIdentNo...

  • Page 192

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 192 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Signal Type Type Value range Remark OldToolMag I INT -1, 0.. Current magazine number of new tool -1: Tool remains at its location OldToolLoc ...

  • Page 193

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 193 Status list Status = 1: The WZV operation is completed (loading/unloading/reloading, prepare change, change). The parameters "NewToolMag...

  • Page 194

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 194 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Status = 5: The operation is complete. The "new" tool is in the position specified in parameters "NewToolMag", "NewT...

  • Page 195

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 195 Status = 104: The "new" tool is in the position specified in parameters "NewToolMag", "NewToolLoc". This status...

  • Page 196

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 196 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Call example CALL FC 8 ( //Tool-management transfer block Start := m 20.5, //Start := "1 " => transfer trigger TaskIdent := D...

  • Page 197

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 197 2.12.15 FC 9: ASUB startup of asynchronous subprograms Description of functions The FC ASUB can be used to trigger any functions in the NC. Be...

  • Page 198

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 198 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Declaration of the function FUNCTION FC 9 : VOID //NAME :ASUP VAR_INPUT Start: BOOL ; ChanNo: INT ; IntNo: INT ; END_VAR VAR_OUTPUT Activ...

  • Page 199

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 199 Pulse diagram (1) Activation of function (2) ASUP active (3) Positive acknowledgment: ASUB ended (4) Reset function activation after re...

  • Page 200

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 200 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.12.16 FC 10: AL_MSG error and operating messages Description of Functions FC AL_MSG evaluates the signals entered in DB 2 and displays them ...

  • Page 201

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 201 Note In DB2, a "1" signal must be present for several OB1 cycles to ensure that a message can also be displayed on the operator in...

  • Page 202

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 202 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.12.17 FC 12: AUXFU call interface for user with auxiliary functions Description of functions FC AUXFU is generally called on an eventdriven ...

  • Page 203

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 203 // Auxiliary-function change signals are now scanned, etc. BE; END_FUNCTION 2.12.18 FC 13: BHGDisp display control for handheld unit Descrip...

  • Page 204

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 204 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Declaration of the function STL representation DATA_BLOCK "strdat" //The data block number is defined in the symbol file STRUCT d...

  • Page 205

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 205 Description of formal parameters The table below lists all formal parameters of the BHGDisp function: Signal I/O Type Value range Remark Row ...

  • Page 206

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 206 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Ranges of values Value ranges of data types Data type Representable numerical range BOOL 0, 1 BYTE 0 to 255 WORD 0 to 65535 INT - 32768 to + ...

  • Page 207

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 207 2.12.19 FC 15: POS_AX positioning of linear and rotary axes Description of Functions (Do not use for new applications, function is integrated ...

  • Page 208

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 208 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Warning If several block calls (FC 15, FC 16, FC 18) are programmed for the same axis/spindle in the PLC user program, then the functions con...

  • Page 209

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 209 Description of formal parameters The table below lists all formal parameters of the POS_AX function: Signal I/O Type Value range Remark Start...

  • Page 210

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 210 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Timing diagram (fault scenario) (1) Activation of function by means of a positive edge (2) Negative acknowledgment: Error has occurred (3...

  • Page 211

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 211 2.12.20 FC 16: PART_AX positioning of indexing axes Description of Functions (Do not use for new applications, function is integrated in FC 18...

  • Page 212

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 212 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Warning If several block calls (FC 15, FC 16, FC 18) are programmed for the same axis/spindle in the PLC user program, then the functions con...

  • Page 213

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 213 Description of formal parameters The table below lists all formal parameters of the PART_AX function: Signal I/O Type Value range Remark Star...

  • Page 214

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 214 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Timing diagram (1) Activation of function by means of a positive edge (2) Positioning axes active (3) Positive acknowledgment: Position ...

  • Page 215

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 215 Call example CALL FC 16 ( //Position an indexing axis Start := I72.4, AxisNo := 6, IC := FALSE, DC := #short, //e.g., local variable ...

  • Page 216

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 216 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Figure 2-29 Star/delta changeover For more detailed information about motor speed adjustments, please see: References: /FB1/Function Manual...

  • Page 217

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 217 Restrictions Star/delta changeover on digital main spindle drives initiates a process, which contains closed-loop control sequences. Since the...

  • Page 218

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 218 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Description of formal parameters The table below lists all formal parameters of the YDelta function: Signal Type Type Value range Remark YDel...

  • Page 219

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 219 2.12.22 FC 18: SpinCtrl spindle control Description of Functions FC SpinCtrl can be used to control spindles and axes from the PLC. References...

  • Page 220

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 220 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Note Please note: FC 18 must be called cyclically until signal "InPos" or, in the case of an error "Error", produces an e...

  • Page 221

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 221 Functions 1. Position spindle: The following signals are relevant: Start: Initiation signal Funct: "1" = Position spindle Mode: Pos...

  • Page 222

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 222 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 MD35010 GEAR_STEP_ CHANGE_ENABLE = 0 Function MD35010 GEAR_STEP_ CHANGE_ENABLE = 1 Function Pos = 0 Oscillation Pos = 0 Pos = 1 Oscillation P...

  • Page 223

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 223 5 to 8. Position axes: The following signals are relevant: Start: Initiation signal Funct: "5 to 8" = Position axes Mode: Positioni...

  • Page 224

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 224 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Declaration of the function FUNCTION FC 18: VOID //SpinCtrl VAR_INPUT Start: BOOL ; Stop: BOOL ; Funct: BYTE ; Mode: BYTE ; AxisNo: INT ...

  • Page 225

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 225 Description of formal parameters The table below lists all formal parameters of the SpinCtrl function. Signal I/O Type Value range Remark Sta...

  • Page 226

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 226 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Error identifiers If a function could not be executed, this is indicated by the "Error" status parameter being set to 'logical 1'. T...

  • Page 227

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 227 Timing diagram (1) Activation of function by means of a positive signal edge with start or stop (2) Positive acknowledgment: Function exec...

  • Page 228

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 228 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Call examples 1. Position spindle: //Positive acknowledgment resets Start: U M112.0; //InPos R M 100.0; //Start //Negative acknowledgment, af...

  • Page 229

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 229 3. Start spindle oscillation CALL FC 18 ( Start := M100.0, Stop := FALSE, Funct := B#16#3, //Oscillate spindle Mode := B#16#0, AxisNo :=...

  • Page 230

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 230 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.12.23 FC 19: MCP_IFM transmission of MCP signals to interface Description of Functions With FC MCP_IFM (M variants), the following are trans...

  • Page 231

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 231 Feedrate and spindle Start/Stop are not transferred to the interface, but output modally as a "FeedHold" or "SpindleHold" ...

  • Page 232

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 232 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 For FC 19, the maximum possible number of axis selections can also be restricted. This upper limit is set for the 1. Machine Control Panel in...

  • Page 233

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 233 MCP selection signals to the user interface Key switch Source: MCP-Switch Destination: Interface DB Position 0 DB10.DBX56.4 Position 1 DB10...

  • Page 234

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 234 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Direction keys rapid traverse override The transfer is dependent upon the selected axis. The associated interface bits are deleted for axes, w...

  • Page 235

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 235 Channel signals Source: MCP - keys Destination: Interface DB (parameter ChanNo) NC Start DB21, ... DBX7.1 NC stop DB21, ... DBX7.3 RESET D...

  • Page 236

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 236 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Channel signals Destination: MCP - LED Source: Interface DB (parameter ChanNo) NC Start DB21, ... DBX35.0 NC stop DB21, ... DBX35.2 or DB2...

  • Page 237

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 237 Reconnecting the axis selections To ensure a flexible assignment of the axis selection keys to the appropriate axis or spindle, FC 19 needs no...

  • Page 238

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 238 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.12.24 FC 21: transfer PLC NCK data exchange Description of functions When the Transfer block is called, data are exchanged between the PLC a...

  • Page 239

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 239 Explanation of formal parameters The table below shows all formal parameters of the "Transfer" function. Signal Type Type Value ran...

  • Page 240

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 240 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Call example FUNCTION FC 100 : VOID VAR_TEMP myAny: ANY ; END_VAR BEGIN NETWORK ... // Deactivate synchronized actions with ID3, ID10 and ID...

  • Page 241

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 241 General A separate, internal data area is provided to allow the highspeed exchange of data between the PLC and NCK. The size of the internal d...

  • Page 242

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 242 Function Manual, 11/2006, 6FC5397-0BP10-2BA0

  • Page 243

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 243 Basic structure in NCK: Variable value ranges The following signals are relevant: Signal Type Type Value range Remark Enable I BOOL = FC 21...

  • Page 244

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 244 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Call example 1. Read double word of position offset 4 with semaphore in byte 0 and store in MD 100: Data type Dword (4 bytes) Position offset ...

  • Page 245

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 245 2. Read word of position offset 8 without semaphore and store in MW 104: CALL FC 21 ( Enable := M 10.0, // if TRUE, FC 21 active Funct := B...

  • Page 246

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 246 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 7: Update control signals to axes: The purpose of function 7 is to transmit important control signals at high speed in between cyclic data tra...

  • Page 247

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 247 2.12.25 FC 22: TM_DIR Direction selection for tool management Description of Functions The block TM_DIR provides the shortest path for positio...

  • Page 248

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 248 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 MagNo[2].AnzPlatz:=12; //Number of locations for magazine 2 = 12 END_DATA_BLOCK Note For further details on tool management (also with reg...

  • Page 249

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 249 Description of the formal parameters The table below shows all formal parameters of the "TM_DIR" function. Signal I/O Type Value ra...

  • Page 250

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 250 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.12.26 FC 24: MCP_IFM2 Transmission of MCP signals to interface Description of Functions With FC MCP_IFM2 (M variant slim operator panel), th...

  • Page 251

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 251 The spindle direction (+, -) is not switched directly either, but made available as output parameter "SpindleDir", permitting, for e...

  • Page 252

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 252 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 For FC 24, the maximum possible number of axis selections can also be restricted. This upper limit is set for the 1. Machine control panel in ...

  • Page 253

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 253 Description of the formal parameters The table below shows all formal parameters of the "MCP_IFM2" function: Signal I/O Type Value ...

  • Page 254

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 254 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.12.27 FC 25: MCP_IFT transfer of MCP/OP signals to interface Description of Functions With FC MCP_IFT (T variants), the following are transf...

  • Page 255

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 255 Multiple calls of FC 25 or FC 19, FC 24, FC 26 are permitted in a single PLC cycle. In this case, the first call in the cycle drives the LED d...

  • Page 256

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 256 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Declaration of the function FUNCTION FC 25: VOID // NAME: MCP_IFT VAR_INPUT BAGNo : BYTE ; ChanNo: BYTE ; SpindleIFNo: BYTE ; END_VAR ...

  • Page 257

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 257 Call example CALL FC 25 ( //Machine control panel T variants //signals to interface BAGNo := B#16#1, //Mode group no. 1 ChanNo := B#16#1, ...

  • Page 258

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 258 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 • Feed override: – The feed override is transferred to the interface of the selected channel and to the interface of the axes. – The fee...

  • Page 259

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 259 Flexible axis configuration It is possible to be flexible in the assignment of axis selections or direction keys for machine axis numbers. Bet...

  • Page 260

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 260 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Description of the formal parameters The table below shows all formal parameters of the "HPU_MCP" function. Signal Type Type Value ...

  • Page 261

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 261 Direction keys rapid traverse override The transfer is dependent upon the selected axis. The corresponding interface bits are deleted for axes...

  • Page 262

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 262 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.12.28.3 Checkback signals from user interface for controlling displays Operating modes and machine functions Destination: MCP - Output Sou...

  • Page 263

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 263 2.12.29 FC 19, FC 24, FC 25, FC 26 source code description Task Machine control panel on user interface (FC19 M variant, FC24 slim-line varian...

  • Page 264

    Detailed description 2.12 Block descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 264 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 The MCS/WCS switchover with edge evaluation, axis selections, direction keys and rapid traverse overlay are determined in Network Global_in f...

  • Page 265

    Detailed description 2.13 Signal/data descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 265 2.13 Signal/data descriptions 2.13.1 Interface signals NCK/PLC, MMC/PLC, MCP/PLC General The NCK/PLC, HMI/PLC, and MSTT/PLC interface si...

  • Page 266

    Detailed description 2.13 Signal/data descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 266 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Addresses in DB21, ... Variable Type Comment DBX 194.0 ... 7 M_Fkt_M0 ... M7 Bool M signals M0 ... M7 DBX 195.0 ... 7 M_Fkt_M8 ... M15 B...

  • Page 267

    Detailed description 2.13 Signal/data descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 267 2.13.3 G Functions General The G functions programmed in the part program, ASUB or synchronized actions are channel specifically transfe...

  • Page 268

    Detailed description 2.13 Signal/data descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 268 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Addresses in DB21, ... Variables Type Basic position Comment DBB 229 G_FKT_GR_22 BYTE 0 Active G function of group 22 DBB 230 G_FKT_GR_2...

  • Page 269

    Detailed description 2.13 Signal/data descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 269 2.13.4 Message signals in DB 2 General DB2 allows the user to display the messages for individual signals on the operator panel front. A...

  • Page 270

    Detailed description 2.13 Signal/data descriptions Basic logic functions: PLC Basic program powerline (P3 pl) 270 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 User areas in DB2 Area Address Message number Axis/spindle 1 DBX144.0 - DBX145.7 600.100 - 600.115 Axis/spindle 2 DBX146.0 - DBX147.7 6...

  • Page 271

    Detailed description 2.13 Signal/data descriptions Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 271 User areas in DB2 Area Address Message number User area 0 DBX180.0 - DBX187.7 700.000 - 700.063 User area 1 DBX188.0 - DBX195.7 700.100...

  • Page 272

    Detailed description 2.14 Programming tips with STEP 7 Basic logic functions: PLC Basic program powerline (P3 pl) 272 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.14 Programming tips with STEP 7 2.14.1 General General Some useful tips on programming complex machining sequences in STEP7 are g...

  • Page 273

    Detailed description 2.14 Programming tips with STEP 7 Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 273 2.14.3 ANY and POINTER 2.14.3.1 POINTER or ANY variable for transfer to FC or FB With version 1 or later of STEP7 it is possible to...

  • Page 274

    Detailed description 2.14 Programming tips with STEP 7 Basic logic functions: PLC Basic program powerline (P3 pl) 274 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 FUNCTIONBLOCK FB 100 Comment L P##Addr1; +AR2; //Add ANY start addresses L P##Temp_addr; LAR1 ; //Retrieve pointer from VAR_TEM...

  • Page 275

    Detailed description 2.14 Programming tips with STEP 7 Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 275 FUNCTIONBLOCK FB 100 Comment SLD 3; //Offset is a bit offset T LD [AR1,P#6.0]; CALL FB 101, DB 100 (ANYPAR := #Temp_addr); //AN...

  • Page 276

    Detailed description 2.14 Programming tips with STEP 7 Basic logic functions: PLC Basic program powerline (P3 pl) 276 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 Example in FC, if POINTER or ANY are present as parameters FUNCTION FC 99: VOID Comment VAR_INPUT Row : BYTE ; Convert : BOOL ...

  • Page 277

    Detailed description 2.14 Programming tips with STEP 7 Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 277 2.14.3.4 Use of POINTER and ANY in FB if POINTER or ANY is available as parameter Description of Functions FB 99 has inputs paramet...

  • Page 278

    Detailed description 2.14 Programming tips with STEP 7 Basic logic functions: PLC Basic program powerline (P3 pl) 278 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 FUNCTIONBLOCK FB 99 Comment T #typ; L DIW [AR1,P#2.0]; //Retrieve amount T #Amount; L DIW [AR1,P#4.0]; //Retrieve DB number ...

  • Page 279

    Detailed description 2.14 Programming tips with STEP 7 Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 279 Example FUNCTION_BLOCK FB 99 Comment VAR_INPUT varin: INT ; END_VAR VAR variable1: ARRAY[0 to 9] of INT; variable2: INT ; ...

  • Page 280

    Detailed description 2.14 Programming tips with STEP 7 Basic logic functions: PLC Basic program powerline (P3 pl) 280 Function Manual, 11/2006, 6FC5397-0BP10-2BA0 2.14.5 Strings General The STRING data type is required by certain services of the basic program. For this reason, some additional ...

  • Page 281

    Detailed description 2.14 Programming tips with STEP 7 Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 281 2.14.6 Determining offset addresses for data block structures General Another task, which occurs frequently, is symbolic determinat...

  • Page 282

    Detailed description 2.14 Programming tips with STEP 7 Basic logic functions: PLC Basic program powerline (P3 pl) 282 Function Manual, 11/2006, 6FC5397-0BP10-2BA0

  • Page 283

    Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 283 Supplementary conditions 3There are no supplementary conditions to note.

  • Page 284

    Supplementary conditions Basic logic functions: PLC Basic program powerline (P3 pl) 284 Function Manual, 11/2006, 6FC5397-0BP10-2BA0

  • Page 285

    Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 285 Examples 4No examples are available.

  • Page 286

    Examples Basic logic functions: PLC Basic program powerline (P3 pl) 286 Function Manual, 11/2006, 6FC5397-0BP10-2BA0

  • Page 287

    Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 287 Data lists 55.1 Machine data 5.1.1 NC-specific machine data Number Identifier: $MN_ Description 10100 PLC_CYCLIC_TIMEOUT Cyclic PLC monitoring time 14504 MAXNUM_USER_DATA_INT Number of us...

  • Page 288

    Data lists 5.1 Machine data Basic logic functions: PLC Basic program powerline (P3 pl) 288 Function Manual, 11/2006, 6FC5397-0BP10-2BA0

  • Page 289

    Basic logic functions: PLC Basic program powerline (P3 pl) Function Manual, 11/2006, 6FC5397-0BP10-2BA0 289 Index A Assignment of DBs, 79 ASUBs, 57 B Basic PLC program (P3)|Connecting the PLC CPUs, 31 Basic PLC Program (P3)|Physical interfaces on 840D, 32 Basic PLC program (P3)|PLC interface on ...

  • Page 290

x