Ä./Yùä EDSTCXN .
I Tip! Current documentation and software updates concerning Lenze products can be found on the Internet in the "Services & Downloads" area under http://www.Lenze.com © 2006 Lenze Drive Systems GmbH, Hans−Lenze−Straße 1, D−31855 Aerzen No part of this documentation may be reproduced or made accessible to third parties without written consent by Lenze Drive Systems GmbH. All information given in this documentation has been selected carefully and complies with the hardware and software described.
1 2 Contents i Preface and general information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.1 About this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.2 For which products is the manual valid? . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.3 Legal regulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Getting started . . . . . . . . . . . .
i 3 4 Contents 2.11 ETC PLC programming with CoDeSys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.11.1 Installing CoDeSys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.11.2 Configuring the control system in the ETC−CoDeSys . . . . . . . . . 51 51 51 2.12 Creating a PLC sample program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.12.1 Required hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.12.
4 Contents i Machine constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 4.1 Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 4.2 Test settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.1 MK_TEST_OHNEMECHANIK . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.2 MK_SPS_DUMMY . . . . . . . . . . . . .
i 6 Contents 4.7 Configuration of axes − Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7.1 MK_IMPULSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7.2 MK_WEG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7.3 MK_MASSSTAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 209 209 209 4.8 Configuration of axes − Operating range . . . . . . . . . . . . . . . . . .
5 6 Contents i 4.15 Technology−specific settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.15.1 MK_MFKT_UPR_TABELLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.15.2 MK_TECHNOLOGIEDATEN1 ... MK_TECHNOLOGIEDATEN4 . . . 4.15.3 MK_MASCH_POLAR_KART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.15.4 MK_KARTESISCH_ACHSNR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.15.5 MK_POLAR_ACHSNR . . . . . . . . . . . . . . . . . . . . .
i 7 8 8 Contents ETC−MMI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286 7.1 Installing ETC−MMI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286 7.2 Starting ETC−MMI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 7.3 Operating ETC−MMI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.
Contents i 8.5 Network variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.5.1 Settings in the target system . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.5.2 Settings in the global variable list . . . . . . . . . . . . . . . . . . . . . . . . 353 353 354 8.6 Generate program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 8.7 Interface to the ETC . . . . . . . . . . . . . . . . . . . . . . .
1 Preface and general information 1.1 About this Manual 1 Preface and general information 1.1 About this Manual Target group This manual is intended for persons who program and commission the ETC Motion Control System under the "NC" operating system.
1.2 Preface and general information 1 For which products is the manual valid? 1.2 For which products is the manual valid? Standard device ETC xx 0 xx 1A 10 Product Version HC = DIN rail, CNC core PC = PCI plug−in card, CNC core ETCHC0xx Number of axes 02 = 2 axes 04 = 4 axes 08 = 8 axes 12 = 12 axes Hardware version Software version ETCPC0xx Modules ETCH xxxx 1A 10 Product N003 = power supply unit T000 = bus termination module I008 = 8 dig. inputs I016 = 16 dig.
1 Preface and general information 1.3 Legal regulations 1.3 Legal regulations Marking The components of the ETC Motion Control System are clearly marked by the contents of the nameplate. Manufacturer Lenze Drive Systems GmbH, Postfach 101352, D−31763 Hameln CE conformity Compliant with EC Directive "Electromagnetic compatibility" Application as intended Components of the ETC Motion Control System ƒ must only be operated under the operating conditions described in the ETC Hardware Manual.
2 Getting started 2 System overview Examples for an automation system 2.1 2.1.1 Getting started System overview 2.1.1 Examples for an automation system ETCHN003 2.1 Ethernet ETCHx ETC-System Components ETCHT000 This chapter explains the basics of the ETC system and describes the procedure for realising an automation task.
2 Getting started 2.1 2.1.1 System overview Examples for an automation system To carry out its allocated control function the ETC control needs various programs which are transferred from the IPC (or standard PC): ƒ Operating system or firmware of the control (e.g. ETCHC.rsc) ƒ PLC programs (e.g. SPSDummy.prg) ƒ CNC programs; i.e. cycle and DIN programs (e.g. 9000.zyk or Nikolaus.din) IPC The ETC control is operated and maintained via the IPC (or standard PC).
2 System overview Layout example for an ETC island 2.1 2.1.2 5 4 3 ETCHT000 ETCHI008 1 ETCHI016 0 ETCHx004 Layout example for an ETC island ETCHN003 2.1.2 Getting started 2 ETCM002 0 1 2 3 4 5 Serial interface (RS232) Watchdog (e.g.
2 Getting started 2.1 2.1.3 System overview Connecting ETCHx and PC 2.1.3 Connecting ETCHx and PC Three types of connections are possible between the ETCHx and a PC. Connection type Cable version Description Serial connection System cable type EWL 0068 or a comparable RS232 cable with double−sided 9−pin SUB−D socket (for the pin assignment see ETC Hardware Manual) This connection is only required for commissioning! A free COM port at the PC is connected with the RS232 interface of the ETCHx.
2.2 Getting started 2 Status display 2.2 Status display LEDs on the front plate of the ETC report the actual system state. The meanings of the signals differ in the start−up phase and during operation. reserved (YE) Error (RD) Watchdog (GN) 1 4 3 6 0 1 2 3 ETC042 0 1 2 3 EDSTCXN EN 2.
2 Getting started 2.2 Status display Start−up phase During start−up a RAM test is carried out. After an error−free RAM test the LEDs 1 ... 6 produce a running indication. Any errors during the boot sequence will be signalled by the following pattern of flashing and indications. Checksum error in the internal FLASH−PROM. 3 times fast consecutive flashing. The boot loader is then burned afresh into the internal FLASH−PROM. Occurs always after a boot loader update.
Operation Getting started 2 Status display 2.2 When the control enters the operating mode after start−up, the following pattern of flashing and indications applies. LED Meaning Watchdog Watchdog, must always illuminate when running. Reserved Without function ERROR Flashes after an exception (violation of the control program protection during runtime, exceeding the permitted variable range, division by zero etc.).
2 Getting started 2.3 Commissioning steps (overview) 2.3 Commissioning steps (overview) ( Stop! Observe the notes in the chapter "Initital switch−on" of the ETC Hardware Manual before commissioning the system. ) Note! Only build in and install the PCI control variant ETCPx in step 6. 20 Step ETCHC 1 X ETCPC Description − Connect ETCHC via RS232 cable with PC and start ETCHC.
2.4 Getting started 2 Establishing the communication between PC and ETCHx Starting ETCHx 2.4 2.4.1 Establishing the communication between PC and ETCHx ) Note! The steps described in this chapter only apply to the ETCHx variant (DIN rail variant); they are not required for the ETCPx variant (PCI card). 2.4.1 Starting ETCHx 1. Connect the serial interfaces of PC and ETCHx.
2 Getting started 2.4 2.4.2 Establishing the communication between PC and ETCHx Starting the terminal program "HyperTerminal" and activating the monitor interface 3. In the "Connect to" dialogue, select the PC interface via which you want to establish the connection (for example "COM1"). ETCM006 4. Click OK. 5. In the "COMx Properties " dialogue, enter the following data: ETCM007 6. Click OK. ETCM008 22 l EDSTCXN EN 2.
Getting started 2 Establishing the communication between PC and ETCHx Starting the terminal program "HyperTerminal" and activating the monitor interface 2.4 2.4.2 As soon as a connection has been established between the PC and ETC, the LEDs 1 ... 6 at the ETCHx start to flash circulatingly. The message "Wait Boot Loader" appears and the following window is displayed: ETCM009 7. Press the > key until the prompt ">" appears. ETCM010 The monitor interface has been started.
2 Getting started 2.4 2.4.2 Establishing the communication between PC and ETCHx Starting the terminal program "HyperTerminal" and activating the monitor interface Important commands of the monitor program Fault elimination Command Meaning dir [dr:][pattern] Shows the contents of the specified drive. The flashdisk (sd:) is preset, other possible drives are program storage (ps:), Ram disk (rd:) and floppy disk (fd:), if existing. As pattern, the usual MS−DOS patterns can be used, e.g.: *.
2.4.3 Getting started 2 Establishing the communication between PC and ETCHx Setting the operating mode of the ETCHx 2.4 2.4.3 Setting the operating mode of the ETCHx The ETCHx can be operated in two operating modes: ƒ Variant "Standalone" (delivery variant) – Directly after the voltage has been applied, the control system loads the firmware. – The control system executes a fixed program.
2 Getting started 2.4 2.4.3 Establishing the communication between PC and ETCHx Setting the operating mode of the ETCHx Set the "With MMI" operating mode For the "With MMI" operating mode, the firmware file must be replaced by the file "NetBoot.rsc" (Loader) on the ETCHx. 1. To delete the firmware, enter the following in the HyperTerminal: del sd: etc*.rsc. Afterwards, press the key. 2. To transfer the Loader to the ETC, activate the menu item Transfer W Send File in the HyperTerminal.
Getting started 2 Establishing the communication between PC and ETCHx Setting the operating mode of the ETCHx 2.4 2.4.3 After loading is complete, the following figure is displayed: ETCN007 The control system waits until the firmware is loaded from the PC; on the ETC front plate, the LEDs 1 ... 6 flash circulatingly. 5. In the HyperTerminal window, enter quit and confirm the command with . The firmware starts. On the ETC front plate, the green watchdog LED lights up. EDSTCXN EN 2.
2 Getting started 2.4 2.4.4 Establishing the communication between PC and ETCHx Assigning the IP address of the ETCHx 2.4.4 Assigning the IP address of the ETCHx For communication via a network or a local Ethernet cable, the ETCHx requires a unambiguous IP address (with subnet mask) that matches the other nodes. When the control system is delivered, it has a specific, but random IP address. The IP address of the ETCHx is assigned via the monitor interface (as described in the following).
MAC address Getting started 2 Establishing the communication between PC and ETCHx Assigning the IP address of the ETCHx 2.4 2.4.4 Like any other device with Ethernet controller, the ETCHx receives an unchangeable and worldwide unique physical Ethernet address, also called MAC ID (Media Access Control Identity), from the manufacturer. It can be used for addressing on the hardware level.
2 Getting started 2.5 Configuring ETC−MMI and ETC−MMI gateway 2.5 Configuring ETC−MMI and ETC−MMI gateway The program "ETC−MMI" is used for the following tasks: ƒ Configuring the control system ƒ Operating and monitoring the control system ƒ Maintenance of the control system and error diagnosis The MMI gateway is the communications program between Windows applications and ETC control systems.
2.6 Getting started 2 Installing ETC−MMI Building in and installing the ETCPx 2.6 2.6.1 Installing ETC−MMI ( Stop! Only install the PCI control variant ETCPx after installing the ETC−MMI and before starting the ETC−MMIs. ) Note! The ETC−MMI Gateway is installed during the installation of the Lenze ETC−MMIs 1. In Windows File Explorer, open the program "setup.exe" on the ETC−MMI installation CD. 2. Follow the instructions of the installation program.
2 Getting started 2.7 Starting ETC−MMI 2.7 Starting ETC−MMI 1. Start the ETC−MMI via W Programs W Lenze W ETC ETCN011 The ETC−MMI Gateway is automatically started. The application can be seen on the task bar: ETCN001 ) Note! It can be defined which operating mode is displayed when the user interface is started. (¶ 327). For a detailed description of the MMIs, refer to chapter "ETC−MMI" (¶ 286). For a detailed description of the MMI gateways, refer to chapter "ETC−MMI Gateway" (¶ 276).
2.7.1 Getting started 2 Starting ETC−MMI Switching the language in the ETC−MMI 2.7 2.7.1 Switching the language in the ETC−MMI 1. In the ETC MMI window, press (diagnostics). The MMI window opens in the "Diagnostics" operating mode. 2. In the ETC−MMI diagnostics window, press (MMI−config.). The window "delphmmi.ini" opens (¶ 283). EETCN095 3. Specify the language in the line Language: German: "Lenze" English: "Lenze_gb" 4. Close the window with . 5. Quit and restart the ETC−MMI.
2 Getting started 2.7 2.7.2 Starting ETC−MMI Establishing a connection between ETC−MMI and ETC 2.7.2 Establishing a connection between ETC−MMI and ETC 1. On the task bar, click on the ETC−MMI Gateway icon. ETCN001 A menu opens. ETCN002 Settings: Start configuration interface. About: Display version and manufacturer information. Exit: Close gateway (if there are active connections to an application, a warning is displayed). 2. Click on Settings.
Getting started 2 Starting ETC−MMI Establishing a connection between ETC−MMI and ETC 2.7 2.7.2 3. To create a new connection, click on Add on the "Connection" tab. ETCN004 4. Specify a name for the connection. To enable an application to communicate with a control system via the ETC−MMI Gateway, each connection must be assigned an unambiguous name. You can choose any name. Assign e.g. consistent names "ETC0", "ETC1" ... or application−specific names "ramp", "laser control" etc.
2 Getting started 2.8 2.8.1 Parameterising drives via machine constants Overview of the most important machine constants 2.8 Parameterising drives via machine constants The properties of the drives must be parameterised both in the drive itself and in the control system. In the control system, the properties are assigned via machine constants (MCs). A machine constant consists of a keyword and the corresponding values; for example "MK_VMAX 20".
Hardware configuration Getting started 2 Parameterising drives via machine constants Overview of the most important machine constants 2.8 2.8.1 MC keyword No. of values Values Meaning MK_CANDRIVES 12 −1, 0 ... 11 Assignment of the axis number 0 ... 11 to the CAN node address in the order of the CAN node address 1 ... 12 −1: No axis number is assigned to the node address 0 ... 11: An axis number is assigned to the node address MK_APPLACHSIDX 18 −1, 0 ... 11 Assignment of the axis number 0 ...
2 Getting started 2.8 2.8.1 Parameterising drives via machine constants Overview of the most important machine constants Setting of the axes Axis−related limit values Path−related limit values 38 MC keyword No. of values MK_IMPULSE 12 Number of impulses per [MK_WEG] (after the quadruplication!) in the order of the axis number 0 ... 11 MK_WEG 12 Distance in [mm] or [degree] which corresponds to the value of [MK_IMPULSE] in the axis computer in the order of the axis number 0 ...
2.8.2 Getting started 2 Parameterising drives via machine constants Machine constant file ETCxC.mk 2.8 2.8.2 Machine constant file ETCxC.mk In the control variant "With MMI", the file ETCxC.mk is loaded into the control system ETCxC when the ETC−MMI is started. In the "Standalone" variant, it is detected that the machine constants have already been loaded. The following example of machine constants is an excerpt from the file ETCxC.
2 Getting started 2.8 2.8.3 Parameterising drives via machine constants Notes on loading the MK file into the control system 2.8.3 Notes on loading the MK file into the control system Make sure that the number of parameters in the file of machine constants corresponds to the number of axes (12) in the operating system of the control system.
2.8.4 Getting started 2 Parameterising drives via machine constants Example for adapting a machine constant file 2.8 2.8.
2 Getting started 2.8 2.8.5 Parameterising drives via machine constants Adapting machine constants in the ETC−MMI 2.8.5 Adapting machine constants in the ETC−MMI 1. In the ETC MMI window, press (diagnostics). The MMI window opens in the "Diagnostics" operating mode. 2. Press (machine const.). 3. Press F6 (Change current MCs) again. The current machine constants are loaded.
Test setting ) Getting started 2 Parameterising drives via machine constants Checking the parameters of the drives 2.8 2.8.6 Note! Basically, the operation of the CNC program is also possible: ƒ without connected mechanics and drives. This is achieved by setting the machine constant MK_TEST_OHNEMECHANIK=1. ƒ without a PLC program. This is achieved by setting the machine constant MK_SPS_DUMMY=1.
2 Getting started 2.8 2.8.7 Parameterising drives via machine constants Testing the drives in inching mode 2.8.7 Testing the drives in inching mode After the machine constants have been adapted, the drives must be tested in inching mode. Check whether the configured drives behave according to the specifications. 1. In the ETC MMI window, press (setup). The MMI window opens in the "Setup" operating mode. 2. Press (Manual travel). 3. In the submenu, press (Modal travel).
2.9 Getting started 2 CNC programming according to DIN 66025 G−functions 2.9 2.9.1 CNC programming according to DIN 66025 The following description of functions according to DIN 66025 is an excerpt from the chapter "CNC programming" (¶ 87). 2.9.1 G−functions G−functions define geometric preparatory functions for the operation of the axes. On principle, a DIN block with a G−function has the following structure: The letter "G" follows the number of the G−function.
2 Getting started 2.9 2.9.2 CNC programming according to DIN 66025 M−functions Parameter for G00, G01 Parameter Target point coordinates of the linear axes X, Y, Z, A, B, C, U, V, W, x, y, z, a, b, c, u, v, w Note: In a G−function, only the axes X, Y, Z, A, B, C, U, V, W or axes x, y, z, a, b, c, u, v, w may be used. d Max. path deviation in the target point for grinding corners with the following linear interpolation.
2.10 Creating a CNC sample program 2.10.1 Calling the text editor in the ETC−MMI Getting started 2 Creating a CNC sample program Calling the text editor in the ETC−MMI 2.10 2.10.1 1. If required, start the ETC−MMI via W Programs W Lenze W ETC. The ETC−MMI window opens. ETCN011 2. In the ETC−MMI window, press (program). The MMI window opens in the "Programming" operating mode. It shows the text editor for entering the CNC program. 3.
2 Getting started 2.10 2.10.2 Creating a CNC sample program Entering and saving a CNC program 2.10.2 Entering and saving a CNC program We create a program for a profile with rounded reference points. Starting point: The cursor flashes in the top right of the text editor and the graphic area is displayed. 1.
2.10.3 Getting started 2 Creating a CNC sample program Loading the CNC program into the control system and starting it 2.10 2.10.3 Loading the CNC program into the control system and starting it Load program into the control system Starting point: PLC program is displayed in the editor. 1. Press (Program to NC). 2. Select the program; e.g. test.din. 3. Press . The program is transferred to the control system ETCxC.
2 Getting started 2.10 2.10.4 Creating a CNC sample program Extending the CNC program 2.10.4 Extending the CNC program The sample program ("test.din") executes a circular profile. The actual target of a CNC program is to switch on a tool while executing a program. Thus, the sample program is extended by the corresponding M−functions M14 and M15, which lift or lower the tool when the profile is executed. The M−functions are programmed in a separate PLC program.
2.11 Getting started 2 ETC PLC programming with CoDeSys Installing CoDeSys 2.11 2.11.1 ETC PLC programming with CoDeSys The tool ETC−CoDeSys is a complete integrated development environment for creating and testing PLC programs for the ETC. It is based on the commonly used program package CoDeSys with the special extensions for ETC control systems. ) Note! For further information, refer to the chapter "PLC programming" (¶ 336). 2.11.1 Installing CoDeSys 1.
2 Getting started 2.11 2.11.2 ETC PLC programming with CoDeSys Configuring the control system in the ETC−CoDeSys Start ETC−CoDeSys and create new project 1. Start the ETC−CoDeSys via W Programs W Lenze W CoDeSys. 2. If required, you can change the language in the CoDeSys: – Projekt W Optionen W Arbeitsbereich W Sprache = englisch – Project W Options W Desktop W Language = german 3. Create a new project via File W New. 4.
Select control configuration in the CoDeSys Getting started 2 ETC PLC programming with CoDeSys Configuring the control system in the ETC−CoDeSys 2.11 2.11.2 1. In the left lower window area, click the "Resources" tab. 2. Select "PLC Configuration". 3. In the right window area, open the control configuration. The entry "ETCPC [Slot]" is displayed. 4. Right−click "ETCPC [Slot]". 5. In the context menu, select the menu item Replace element W ETHC. ETCN018 Configure control system (CAN master) 1.
2 Getting started 2.11 2.11.2 ETC PLC programming with CoDeSys Configuring the control system in the ETC−CoDeSys ETCN019 4. Repeat the last step for all modules that you want to add in the order of their position on the DIN rail. After the modules have been installed, the configuration looks as follows: ETCN020 54 l EDSTCXN EN 2.
) Getting started 2 ETC PLC programming with CoDeSys Configuring the control system in the ETC−CoDeSys 2.11 2.11.2 Note! New modules are added at the end of the list. To insert a new module before an existing one, select the existing module and add it via the right mouse button with Element einfügen (Insert Element). A module can be removed from the list via the right mouse button and Delete.
2 Getting started 2.11 2.11.2 ETC PLC programming with CoDeSys Configuring the control system in the ETC−CoDeSys Parameterise modules After you have clicked the individual modules, the display looks as follows: ETCN021 The program must know at which addresses of the memory area the input and output data of the modules are located.
Addresses automatically Getting started 2 ETC PLC programming with CoDeSys Configuring the control system in the ETC−CoDeSys 2.11 2.11.2 In the control configuration, the "Automatic calculation of adresses" checkmark should not be set. Otherwise, the CoDeSys will newly assign the addresses when the control configuration is changed. ETCN022 EDSTCXN EN 2.
2 Getting started 2.11 2.11.2 ETC PLC programming with CoDeSys Configuring the control system in the ETC−CoDeSys Enter CAN address Each module has its own CAN address (node ID). An address consists of the type−specific basic address and the individually set address at the hex switch on the front side.
Nodeguarding Getting started 2 ETC PLC programming with CoDeSys Configuring the control system in the ETC−CoDeSys 2.11 2.11.2 If the Nodeguarding option is activated, a message is sent to the module at the interval specified in milliseconds under Guard Time. If the module does not respond and the number of attempts (Life Time Factor) has been reached, the module is regarded as not NOK (defect or not existing).
2 Getting started 2.12 2.12.1 Creating a PLC sample program Required hardware 2.12 Creating a PLC sample program This chapter describes the creation of a PLC program using an ETCHx system as example. Please note the differences in the case of an ETCPx system. ETCHT000 O_ToolDown ETCHU008 I_NoEStop Ethernet ETCHI008 ETCHM004 ETCN003 24 V 0 V I_ToolUp Required hardware I_ToolDown 2.12.
2.12.2 Getting started 2 Creating a PLC sample program Starting and configuring the PLC sample program 2.12 2.12.2 Starting and configuring the PLC sample program The sample program "Training1" contains ƒ all settings of the control system, ƒ the parameterisation, ƒ the calls for adding the required PLC functions for the M−functions to the described CNC program. Start sample program 1. In Windows File Explorer, double−click on the file "Training1.pro". CoDeSys starts and the sample program is loaded.
2 Getting started 2.12 2.12.2 Creating a PLC sample program Starting and configuring the PLC sample program Add libraries The sample program requires the libraries "standard.lib" "sysetcxc.lib.lib" (...\CoDeSys V2.3\Targets\Lenze\ETCxC). and 2. If the libraries do not yet exist, add them via Resources W Library Manager". ETCN025 62 l EDSTCXN EN 2.
System variables and data blocks Getting started 2 Creating a PLC sample program Starting and configuring the PLC sample program 2.12 2.12.2 The communication between the CNC control system and the PLC program takes place via variables of the data block 1, the communication between the ETC−MMI and the PLC program via variables of the data block 2.
2 Getting started 2.12 2.12.
Define inputs/outputs Getting started 2 Creating a PLC sample program Starting and configuring the PLC sample program 2.12 2.12.2 1. In the CoDeSys, select Resources W Global Variables W Ein_Ausgaenge. 2. Define the inputs and outputs as bit in the corresponding words of the process image.
2 Getting started 2.12 2.12.2 Creating a PLC sample program Starting and configuring the PLC sample program Function M_FUNCTIONS The function block M_FUNCTIONS evaluates the M−functions coming from the NC.
M15 Getting started 2 Creating a PLC sample program Starting and configuring the PLC sample program 2.12 2.12.2 The output O_ToolDown is reset and a timer of 5 s is started. If the input I_ToolUp is set within the next 5
2 Getting started 2.12 2.12.3 Creating a PLC sample program Loading the PLC sample program into the control system 2.12.3 Loading the PLC sample program into the control system ) Note! The steps described in this chapter only apply to the ETCHx variant (DIN rail variant); they are not required for the ETCPx variant (PCI card). Via the ETC−CoDeSys, the connection from the PC to the control system can be set, optionally via a serial connection (RS232 interface) or via the network.
Getting started 2 Creating a PLC sample program Loading the PLC sample program into the control system 2.12 2.12.3 ETCM038 7. As the control system contains a Motorola processor, the field "Motorola byteorder" must be set to "Yes". If required, correct this setting. 8. Close the window with OK. Connection via network 1. Select Online W Communication parameters. 2. Click on New. ETCM036 3. Specify a name (e.g. network) and select the TCP/IP protocol as parameter. Click OK. ETCM040 EDSTCXN EN 2.
2 Getting started 2.12 2.12.3 Creating a PLC sample program Loading the PLC sample program into the control system 4. Double−click the "Address" field and specify the correct IP address. (¶ 28). ETCM041 ) Note! Do not use any leading zeros in the IP addresses. Otherwise, the IP address will be interpreted as octa decimal number. 5. As the control system contains a Motorola processor, the field "Motorola byteorder" must be set to "Yes".
Load and start program Getting started 2 Creating a PLC sample program Loading the PLC sample program into the control system 2.12 2.12.3 1. Select Online W Log in. The program is loaded into the control system. 2. Select Online W Start. The program starts. After a successful start, the "RUNNING" field in the status line changes its colour from grey to black. ETCM042 The status line shows the current connection (in this case: "local_").
2 Getting started 2.13 Testing CNC and PLC program 2.13 Testing CNC and PLC program ) Note! Basically, the operation of the CNC program is possible: ƒ without connected mechanics and drives. This is achieved by setting the machine constant MK_TEST_OHNEMECHANIK=1. ƒ without a PLC program. This is achieved by setting the machine constant MK_SPS_DUMMY=1.
Start CNC program Getting started 2 Testing CNC and PLC program 2.13 1. Start the ETC−MMI via W Programs W Lenze W ETC In the ETC−MMI window, press (program). The MMI window opens in the "Programming" operating mode. It shows the text editor for the CNC program. 2. Press (Graphics) and afterwards (Graphics on/off). The window is split. The text editor is displayed on the left, the display field for the graph (graphic area) on the right. 3. Press (Open program). 4.
2 Getting started 2.13 Testing CNC and PLC program Error messages of the CNC program If 24 V is not applied to one of the two inputs in time, the program stops and the following error message appears in a red box. ETCN036 This error message is generated via the SPSERROR function in the PLC_KEYS module after a timer of 5 s has elapsed. The text belonging to the error number is contained in the file "sps_fehl.db" (English version: "sps_erro.db").
2.14 Getting started 2 PLC keys in the ETC−MMI Labelling of the PLC keys in the ETC−MMI 2.14 2.14.1 PLC keys in the ETC−MMI In the "PLC KEYS" operating mode, it is possible to start manual functions in the PLC from the ETC−MMI. For this purpose, 6 menu levels are available. This corresponds to 42 function keys. In this example, the following assignments are to be made to three PLC keys: F1: System on/off F4: Lower tool F5: Lift tool 2.14.
2 Getting started 2.14 2.14.2 PLC keys in the ETC−MMI Calling the signals in the PLC Key 00: Texts 2800 and 2801 from the file lenze.txt are used for the first PLC key. 2 texts for one key automatically contain a toggle function. This means that the system is switched on when F1 is pressed and switched off when F1 is pressed again. The output value in the PLC is switched over every time the key is pressed. Key 03: Text 2805 (Lower tool) of the file "lenze.txt" applies.
2.15 Getting started 2 Operation via a Lenze−HMI Settings for the connection of a Lenze−HMI H505 2.15 2.15.1 Operation via a Lenze−HMI In addition to operation via the ETC−MMI (with PC), operation via a Lenze−HMI is also possible. The HIM, which is connected via the CAN1 bus, can be used as additional or main operating control. If the HMI is used for the complete machine control, the control system must be parameterised and programmed by means of a PC first.
2 Getting started 2.15 2.15.1 Operation via a Lenze−HMI Settings for the connection of a Lenze−HMI H505 Settings in the PLC program (target system) To inform the control system that communication to an HMI is desired, change the system setting as follows: ETCN043 In the system settings, activate the object directory and the network variables on the "Network functions" tab. The object directory provides the declared variables with the corresponding indexes to the HMI (Lenze code = index with CANopen).
CoDeSys object directory Getting started 2 Operation via a Lenze−HMI Settings for the connection of a Lenze−HMI H505 2.15 2.15.1 The object directory is the interface between the codes in the HMI H505 and the HEX indexes in the ETC. According to the Lenze standard, the following relationship exists: INDEX =DEZ_TO_HEX(24575 code) To facilitate this conversion, an Excel table is available (Umrechnung Objektverzeichnis Schulung.xls). It is located on the ETC−CODeSys CD in the directory "Systemhandbuch".
2 Getting started 2.15 2.15.1 Operation via a Lenze−HMI Settings for the connection of a Lenze−HMI H505 The declared variables must be created as global variables: ETCN047 If the HMI accesses variables that have not been created in the CoDeSys, a communication error occurs. 80 l EDSTCXN EN 2.
2.15.2 Getting started 2 Operation via a Lenze−HMI Functional description HMI505 operation 2.15 2.15.2 Functional description HMI505 operation In the following, the functional description of the project "ETC−Schulung des HMI" ("ETC training of the HMI") will be briefly explained.
2 Getting started 2.15 2.15.2 Operation via a Lenze−HMI Functional description HMI505 operation Auto operating mode ƒ Error reset ƒ Return to start page ƒ Display of the axis positions ƒ Start of the NC program %1 ƒ Stop of the running NC program ETCN056 Download page ETCN057 Project name: Schulung1_HMI505_V1.VTS 82 l EDSTCXN EN 2.
2.16 Getting started 2 Updating the firmware of the ETCHx in the "Standalone" operating mode Calling the boot monitor in the control system 2.16 2.16.1 Updating the firmware of the ETCHx in the "Standalone" operating mode ) Note! The steps described in this chapter only apply to the ETCHx variant (DIN rail variant); they are not required for the ETCPx variant (PCI card). 2.16.
2 Getting started 2.16 2.16.2 Updating the firmware of the ETCHx in the "Standalone" operating mode Querying the version of the firmware 2.16.2 Querying the version of the firmware 1. When the prompt ">" of the boot monitor is displayed, enter the command ver. The version of the firmware is queried and displayed. Variant "with ETC−MMI" ETCN005 Variant "Standalone" ETCN006 2.16.
Getting started 2 Updating the firmware of the ETCHx in the "Standalone" operating mode Updating the firmware 2.16 2.16.3 Firmware file names: ETCHC_A.rsc (ETCHC with 4 MB) or ETCPC.rsc (ETCPC) ETCN098 3. Click on Send. While the file is being loaded into the control system, the following figure is displayed. On the ETC front plate, the LEDs 1 ... 6 flash circulatingly.
2 Getting started 2.16 2.16.3 Updating the firmware of the ETCHx in the "Standalone" operating mode Updating the firmware Important commands of the boot monitor 86 Command Meaning ver Shows the versions of the boot loader and the currently loaded firmware. sz [file name] Sends the currently loaded firmware under the specified name to the PC via Z modem.
3 CNC programming 3 Basics 3.1 CNC programming This chapter describes the functions of the ETCxC control, with which the programs for processing workpieces are created. The way ETCxC is programmed is based on DIN 66025. Compared to the DIN, the instruction set is provided with a number of additional, better performing functions. In the following, first the some basic conditions for the creation of a program are described. Then all the functions are described in detail. 3.
3 CNC programming 3.1 Basics Program start Generally, a program starts with a "%" sign, followed by the program number (1 ... 9999). When a program is loaded via the monitor interface, this program number is automatically created from the file name and inserted at the start of the program (123.DIN −> %123). Every program can be directly started or called as a subprogram by other programs. Note that, in individual cases, the relevant parameters must be provided.
Comments CNC programming 3 Basics 3.1 Comments are limited by round or curly brackets and read over at runtime. A comment can occur at the end of the block or alone in a block. The line length of 256 characters must also not be exceeded with a comment. If a comment is opened with a bracket, the line end is automatically seen as the comment end. When using the curly brackets for comments, it is possible to suppress them during importation via the monitor interface into the control.
3 CNC programming 3.1 Basics Block preprocessing and time synchronization When a CNC program is processed, a distinction is made between program interpretation and program execution. Generally, a DIN block is not executed at the same time as its interpretation. Rather, for many functions it is important that the blocks are interpreted in advance.
3.2 CNC programming 3 G functions Overview of G functions 3.2 3.2.1 G functions Syntax A DIN block with a G function always has the following structure: the letter "G" is followed by the number of the G function. This is then followed by the parameters, which are each formed by their address letters and the corresponding value. G(number) [address identification(address value)] ...
3 CNC programming 3.2 3.2.1 G functions Overview of G functions No.
EDSTCXN EN 2.0 No. Meaning 117 Reserved CNC programming 3 G functions Overview of G functions 3.2 3.2.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2 G functions individual descriptions Every G function is described in detail in the following. The functions are sorted numerically in ascending order. ) Note! For the preparatory functions, the code letters for the individual axes are explicitly specified. These refer to a configuration with a maximum of four axes. Other axis letters can also be used in another configuration.
CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 As an alternative to R, D can be used to program the maximum path deviation in the target point in order to define the grinding of the corner which is created between two G0/G1 blocks. The two blocks must also be programmed in direct succession here, otherwise the D is ignored.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions Example Y Change over to the reference dimension system and traverse the X axis to the position N20 G0 X20 Z200 +20 mm and the Z axis to the position +200 mm. N10 G90 N60 N50 G0 X10 Y10 Select modal G function and approach the starting position. N60 Y30 R10 The blocks N60 and N70 are connected with a tangential arc with a radius of 10 mm instead of with a 90° angle. N50 X N70 X30 Startp unkt 96 l EDSTCXN EN 2.
3.2.2.2 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G01 Linear interpolation In the case of linear interpolation, the tool moves between the starting point, i.e. the current actual position, and the programmed end point (desired position) on a line. The programmed end point is reached by all axes at the same time. Syntax G1 AXES R D F E L Meaning of the addresses AXES Target point coordinates of the axes.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions Route operation: All axes travel with the programmed speed and reach their target point independently of each other according to the traverse route and the speed. The following block is only executed when all axes have reached their target point. The feed speed programmed for F has a modal effect for all programmed axes. The value 0 is preset for all axes. The speeds of the participating axes are limited to the respective max.
3.2.2.3 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G02 Circular interpolation, clockwise, G03 Circular interpolation, counterclockwise Definition of a circle or segment of a circle, clockwise or counterclockwise, with linear positioning of a linear axis (helix) or expanding radius (spiral) with additional positioning of a linear axis (conical helix). ) Note! When correction modules are used (e.g. TRC) only the normal arc can be programmed.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions If target values are missing, the corresponding circle start values are used. The specification of a center is always interpreted as a relative specification to the circle start point. Since there is always more than one circle center for the radius programming from a mathematical point of view, it is not possible to program a full circle in this circle determination mode.
CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 The principal and secondary axes which are assigned to the current NC channel can be selected with G16. The path speed can be programmed under the address F. If the speed is not programmed, the speed that was last programmed is valid.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.4 G04 Dwell time The preparatory function G04 is used to program the dwell time. In other words, that the machine is motionless during the programmed time. Syntax G04 X Meaning of the addresses X: Dwell time in seconds Explanation The dwell time is programmed under the address letter "X", in steps of 0.01 s. The unit is 1 second.
3.2.2.5 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G05 Spline interpolation The spline interpolation is switched on with G05 and the specification of the involved axes and possibly additional parameters.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions Notes for the use of spline interpolation: The spline interpolation is also allowed in connection with a tool radius correction (TRC). It must be noted here that the TRC is executed before, i.e. the spline interpolation takes place via the corrected grid points. A spline interpolation via grid points, which are programmed in the polar coordinate system, is possible.
3.2.2.6 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G06 Polynomial interpolation Polynomial interpolation, third degree, in a block. Syntax G06 AXES[target;a2;a3] NAXS I J K E L F Meaning of the parameters AXES Random axis address, whose polynomial coefficients (target, a2, a3) should be programmed.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.7 G10 Definition of a restart position G10 can be used to set restart positions in the program, at which the processing can be resumed after an error. Syntax G10 AXES Meaning of the addresses AXES Explanation After a minor error has occurred, the "Start nach G10" ( Start after G10 ) command (see "MC and NC Software Manual") can be used to resume program processing again at the last programmed G10 prior to the error.
3.2.2.8 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G16 Selection of the principal and secondary axes of the current NC channel With G16, the principal and secondary axes of the current NC channel which are involved in the three main planes can be freely selected and thus the preset axes X,Y,Z and A,B,C can be replaced.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.9 G17, G18, G19 Plane selection The preparatory functions G17 ... G19 are used to select the corresponding plane for various functions, e.g. circular interpolation in two axes. Syntax G17 G18 G19 Explanation Selected plane: G17 X−Y plane G18 X−Z plane G19 Y−Z plane The selected plane is valid modally in the program. "G17" is automatically valid after the end of the program.
3.2.2.11 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G22 Subprogram call, optionally with condition check and start of a new NC channel Call of a subprogram as a separate program or within the current program, optionally dependent on a condition and programmable with repetition. The subprogram can also be started in a new NC channel. Syntax G22 AXES K L J I E Meaning of the addresses AXES Axes, which should be transferred to the new NC channel (K).
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions Starting a second NC channel The subprogram can also be executed in parallel to the current program. For this, in K the number of the NC channel must be specified, in which the program should be started. The specified channel number must be greater than the number of the current channel (normally 0) and smaller than the maximum channel number in the machine constant MK_KANALANZAHL.
3.2.2.13 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G25 Define negative traversing range limit Definition of a traversing range limit in negative traversing direction. Syntax G25 AXES Meaning of the addresses AXES Explanation If axis addresses are specified with the preparatory function, the programmed values are entered into the parameter field from P336, related to the machine zero point defined by the basic offset.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.15 G27 Jump function with repetition counter Programming of a loop, which should be passed n−times. Syntax G27 X Z Meaning of the addresses X Jump target (block number) Z Repetition counter Explanation The programmed block number is carried out in accordance with the number in the repetition counter Z. The target block number must always be smaller than the block number, in which G27 is programmed, i.e.
3.2.2.17 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G33 Coupling between path and rotation axes "on" With G33, the coupling is switched on between the path or an axis involved in the path and a rotation axes. Syntax G33 A B C L E or G33 I J K Meaning of the addresses ABC Rotation axes, which should be corrected analog to the path. (Any value). L Path length, which should be covered during a complete revolution of the rotation axes.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.18 G34 Coupling between path and rotation axes "off" With G34, the path coupling, which was switched on with G33, is switched off again. Syntax G34 Explanation G34 cancels the coupling between the path or axis involved in the path and the rotation axes again. With the second variant of the G33, thread grinding, this is necessary to position the involved rotation axes alone, for example. Example 3.2.2.
3.2.2.20 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G37 Modal oscillation "off" Syntax G37 AXES Meaning of the addresses AXES Explanation With the preparatory function G37, the modal oscillation (see G36) is switched off. To achieve this, a 1 is programmed in a block with the preparatory function G37 under the address of the axis, whose modal oscillation should be switched off.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.22 G41 Tool path correction − left, G42 Tool path correction − right Switching on the tool radius compensation or an application−specific correction procedure for the tool path. Syntax G41 R J L G42 R J L Meaning of the addresses R Tool radius to be compensated J Tool orientation (value 0 ...
3.2.2.23 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G53 Deactivate temporary coordinate shift Cancels the temporary coordinate shift in the current coordinate system again. Syntax G53 Explanation The G53 function is sued to cancel a temporary coordinate shift carried out by G54. The originally defined zero points are valid again. This only applies to the current workpiece coordinate system. Example G53 S1 3.2.2.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.25 G60 Exact positioning "on"/"off" Change over of the behavior of the path control at the end of the block. Syntax G60 X Y Meaning of the addresses X Selector switch not programmed: exact positioning "on". 0: exact positioning "off", Look Ahead "on". >0: waiting time at the end of the block in seconds. Y Activation of exact positioning with tolerance margin monitoring.
3.2.2.26 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G61 Stop block preprocessing Carry out time synchronization with coarse interpolator. Syntax G61 Explanation With the G61 function, the block preprocessing of the interpreter can be temporarily stopped, i.e. the interpretation of the next block is stopped until the last block has been processed in the order buffer of the coarse interpolator.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.28 G75 Scaling factor for input units Setting the scaling factor of the individual axes for the programmed input units. Syntax G75 AXES Meaning of the addresses AXES Explanation G75 causes an extension or compression of the programmed profile before processing by internal correction modules. This can be non−symmetrical if different scaling factors are programmed for the individual axes.
3.2.2.30 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G88 Basic rotation Rotation of the systems S1 − S31 in the XY plane. Syntax G88 C X Y Meaning of the addresses C Basic rotation angle in degrees. X, Y Determination of the basic rotation angle from Delta X and Delta Y Explanation The basic rotation is used to define the position of a workpiece (S1 ... S31) relative to the machine workspace (S0). The rotation is effective for S1 ...
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.31 G89 Profile rotation Rotation of the systems S1 ... S31 in the XYZ plane acts like the G88, however, is only effective within a program and in addition to G88.
3.2.2.32 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G90 Absolute dimensions (reference dimension) Change−over to the reference dimension system.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.34 G92 Relative zero shift The preparatory function G92 can be used to effct an incrementally shift of the zero point of the current coordinate system. Syntax G92 AXES Meaning of the addresses AXES Explanation The incremental zero shift is programmed with the preparatory function G92 and the address letters of the axes, for which the zero point should be shifted. Axes, whose zero point should be shifted.
3.2.2.35 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G93 Absolute zero shift G93 can be used to shift the zero point of the current coordinate system to an absolute programmed value. Syntax G93 AXES Meaning of the addresses AXES Explanation The absolute zero shift is programmed with the preparatory function G93 and the address letters of the axes, for which the zero point should be shifted.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.37 G100 Polar coordinates: linear interpolation, high rate The preparatory function G100 corresponds in function to the preparatory function G00 during the programming of the target positions in the rectangular coordinate system.
3.2.2.38 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G101 Polar coordinates: linear interpolation The preparatory function G101 corresponds in function to the preparatory function G01 during the programming of the target positions in the rectangular coordinate system. Syntax G101 AXES U W F E L Meaning of the addresses AXES Center coordinates U Polar radius W Polar angle F Path speed E, L Selection of feed speed via speed (E) and increment (L). F=E*L.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.39 G102/G103 Polar coordinates: circular interpolation The preparatory function G102/G103 corresponds in function to the preparatory function G02/G03 during the programming of the circle with center coordinates in the rectangular coordinate system.
3.2.2.40 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G110 Polar coordinates: accept center Transfer the reached set position as a new center in the polar coordinate system. Syntax G110 U W Meaning of the addresses U Polar radius W Polar angle The current positions of the principal axes are transferred as new center coordinates and the target position programmed with the radius U and the angle W is approached with G101 from this new center.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.42 G112 Tangential correction "on" The tangential correction of the C axis is switched on. Syntax G112 AXES Meaning of the addresses AXES Explanation For path profiles with tangential or approximate tangential transitions, an automatic tangential correction of a rotation axis is possible. For this, there are two modes, which must be programmed as a numerical value under the respective axis code letters.
3.2.2.43 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G113 Tangential correction "off" Tangential correction "off" Syntax G113 AXES Meaning of the addresses AXES Explanation The tangential correction switched on with G112 is switched off for the programmed axis. If none is programmed, the tangential correction is switched off for all axes. Example G113 3.2.2.44 Axis, for which tangential correction should be switched off.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.45 G115 Convex surface transformation Convex surface transformation "on" or "off". Syntax G115 X Y Z A B C I Meaning of the addresses XYZ Selection of lateral and longitudinal axis.
3.2.2.46 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G116 Rotation axes transformation Transforms a virtual axis system with the rotation axes B and C into a physical axis system with the rotation axes A and B‘. Syntax G116 C Meaning of the addresses c Explanation The function creates the virtual axes B and C and transforms their angles γ and δ with consideration of the shift angle ϕ into the angles α and β of the physical axes A and B‘.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions The following example should illustrate the use of G116 using the example of a cutting technology. For this, MK_KUNDE = "SCHNEIDEN" (CUT) must be set. G41 switches on the tangential correction of the tool in this case. After the transformation has been switched on, the B axis is used to set the miter−box angle of the cutting tool. Example ...
3.2.2.48 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G121 Programming the modal offset Change of the modal offset with the transfer of the change amount into the NC actual position at the same time. Syntax G121 AXES Meaning of the addresses AXES Explanation When the traverse keys are used for traveling (modal or target point travel via PLC axes), the axes are positioned via the modal offset.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.49 G122 Configuring the effect of the traverse keys Syntax G122 X Meaning of the addresses X Explanation G122 is used to configure the effect of the traverse keys to the axis movement. The value entered for X has the following meaning: Traverse key mode Mode 0: (Default) the traverse keys only have an effect in manual operation and not in the automatic program.
3.2.2.50 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G125 Non−modal comparative operation, parameter field comparison Non−modal comparative operation without an effect on other, modal comparative operations.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.51 G130 Modal comparative operation, parameter field comparison Modal or non−modal comparative operation with an effect on other modal comparative operations Syntax G130 X Z K I E Y V J Meaning of the addresses X First operand Z Second operand K Comparative operation I Target block number E Target program number Y Number of modal comparison (0 ... 6) or, if not programmed, non−modal comparison.
CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 It is the user’s responsibility to ensure that all axes, which he uses in the subprogram, are returned to the positions which he found during the subprogram call. Seven modal comparisons can be activated at the same time. With Y the index for the table line must be specified. A missing Y is interpreted as a non−modal comparison, i.e. the function is only interpreted once and does not remain effective in the background.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.52 G131 Delete modal comparative operation Syntax G131 Y Meaning of the addresses Y Explanation With the preparatory function G131, modal comparative operations, which were activated with G130, can be deleted again from the comparison operation table. For this, the number of the comparative operation must be programmed under the address Y. Number of the modal comparison (0 ...
3.2.2.54 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G134 Non−modal waiting function, parameter field comparison Wait for a comparative operation to become true. Syntax G134 X Z K Meaning of the addresses X First operand Z Second operand K Comparative operation Explanation G134 carries out a comparison K between the two operands X and Z. Both constants and indexes of parameter fields are allowed as operands.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.55 G140/G141/G142 Noncircular grinding "on"/"off" The functions G140 ... G142 are used to switch the "Noncircular grinding" function on or off. Syntax G140 G141 X C D L K E G142 X C D L K E Meaning of the addresses X Total overmeasure in mm C Start area of the positioning as a position of the angle axis (with L=0 only).
Example CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 N10 G31 Path operation N20 G01 X50 C0 F5000 Approach starting position N30 G60 X0 Switch Look Ahead "on" N40 G142 D500 X20 L0 E0 Noncircular grinding for smooth profile "on" N41 G5 X24.142 Y−14.142 I3 L1 Switch spline interpolation for closed curve "on" N42 G143 X15 D7.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.56 G143 Parameters of grinding phases during noncircular grinding With G143, the parameters must be programmed for every grinding phase, e.g. roughing, smoothing, fine finishing and sparking out. Syntax G143 X D C F L J I Meaning of the addresses X Overmeasure for this phase in mm. D Positioning amount per revolution in mm. C Motion range of the C axis in which the positioning should take place.
3.2.2.57 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G144/G145 Programming a correction table during noncircular grinding The correction table is used for the compensation of any systematic errors during the creation of a profile during noncircular grinding.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.58 G150 Modal comparative operation, Q−Bit comparison Import or export of a modal comparison to an external event (Q−Bit).
CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 The function still has a modal effect. It is deactivated if ƒ the entry is reset (see below) ƒ when the result of the comparison is positive and the resulting block jump ƒ at the end of the subprogram; in this case all comparisons are deactivated, which were activated in this subprogram. ƒ Occurrence of another modal event (G130, G150) in a higher program plane with a resulting block jump.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.59 G151 Non−modal comparative operation, Q−Bit comparison Execution of a non−modal comparison to an external event (Q−Bit).
3.2.2.60 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G152 Non−modal waiting function, Q−Bit comparison Wait for a comparison to be become true on an externes event. Syntax G152 E Z Meaning of the addresses E Index of the external event Z State of the comparison Explanation G152 carries out a comparison of the Q−Bit E (0 ... 63) with the state Z (0 or 1). In contrast to G151, no block jump takes place in the case of a positive comparison result.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.61 G153 Wait for the termination of a channel 1 G153 is used to synchronize the program end in channel 1 with channel 0. Syntax G153 K Meaning of the addresses K Explanation G153 is called in channel 0 in order to wait for the program end in channel 1 and in order to return the axes of channel 1 again to channel 0. The return of the axes is only possible through the termination of channel 1.
3.2.2.62 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G158/G159 Intermittent operation "on"/"off" The preparatory function G158 switches the intermittent operation on, during which the interpolation of the programmed profile is executed in strokes.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions Example G158 K2 Activate intermittent operation with linear ramps G0 X10 Y300 M14 Approach starting position, and select profile start (M14) G0 A90 Position needle into the starting position 90° (0° = highest position) G33 A0 Automatic coupling between path and rotation axis "on" G1 E500 L3 Select speed and stitch length X300 Profile Y10 X10 Y300 3.2.2.
3.2.2.64 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G162 Define axis group Switches the forced coupling of two axes "on" or "off". Syntax G162 LAX FAX Meaning of the addresses LAX Code letter of the master axis, the programmed value must be 0 FAX Code letter of the slave axis and coupling factor ≠0: Define axis group with the specified coupling factor 0: Delete axis group Explanation G162 is used to define an axis group.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions The axes A and B should be coupled one to one to the movement of axis C after the home position approach. The starting positions and coordinate system offsets of all three axes should be equal when they are activated, i.e. b=0 and m=1. Example 3.2.2.
3.2.2.66 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G180 Modal travel "on" Traverse one or several axes modally with the programmed speed in the specified direction. Syntax G180 AXES F Meaning of the addresses AXES Axes to be traveled. The programmed value specifies the traversing direction. > 0: positive traversing direction, < 0: negative traversing direction, = 0: only preselect speed. F Modal traversing speed.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.67 G181 Modal travel "off" Stop one, several or all axes started with G180. Syntax G181 AXES Meaning of the addresses AXES Explanation All programmed axes are stopped if they were started with G180. To stop all axes started with G180, it is sufficient to program this function without axes. Example see G180 3.2.2.68 Axes to be stopped. The programmed value is without meaning.
3.2.2.69 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G193 Set absolute zero point The current position of the programmed axes is set to the specified position value in the current coordinate system. Syntax G193 AXES Meaning of the addresses AXES Explanation With G193, the current position of the axes in the activated coordinate system can be set to the values programmed for the axes.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.71 G195 Absolute coordinate shift of all S coordinate systems With G195, all the S coordinate systems can be shifted by the programmed amount in reference to the zero points defined by G193/G92 at the same time. The shift has an additive effect to the current zero points of all S coordinate systems except for S0. Syntax G195 AXES Meaning of the addresses AXES Explanation G195 is used to program the offset of S0.
3.2.2.72 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G200 Geometry filter "on"/"off" With G200, a filter can be activated with which the noise of the programmed profile can be suppressed. Noise−infested profiles are usually created when the point density corresponds in size to the defined profile grid points. Syntax G200 AXES Meaning of the addresses AXES Explanation The geometry filter can replace several G1 blocks by a single G1.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.73 G201 Change the acceleration and deceleration ramps G201 can be used to program the acceleration and deceleration ramps in path operation and in route operation. Syntax G201 AXES J I Meaning of the addresses AXES Axes, whose ramps should be changed to route operation. J For changing the ramps to path operation.
3.2.2.74 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G209 Set the geometry counter G209 is used to initialize the geometry counter to a user−specific value. Syntax G209 E Meaning of the addresses E Explanation The geometry counter is needed in the DIN display of the ETC−MMI for the synchronization of the progress display with the program processing in the NC control.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions Explanation The function transforms from the X Y plane in the Cartesian coordinate system into a A B machine coordinate system. During this process, the tool orientation of the C axis, if desired (E1), is also transformed. The following figure shows the machine kinematics in the 0° setting of the A and B axis. L2 C A B L1 ETCN054 The lever lengths L1 and L2 may also be negative.
3.2.2.76 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G226 Reconfigure hardware limit switch G226 can be used to change the response of the control when traveling on the direction−dependent hardware limit switches of individual axes. Syntax G226 AXES Meaning of the addresses AXES Explanation The identification, which is programmed for the axes, defines how the control should respond to the limit switches of the corresponding axis.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.77 G233 2D/3D axis correction With 2D/3D axis correction, an axis is corrected in dependency on one or two axes via one of a maximum of 3 grid point tables. Syntax G233 AXE Meaning of the addresses AXE Explanation With this function, the position of an axis is corrected in dependency on one to two basis axes via a previously loaded table with equidistant grid points.
Structure of correction file CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 The correction tables are created as binary files and must be transferred to the control either via a connected ETC−MMI or with the hyper terminal under the name "ACHS3D??.KOR". The "?" must be replaced by any numbers or letters. The file consists of a 128 byte long header, a definition block and a block with the grid point values for the axis to be corrected.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions Definition of the used data types BYTE ULONG FLOAT 3.2.2.78 unsigned 8−bit integer unsigned 32−bit integer, 4 bytes long, with the byte with the lowest value first IEEE single precision floating point, 4 byte long, with the byte with the lowest value of the mantissa first.
3.2.2.79 CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 G251 Accept step response of an axis G251 is used to set the drive and attitude control parameters of an axis through the acceptance of a step response and can only be used by a special axis setting tool like the AXSCOPE. Generally, this function is not important for DIN programmers.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.80 G252 Value input via display device (see MMI) The P field parameter specified in the G function is redetermined by means of an interactive user query.
CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 During the input, the text specified under F="..." is output and the desired parameter accepted in the defined format.
3 CNC programming 3.2 3.2.2 G functions G functions individual descriptions 3.2.2.81 G253 Output of a comment, optional with program termination The text specified in the G function is displayed on the connected control computer. If an error number is specified, the current program can also be canceled.
CNC programming 3 G functions G functions individual descriptions 3.2 3.2.2 The position and the format of the parameters to be inserted must be indicated at the desired position in the text string in accordance with the following rules. %[flags][width][accuracy]type Flags right−justified, leading blanks/zeros − left−justified, subsequent zeros + always issue sign (including +) "" only issue neg.
3 CNC programming 3.3 3.3.1 Formula processor Arithmetic operations 3.3 Formula processor In the NC program, in addition to programming via G functions, it is also possible to input mathematical formula directly. A mathematical expression is indicated by a ":" at the beginning of the line. This can be preceded by a block number. Comments are allowed in a block with a mathematical expression when included in curly brackets "{}".
Syntax Operation CNC programming 3 Formula processor Arithmetic operations 3.3 3.3.1 Description AND(x,y) (x ¹ 0) ∧ (y ¹ 0) Logical AND operation OR(x,y) (x ¹ 0) ∨ (y ¹ 0) Logical OR operation XOR(x,y) (x ¹ 0) ∨ (y ¹ 0) Logical exclusive OR operation NOT(x) x=0 Logical NOT BITAND(x,y) x∧y Bit−wise AND operation BITOR(x,y) x∨y Bit−wise OR operation BITXOR(x,y) x∨y Bit−wise exclusive OR operation BITNOT(x) x Bit−wise NOT PI p Constant 3.141592654 PI180 p/180 Constant 0.
3 CNC programming 3.4 3.4.1 Block extensions Parameter assignment P 3.4 Block extensions The blocks may be enhanced by one or several additional functions, which are indicated by the address letters H, M, P, Q, S and T. The functions may be programmed for individual blocks or for several blocks. They may also occur alone in a block. If several functions are specified at the same time, they are processed in the fixed sequence H, P, T, S, M, Q. 3.4.
3.4.2 CNC programming 3 Block extensions H functions 3.4 3.4.2 H functions H functions are provided for changing technology parameters. The number programmed for H is transferred to the PLC and must be evaluated there. The H function is always evaluated as the first function in the block. Generally, H functions are generally time synchronized, i.e. the following function is only interpreted if the transfer by the PLC was acknowledged.
3 CNC programming 3.4 3.4.3 Block extensions M functions M49: Speed overlap disabled (override off) M1014: Like M14, however as an asynchronous M function M1015: Like M15, however as an asynchronous M function M1048: Like M48, however as an asynchronous M function M1049: Like M49, however as an asynchronous M function Using a M function, it is also possible to initiate a subprogram call.
3.4.4 CNC programming 3 Block extensions Q functions 3.4 3.4.4 Q functions States of CAN I/O modules can be programmed under the address "Q". Q functions are also referred to as "fast inputs", because they are entered directly in the course interpolator, without a detour via the PLC, into the NC program. Since only CAN outputs are available for the digital outputs, these are always connected to the PLC cycle.
3 CNC programming 3.4 3.4.5 Block extensions S functions 3.4.5 S functions The letter S in the DIN block always stands for the specification of the current workpiece coordinate system, to which the following position specifications refer. Under a coordinate system, the control understands the definition of a zero point offset for each axis (related to the zero point in S0), where S0 is related to the machine zero point (home position + basic offset).
3.4.6 CNC programming 3 Block extensions T functions 3.4 3.4.6 T functions The letter T in the DIN block always stands for the specification of the current tool coordinate system, to which following position specifications relate. Under a coordinate system, the control understands the definition of a zero point offset for each axis. In ETCXC, 100 such tool coordinate systems are available, which are selected with T0 ... T99.
3 CNC programming 3.5 3.5.1 Data fields P field 3.5 Data fields 3.5.1 P field For programming with variables, a data field (the parameter or P field) is available in the control. This data field contains different data: ƒ Internal data of the NC computer This data is created by the processing of a program and/or reflects certain states of the NC computer. Only read accesses can be made to this data. The access to most of this data is time synchronized.
Assignment of system parameters CNC programming 3 Data fields P field 3.5 3.5.1 The assignment of the area of the parameter field, in which the internal data of the NC computer is stored, is specified in the following. The specified digits correspond to the parameter numbers under which the variables are addressed. Axis−related values are always entered in the sequence in which they are defined in the machine constant MK_APPLACHSIDX.
3 CNC programming 3.5 3.5.1 Data fields P field Index 182 Meaning Sync Unit 112 ... 127 Zero point offset of coordinate system Tn (−> P585) from channel N x mm * 128 ... 143 Zero point offset of coordinate system Tn (−> P553) from channel 0 x mm * 144 ... 159 Modal target position of the axes in reference to the current coordinate system x mm * 160 ... 175 Modal actual position of the axes in reference to the current coordinate system x mm * 176 ...
Parameters for program management EDSTCXN EN 2.0 Index CNC programming 3 Data fields P field 3.5 3.5.
3 CNC programming 3.5 3.5.1 Data fields P field Index 184 Meaning Sync Unit 556 Current processing state of channel 0 for diagnosis purposes 0: Idle 1: Run 2: Brake termination 3: Termination wait quit 4: Termination 5: Brake interrupt 6: Interrupt 7: Brake block jump 8: Block jump 9: Brake interrupt 10: Interrupt 11: Brake error 12: Error 13: Balancing run x 557 Current increment, e.g.
Index 3 Data fields P field 3.5 3.5.1 Meaning Sync Unit 588 Current processing state of channel N for diagnosis purposes 0: Idle 1: Run 2: Brake termination 3: Termination wait quit 4: Termination 5: Brake interrupt 6: Interrupt 7: Brake block jump 8: Block jump 9: Brake interrupt 10: Interrupt 11: Brake error 12: Error 13: Balancing run x 589 Current increment, e.g.
3 CNC programming 3.5 3.5.1 Data fields P field Index Technology−specific parameter 186 Meaning Sync Unit 674 Conversion factor of input units in mm 675 Conversion factor of m/min by input units/GIT x 676 Conversion factor of input units/min in input units/GIT x min/GIT 677 Conversion factor of m/s2 in input units/GIT2 x Unit/GIT2 m/s2 678 Conversion factor of input units/s2 in input units/GIT2 x s2/GIT2 Index Meaning mm/Einh Unit/GIT m/min Sync Unit 288 ...
Parameter for time recording Technology−specific user parameters Material cutting Polystyrene cutter EDSTCXN EN 2.0 Index CNC programming 3 Data fields P field 3.5 3.5.
3 CNC programming 3.5 3.5.1 Data fields P field Axis positioning handler for handling tasks (G97 X10) Sewing (G97 X5|X6) 188 Index Meaning 1040 Intended speed for axis positioning mm/min * 1041 Target speed on reaching the target point mm/min * 1042 Intended traverse path after triggering mm * 1043 Accumulated actual traverse path after triggering mm * 1044 Number of the input, which should be used as a trigger signal (0 ...
Rectraction handler for measurement machine CNC programming 3 Data fields Q field 3.5 3.5.2 Index Meaning 1060 This is set when a probing has happened.
4 Machine constants 4.1 Basics 4 Machine constants This chapter describes the machine constants (MCs) of the controls ETCPC and ETCHC. Some of the described MCs are not available in both control types due to the different hardware features. The respective identifiers are marked with a corresponding footnote. 4.1 Basics MCs are used to adapt the control to the specific field of application. These include the actual machine with its axes as well as the fields of technology and operating philosophy.
Machine constants 4 Basics 4.1 The exact name of the MCs must be entered, otherwise the NC computer will not recognize it. During the transfer of the MCs, the ETC issues an error message for each MC it does not recognize. From the moment the transfer has been completed without errors, the MCs are valid in the machine. In general, it is always possible to transfer the MCs.
4 Machine constants 4.2 4.2.1 Test settings MK_TEST_OHNEMECHANIK 4.2 Test settings The test settings are used for operating or testing the ETC without the machine or to switch off specific parts of the functional range (PLC). 4.2.1 MK_TEST_OHNEMECHANIK This machine constant is used for testing the control functions without having to connect the machine. In the process, the control switches the actual value encoder inputs to simulation operation. Correcting variables are still output.
4.3 Software configuration 4.3.1 MK_KUNDE Machine constants 4 Software configuration MK_KUNDE 4.3 4.3.1 This machine constant is a string constant by means of which the different customer−specific extensions are activated within the control. This includes technology−specific correction modules and M function handler. Value "" Standard TRC, no special treatment of M functions (default).
4 Machine constants 4.3 4.3.3 Software configuration MK_NCPROG_OHNE_KOMMENTARE 4.3.3 MK_NCPROG_OHNE_KOMMENTARE This machine constant suppresses the storage of comments and spaces in DIN programs. All comments in curly brackets are deleted and groups of more than one space are reduced to one. This is probably recommended for reasons of saving memory space in Flash−PROM of the control. However, this setting is only suitable if the programs do not have to be viewed or changed in the control.
4.3.6 Machine constants 4 Software configuration MK_CONST_REL_MM 4.3 4.3.6 MK_CONST_REL_MM This machine constant defines the input resolution in the metrical system. 1, i.e. 1 mm / unit, is used as the default. If all inputs and outputs of the control are to be specified in mm units, enter the value 0.001. 4.3.7 MK_CONST_REL_INCH This machine constant defines the input resolution using the inch system. 25.4 is the default value, i. e. 25.4 mm / unit.
4 Machine constants 4.3 4.3.9 Software configuration MK_LAH_GRENZWINKEL 4.3.9 MK_LAH_GRENZWINKEL This machine constant limits the Look Ahead function (G60) to a defined angle range. During this process, the system switches automatically to exact positioning on non−tangential block transitions, on which the transition angle is larger than the value of this MC.
4.3.11 Machine constants 4 Software configuration MK_EPSILONMM 4.3 4.3.11 MK_EPSILONMM This machine constant is used for tolerance analysis [mm] when specifying translatory positions. It is currently taken into account during circle center point programming only, where it determines exactly how the circle’s radius and center are to be programmed.
4 Machine constants 4.3 4.3.15 Software configuration MK_S0T0_VERSATZ_ERLAUBT 4.3.15 MK_S0T0_VERSATZ_ERLAUBT This machine constant is used to shift coordinate systems S0 and T0 which are intended as reference coordinate systems. The shift of these coordinate systems is normally not allowed in order to ensure that there is always one coordinate system that has not been shifted. However, sometimes it may be useful to shift S0 or T0. In this case, this MC must be set.
4.3.18 Machine constants 4 Software configuration MK_DELTAT 4.3 4.3.18 MK_DELTAT This machine constant sets the internal interpolation cycle [ms] of the control. During each of these rough interpolation cycles, the control calculates new position values for the participating axes from the programmed path. The smaller the cycle, the closer are the calculated positions to one another.
4 Machine constants 4.4 4.4.1 Storage space reservation MK_SPS_SPEICHERGROESSE 4.4 Storage space reservation The following MCs affect the static memory layout within the control. The set values only become effective after they have been changed on the control or transferred from the PC and the control has been restarted. 4.4.
4.4.4 Machine constants 4 Storage space reservation MK_SPV_SYMBOLANZAHL 4.4 4.4.4 MK_SPV_SYMBOLANZAHL This machine constant defines the size of the symbol table, which is required for managing symbolic program numbers. If a larger value than 0 is entered for this MC, symbolic program names can be used when programming the DIN programs. During this process, dynamic program numbers between 32768 ... 65534 were assigned program names. For further information on this, refer to chapter "CNC programming".
4 Machine constants 4.4 4.4.7 Storage space reservation MK_LAH_VORLAUFTIEFE 4.4.7 MK_LAH_VORLAUFTIEFE This machine constant defines the maximum number of orders in the prebuffer. The prebuffer is a circular puffer (FIFO) between DIN interpreter and rough interpolator and is used to isolate the interpretation from the execution of DIN blocks. This MC defines how many blocks can be seen in advance during the processing of a DIN program. The MC contains one parameter for each possible NC channel.
4.4.9 Machine constants 4 Storage space reservation MK_PFELD_GROESSE 4.4 4.4.9 MK_PFELD_GROESSE This machine constant defines the total size of the parameter field in the control, including the 1024 system parameters. The MC specifies the number of parameters in the parameter field. Each parameter is assigned 8 byte of the main memory. The minimum size is 2048 parameters. For further information on the parameter field, refer to chapter "P−field" (¶ 180). EDSTCXN EN 2.
4 Machine constants 4.5 4.5.1 Configuration of axes − Basics MK_CANDRIVES 4.5 Configuration of axes − Basics These are the most important settings that have to be implemented as they are used to adapt the control to the mechanics.
4.5.2 Machine constants 4 Configuration of axes − Basics MK_APPLACHSIDX 4.5 4.5.2 MK_APPLACHSIDX This MC has 18 parameters, one for each of the 18 possible axis letters. The order of the letters assigned to the parameters is fixed. Only the assignment of the application axis numbers can be freely selected. The order of the letters is as follows X Y Z C U V W A B u v w a b c x y z Exactly one application axis can be assigned to each letter.
4 Machine constants 4.5 4.5.2 Configuration of axes − Basics MK_APPLACHSIDX Example Your task is to configure a machine that has an X, Z and C axis. The X axis must be a synchronous axis.
Machine constants 4 Configuration of axes − Assignment and evaluation MK_CANDRIVES 4.6 4.6.1 4.6 Configuration of axes − Assignment and evaluation 4.6.1 MK_CANDRIVES This machine constant assigns application axis numbers to the node numbers 1 ... 12 on the second CAN bus and thus defines which application axes are configured. For each unassigned node number, enter value −1. The axis letters are assigned to the specified application axis numbers via MK_APPLACHSIDX.
4 Machine constants 4.6 4.6.3 Configuration of axes − Assignment and evaluation MK_ACHSENART 4.6.3 MK_ACHSENART This machine constant specifies different axis properties. The MC is bit coded. Bit Value 0 0 1 Meaning linear axis rotation axis 1 0 2 observe limit switch ignore limit switch 2 ... 3 0 4 8 12 normal axis spindle measurement axis spindle + measurement axis 4...
4.7 Configuration of axes − Resolution 4.7.1 MK_IMPULSE Machine constants 4 Configuration of axes − Resolution MK_IMPULSE 4.7 4.7.1 This machine constant determines the number of pulses assigned to the actual value counter of the axis interface for rotary motors per revolution on the motor shaft and for linear induction motors per millimeter. Enter the number of pulses including the pulse quadruplication; e.g. for ECS compact servo 65536 imp. / revolution.
4 Machine constants 4.8 4.8.1 Configuration of axes − Operating range MK_GRUNDOFFSET 4.8 Configuration of axes − Operating range 4.8.1 MK_GRUNDOFFSET This machine constant is the offset of the mechanical zero point of the machine in relation to the zero point of the position measurement system. The unit is millimeters for linear axes and degrees for rotation axes. 4.8.2 MK_SW_ENDS_MINUS, MK_SW_ENDS_PLUS This machine constants define the positive and negative traversing range limit of the mechanics.
Machine constants 4 Configuration of axes − Controller settings MK_T2 4.9 4.9.1 4.9 Configuration of axes − Controller settings 4.9.1 MK_T2 This machine constant is the filter time constant for the fine interpolation filter in seconds. This MC does not affect the position control directly, but the fine interpolation by means of which new position setpoints are calculated in the fine interpolation grid (MK_FIT_PRO_GIT).
4 Machine constants 4.10 4.10.1 Configuration of axes − Referencing MK_REF_RICHTUNG_UND_FOLGE 4.10 Configuration of axes − Referencing 4.10.1 MK_REF_RICHTUNG_UND_FOLGE This machine constant determines the direction and the sequence, in which the axes carry out a home position approach. The direction, into which the axis is to move first, is defined by the sign of the entered value.
4.11 Machine constants 4 Configuration of axes − speed and acceleration MK_MODVMAX 4.11 4.11.1 Configuration of axes − speed and acceleration There are different MCs which influence the maximum speeds and ramps for the individual axes and for the paths resulting thereof. These are the limit values that must not be exceeded by the control. The axis−specific MCs are effective in path, route and manual operation. The path−specific MCs only act as limit values in path operation. 4.11.
4 Machine constants 4.11 4.11.5 Configuration of axes − speed and acceleration MK_VBAHNMAX 4.11.5 MK_VBAHNMAX This machine constant defines the maximum speed [m/min] in path operation. It may be higher than the maximum speed of the individual axes if the resulting speed of the participating axes is less or equal to MK_VMAX. 4.11.6 MK_BAHNBESCHL, MK_BAHNBREMS These machine constants define the maximum permissible acceleration and deceleration ramps [m/s2] in path operation.
Machine constants 4 Configuration of axes − Correction of axes MK_SPINDELUMKEHRSPIEL 4.12 4.12.1 4.12 Configuration of axes − Correction of axes 4.12.1 MK_SPINDELUMKEHRSPIEL This machine constant uses millimeters or degrees to define by which value the set position is to be corrected if the travel direction is reversed. The default value is 0. As soon as a value is entered, the spindle reverse compensation is switched on.
4 Machine constants 4.12 4.12.1 Configuration of axes − Correction of axes MK_SPINDELUMKEHRSPIEL Def 1: The first definition block contains per axis in the header one 32−bit integer for minimum and maximum value of the actual position range, in which the correction table is valid. The specification is made in increments in relation to the home position. 0 4 MIN 8 MAX 12 MIN 16 MAX 20 MIN 8n ... n: number of axes in the header min. value 3rd axis max. value 2nd axis min. value 2nd axis max.
Machine constants 4 Configuration of axes − Correction of axes MK_SPINDELUMKEHRSPIEL 4.12 4.12.1 Data: Each data block has 8 byte of data per axis and contains the actual correction data. Each correction value is represented by one byte. Thus, on data block contains 8 correction values per axis. Each correction value has a value range of −128 ... +127 increments. 0 8 X 16 Y 24 Z 8(n−1) ...
4 Machine constants 4.13 4.13.1 Configuration of axes − Handwheels MK_CANDRIVES 4.13 Configuration of axes − Handwheels The control allows for the connection of electronic handwheels with CAN interface. For this purpose, the handwheel must be configured in the machine constants. Configure the handwheel analog to a normal axis. The configured handwheels are consecutively numbered in the control from 0 ... N−1, while N corresponds to the maximum number of configurable handwheels.
4.13.7 Machine constants 4 Configuration of axes − Handwheels MK_HANDRADFAKTOR 4.13 4.13.7 MK_HANDRADFAKTOR This machine constant is an additional axis−specific evaluation factor for the handwheel function. It is used to obtain different evaluation factors for the individual axes, e.g. when linear as well as rotation axes are operated on one handwheel. 4.13.8 MK_HANDRADFILTER This machine constant is a filter time constant [ms] for the handwheel function.
4 Machine constants 4.14 4.14.1 Configuration of axes − Synchronous axes MK_ACHSENART 4.14 Configuration of axes − Synchronous axes A synchronous axis is configured in the control by entering the corresponding axis number in two places in MK_CANDRIVES. This way, a forced coupling is generated between the two physical axes. The axis channel with the lower index is automatically the master axis. The slave axis channel, which has been assigned the same axis identification, is the slave axis.
4.15 Technology−specific settings 4.15.1 MK_MFKT_UPR_TABELLE Machine constants 4 Technology−specific settings MK_MFKT_UPR_TABELLE 4.15 4.15.1 This machine constant is a list of up to 16 M function numbers, which generate a branch in a subprogram during processing within a DIN program.
4 Machine constants 4.15 4.15.3 Technology−specific settings MK_MASCH_POLAR_KART 4.15.3 MK_MASCH_POLAR_KART This machine constant switches from a Cartesian to a polar machine coordinate system. In the polar coordinate system, the positions in the machine plane are defined by an angle axis and a radius axis, while the control transfers the transformation of the interpolated Cartesian coordinates into the polar coordinate system.
4.15.5 Machine constants 4 Technology−specific settings MK_POLAR_ACHSNR 4.15 4.15.5 MK_POLAR_ACHSNR This machine constant defines the numbers of the radius and the angle axis in the polar machine coordinate system. They are the physical axes for radius and angle on the machine.
4 Machine constants 4.15 4.15.8 Technology−specific settings MK_WLK_VERWEILZEIT 4.15.8 MK_WLK_VERWEILZEIT This machine constant is used to automatically insert dwell times in the correction module "SCHNEIDEN" ("CUT") at all places where the cutting tool is to punch and cut. The MC has two parameters. The first entry defines the dwell time after punching (M15/M16) and the second one the dwell time after cutting. Both are entered in seconds with decimal positions. 4.15.
4.15.11 Machine constants 4 Technology−specific settings MK_DW224_255 4.15 4.15.11 MK_DW224_255 This machine constant is used to affect the sequence program of the PLC. The contents of the 32 entries of this MC are copied in the data area %MW2.224 to %MW2.255 of the PLC during the transfer of the machine constants. The programmer can freely define the meaning of the data words. This MC can be used, for example, to configure different pieces of equipment of a machine with additional components.
4 Machine constants 4.16 List of machine constants 4.16 List of machine constants In the following, you can find the list of machine constants as it is loaded in the control. The list is provided as an ASCII file and can be edited on a PC. The structure of the list corresponds to the previous description. It is recommended to enter the required values for all machine constants. Do not change the key values listed. Only change or add the corresponding numerical values.
Machine constants 4 List of machine constants 4.16 /*−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−*/ /* 1.
4 Machine constants 4.
Machine constants 4 List of machine constants 4.
4 Machine constants 4.16 List of machine constants /* !!! The following 5 MCs are only active after the control !!! */ /* !!! is restarted after the transfer of the MCs !!! */ MK_KANALANZAHL 1; /* number of NC channels */ MK_PFELDGROESSE 2048; /* parameter field size */ MK_LAH_VORLAUFTIEFE MK_LAH_RUECKLAUFGRENZE 256, /* size of prebuffer in blocks for channel 0 */ 0; /* and for channel 1 */ 4, /* no.
MK_US Machine constants 4 List of machine constants 4.16 1234, /* input number of the neg. limit switch */ 1234; /* input number of the pos. limit switch */ 0, /* monitor.
4 Machine constants 4.
Machine constants 4 List of machine constants 4.
4 Machine constants 4.16 List of machine constants 0, 0, 0, 0; MK_KF 0, /* feed−forward factor */ 0, /* calculation: (Umax = setpoint for Vmax) */ 0, /* 0, /* MK_KF = −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− */ Umax[0.1V] * 327.
MK_REF_BMAX1 1, Machine constants 4 List of machine constants 4.
4 Machine constants 4.16 List of machine constants 2, 2, 2, 2; MK_T_BESCHL 0, /* damping time constant for acceleration ramps */ 0, /* and deceleration ramps [ms] */ 0, 0, 0, 0; MK_SPINDELMAX 6000, /* spindle speed in [rpm] at 10 V */ 6000, 6000; /* −−−−−−−−−−−−−−−−−−−−−−− */ /* path−related limit values */ /* −−−−−−−−−−−−−−−−−−−−−−− */ MK_VBAHNMAX 20; /* 20 max.
Machine constants 4 List of machine constants 4.16 /*−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−*/ /* 5. Technology − specific settings */ /*−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−*/ MK_MFKT_UPR_TABELLE 0, /* table of M functions after which a */ 0, /* G22 L9000+Mfktnr is to be added. 0, /* the table may have a max.
4 Machine constants 4.16 List of machine constants 0, 0, 0, 0; MK_TECHNOLOGIEDATEN2 0, /* like TECHNOLOGIEDATEN1 */ 0, 0, 0, 0, 0, 0, 0, 0, 0; MK_TECHNOLOGIEDATEN3 0, /* like TECHNOLOGIEDATEN1 */ 0, 0, 0, 0, 0, 0, 0, 0, 0; MK_TECHNOLOGIEDATEN4 0, /* like TECHNOLOGIEDATEN1 */ 0, 0, 0, 0, 0, 0, 0, 0, 0; /*−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−*/ /* 6.
EDSTCXN EN 2.0 0, /* DW 234 */ 0, /* DW 235 */ 0, /* DW 236 */ 0, /* DW 237 */ 0, /* DW 238 */ 0, /* DW 239 */ 0, /* DW 240 */ 0, /* DW 241 */ 0, /* DW 242 */ 0, /* DW 243 */ 0, /* DW 244 */ 0, /* DW 245 */ 0, /* DW 246 */ 0, /* DW 247 */ 0, /* DW 248 */ 0, /* DW 249 */ 0, /* DW 250 */ 0, /* DW 251 */ 0, /* DW 252 */ 0, /* DW 253 */ 0, /* DW 254 */ 0; /* DW 255 */ l Machine constants 4 List of machine constants 4.
5 Interface PLC <˘> NC operating system 5.1 Definitions 5 Interface PLC <−> NC operating system The integrated PLC is a component of the hardware and software of the ETC control. It is programmed like a conventional PLC and generally has the same features. For the communication with the actual CNC control (NC), a formal interface is provided within the CNC, whose function follows the regulations according to IEC 550, ISO 4336 and VDI 3422. In this chapter, the function of the interface is described.
Interface PLC <˘> NC operating system 5 Definitions 5.1 With "Strobe", the transmitter validates the previously written data, with "Acknowledgement", the receiver indicates the evaluation of the data. If the transmitter detects the acknowledgement of the receiver, it withdraws the "Strobe" signal, after which the receiver deletes its "Acknowledgement" signal. It is now permitted to transfer new data.
5 Interface PLC <˘> NC operating system 5.1 5.1.1 Definitions Data block 0 5.1.1 Data block 0 When using DB0, bear in mind that the data may only be evaluated in the 2nd PLC task (PLC_PRG2/ OB20). This is necessary because the data is updated in DB0 before the 2nd task is called and the NC evaluates the data after execution. The error interface is an exception as it is synchronized by a strobe (error counter) and an acknowledgement signal (error acknowledgement).
Interface PLC <˘> NC operating system 5 Definitions Data block 0 5.1 5.1.1 Data word Name Direction Type of signal 128 Current menu NC ® PLC static This is where the current menu is identified: 0 = invalid 1 = main menu 2 = set−up 3 = automatic 4 = programming 5 = diagnostics 6 = user If you want the PLC program to change to a standard menu, the identification of the new menu must be stored in DW128 prior to executing the function "New state()".
5 Interface PLC <˘> NC operating system 5.1 5.1.1 Definitions Data block 0 Data word Name Direction Type of signal 133 Error counter NC ® PLC static DW133 is used by the NC computer in order to report errors to the PLC. For this purpose, DW133 is incremented and is thus unequal to DW001 (error acknowledgement). After the error message has been evaluated, DW001 must also be incremented by the PLC.
Interface PLC <˘> NC operating system 5 Definitions Data block 1 5.1 5.1.2 Data word Name Direction Type of signal 136 Error number NC ® PLC static This is where the actual error number is reported. An error number is always assigned to the corresponding error module. The error can only be clearly determined by means of the error number and error module. Data word Name Direction Type of signal 137 Current submenu NC ® PLC static Data word Name Direction Type of signal 148.00−255.
5 Interface PLC <˘> NC operating system 5.1 5.1.2 Definitions Data block 1 Data word Name Direction 033.00 db1_sps2nc_hfkt_quitt_bit PLC ® NC 035.00 db1_sps2nc_extsync_enable_bit PLC ® NC 035.08 db1_sps2nc_programmhalt_aktiv_bit PLC ® NC 036.00 – 037.15 038.00 – 039.15 db1_sps2nc_qin_mask_aw db1_sps2nc_qout_mask_aw PLC ® NC PLC ® NC 042.00 – 043.15 044.00 – 045.15 db1_sps2nc_qin_offset_ab db1_sps2nc_qout_offset_ab PLC ® NC PLC ® NC 080.00 – 080.15 081.00 – 081.15 082.00 – 082.15 083.
Description of the signals Interface PLC <˘> NC operating system 5 Definitions Data block 1 5.1 5.1.2 Data word Name Direction Type of signal 000.00 EMERGENCY STOP PLC → NC static 0 = emergency stop state 1 = normal operating state Effect in the NC: The 0 signal interrupts all movements, the program process is interrupted. Data word Name Direction Type of signal 000.01 Feed enable (total) PLC → NC static 001.00−15 Feed enable axis 0 ...
5 Interface PLC <˘> NC operating system 5.1 5.1.2 Definitions Data block 1 Data word Name Direction Type of signal 000.03 MMI individual function inhibit PLC ® NC static With this signal, all individual functions (e.g. G functions, M functions, ...) of HMI can be inhibited. Effect in the NC: The "1" signal has the effect that no individual block of the MMI is executed via the NC.
Interface PLC <˘> NC operating system 5 Definitions Data block 1 5.1 5.1.2 Data word Name Direction Type of signal 003 Enable traverse keys (+) Axis 0 − 15 PLC → NC static 004 Enable traverse keys (−) Axis 0 − 15 PLC → NC static For each axis, an enable signal for the manual traverse keys is output. Signal state "1" activates the enable signal. The signal is only output in "Manual operation" or "Interrupt" if all conditions for the manual traversing of the axes are met.
5 Interface PLC <˘> NC operating system 5.1 5.1.2 Definitions Data block 1 Data word Name Direction Type of signal 009.00−07 Program start PLC → NC static The starting signal is a byte information which can adopt a value between 0 and 255. The program start requirement is output if the start signal of the HMI to the PLC (DW137) has a value unequal to "0" or a corresponding input of the PLC has been set ("Press the start key") and the necessary starting conditions have been met.
Interface PLC <˘> NC operating system 5 Definitions Data block 1 5.1 5.1.2 Data word Name Direction Type of signal 012.00 Program stop PLC → NC static The "Stop" signal is set to value "1" if the stop signal from HMI to the PLC (DW142) has value "1" or if a corresponding input of the PLC is set ("Press the stop key") or if the conditions for further processing of a program are not met due to other reasons.
5 Interface PLC <˘> NC operating system 5.1 5.1.2 Definitions Data block 1 Data word Name Direction Type of signal 013.00 − 07 Individual/following block PLC → NC static Switching between following and individual block operation. (This signal is ORed with the "Individual/following block" signal from the DB15.
Interface PLC <˘> NC operating system 5 Definitions Data block 1 5.1 5.1.2 Data word Name Direction Type of signal 018.00 Q bit signal 0 PLC → NC static ... ... ... ... 021.15 Q bit signal 63 PLC → NC static Application and program−specific signals for controlling the program flow in the NC control. The meaning of the values must be defined individually. The values depend on the inputs of the PLC and internal links.
5 Interface PLC <˘> NC operating system 5.1 5.1.2 Definitions Data block 1 Data word Name Direction Type of signal 032.00 Acknowledgement for M function PLC → NC Acknowledgeme nt The signal is set to "0" when the PLC has detected the value "0" of the strobe for M functions and accepted the data of the M functions transferred by the NC. It is set to "1" when the strobe has accepted the value "1" again (¶ 240).
Interface PLC <˘> NC operating system 5 Definitions Data block 1 5.1 5.1.2 Data word Name Direction Type of signal 036.00−037.15 Enable of the "fast inputs" PLC → NC static The PLC uses a "1" to specify the corresponding digital input as the "fast input", i.e. the input signal is evaluated directly by the rough interpolator (in rough interpolation cycle). If enable is reset again by the PLC, it can immediately use the inputs again exclusively.
5 Interface PLC <˘> NC operating system 5.1 5.1.2 Definitions Data block 1 Data word Name Direction Type of signal 042.00−043.15 Offset of the "fast inputs" PLC → NC static Use the two data words to position the 2 masks "Enable fast inputs" to any place in the process image. Effect in the NC: The corresponding inputs are made available to the NC as Q bits. Example: see "Enable of fast inputs" Data word Name Direction Type of signal 044.00−045.
Interface PLC <˘> NC operating system 5 Definitions Data block 1 5.1 5.1.2 Data word Name Direction Type of signal 084.00−07 Traverse key axis 0 PLC → NC static 084.08−15 Traverse key axis 1 PLC → NC static ... ... ... ... ... ... ... .... 091.00−07 Traverse key axis 14 PLC → NC static 091.08−15 Traverse key axis 15 PLC → NC static These signals are used for traversing the axes. One byte is available for each axis. By writing the bytes, the respective action is executed.
5 Interface PLC <˘> NC operating system 5.1 5.1.2 Definitions Data block 1 This is precisely when the target point is accepted. (Note: Also a change from 110 to –110 or vice versa has the effect that the target position is accepted again.) The axis moves for as long as the value +/−110 is specified in the traverse key and the target has not yet been reached. A change to the speed specification (P208 ... 223) is also accepted when the axis is in motion.
Interface PLC <˘> NC operating system 5 Definitions Data block 1 5.1 5.1.2 Data word Name Direction Type of signal 129.00−15 Home position axis 0 – 15 NC → PLC static The signal has the value "0" after the control has been switched on and if the home position is unknown. The signal has the value "1" if the home position of the respective axis has been approached or if value −1 has been entered for machine constant MK_REF_RICHTUNG_UND_FOLGE for the respective axis.
5 Interface PLC <˘> NC operating system 5.1 5.1.2 Definitions Data block 1 Data word Name Direction Type of signal 132.02 Block search active NC → PLC static Value "1" of the signal indicates that the processing of an NC program is active in the block search. The signal is pending until the target block of the block search has been reached. Data word Name Direction Type of signal 132.
Interface PLC <˘> NC operating system 5 Definitions Data block 1 5.1 5.1.2 Data word Name Direction Type of signal 133.08−15 Program start counter NC → PLC static This counter is incremented by 1 for every rising edge by "NC program is running". Data word Name Direction Type of signal 134.00−15 Axis moves, axis 0 ... 15 NC → PLC static The signal always has value "1" when an axis is in motion or a command for traversing the axis is active.
5 Interface PLC <˘> NC operating system 5.1 5.1.
Interface PLC <˘> NC operating system 5 Definitions Data block 1 5.1 5.1.2 Data word Name Direction Type of signal 137.08 − 15 Individual/following block active NC → PLC static Changing over from following to individual operation and vice versa. (copy from the virtual keyboard). Effect in the NC: Processing of a program either continuously (following block) or block by block (individual block). 0 = following block; 1 = individual block Data word Name Direction Type of signal 138.00−15 139.
5 Interface PLC <˘> NC operating system 5.1 5.1.2 Definitions Data block 1 Data word Name Direction Type of signal 150.00 Strobe M function NC → PLC Strobe The signal is set to "0" if the data word is valid for the "M function". It is set to value "1" if the acknowledgement signal of the PLC has changed from "1" to "0". After switching on the control, the signal has the value "1". Effect in the PLC: If the signal has the value "0", the data word of the "M function" is accepted.
Interface PLC <˘> NC operating system 5 Definitions Data block 1 5.1 5.1.2 Data word Name Direction Type of signal 160 H function NC → PLC Message The data word contains the number of the H function in binary representation. For the description on the acceptance of an H function, refer to the "Programming instructions". Effect in the PLC: Execution of the function specified via the H function. Read enable is activated after the function has been completed or at another suitable point in time.
5 Interface PLC <˘> NC operating system 5.1 5.1.2 Definitions Data block 1 Data word Name Direction Type of signal 182.00−15 Slave axis limit switch + active NC → PLC static The signal has the value "1" if the positive limit switch of the slave axis of a synchronous axis is active, otherwise the value is "0". Effect in the PLC: Disabling machine functions or traversing movements (feed enable). Data word Name Direction Type of signal 183.
Interface PLC <˘> NC operating system 5 Definitions Data block 1 5.1 5.1.2 Data word Name Direction Type of signal 192.00−199.15 State CAN modules (CANopen) NC → PLC static Signal state "1" indicates that the corresponding CANopen module is available. The bits in the data words are assigned by means of the module ID (node no.). Example: 192.01 indicates state of node 1 192.15 indicates state of node 15 193.01 indicates state of node 17 Effect in the PLC: Option of monitoring the CAN modules.
5 Interface PLC <˘> NC operating system 5.1 5.1.3 Definitions Data block 2 Data word Name Direction Type of signal 212.00−15 213.00−15 214.00−15 215.00−15 216.00−15 217.00−15 218.00−15 219.00−15 Area of the "Virtual keyboard" HMI → PLC static Area of the virtual keyboard whose meaning/function can be freely defined. If the ETC−MMI (PC user interface) is used, this is where the states of the freely configurable PLC keys (soft keys) are stored bit by bit (see chapter "ETC− MMI"). 5.1.
Assignment Interface PLC <˘> NC operating system 5 Definitions Data block 2 5.1 5.1.3 For the ETC−MMI, the assignment of the DB2 listed in the table below is used. This assignment is a recommendation for the use of the DB2. Within the areas data word 0 ... 127 and 128 ... 191 a freely definable assignment is possible. Data word Name Direction 000.00 – 007.15 008.00 – 015.15 016.00 – 079.15 080.00 – 095.15 096.00 – 096.15 097.00 – 097.15 098.00 – 125.15 126.00 – 126.15 127.00 – 127.15 128.00 – 128.
5 Interface PLC <˘> NC operating system 5.2 5.2.1 Extended interface for MMI functions Data blocks 8 ... 14 5.2 Extended interface for MMI functions 5.2.1 Data blocks 8 ...
EDSTCXN EN 2.0 Interface PLC <˘> NC operating system 5 Extended interface for MMI functions Data blocks 8 ... 14 5.2 5.2.
5 Interface PLC <˘> NC operating system 5.2 5.2.1 Extended interface for MMI functions Data blocks 8 ...
5.2.2 Interface PLC <˘> NC operating system 5 Extended interface for MMI functions Data block 15 5.2 5.2.2 Data block 15 Assignment Description The data block 15 represents the "virtual keyboard" of the NC computer. This block can only be written by the PLC if no ETC−MMI is connected to the control. Otherwise the contents of the PLC can only be read.
5 Interface PLC <˘> NC operating system 5.2 5.2.2 Extended interface for MMI functions Data block 15 Data word Name Direction Type of signal 028.00−07 Traverse key axis 0 HMI → NC static 028.08−15 Traverse key axis 1 HMI → NC static 029.00−07 Traverse key axis 2 HMI → NC static 029.08−15 Traverse key axis 3 HMI → NC static 030.00−07 Traverse key axis 4 HMI → NC static 030.08−15 Traverse key axis 5 HMI → NC static 031.00−07 Traverse key axis 6 HMI → NC static 031.
Interface PLC <˘> NC operating system 5 Extended interface for MMI functions Data block 15 5.2 5.2.2 Data word Name Direction Type of signal 036 General override for axes HMI → NC static 037 Override for spindle speeds HMI → NC static 038 Override for oscillation speed HMI → NC static 039 Override for PLC axes (Target position approach) HMI → NC static Definition of a signed evaluation factor for the currently valid traversing speed. The specification is made in steps of 0.1 %.
6 ETC−MMI−Gateway 6.1 Installing the ETC−MMI gateway 6 ET −MMI gateway The MMI gateway is the communications program between Windows applications and ETC control systems. Different applications such as MMIs, configuration tools or OPC servers can establish connections to one or more control systems at the same time. The gateway implements all required mechanisms for access control, error handling and diagnostics and supports control−specific hardware drivers and communication protocols.
6.2 ETC−MMI−Gateway 6 Starting the ETC−MMI gateway 6.2 Starting the ETC−MMI gateway The ETC−MMI gateway is started automatically when an application (e.g. ETC−MMI) loads the file "mmictrl.dll". The current configuration is read from the file "mmigtway.ini" (¶ 283) and checked. In the task bar, an icon for the ETC−MMI gateway is displayed. You can open the menu with a mouse−click on the gateway icon. ETCN001 ETCN002 Settings: Start configuration interface.
6 ETC−MMI−Gateway 6.3 6.3.1 Configuring the ETC−MMI gateway Connection − Setting up connections 6.3 Configuring the ETC−MMI gateway Via the configuration interface of the ETC−MMI gateway, you can configure the connections to the control systems and call debug information. The configuration interface is a separate application (gtwconf.exe), which is installed with the ETC−MMI gateway. It can be started via the gateway menu (¶ 277) or as Windows application, e.g. via Windows File Explorer. 6.3.
Add − create new connection ETC−MMI−Gateway 6 Configuring the ETC−MMI gateway Connection − Setting up connections 6.3 6.3.1 Use the Add button to create a new connection. In the "Settings" dialogue, you determine the communication parameters. ETCN004 Name: To enable an application to communicate with a control system via the ETC−MMI gateway, each connection must be assigned an unambiguous name. You can choose any name. Assign e.g. consistent names "ETC0", "ETC1" etc.
6 ETC−MMI−Gateway 6.3 6.3.1 Configuring the ETC−MMI gateway Connection − Setting up connections Details – Display communication status If you want to display the communication status of the selected connection, click the Details button. ETCN060 Settings – Edit connection parameters Via the Settings button, you can edit the communication parameters of the selected connection if e.g. the IP address of the control system has changed. ETCN004 Name and Control cannot be changed.
6.3.2 ETC−MMI−Gateway 6 Configuring the ETC−MMI gateway Trace – Error logbook 6.3 6.3.2 Trace – Error logbook In the case of faults in the communication, you can activate trace logs on this tab. Gateway traces are internal events of the communication channel between the application and the gateway and contain information on the communication flow or the causes of occurred errors. Trace logs are saved in the file "mmigtway.trc", which is created anew every time the gateway runs up.
6 ETC−MMI−Gateway 6.3 6.3.3 Configuring the ETC−MMI gateway About – Version information 6.3.3 About – Version information The "About" tab shows the version numbers of the gateway, the configuration tool and the MmiCtrl.dll. ETCN062 282 l EDSTCXN EN 2.
6.4 ETC−MMI−Gateway 6 Mmigtway.ini 6.4 Mmigtway.ini In the file "mmigtway.ini", the current configuration of the gateway is saved. [Connection] section In the [Connections] sections, general information of the gateway is saved.
6 ETC−MMI−Gateway 6.4 6.4.1 Mmigtway.ini Example of the file "mmigtway.ini" 6.4.1 Example of the file "mmigtway.ini" [Connections] UdpConns=3 PciConns=1 DemoConns=0 [Options] AutoClose=0 [Traces] OnChCreate=0 OnConnect=0 OnRead=0 OnWrite=0 OnWrCh=0 OnLoadFw=0 OnFileOpen=0 OnFileClose=0 OnMsg2Nc=0 OnMsg2Mmi=0 OnError=0 ConnTrc=0 OnAddConn=0 [UdpConn0] Name=CNC0 Param=172.16.5.113 PcDir= [UdpConn1] Name=CNC1 Param=172.16.5.114 PcDir= [PciConn1] Name=MyPnc Param=0 PcDir= [UdpConn2] Name=CNC2 Param=172.16.
6.5 ETC−MMI−Gateway 6 Communication values in the DPR area 6.5 Communication values in the DPR area Name Meaning Communication area MMI−>NC mmi2t_order_us Command to the communication processor t2mmi_quitt_us Acknowledgement from the communication processor t2mmi_status_us Status from the communication processor mmi2t_quitt_us Acknowledgement to the communication processor msq2nc_r.qc_uc Message acknowledgement counter msq2nc_r.mc1_us Messages−Start−Message counter msq2nc_r.
7 ETC−MMI 7.1 Installing ETC−MMI 7 ETC−MMI The program "ETC−MMI" is used for the following tasks: ƒ Configuring the control system ƒ Operating and monitoring the control system ƒ Maintenance of the control system and error diagnosis 7.1 Installing ETC−MMI ( Stop! Only install the PCI control variant ETCPx after installing the ETC−MMI and before starting the ETC−MMIs. ) Note! The ETC−MMI Gateway is installed during the installation of the Lenze ETC−MMIs 1.
Installed files ETC−MMI 7 Installing ETC−MMI 7.1 After a standard installation, the following files and file paths can be found on the hard disk of the PC after a successful installation: e.g. c:\Programs\Lenze\ETC\MMI\) Lenze.exe ETC−MMI application ncform.hlp Help file install.hlp Installation instructions ...\cfg\ Configuration directory muster.mk Machine constant file with basic settings mk.
7 ETC−MMI 7.2 Starting ETC−MMI 7.2 Starting ETC−MMI 1. Start the ETC−MMI via W Programs W Lenze W ETC. ETCN011 The ETC−MMI Gateway is automatically started. The application can be seen on the task bar: ETCN001 288 l EDSTCXN EN 2.
ETC−MMI 7 Operating ETC−MMI Display elements of the program interface 7.3 7.3.1 7.3 Operating ETC−MMI 7.3.1 Display elements of the program interface Operating mode Status display Actual value display Bar display Status line Input line Softkeys ETCN063 Operating modes: Displays the currently selected operating mode ("Setup", "Automatic", "Programming" or "Diagnostics") and, if selected, a sub mode.
7 ETC−MMI 7.3 7.3.2 Operating ETC−MMI Operational controls of the program interface 7.3.2 Operational controls of the program interface The standard user interface does not require an external machine control panel for the operation of the machine. All important functions (start, stop, traverse buttons) are assigned to softkeys (function keys); i.e. all operational controls of the program interface can be activated via the keyboard.
Showing a new softkey line (submenu) ETC−MMI 7 Operating ETC−MMI Help function 7.3 7.3.3 These function keys open a submenu; i.e. they change the labelling and thus the meaning of other keys. The labelling of this function key type always ends with three dots. ETCN066 Use the function key to change back to the calling key level. 7.3.3 Help function Use the shortcut ++to start the online help. 7.3.4 Configuration file The configuration file "delphmmi.
7 ETC−MMI 7.3 7.3.6 Operating ETC−MMI Passwords 7.3.6 Passwords In the ETC−MMI, a password can be assigned for each operating mode and additionally for changing the passwords. These passwords are prompted for when the ETC−MMIs are started or when the operating mode is changed. The following passwords are preset: Operating mode / password administration Password Setup 1 Automatic 2 Program 3 Diagnostics 4 Edit password 5 Passwords can be changed in the "Diagnostics" operating mode. (¶ 312).
7.4 ETC−MMI 7 "Setup" operating mode 7.4 "Setup" operating mode ETCN068 The "Setup" operating mode contains functions for setting up the plant. Among other things, you can carry out homing and manual travel and manage tools. Horizontal function keys Reference... automatic Via the key, an automatic home position approach can be initiated. All axes are referenced in the configured sequence. manual A manual home position approach can be initiated.
7 ETC−MMI 7.4 "Setup" operating mode Target position Target position for the selected axis. Select the desired axis by means of the key (or keys). The entry must be completed with . cancels the entry and restores the old positions. The function key is only labelled and enabled if the key has been pressed. Handwheel The Xhandwheel keysX are only displayed if a handwheel is configured in the machine constants. Traversing the axes via a handwheel.
Tool data... ETC−MMI 7 "Setup" operating mode 7.4 This key requests the current tool correction data from the NC computer and saves them in the file "vom_nc.wtk" in the configurations directory. The received data is interpreted according to the specification in the tool management and displayed in the tool correction table. Each defined tool can be assigned a magazine position. It is not permissible to assign a magazine position more than once.
7 ETC−MMI 7.4 "Setup" operating mode ETCN070 Vertical function keys 296 Import + save The data from the table is transferred to the NC computer and saved on the PC in a file. back... Back to the previous level. Load tool record Open a dialogue for selecting a file with tool data (WTK file). This file will be transferred to the control system. Tool number In the upper edge of the "Status displays" dialogue there is a field for entering a tool number (Tx).
Vertical function keys in the Tool management menu EDSTCXN EN 2.0 ETC−MMI 7 "Setup" operating mode 7.4 When you switch to tool management, a new vertical softkey line is shown. Fetch tool The tool "Tx" displayed in the status fields is fetched from the tool magazine and placed in the tool holder. Change tool The tool currently located in the tool holder is replaced by the tool "Tx" displayed in the status fields. The functions of the tool change require a corresponding PLC program (DIN program).
7 ETC−MMI 7.5 "Automatic" operating mode 7.5 "Automatic" operating mode ETCN071 The "Automatic" operating mode is always active when the NC computer regularly processes a program. It shows the most important information of the program flow. 298 l EDSTCXN EN 2.
Horizontal function keys ETC−MMI 7 "Automatic" operating mode 7.5 Start program number Enter the program number of the program to be edited. Before, the program must be transferred via the "Program to NC" function (if required, with all necessary subprograms). The program is started via the key. Program to NC Transfer program from the PC to the ETCxC. After a function has been called, a dialogue is displayed. Via the keys, select a program and start the transfer with .
7 ETC−MMI 7.5 "Automatic" operating mode Vertical function keys Start Starts the selected program or blockwise processing in single block operation. Stop Immediately stops program execution. All axes are stopped with the set deceleration ramps. After a restart, processing is started again. Feed stop If "Feed stop" is activated, the axes are no longer traversed, until the function has been deactivated. The axes are stopped with the set deceleration ramps.
Vertical function keys for graphics "on" EDSTCXN EN 2.0 ETC−MMI 7 "Automatic" operating mode 7.5 Display idle travel Idle travels are displayed in a different colour (M15/M14). Note: The graphic detects idle travels by means of an upstream M15, work paths by means of M14. Progress in colour The colour of paths that have been travelled completely changes. X plus Shift representation in X plus direction. X minus Shift representation in X minus direction.
7 ETC−MMI 7.6 "Programming" operating mode 7.6 "Programming" operating mode ETCN073 In the "Program" operating mode, you edit CNC programs or any text files. The operating mode offers a file management system for copying, printing and deleting files (¶ 308) and an ASCII editor (¶ 305) for editing programs. The name of the file being edited is displayed in the upper right. In the editor field (in the illustration on the left), the contents of the file are displayed and edited.
Horizontal function keys EDSTCXN EN 2.0 ETC−MMI 7 "Programming" operating mode 7.6 New program Prepare the editor for entering a new file. If a file is already being edited, it remains active in the background. Via the file selection line in the upper window area, files from the background can be brought to the foreground. Open program Open existing (program) file. A dialogue opens (^ 306). Here you can select the desired file. After has been pressed, the file is opened in the editor.
7 ETC−MMI 7.6 "Programming" operating mode Vertical function keys Vertical function keys for graphics "on" 304 Stop Quits a running program. Insert cycle Adds a prepared cycle. The cycle is selected by means of the keys and added to the line where the cursor is positioned by means of . cancels the selection. A cycle is a subprogram to which parameters are transferred when it is called. More detailed information on creating cycles can be found later in this chapter (^ 310.).
7.6.1 ETC−MMI 7 "Programming" operating mode ASCI editor 7.6 7.6.1 ASCI editor The editor is primarily used for entering and changing CNC programs according to DIN 66025, but also for editing any ASCII files. ETC075 ) Note! We recommend to operate the editor via an external keyboard. To facilitate program creation, the CNC blocks are automatically set in upper case letters. If you want to enter lower case letters (e.g. for axes u, v, w), press the key during the entry.
7 ETC−MMI 7.6 7.6.1 "Programming" operating mode ASCI editor Dialogue box for file selection This dialogue box is used, among other things, for the selection of a program for the editor and for the transfer to an NC computer. Cursor keys Pathname ENTER select file ESC discard entry Display filter Display profile of the program ETCN076 General functions ƒ A dialogue box (button, input field, selection list etc.) can be selected with the key.
Display profile of the program ETC−MMI 7 "Programming" operating mode ASCI editor 7.6 7.6.1 1. Select the file whose profile you want to display (see above). 2. Afterwards, press the key several times until the "Kontur des Programms anzeigen" ("Display profile of the program") button is selected. 3. Finally, press . The profile of the selected program is displayed. 4. Press to close the display.
7 ETC−MMI 7.6 7.6.2 "Programming" operating mode File manager 7.6.2 File manager The file manager provides functions for managing files. When the file manager is called via the corresponding softkey of the "Programming" operating mode, a new softkey line is shown, which provides all functions of the file manager. ETCN077 In the file manager, different directories can be displayed independently from each other in the left and right file window. The active file window has a white background.
Horizontal function keys Vertical function keys Hotkeys EDSTCXN EN 2.0 ETC−MMI 7 "Programming" operating mode File manager 7.6 7.6.2 Copy Copy selected file(s). Move Move selected file(s) to a different directory. Delete Delete selected file(s). Rename Rename selected file(s). Print Print selected file(s). Graphics Display the graphic selected by the cursor. closes the graphic. Display Display the file selected by the cursor (write−protected). closes the graphic. back...
7 ETC−MMI 7.6 7.6.3 "Programming" operating mode Cycle programming 7.6.3 Cycle programming A cycle is a subprogram to which parameters are transferred when it is called. During cycle programming, the parameters are requested by the user and made available to the DIN program in the P fields. Existing cycles are defined in the configuration file. More detailed information on creating cycles can be found later in this chapter (¶ 325).
ETC−MMI 7 "Programming" operating mode Cycle programming 7.6 7.6.3 Representation of the cycle in the DIN program ETCN081 P1203=20.0000 P1206=0.0000 G22 L3501 G99 P1204=20.0000 P1200=90.0000 P1205=1.0000 Edit cycles ETCN082 After a function or a cycle has been selected, the respective entries are made in the DIN file. Change cycle If the cursor is positioned on a line starting with "G22 Jxxxxx", the cycle can be edited and the data changed as long as all information is available.
7 ETC−MMI 7.7 "Diagnostics" operating mode 7.7 "Diagnostics" operating mode The "Diagnostics" operating mode is primarily intended for service and commissioning technicians. It offers functions for the support of axis setting, for the control of inputs/outputs and parameters, for editing machine constants and for the control of internal statuses. In addition, the error logbook, which logs all errors, can be accessed. ETCN083 Horizontal function keys 312 Axis setting...
ETC−MMI 7 "Diagnostics" operating mode 7.7 Diagnostics data... NC timing information Display different internal control−specific data. The function is intended for internal use only or for trained service personnel. The display can be cleared with the key. Trace Open dialogue for activating events that are to be logged. From the list of available traces, individual traces can be selected with a double−click and activated with . You will then be prompted to enter a file name (e.g.
7 ETC−MMI 7.7 "Diagnostics" operating mode Error logbook If errors occur in the communication of PC, PLC, NC and/or during programming, they are logged together with date and time in a file (errorlog.txt). By means of the "Error logbook" function, the error messages can be displayed. Use the cursor keys to browse through the individual fields. With or the display can be quit. Errors older than 30 days are removed from the logbook.
Parameter field (P field) P field read ETC−MMI 7 "Diagnostics" operating mode 7.7 The following applies for all entries: The key is used to confirm the entry, the cancels the entry. Display the value of a parameter field. The P field number is entered in the status line. The contents are output in the display line. If this field is selected, the number that was entered last is automatically offered. A different number can be entered immediately without having to delete the old display.
7 ETC−MMI 7.7 "Diagnostics" operating mode P field display Opens a separate window with a list of 32 successive parameters. The start parameter can be entered by pressing the or key. When the last P field is selected, the P field index is displayed. Press to display this index in the first field. This function can be used to browse 31 fields up. If is pressed on a field with value of the P field, this value can be changed via an entry block.
Enable PLC ETC−MMI 7 "Diagnostics" operating mode 7.7 The Enable PLC function is used for checking the most important interface signals between PLC and NC. ETCN092 Remote On/Off binary Displays the input and output statuses of the external I/O modules connected via CAN bus in binary form (0 = input/output not set). This function is only significant if the system is equipped with the corresponding hardware. Cards On/Off ... In the language file, a text can be saved for each input and output (^ 321).
7 ETC−MMI 7.7 "Diagnostics" operating mode Machine constants Edit machine constants (^ 190). 0 1 2 3 4 ETCN093 0: Available machine constants 1: Date and version of the NC 2: Setting of the current machine constant 3: Change value 4: Description of the machine constant from the "MK.hlp". Individual parameters can be changed in the machine constant catalogue. 318 edit MC When "edit MC" is selected, the current machine constants are first loaded from the NC computer and then displayed.
EDS ETC−MMI 7 "Diagnostics" operating mode 7.7 Load description file of a manufacturer of a CAN module. All defined code positions can be read out. The code positions released for writing can be overwritten with new values. For details, refer to the module description of the manufacturer of the CAN modules. If the softkey is pressed, a selection of the CAN bus (1:I/O bus, 2:drive) is displayed first. Afterwards, the node number of the desired module must be specified.
7 ETC−MMI 7.7 "Diagnostics" operating mode Vertical function keys 320 Start Starts the selected program or blockwise processing in single block operation. Stop Immediately stops program execution. All axes are stopped with the set deceleration ramps. After a restart, processing is started again. Travel+ Manual traverse key for positive axis direction of the selected axis. Travel− Manual traverse key for negative axis direction of the selected axis. Axis Select the axis to be traversed.
7.8 Appendix 7.8.1 Language file (SPRACHE.TXT) ETC−MMI 7 Appendix Language file (SPRACHE.TXT) 7.8 7.8.1 The language file (e.g. SPRACHE.TXT) contains all display and message texts, with the exception of the error messages, which are saved in separate files. The file is created in the ANSI character set typical of Windows and can be edited with any editor (e.g. the editor in the PROGRAMMING operating mode of the MMI software). The beginning of a text line is always marked by a number.
7 ETC−MMI 7.8 7.8.1 Appendix Language file (SPRACHE.TXT) 00003000,"Your password please :" 00003001,"Setup password" . . . 01000007,"mc" 01000008,"File has been changed." "Save change?" 01000009,"Cycle files cannot be loaded as job." 01000010,"The value of the entry is impermissible." "For this parameter, only a value between %f and %f is permitted." 01000011,"Input fields" The texts no. 01010000 ...
ETC−MMI 7 Appendix Language file (SPRACHE.TXT) 7.8 7.8.1 It is useful to save these texts in a separate language file (see chapter configuration file: language). The PLC texts can be maintained independently from the MMI texts. 01020000,"" 01020001,"Bit01" 01020002,"Bit02" 01020003,"!Bit03" . . . 01020027,"Bit27" 01020028,"Bit28" 01020029,"Bit29" From no. 1020300 general texts, error messages etc. follow.
7 ETC−MMI 7.8 7.8.1 Appendix Language file (SPRACHE.TXT) Text assignment of the inputs/outputs in the language file The text assignment of the individual inputs and outputs is realised via text numbers. The text numbers are structured according to the following key. Each character corresponds to a digit. Key TKKKXNNN (8−digit number) T Type 0: local digital I/O module (EC−IO) 1: local analogue I/O module (EC−ADA, EC−ADC) 2: CAN I/O module (SLIO, CANOpen) KKK Node number 001 ...
Settings in the configuration file "delphmmi.ini" ETC−MMI 7 Appendix Cycle programming 7.8 7.8.2 In the configuration file "delphmmi.ini", the following parameters can be set in the "e/a anzeige" ("I/O display") section: textbasisnr: Basic number where the I/O signal texts start. separate_karten_texte: Can be used to determine whether separate texts are to be entered for each I/O module.
7 ETC−MMI 7.8 7.8.2 Appendix Cycle programming Section Term Description entry1 = P1200 = 1.23; top entry1: for identification P1200: definition of the corresponding P field 1.23: value which is set in the P field top: text for display and selection [L8000] entry2 = P1201= 2.34; bottom entry3 = P1202= 3.45; middle entry4 = c:\stdmmi\cnc20.bmp Image file that can be displayed entry1 = P1200= 1.23; Min; Max; Flag; top P1200=: definition of the corresponding P field 1.
7.8.3 ETC−MMI 7 Appendix Configuration file (DELPHMMI.INI) 7.8 7.8.3 Configuration file (DELPHMMI.INI) The configuration file (by default delphmmi.ini) contains settings which are required for the operation of the IPC and the NC computer and should only be changed by trained personnel. Definitions A section refers to the expressions that are enclosed in "[ ]" (example [config]). A term means the expressions following a section (example: cfg=c:\Programs\Lenze\ETC\mmi\cfg).
7 ETC−MMI 7.8 7.8.3 Appendix Configuration file (DELPHMMI.INI) Section Term Description LanguagePath Path in which the program looks for the language files. language=language Here you can specify the name of an ASCII file (name extension ".txt" is presupposed). This file contains general display texts, additional error messages, the function key assignment etc. required for the operation of the MMI software (see also "language file").
Section ETC−MMI 7 Appendix Configuration file (DELPHMMI.INI) 7.8 7.8.3 Term Description helpfile=c:\Programs\Lenze\ETC\m mi\ ncform31.hlp This term offers the possibility that the MMI software shows online helps. If the file name of a Windows help file is specified, the online help is displayed in Windows format. If only a directory (e.g. c:\Programs\Lenze\ETC\mmi\ help) is specified, the standard software shows help texts in the form of ASCII files.
7 ETC−MMI 7.8 7.8.3 Appendix Configuration file (DELPHMMI.INI) Section Term Description [startup] In the [startup] section, additional procedures during the startup of the HMI software are determined. dinLoad=1 This Boolean value defines (=1) whether after a complete (!) download of the NCR the automatic DIN program that was used last is loaded back into the control system and prepared for the program start. dinFile=c:\prog\beispiel.din The name of the automatic DIN program that was used last.
Section ETC−MMI 7 Appendix Configuration file (DELPHMMI.INI) 7.8 7.8.3 Term Description [SPS_EXEC] Call of a file that is executable under Windows by a PLC message: Entry=EXE file;parameter;[MAX|MIN|NORM] EXE file: executable Windows file Parameter: transfer parameter for EXE file MAX: maximum window MIN: minimum window NORM: normal window entry0=C:\WinNT\Notepad entry1=C:\WinNT\Notepad;Readme.txt entry2=C:\WinNT\Notepad;Readme.
7 ETC−MMI 7.8 7.8.3 Appendix Configuration file (DELPHMMI.INI) Section Term Description [WerkzeugVerwaltung] Wsk=default.wsk Name and path of a file with workpiece correction data. After a complete (!) download, this file is transferred to the NCR for presetting. wtk=default.wtk Name and path of a file with tool correction data. After a complete (!) download, this file is transferred to the NCR for presetting.
Section EDSTCXN EN 2.0 ETC−MMI 7 Appendix Configuration file (DELPHMMI.INI) 7.8 7.8.3 Term Description KEYxxx=yyyy . . KEYmmm=nnnn,oooo Determination of the properties of the "PLC key" to be activated: l Behaviour as key or switch, l the sequence of the execution of the functions on the softkeys l the labelling of the softkeys are achieved by entries of the type KEYxxx= yyyy or KEYmmm=nnnn,oooo.
7 ETC−MMI 7.8 7.8.3 Appendix Configuration file (DELPHMMI.INI) ) Note! The file can be edited by means of the MMI software (Diagnostics operating mode − MMI−config. function). It must be noted here that some changes are only updated after a restart of the software and some changes are only updated when the control system is reset. A restart of the software can be achieved by quitting the MMI software and then restarting it.
BARANZ ETC−MMI 7 Appendix Configuration file (DELPHMMI.INI) 7.8 7.8.3 The configuration of the bar displays for Vist and Override can be changed to display a different value from the DPR. Moreover, two different bar displays below the axis positions can be configured in the Automatic operating mode. For this purpose, there is a new section [BarAnz] in the Delphmmi.ini. This section contains up to four entries for the four bars.
8 PLC programming 8.1 ETC PLC programming with CoDeSys 8 PLC programming 8.1 ETC PLC programming with CoDeSys CoDeSys is a complete development environment for creating and testing PLC programs for the ETC. CoDeSys offers options for debugging programs similar to modern high level language development systems (setting breakpoints, monitoring variables, recording a trace (oscilloscope function) etc.).
PLC programming 8 CoDeSys installation System requirements for CoDeSys V2.xx 8.2 8.2.1 8.2 CoDeSys installation 8.2.1 System requirements for CoDeSys V2.xx ƒ Pentium processor (Pentium II, 350 MHz or higher recommended) ƒ 32 MB RAM (64 MB recommended) ƒ Windows 2000 or XP ƒ MS Internet Explorer version 4.0 or higher 8.2.2 Installing software 1. Place the CoDeSys setup CD into your CD−ROM drive.
8 PLC programming 8.3 8.3.1 Connecting ETC and PC V.24 Interface 8.3 Connecting ETC and PC The connection to the ETC can be established via one of the following interfaces: ƒ Serial interface ƒ Ethernet interface (only ETCHx, DIN rail design) ƒ DPR interface (only ETCPx, PCI insert card) 8.3.1 V.24 Interface For communication via the serial interface the RS232 or CAN2 connection of the ETC must be connected via a null modem cable to a free COM port of the PC.
8.3.3 PLC programming 8 Connecting ETC and PC DPR interface (only ETCPx, PCI insert card) 8.3 8.3.3 DPR interface (only ETCPx, PCI insert card) For the communication via the DPR interface the Windows WDM driver for the ETCPx and the Lenze MMI Gateway must be installed. In the communication parameters of CoDeSys the driver "E*DPR" must be selected.
8 PLC programming 8.4 8.4.1 Project planning Target system setup 8.4 Project planning 8.4.1 Target system setup When creating a new project in CoDeSys a dialog will automatically open which asks for the hardware used (=target system). After the creation the configuration dialog can be called via the menu item "target system setup" in the tab "Resources".
Task properties PLC programming 8 Project planning Configuring PLC tasks of the ETCxM 8.4 8.4.2 The properties of the individual tasks are configured in the "Task configuration" of CoDeSys. ETC103 The following points must be noted: ƒ The greater the value for priority, the greater the task priority. ƒ A task with an interval of "t#0s" must have a priority of no more than 10, otherwise the control will set the priority of all tasks to 0 and reports an error (module 13, error number 202).
8 PLC programming 8.4 8.4.3 Project planning Configuring PLC tasks of the ETCxC ( Stop! When accessing data or calling components which are used in several tasks it must be noted that no synchronisation exists between the tasks. The PLC programmer must ensure that this does not cause any problems. Process image When allocating the CoDeSys program components to the PLC tasks it must be noted that each task is only allocated to a part of the process image.
Step 2: PLC programming 8 Project planning Configuring I/O modules 8.4 8.4.4 As identification for the control that this task entry is the 2nd (lower priority) task "PLC_PRG2" must be entered into the field "event" (or OB20 if the program component to be linked to the task was called "PLC_PRG2").
8 PLC programming 8.4 8.4.4 Project planning Configuring I/O modules 8.4.4.1 Configuring CAN Master (global CAN settings) Basic parameters Automatic address: The switch should be disabled, otherwise CoDeSys will allocate the addresses automatically. CAN parameters ETC106 Baud rate: The baud rate for the CAN Bus must be selected in accordance with the settings of the connected CAN modules. ) Note! Entering the baud rate is only enabled for the ETCxM.
8.4.4.2 PLC programming 8 Project planning Configuring I/O modules 8.4 8.4.4 CAN slave configuration Basic parameters ETC107 Module ID: ID number of the module. Node ID: The node ID is entered in the CAN parameter tab. ETCxM Input/Output address: The basic addresses must always be stated as word addresses. The address defines where the process data of the module are located within the process image (I/O memory). This also determines to which PLC task the data will be allocated.
8 PLC programming 8.4 8.4.4 Project planning Configuring I/O modules CAN parameters ETC108 General: In node ID the CAN ID (node number) set for the module must be entered. Nodeguarding: Nodeguarding is used to detect whether a CANopen module is connected to the Bus. To do so the control sends a message to the module in "guard time" intervals and waits for a response. If the control does not receive a response after the "Life time factor" requests, an error message is generated.
PDO mapping PLC programming 8 Project planning Configuring I/O modules 8.4 8.4.4 Via PDO (Process Data Object) the process data are transferred at CANopen; this means the states of the digital and analogue inputs/outputs. Each PDO has a unique COB ID (385−1407) allocated to it, with the COB IDs for the CANopen IO modules being issued as follows, assuming a maximum of 127 modules: 1. Tx−PDO: 384 + NodeID 1. Rx−PDO: 512 + NodeID 2. Tx−PDO: 640 + NodeID 2. Rx−PDO: 768 + NodeID 3. Tx−PDO: 896 + NodeID 3.
8 PLC programming 8.4 8.4.
8.4.5 PLC programming 8 Project planning Addressing 8.4 8.4.5 Addressing The ETC is based on the big−endian data model, i.e. all data types are in the memory with those of the highest value byte, i.e. the "bigger end", on top. This is especially important when communicating with a PC−HMI (e.g. ETC−MMI) via DB2 (ETCxC), because PCs are based on the little−endian data model. The control provides a number of functions to simplify this (¶ 393).
8 PLC programming 8.4 8.4.6 Project planning Remanent variables 8.4.5.2 Addressing data blocks The data blocks (DB0 − DB15) are addressed via the area prefix "M". Access type Syntax Comment In bits %MX x.y.z x: number of the data block y: word in the data block ( 0 ... 255 ) z: bit in the word ( 0 ... 15 ) In bytes %MB x.y.z x: number of the data block y: word in the data block ( 0 ... 255 ) z: left (higher value) or right (lower value) byte of the word (left = 1, right = 0) In words %MW x.
PLC programming 8 Project planning Object directory (parameter manager) 8.4 8.4.7 ETC109 The CANopen address of the control must be defined under Control configuration −> CAN Master −> CAN Parameter−>Node ID. ETC116 When defining the Node ID the following must be noted: If the node ID is in the range 1 ... 63, two server SDO channels with the addresses "Node ID" and "Node ID + 64" will be created, i.e. the control receives 2 CANopen addresses.
8 PLC programming 8.4 8.4.7 Project planning Object directory (parameter manager) Create a new object directory. In it, define the variables to be exchanged with other controls. ETC110 The tab Variable must have been selected. The indexes can then be entered with their variable names. Index: In hexadecimal notation Subindex: The range of the subindexes is defined in the target settings.
8.5 PLC programming 8 Network variables Settings in the target system 8.5 8.5.1 Network variables Network variables are a way of transferring data between two or several controls. Currently network variables are implemented on the basis of UDP. The variable values are transferred automatically on the basis of broadcast messages. These services are not confirmed by the protocol, i.e. there is no control whether the message actually reaches the recipient.
8 PLC programming 8.5 8.5.2 Network variables Settings in the global variable list 8.5.2 Settings in the global variable list Create a new global list of variables. Here you define the variables to be exchanged with other controls. The transfer properties can be defined via the properties dialog of the variable list. ETC112 You can define the network properties of this variable list by pressing the button Add network connection.
PLC programming 8 Generate program Settings in the global variable list 8.6 8.5.2 Pack variables: If this option is enabled the variables will be combined to a transfer unit where possible. For UDP a transfer unit has a size of 256 bytes. If not all variables of the list fit into one transfer unit, several transfer units will be created for this list. If the option is disabled, each variable will go into its own transfer unit.
8 PLC programming 8.7 8.7.1 Interface to the ETC Data blocks 8.7 Interface to the ETC 8.7.1 Data blocks The integrated PLC has an internal RAM range available which is divided into 16 so−called data blocks. Each data block (DB) contains 256 data words (DW) of 16 Bit. 8.7.2 System variables of the ETCxC The system variables represent a predefined number of variables from the data blocks.
EDSTCXN EN 2.0 PLC programming 8 Interface to the ETC System variables of the ETCxC 8.7 8.7.2 DB1_sps2nc_programmstop_b %MB1.12.0 DB1_sps2nc_unterbrechen_bit %MX1.12.8 DB1_sps2nc_einzel_folgesatz_bit %MX1.13.0 DB1_sps2nc_satzausblenden_bit %MX1.13.8 DB1_sps2nc_rueckzug_bit %MX1.14.0 DB1_sps2nc_tastensignale_aw %MW1.16 ARRAY[0..1] OF WORD DB1_sps2nc_qbit_signale_aw %MW1.18 ARRAY[0..3] OF WORD DB1_sps2nc_freigaben_mmi_w %MW1.31 DB1_sps2nc_mfkt_quitt_bit %MX1.32.
8 PLC programming 8.7 8.7.2 Interface to the ETC System variables of the ETCxC DB1_nc2sps_sfkt_strobe_bit %MX1.159.0 DB1_nc2sps_sfkt_w %MW1.160 DB1_nc2sps_tfkt_strobe_bit %MX1.168.0 DB1_nc2sps_tfkt_w %MW1.169 DB1_nc2sps_refpunkt_angefahren_w %MW1.177 DB1_nc2sps_endschalter_plus_w %MW1.178 DB1_nc2sps_endschalter_minus_w %MW1.179 DB1_nc2sps_referenznocken_w %MW1.180 DB1_nc2sps_reserveeingang_w %MW1.181 DB1_nc2sps_slave_endschalter_plus_w %MW1.
8.7.3 PLC programming 8 Interface to the ETC System variables of the ETCxM 8.7 8.7.3 System variables of the ETCxM Currently the data blocks of the PLC are freely available as data memory for the ETCxM. 8.7.4 Using machine constants in the ETCxC In the ETCxC the machine constants MK_DW224_255 [MC_DW224_255] are freely available to store machine−specific values. For the ETCxC these are shown in the data block 2 after data word 224, so that the content can be read by the PLC.
8 PLC programming 8.7 8.7.7 Interface to the ETC Operating data of the ETCxC 8.7.7 Operating data of the ETCxC The control features an operating data field where so far only 2 entries from the control are being used. The entries are accessible via the functions READ_SYSPARAM and WRITE_SYSPARAM.
8.8 PLC programming 8 Library General functions 8.8 8.8.1 Library The functions and functional blocks of the two axis representations ETCxC and ETCxM are the same barring a few exceptions. Nonetheless there is an ETC system library for each variant: ETCxC: SysEtc.LIB ETCxM: SysETCxM.LIB All functions are described in detail below. They are found in both libraries. Special functions of the variant are highlighted. 8.8.1 General functions 8.8.1.
8 PLC programming 8.8 8.8.1 Library General functions 8.8.1.3 Declaration Format FUNCTION FORMAT: INT VAR_INPUT string_s : STRING(255); (* target string *) FORMAT_S : STRING(80); (* Format string *) PARAMETER_P : DINT; (* Address of a structure or variable *) END_VAR Description All characters in the format string which are not part of the format definition will be copied into STRING_S.
Example PLC programming 8 Library General functions 8.8 8.8.1 TYPE TEST_R STRUCT Dw : DWORD; l : LREAL; END_STRUCT END_TYPE s_s : STRING(80); ret_i : INT; di : DINT; t_r : TEST_R; One parameter: di : 345; ret_i : = FORMAT(s_s, ’%d’, ADR(di)); ret_i = 4; s_s = >−345’ Several parameters: t_r.dw 8.8.1.4 : = 123; t_r.lr : = 4.321; ret_i : = FORMAT(s_s, ’1: %u, 2: %f’, ADR(t_r)); ret_i = 19; s_s = ’1: 123, 2: 4.
8 PLC programming 8.8 8.8.1 Library General functions 8.8.1.5 Declaration GetMacAddr (nur ETCxM) FUNCTION GetMacAddr: BOOL VAR_INPUT pMac : DINT; (* Address of an array of the teyp ARRAY[0..5] OF BYTE *) END_VAR Description With this function the MAC address of the Ethernet controller of the control can be read. The function must be passed the address of a memory area of 6 bytes (see example). The return value of the function indicates whether the address could be read. Example ret_bit 8.8.1.
8.8.1.7 PLC programming 8 Library General functions 8.8 8.8.1 IO_SET Declaration FUNCTION IO_SET: BOOL VAR_INPUT byte_w : WORD; bit_w : WORD; END_VAR Description The function inverts the state of an output. In the output byte byte_w (value range 0 ... 31) the bit bit_w (value range 0 ... 7) will be inverted. The return value of the function is of no consequence. Example IO_SET(1,3); 8.8.1.8 inverts the output Q0.
8 PLC programming 8.8 8.8.1 Library General functions 8.8.1.10 Declaration READ_PARAM_DINT (only ETCxC) FUNCTION READ_PARAM_DINT: DINT VAR_INPUT IDX_DI : DINT; (* Parameter index *) END_VAR Description 8.8.1.11 Declaration The function returns the value of the parameter idx_di (as data type DINT) from the P field. READ_PARAM_REAL (only ETCxC) FUNCTION VAR_INPUT IDX_DI : DINT; (* Parameter index *) END_VAR Description 8.8.1.
8.8.1.14 PLC programming 8 Library General functions 8.8 8.8.1 READ_TOOLDATA (only ETCxC) Declaration FUNCTION READ_TOOLDATA: INT VAR_INPUT tnr_dw : DWORD; * T (tool number) *) anzahl_dw : DWORD; (* number of tool data *) puffer_p : DINT; (* Address after which the data should be stored *) END_VAR Description The function reads the tool data for the defined T (tools).
8 PLC programming 8.8 8.8.1 Library General functions 8.8.1.15 SAVE_PARAM (only ETCxC) Declaration FUNCTION SAVE_PARAM: DINT VAR_INPUT dateiname_s : STRING(15); pindex_di : DINT; (* "device:filename" *) (* P field index *) anzahl_di : DINT; (* number of the P field values *) END_VAR SAVE_PARAM saves anzahl_di P field values after index pindex_di under the file name " dateiname_s" on the RAM disk (device: rd), in the FLASHPROM (device: sd) or on a floppy disk (device: fd).
8.8.1.17 PLC programming 8 Library General functions 8.8 8.8.1 SETINPUT_WORD Declaration FUNCTION SETINPUT_WORD: BOOL VAR_INPUT WORD_W : WORD; VAL_W : WORD; (* No. of the data word *) END_VAR The function executes a boolean OR operation with the value val_w and the data word word_w of the input process image and writes the result to the same data word. Description Return value FALSE indicates a wrong transfer parameter.
8 PLC programming 8.8 8.8.1 Library General functions 8.8.1.19 Declaration SPSERROR FUNCTION SPSERROR: BOOL VAR_INPUT fehler_di] : DINT; (* error number *) klasse_dw : DWORD; (* error class *) formatstring : STRING(80); (* Format string *) PARAMETER_P : DINT; (* Address of a structure containing the parameters *) END_VAR Description The function places an error message which is displayed on a connected control terminal.
PLC programming 8 Library General functions 8.8 8.8.1 Format string: The % sign in a format string opens a format definition with the general form: % Flag output field lengths Accuracy Data type definition Flag flush right, leading spaces / nulls − flush left, following spaces / nulls + Always output operational sign Output field length 0n min. n digits, fill with nulls n min. n digits, fill with spaces Accuracy 6 digits .0 do not output a decimal point .n output max.
8 PLC programming 8.8 8.8.1 Library General functions 8.8.1.20 SETLANGUAGE (only ETCxM) Declaration FUNCTION SETLANGUAGE: BOOL VAR_INPUT Language : INT; END_VAR This function switches between different output text languages. Language = 0 selectes the output text files ncrspch0.txt/spsspch0.txt, language = 1 the files ncrspch1.txt/spsspch1.txt etc. Description The return value of the function is of no consequence. Example SETLANGUAGE(4); Output text files ncrspch4.txt and spsspch4.
8.8.1.23 PLC programming 8 Library General functions 8.8 8.8.1 SYSERROR Declaration FUNCTION SYSERROR: BOOL VAR_INPUT fehler_di : DINT; (* error number *) klasse_dw : DWORD; (* error class *) formatstring : STRING(80); (* Format string *) PARAMETER_P : DINT; (* Address of a structure containing the parameters *) END_VAR The function SYSERROR is used like the function SPSERROR. Description This function can be used to display control−internal errors. 8.8.1.
8 PLC programming 8.8 8.8.1 Library General functions 8.8.1.25 Declaration WordWrap FUNCTION WordWrap: INT VAR_INPUT string_s : STRING(255); (* String, which is to be reformatted *) linelen_di : DINT; (* maximum line length *) END_VAR Description The function automatically enters a line break into the string if the line length exceeds the value stated. The return value is the resulting total length of the string.
8.8.1.28 PLC programming 8 Library General functions 8.8 8.8.1 WRITE_PARAM_REAL (only ETCxC) Declaration FUNCTION WRITE_PARAM_REAL: BOOL VAR_INPUT IDX_DI : DINT; (* Parameter index *) VAL_R : REAL; (* value *) END_VAR The function writes the value val_i at the location idx_di into the P field. The return value FALSE indicates an error. Description 8.8.1.
8 PLC programming 8.8 8.8.1 Library General functions 8.8.1.
8.8.2 V24 functions 8.8.2.1 ALLOCV24 Declaration PLC programming 8 Library V24 functions 8.8 8.8.2 FUNCTION AllocV24: DINT VAR_INPUT unit_di : DINT; (* Interface: COM1 (X3), COM2 (X4) *) pri_di : DINT; (* Priority (−128 ... +127) *) END_VAR Description A V24 interface must be allocated with AllocV24() before it can be used. It can then be initialised as required with InitV24(). The request is only met if the interface is available or the request priority is higher than the actual priority.
8 PLC programming 8.8 8.8.2 Library V24 functions 8.8.2.2 INITV24 Declaration FUNCTION InitV24: DINT VAR_INPUT req_pr : DINT; mode_dw : DWORD; flags_dw : DWORD; (* Address of the V24 request structure *) END_VAR This function is used to set up the interface parameters of a V24 interface allocated with AllocV24. Description ƒ mode_dw results from the OR combination of mode bits (¶ 391). ƒ flags_dw results from the OR combination of flag bits (¶ 391).
8.8.2.4 PLC programming 8 Library V24 functions 8.8 8.8.2 READBLOCKV24 Declaration FUNCTION ReadBlockV24: DINT VAR_INPUT pRequest : DINT; pBuffer : DINT; (* Address of the V24 request structure *) (* Address of a data buffer *) BufSize : INT; (* Buffer size in byte *) END_VAR Description The function reads max. BufSize characters in the stated data buffer pBuffer from the V24 reception buffer. The function returns the number of characters read from the reception buffer. 8.8.2.
8 PLC programming 8.8 8.8.2 Library V24 functions 8.8.2.7 WRITEV24 Declaration FUNCTION WriteV24: DINT VAR_INPUT req_pr : DINT; (* Address of the V24 request structure *) chr_di : DINT; (* character to be written *) END_VAR Writing a character into the send buffer. The send buffer is implemented as FIFO and is read and written a character at a time. Description This function always provides an immediate return even if the FIFO is full.
8.8.2.9 PLC programming 8 Library V24 functions 8.8 8.8.2 CLRTXBUFFER Declaration FUNCTION ClrTxBuffer: BOOL VAR_INPUT req_pr : DINT; (* Address of the V24 request structure *) END_VAR Description This function can be used to delete the sender FIFO. The return value of the function is of no consequence. Example requestV24_p : DINT; requestV24_p : = ALLOCV24(1, 127); CLRTXBUFFER(requestV24_p); EDSTCXN EN 2.
8 PLC programming 8.8 8.8.2 Library V24 functions 8.8.2.
8.8.3 FILE IO functions 8.8.3.1 LOAD Declaration PLC programming 8 Library FILE IO functions 8.8 8.8.3 FUNCTION LOAD: DINT VAR_INPUT Name : STRING(15); (* ’device:file name’ *) daten_paten_p : DINT; (* Address after which the data should be stored *) len : INT; (* Length of the data in bytes *) END_VAR Description This function is used to read data from a device (¶ 390). From the file name len bytes will be read from the defined device and stored after the the memory address daten_p.
8 PLC programming 8.8 8.8.3 Library FILE IO functions 8.8.3.3 SetCurrentPath Declaration FUNCTION SetCurrentPath: DINT VAR_INPUT path_s : STRING(40); (* device name and path *) END_VAR Defines the actual default drive and the directory path for the file IO functions of the device drivers (¶ 390). With the directory path the IP address of the CNC data server (network disk) can be defined. Description Return value: The function returns an error code (¶ 391). Example 8.8.3.
8.8.3.5 PLC programming 8 Library FILE IO functions 8.8 8.8.3 SYSCLOSEFILE Declaration FUNCTION SYSCLOSEFILE: DINT VAR_INPUT handle_di : DINT; END_VAR Description The function is used to close a file previously opened with SysOpenFile(). The content of the FLASHPROMs is only updated in the FLASHPROM after the last file opened for write−access has been closed. The return value of the function is less than 0 for an error (all error codes are defined in the global constants of the library).
8 PLC programming 8.8 8.8.3 Library FILE IO functions 8.8.3.7 SYSREADLINE Declaration FUNCTION SYSREADLINE: DINT VAR_INPUT handle_di : DINT; (* File handle returned by SysOpenFile *) buffer_p : DINT; (* Address of a buffer where the data are stored *) maxlen_di : DINT; (* Buffer length in byte *) END_VAR The function is used for the reading of lines (in sequence) from a file previously opened with SysOpenFile().
8.8.3.9 PLC programming 8 Library FILE IO functions 8.8 8.8.3 SYSREMOVEFILE Declaration FUNCTION SYSREMOVEFILE: DINT VAR_INPUT filename_s : STRING(15); (* file name *) END_VAR Description The function is used to delete a file from the FLASHPROM, the RAM disk or the FLOPPY. Parameters filename_pc: 8.8.3.10 Name of the file to be deleted. Optionally with preceding device ID and colon ^ 390.
8 PLC programming 8.8 8.8.3 Library FILE IO functions 8.8.3.
8.8.3.12 PLC programming 8 Library FILE IO functions 8.8 8.8.3 SYSDISKINFO Declaration FUNCTION SYSDISKINFO: DINT VAR_INPUT info_p : DINT; (* Address of a variable of type DISKINFO_TR *) pattern_s : STRING(15); (* search pattern *) END_VAR Description The function detects the usage data for a device and stores it in the disk info structure defined.
8 PLC programming 8.8 8.8.3 Library FILE IO functions 8.8.3.13 Device driver The control supports different devices with write (w), and for some devices, read (r) access. The access takes place via a file system. A file must be opened using the function SysOpenFile() before it can be accessed. With the exception of the device "Printer" several files can be opened simultaneously on a device. In total four simultaneously opened files are possible. The file names must comply with the DOS 8.
8.8.3.14 PLC programming 8 Library FILE IO functions 8.8 8.8.3 Global constants for File IO functions Constant EDSTCXN EN 2.
8 PLC programming 8.8 8.8.
8.8.4 Memory access functions 8.8.4.1 DEFDATATYPES Declaration PLC programming 8 Library Memory access functions 8.8 8.8.4 FUNCTION DEFDATATYPES: BYTE VAR_INPUT iRange : INT; sDescriptor : STRING(255); END_VAR Description The function defines the data types in DB2 and thereby the required byte swapping during the data transfer between NCR and MMI. Currently, two ranges are being differentiated: Range 1 of word 0 ... 127 contains data from the PLC to MMI, range 2 of word 128 ...
8 PLC programming 8.8 8.8.4 Library Memory access functions Example At the beginning of DB2 in range 1 of %MW2.0 to %MW2.16 there are 10 BYTE, 2 WORD, 3 DINT and 1 LREAL. In range 2 of %MW2.128 to %MW2.158 there are 5 WORD, 8 DWORD and 5 WORD in the order stated. The definition is given as follows: DEFDATATYPES(1,’10b2w3d1l’) DEFDATATYPES(2,’5w8d10w’) If a message interface in DB2 is used between PLC and HMI and the messages use different data types than WORD, additional adaptations are required.
8.8.4.2 PLC programming 8 Library Memory access functions 8.8 8.8.4 GET_BYTE, GET_WORD, GET_DWORD, GET_INT, GET_DINT, GET_REAL, GET_LREAL Declaration FUNCTION GET_TYPE : BYTE VAR_INPUT pAddress : DINT; (* memory address *) END_VAR The functions GET_TYPE read the corresponding data type TYPE from the address stated and carry out the required byte swapping (see also DEFDATATYPES). Description 8.8.4.
8 PLC programming 8.8 8.8.4 Library Memory access functions 8.8.4.5 MEMSET Declaration FUNCTION MEMSET: BOOL VAR_INPUT pMem : DINT; (* memory address *) bValue : DINT; (* value *) dwSize : DINT; (* number of bytes *) END_VAR Description dwSize bytes after memory address pMem with a value bValue will be written. Example feld_ab : ARRAY[0..10] OF BYTE; MEMSET( ADR(feld_ab[0]), 0, SIZEOF(feld_ab) ); 8.8.4.
Example PLC programming 8 Library Memory access functions 8.8 8.8.4 TYPE DATA_TR : STRUCT var1 : DINT; var2 : DINT; END_STRUCT END_TYPE byte_di : DINT; descstring_s : STRING(10) := ’2d’; data_st : DATA_TR := (var1:=16#FF, var2:=16#123456); buf_ab : ARRAY[0..20] OF BYTE; byte_di := MOVESWAPPED(ADR(buf_from), ADR(data_st), descstring_s); Result: byte_di = 8, buf_from[0] = 16#FF, buf_from[4] = 16#56, buf_from[5] = 34, buf_from[6] := 16#12 All other elements of the array are equal to 0. 8.8.
8 PLC programming 8.8 8.8.5 Library CANopen functions 8.8.5 CANopen functions 8.8.5.
PLC programming 8 Library CANopen functions 8.8 8.8.5 Type is a lower−case letter describing the size of the data type as follows: Type Codesys data type Size B BYTE 8 Bit W BOOL, WORD, INT 16 Bit D DWORD, DINT, REAL 32 Bit The return value is TRUE if the function has been executed successfully. Otherwise the function could not be executed, e.g. due to lack of memory. ) Note! The database should only be as large as required by the data actually used.
8 PLC programming 8.8 8.8.5 Library CANopen functions 8.8.5.2 Declaration CopXDefineDS403 (only ETCxM) FUNCTION CopXDefineDS403: BOOL (* Defines the global database for a CANopen control element in accordance with DS403 for 1/2 CAN Bus *) VAR_INPUT CanNum_b : BYTE NodeID_b : BYTE DataBase_p : DINT; Len_w : WORD; Datatypes_s : STRING(255); ReadDataObject : WORD; WriteDataObject : WORD; END_VAR Parameters Description 8.8.5.
8.8.5.4 PLC programming 8 Library CANopen functions 8.8 8.8.
8 PLC programming 8.8 8.8.5 Library CANopen functions The return value is TRUE if the read request could be passed to the transfer queue, otherwise the transfer queue is already full. Example Status Meaning 0 Inactive 1 Request in transfer queue 2 Transfer active 3 Transfer completed successfully 4 Transfer cancelled 5 Timeout status_b devicetype_dw CopReadObject(1, 16#1000, 0, COP_UNSIGNED32_KW, ADR(devicetype_dw), SIZEOF(devicetype_dw), ADR(status_b)); 8.8.5.
8.8.5.6 PLC programming 8 Library CANopen functions 8.8 8.8.
8 PLC programming 8.8 8.8.5 Library CANopen functions The function returns TRUE if the write request has been passed to the transfer queue, otherwise the transfer queue is already full.
8.8.5.8 PLC programming 8 Library CANopen functions 8.8 8.8.
8 PLC programming 8.8 8.8.5 Library CANopen functions 8.8.5.
8.8.5.10 PLC programming 8 Library CANopen functions 8.8 8.8.5 CopXEnableSync (only ETCxM) Declaration FUNCTION CopXEnableSync: DINT (* Releasing the Sync message *) VAR_INPUT CanNum_uc : BYTE; END_VAR Parameters CanNum_uc Description Calling this function enables the sending of the CANopen Sync message by the PLC. The Sync messages will be sent with the cycle time of the PLC task calling the function. Number of the CAN Bus (1 or 2) The function returns the following values: Return value 8.
8 PLC programming 8.8 8.8.5 Library CANopen functions 8.8.5.12 Declaration CopyChannelDisplayData (only ETCxC) FUNCTION CopyChannelDisplayData: BOOL (* updates the channel−dependent data of the NCR in the transferred structure *) VAR_INPUT kanal_b : BYTE; data_pst : POINTER TO CHANNELDATA_TR; END_VAR Parameters Description 8.8.5.
8.8.5.15 PLC programming 8 Library CANopen functions 8.8 8.8.5 Global constants for CANopen functions These constants are intended as transfer parameters "DataType" for the functions CopReadObject() and CopWriteObject(). The values of the constants comply with CiA DS301 "Application Layer and Communication Profile".
8 PLC programming 8.8 8.8.6 Library CAN functions (only ETCxM) 8.8.6 CAN functions (only ETCxM) 8.8.6.1 DefineCanMsg (only ETCxM) Declaration FUNCTION DefineCanMsg: DINT VAR_INPUT CanNum_w : WORD; (* Number of the CAN interface − 1 or 2 *) WriteCobId_w : WORD; (* CobId: ETCxM → CAN node *) ReadCobId_w : WORD; (* CobId: CAN node → ETCxM *) QueueSize_w : WORD; (* Number of messages being buffered *) END_VAR Description Creating and initialising a structure for managing CAN transfers.
8.8.6.3 PLC programming 8 Library CAN functions (only ETCxM) 8.8 8.8.6 DelCobIdCanMsg (only ETCxM) Declaration FUNCTION DelCobIdCanMsg: BOOL VAR_INPUT handle_pr : DINT; (* Handle on the management structure *) CobId_w : WORD; (* CobId *) END_VAR Description This function removes a CobId from the management structure (see function DefineCanMsg()) for CAN transfers. The return value of the function is of no consequence.
8 PLC programming 8.8 8.8.6 Library CAN functions (only ETCxM) 8.8.6.5 Declaration ClearCanMsg (only ETCxM) FUNCTION ClearCanMsg: BOOL VAR_INPUT handle_pr : DINT; (* Handle on the management structure *) END_VAR FUNCTION Description This function can be used to delete the reception FIFO (see function DefineCanMsg()). The return value of the function is of no consequence. Example handle_pr : DINT; handle_pr = DefineCanMsg(1, 1014, 1114, 32); ClearCanMsg(handle_pr); 8.8.6.
Example handle_pr : DINT; received_bit : BOOL; msg_st : CAN_MSG_TR; PLC programming 8 Library CAN functions (only ETCxM) 8.8 8.8.6 handle_pr = DefineCanMsg(1, 1014, 1114, 32); handle_pr = DefineCanMsg(1, 1014, 1114, 32); 8.8.6.
8 PLC programming 8.8 8.8.7 Library MMI communication functions 8.8.7 MMI communication functions 8.8.7.1 GetApplicationMessage Declaration FUNCTION_BLOCK GetApplicationMessage (* fetches a message with up to 512 Byte user data from the MMI *) VAR_INPUT data_pab : POINTER TO ARRAY[0..
PLC programming 8 Library MMI communication functions 8.8 8.8.7 If a message from HMI is available when calling GetApplicationMessage, OK is set to TRUE and the message copied into the defined buffer. The function provides an immediate return in any case, even if no message from HMI is available. In that case OK is set to FALSE. By evaluating sb1_b the message can be identified by the PLC. The definition of control blocks must take place between the PLC and MMI developer.
8 PLC programming 8.8 8.8.7 Library MMI communication functions Description With this function the PLC can send a message of type SB0_SPSAUFTRAG_KUC (SB0=14) with up to 512 Byte user data to HMI. Here the message buffer between NCR and MMI in the dual port RAM will be used. The function can be used together with GetApplicationMessage to establish a fast message communication between the PLC and MMI. In data_pab a pointer to a buffer containing the user data to be sent can be transferred.
8.8.8 Realtime clock (only ETCxM) 8.8.8.1 RTC_GetTime_DT (only ETCxM) Declaration PLC programming 8 Library Realtime clock (only ETCxM) 8.8 8.8.8 FUNCTION RTC_GetTime_DT: BOOL VAR_INPUT GetTime_pr : DWORD; END_VAR Description This function allows for the realtime clock of the control to be read. The function must be given the address of a variable of type DT (see example). The return value TRUE of the function indicates that the time could be read.
8 PLC programming 8.9 8.9.1 Library ServerSDO.lib InitServerSdo 8.9 Library ServerSDO.lib 8.9.1 InitServerSdo Declaration FUNCTION InitServerSdo: BOOL VAR_INPUT Max_NetVarODIdx : UINT; pNetVarOD : POINTER TO NetVarOD_CAN; END_VAR Parameters Max_NetVarODIdx maximum index pNetVarOD Pointer to the object directory Description This function announces an object directory for the data transfer with a CANopen client to the runtime system.
Contents 9 i Index A AddCobIdCanMsg, 410 address CAN, 58 Addressing − Data block, 350 − I/O module, 349 Addressing , 349 ALLOCV24, 377 Appendix, 321 application, as intended, 12 application as directed, 12 Arithmetic operations, 172 Automation system, Example, 13 B Block extensions, 174 Block preprocessing, 90 boot monitor, call, 83 Bootloader, 363 Bus termination − CAN bus, 15 − ME bus, 15 C CAN − address, 58 − Bus termination, 15 − Configuring Master, 344 − Searching modules, 348 − Slave configurati
i Contents general, 361 GET_BYTE, 395 GET_DINT, 395 GET_INT, 395 GET_LREAL, 395 GET_REAL, 395 GET_WORD, 395 GetApplicationMessage, 414 GetFirmwareVersion, 363 GetMacAddr, 364 GetUserParam, 364 INITV24, 378 IO_SET, 365 LOAD, 376 , 383 LOAD_PARAM, 376 Load_Param, 365 MEMCOMP, 395 MEMCOPY, 395 MEMSET, 396 OVESWAPPED, 396 PUT_BYTE, 397 PUT_DINT, 397 PUT_DWORD, 397 PUT_INT, 397 PUT_LREAL, 397 PUT_WORD, 397 PutApplicationMessage, 415 READ_PARAM_DINT, 366 READ_PARAM_INT, 365 READ_PARAM_LREAL, 366 READ_PARAM_REAL
Contents CopyCyclicDisplayData, 408 CopyDiagDisplayData, 408 cycle programming, 310 , 325 D Data block, 63 Data block 0, 242 Data block 1, 245 Data block 15, 273 Data block 2, 268 Data block 8 ...
i Contents − Mmigtway.ini, 283 − operating mode , 277 − start, 277 − Version information, 282 ETCHx − connect with PC, 16 − Connections, 15 − Description, 13 − IP address, 28 − operating mode, 25 − start, 21 ETCPx − Description, 13 − install, 31 ETCxC.mk, 39 Ethernet interface, 338 Example − Automation system, 13 − PLC program, 60 example, CNC program, 47 F Fault elimination, monitor interface, 24 File − EDS, 55 − ETCxC.mk, 39 file, DelphMMI.
Contents i − READ_TOOLDATA, 367 − READBLOCKV24, 379 − ReadCanMsg, 412 − READV24, 379 − RTC_GetTime_DT, 417 − RTC_SetTime_DT, 417 − SAVE, 376 , 383 − SAVE_PARAM, 368 , 376 − SetCurrentPath, 384 − SETINPUT_BIT, 368 − SETINPUT_WORD, 369 − SETLANGUAGE, 372 − SINGLEBLOCK, 369 − SPSERROR, 370 − STRTOF, 372 − STRTOL10, 372 − SYSCLOSEFILE, 385 − SYSDISKFORMAT, 387 − SYSDISKINFO, 389 − SYSERROR, 373 − SYSFIRSTFILE, 388 − SYSNEXTFILE, 388 − SYSOPENFILE, 384 − SYSREADFILE, 385 − SYSREADLINE, 386 − SYSREMOVEFILE, 387
i Contents G195 Absolute coordinate shift , 158 GET_BYTE, 395 G20 Block jump, 108 GET_DINT, 395 G200 Geometry filter , 159 GET_DWORD, 395 G201 Change the acceleration and deceleration ramps, 160 GET_INT, 395 GET_LREAL, 395 G209 Set the geometry counter, 161 GET_REAL, 395 G211 Transformation for two−axle articulated robot kinematics, 161 GET_WORD, 395 GetApplicationMessage, 414 G22 Subprogram call, 109 GetFirmwareVersion, 363 G226 Reconfigure hardware limit switch, 163 GetMacAddr, 364 G233
Contents Load_Param, 365 i MK_EPSILONGRAD, 197 MK_EPSILONMM, 197 M MK_FEHLERRESTART, 197 M functions, 175 MK_GENAUHALTZEIT , 210 M−function, basics, 46 MK_GEWINDE_VMAX, 224 MAC address, 29 MK_GRUNDOFFSET, 210 Machine constants, 95 , 160 , 359 − adapt file, 41 , 42 − check, 43 , 44 − Configuration of axes, Assignment and evaluation, 207 − Configuration of axes, Basics, 204 − Configuration of axes, Controller settings, 211 − Configuration of axes, Correction of axes, 215 − Configuration of axes, H
i Contents MK_SW_ENDS_PLUS, 210 MK_T_BAHNBESCHL, 214 Overview − Arithmetic operations, 172 − G function, 91 − Machine constants, 226 − machine constants, 36 MK_T_BESCHL , 213 OVESWAPPED, 396 MK_SYNCHRONABWEICHUNG, 220 MK_SYNCHRONOFFSET , 220 MK_T2, 211 MK_TECHNOLOGIEDATEN, 221 MK_TEST_OHNEMECHANIK, 192 MK_VBAHNMAX, 214 MK_VMAX, 213 MK_VOREINSTELLUNG, 193 MK_WEG, 209 , 218 MK_WLK_C_GRENZWINKEL, 223 MK_WLK_C_OFFSET, 223 MK_WLK_VERWEILZEIT, 224 MK_X_WINKEL, 224 Mmigtway.
Contents PUT_WORD, 397 SYSDISKINFO, 389 PutApplicationMessage, 415 SYSERROR, 373 Q Q field, 189 Q functions, 177 R READ_PARAM_DINT, 366 READ_PARAM_INT, 365 READ_PARAM_LREAL, 366 READ_PARAM_REAL, 366 READ_SYSPARAM, 366 READ_TOOLDATA, 367 READBLOCKV24, 379 ReadCanMsg, 412 READV24, 379 SYSFIRSTFILE, 388 SYSNEXTFILE, 388 SYSOPENFILE, 384 SYSREADFILE, 385 SYSREADLINE, 386 SYSREMOVEFILE, 387 System variables, 63 , 356 , 359 SYSWRITEFILE, 386 T T functions, 179 Target system settings, 353 Target system set
Q Lenze Drive Systems GmbH Hans−Lenze−Straße 1 D−31855 Aerzen Germany ( ( Service Ê Service +49h(0)h51h54h82−0 E−Mail Internet Lenze@Lenze.de www.Lenze.com EDSTCXN EN 2.