Home

XC-CPU202

image

Contents

1. T ES yY yY lt 76 ww OOL amp 6 amp 9 G9 amp G9 6 69 6o n suu amp amp amp amp 69 amp 69 o amp 9 amp ES 3 E 00 mmm Y XIOC BP XC1 XIOC BP XC Module rack VW 141 XV 06 14 MN05003001Z EN www eaton eu XV XC CPU202 Modular PLC XC CPU201 13 Appendix 13 6 Technical Data 13 6 Technical Data XC CPU201 EC256 8DI 6DO XV XC CPU201 EC512 8DI 6DO XV XC CPU202 EC4M 8DI 6D0 XV General Standards IEC EN 61131 2 EN 50178 Ambient temperature C 0 55 Storage temperature C 25 70 ounting position Horizontal Relative humidity non condensing IEC EN 60068 2 30 10 95 Air pressure in operation hPa 795 1080 Vibration resistance 5 8 4 Hz 3 5 mm 8 4 150 Hz 1 0 g echanical shock resistance 15 g 11
2. sssssssssee me 5 9 4 Address range ssssssssssssssseeme e enn nnne enn nnne nennnnnes 5 9 5 Free assignment or modification of addresses of input output modules and diagnostic addresses nnnnenn 5 9 6 Run Automatic calculation of addresses en 5 10 Digos tC Sker aisee et a e EE E 6 Connection set up PC XC200 sess 6 1 Connection set up via RS 232 interface een 6 2 Defining changing the PC s communication settings 6 2 1 Changing the CPU s communication settings 6 3 Connection set up with Ethernet sssssssssssee 6 3 1 Selecting communication channel and address 6 4 Scan modify the P address si uide e tds 7 Setting system parameters via the Startup ini file 7 1 OVEIVIEW Z3 Parameters in the Startupant Hessens 7 2 otr cture of the IR TG Saen a ea 7 3 Creating the Startup ini TO deti an 7 4 Entry of the ini file HOST NAME nn 7 4 1 Switch on of the control with inserted memory card with XCSTARTUPnI file ur ioo ete re deett ett ete tees 7 4 2 Alter parameters ssssssssssssssssssssssee eene nennen nnne nnns 743 Deleting the Startup iri files 8 Programming via CAN open Network Routing 8 1 Prerequisite Sorsi ni eee euin erdt edits seele 8 2 Routing features of
3. WARNING Warns of the possibility of hazardous situations that could result in serious injury or even death DANGER Warns of hazardous situations that result in serious injury or death 0 2 3 Tips Indicates useful tips teppe gt Indicates instructions to be followed Select File gt New means activate the instruction New in the File menu 6 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu O About this manual 0 3 Additional documentation 0 3 Additional documentation At different points in this manual references are made to more detailed descriptions in other manuals These manuals are described with their title and documentation number e g MN05002002Z DE All manuals are available in PDF format If for some reason they are not supplied on the product CD they are available for download as PDF files To find the manuals required go to the following Internet address http www eaton eu gt Customer Support gt Download Center Documentation and enter the documentation number in the quick search box Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 7 1 Design of the XC200 PLC 1 1 Rack 1 Design of the XC200 PLC 1 1 Rack The XC200 PLC is designed for use in machine controls and systems With an RS232 Ethernet interface for connection of a programming device the central coupling of XIOC signal
4. Figure 129 UIP GetFirstuserlPAddress Table 92 Input variables for UIP GetFirstuserlPAddress Input variables Meaning IPAddress Points to wildcard for the user table entry to be determined IPMask Points to wildcard for the user table entry to be determined Table 93 Return values for UIP GetFirstuserlPAddress ReturnVal Meaning TRUE Valid entry found FALSE The user IP address table does not contain an entry Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN050030017 EN www eaton eu 125 11 Libraries function blocks and functions 11 2 XC200 specific functions UIP GetNextUserlPAddress Reads the next user IP address entered from the user IP table UIP GETNEXTUSERIPADDRESS IPAddress POINTER TO DWORD UIP_GetNextUserlPAddress BOOL IPMask POINTER TO DWORD Figure 130 UIP_GetNextUserlPAddress Table 94 Input variables for UIP GetNextUserlPAddress Input variables Meaning IPAddress Pointer to DWORD wildcard for the user table entry to be determined IPMask Pointer to DWORD wildcard for the user table entry to be determined Table 95 Return values for UIP GetNextUserlPAddress ReturnVal Meaning TRUE Valid entry found FALSE The user IP address table does not contain any other entry UIP GetUserlPAddressCount Supplies the number of the user IP entries currently present in the user IP table UIP_GETUSERIPADDRESSCOUNT UIP GetUserlPAddressCount DWORD
5. Figure 11 Control panel layout D Clearance gt 50 mm 2 Clearance 75 mm to active elements 3 Cable duct 3 2 Preventing interference 3 2 1 Cable routing and wiring Cables are divided into the following categories e Electric power lines e g power cables carrying high currents or lines to current converters contactors solenoid valves e Control and signal cables e g digital input cables e Measurement and signal cables e g fieldbus cables gt Always route power cables and signal cables as far apart as possible This avoids capacitive and inductive coupling If separate cable routing is not possible then the first priority must be to shield the cable responsible for the interference Take care to implement proper cable routing both inside and outside the control panel to keep interference as low as possible gt Avoid parallel routing of sections of cable in different power categories gt As a basis rule keep AC cable separated from DC cables Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 21 3 Engineering 3 3 Lighting protection gt Keep to the following minimum clearance e at least 10 cm between power cables and signal cables e at least 30 cm between power cables and data or analog cables gt When routing cables make sure that the outgoing and return leads of a circuit pair are routed together The opposing currents on this cable pair cause the sum
6. saveretain Save retentive data in the file file name serialProgrammingOn Enable serial programming with CoDeSys on XC202 local COM2 port enables the local COM as a programming interface Factory setting Serial interface in programming mode serialProgrammingOff C Disable serial programming with CoDeSys on XC202 local COM2 port Disables the local COM as programming interface Serial interface in programming mode setcomconfig Set the baud rate of the serial interface setcomconfig 4800 9600 19200 38400 57600 115200 setcommunicationport Set the interface parameters for the TCP IP communication setipconfig Set Ethernet configuration setipconfig adr1 adr2 adr3 adr4 mask1 mask2 mask3 mask4 e g setipconfig 192 168 119 010 255 255 255 000 setipdns Set DNS address setipdns adr1 adr2 adr3 adr4 setipgateway c Set gateway address adr1 adr2 adr3 adr4 e g setipgateway 192 168 119 010 setipwins Set WINS address setipwins adr1 adr2 adr3 adr4 setlanguage Determine dialog language for error list deu eng fra ita setpwd Activate password for online access setrtc Set date and time YY MM DD HH MM SS e g setrtc 03 07 24 10 46 33 settargetname Set device name devicename e g settargetname test shutdown Accept changes registry save and switch off PLC startprg Start user program stopprg Stop user program tsk
7. 33 oem ete eel Ente RE LN Ur ke Een RR REFIERE 20 3 1 Controlpanel layout ur 20 3 1 1 Ventilation eno Entities eI Perf eae tien ep E e E eU 20 CN ES MEN S V GUA OD Unts se ELTE IST 21 3 2 Preventingiinterferenter qe Lie emeret ae 21 3 2 1 Cable routing and IRI ie dc ea 21 3 2 2 Suppressor circuit for interference sources euuuesuss 22 S2 9a DUBIO S Rm ee ene re ee ee EIL 22 3 3 Lighting Protection Lee etae Heli reti bie Meise Hal 22 3 3 1 External lightning protection 022ssssneeeneennnennnennnenenennnennn 22 3 3 2 Internal lightning protection neeeeneenennnnnnnnne nee 22 3 4 CODIGO Spare tC d cet atf ES LEE ET 23 3 4 1 Connecting the power Supply uu tenetis ae 23 3 4 2 Connecting inputs outputs central processing unit 23 3 4 8 Connecting the incremental encoder seesssssssssssss 24 3 4 4 Connecting Up dOWN coitu enar oan ioter stada trieste 25 345 Connecting interrupt aCtUastOle vue ood an 25 SAG Gonnget PCs Gk vel dae tr Pesbe iM vut lehnen nee tg dep 26 Modular PLC XC CPU201 XV XC CPU202 XV 08 13 MN05003001Z EN www eaton eu 1 Contents 3 5 3 5 1 3 5 2 3 5 3 4 4 1 4 1 1 4 1 2 4 1 3 4 2 4 2 1 4 2 2 4 3 4 3 1 4 3 2 4 3 3 4 3 4 4 3 5 4 3 6 4 3 7 4 4 4 4 1 4 4 2 4 4 3 4 5 4 5 1 4 5 2 5 5 1 5 1 1 5 1 2 5 2 5 2 1 5 3 5 3 1 5 3 2 5 4 5 4 1 5 5 5 5 1 5 5 2 5 5 3 5 5 4 5 5 5 5 5 6
8. S7 slot number on rack Figures 64 to 66 indicate the changes to the input output parameters of the signal modules in dependence on the slots and are compiled in Table 17 Table 17 Input output parameters with a change of configuration Figure Slot Module type Input parameter Output parameter 64 2 XIOC 16DX olW 6 OW 2 5 XIOC 8DI IB8 7 XIOC 2A0 U1 2A0 I2 OW 4 OW 6 OW 8 OW 10 65 2 XIOC 2A0 U1 2A0 I2 OW 2 OW 4 OW 6 OW 8 5 XIOC 16DX olW 6 OW 10 7 XIOC 8DI IB8 66 2 Slot not used 5 XIOC 8DI IB6 D XIOC 2A0 U1 2A0 I2 OW 2 OW 4 OW 6 OW 8 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 89 10 Configuration and parameterization of the inputs outputs 10 2 Inputs outputs for additional functions 10 2 Inputs outputs for additional functions 10 2 1 Incremental encoder Parameterization occurs in the PLC Configuration gt Activate the Other Parameters tab in the PLC Configuration window and click on the Configure Counter Encoder button 1 Settings Other Parameters j Settings Interrupt Sources Counter Input 10 4 Start Behaviour WARMSTART P 4 none z RS232 TCP gt CAN Routingsettings Ji i E d Configure Inputs Counter End Inputs 10 0 10 3 p Input 10 5 Digital Inputs 4 IO Interrupt 3 w Inc Encoder C 1x 32Bit Up Dow
9. Status View Definition RUN STOP SF Boot off on The serial boot loader starts and boots and or updates flashes at the operating system Windows CE is loaded from Flash Start memory and copied in unpacked form into memory and started Start operating off off Windows CE system start and system test are carried system flashes at Out Start Start of applications e HTTP Server e FIP Server e Telnet Server e PLC Runtime e Web Server STOP flashes off PLC in STOP state RUN on off PLC in RUN state Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 63 5 Program processing multitasking and system times 5 7 Web visualization 5 7 Web visualization Status View Definition RUN STOP SF RUN STOP flashes on Error in RUN state cycle time exceeded The system is set to the Halt state A Warm Reset command is automatically executed The occurrence of a fault will be protocolled in the Error List read with browser command geterrorlist NOTREADY flashes on No start possible A major fault prevents a start see Error List e g No program loaded e Field bus error e Configuration not OK e Checksum error e ShutDown flashes flashes Wait for the supply voltage to disconnect after shutdown browser command A description of the web visualization interface can be found in section 7 4 Web visualization of the manual for programming PLCs with CODESYS The XC CPU201 specific cal
10. 32 COMMISSIONING 00 0 0 eese 34 Communication Channel z v2 exutus exe DEP Eee DS 72 84 MOM rete Tae cel ERU gat E RUE 71 Parameters 2a urreni s CE eter epe ps 70 Communication with the target PLC 82 ComProgrammMming cut tl octet he Ghee ES 113 Configuration inputs outputs 87 Connection Incremental encoder 24 Inputs outputs sss esses 23 Interrupt actuators 005 25 PG i tel oa Ud en DEN EN ra od gre 26 Power supply and local inputs outputs 11 Up down counter 2 0 0 0 eae 25 Voltage supply 0 0005 23 Connection SetU viis Eumenis y Brae as 70 Control panel layouts 2244 se ei3 eect essa yews 20 COURTS S elon eset eti an et re oot tries ua vf 93 CPU Display of the operating states 34 Functional areas aoaaa anaana 9 Lodd 32 4 cose etate Leone orbis 131 EYClietask ausser oa 49 D B ta sec nlty es eb v E IR et 12 Data transfer block size 79 DEBUGGING oe 2308 Re Wee 34 128 Decrementing lslslssssssn 18 25 Diagnostics sosta sehr Pedy a2 69 128 Wid ABS ac ole an anne us ioo o sey on a gea 83 Dialog language for errors and event lists 133 Dimensions erdt tiet ars 141 Direct peripheral access Fail re Gode su IERI AA 63 Direct periphery access lusus 58 Documentation online 000006 7 Down counter or cet en RR
11. IO Interrupt 3 gt Set the cursor on the marked area and press the function key F2 Task configuration o EM Task configurati called P Called whe O Stop Called whe O IO Interrupt 1 Interrupt Ch O IO Interrupt 2 Interrupt Ch M l0 Interrupt 3 Interrupt Ch O IO Interrupt 4 Interrupt Ch M 10 Interrunt amp Interrint Ch g PLC_PRGO Help Manager IV Structured Figure 77 Allocation of Interrupt source POU The Help Manager window opens in which all predefined programs are listed gt Select the Fastprog POU and confirm with OK gt Save the project You can now test it The variable b is incremented by one with every rising edge on input 10 5 98 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 11 Libraries function blocks and functions 11 1 Using libraries 11 Libraries function blocks and functions 11 1 Using libraries The libraries contain IEC function blocks and functions that you can use for example for the following tasks e Data exchange through the CAN bus e Controlling the real time clock e Determining bus load of the CAN bus e _ Triggering interrupts e Sending receiving data through the interfaces The libraries are located in the following folders e Lib Common for all PLCs e Lib CPU100 and Lib CPU200 for PLCs XC100 and XC200 e Lib XN PLC CANopen for PLC XN PLC When you open a project
12. Multiple write access on output zn gure 45 Memory management Change the number of data segments 5 9 Addressing inputs outputs and markers If you open the PLC configuration of a new project you will receive the current view of the default settings of the addressing In this setting the addresses are automatically assigned and address conflicts overlaps are reported Kf PLC Configuration tion XC CPU202 EC4M 8DI 6DO x i AT IBO BYTE Local Inputs Counter AT IX1 0 BOOL State CHANNEL I AT 96 X1 1 BOOL NO CHANNEL 1 AT IX1 2 BOOL N1 CHANNEL 1 AT IX1 3 BOOL Error CHANNEL I AT IX1 4 BOOL Referencing activated AT 96 2 WORD Counter Value Low Vv y gt Settings Other Parameters Automatic calculation of addresses Check for overlapping addresses Save configuration files in project Figure 46 Default setting of the addressing If you add a module to the PLC in the configurator the configurator will assign this module with an address Further modules are assigned with the next addresses in ascending order You can also assign the addresses freely However if you access the Automatic calculation of addresses function later the addresses are shown in reassigned ascending order 5 9 1 Activate Automatic addresses The addresses are automatically assigned or modified if a module is changed or added
13. UTI2 psSubnetmask POINTER TO STRING 80 Figure 113 UTI2 SetlPConfig Table 60 Input variables for UTI2 SetlPConfig Input variables Meaning UTI2 pslPAddress Pointer to a string variable which contains the IP address to be written UTI2_psSubnetmask Pointer to a string variable which contains the value to be entered from the subnet mask Table 61 Return values for UTI2 SetlPConfig ReturnVal Meaning 1 Write successful 0 Write failed general fault 4 No valid pointer transferred UTI2_SetIPDNS Setting of the IP address of a DNS server in the registry if necessary must be saved with UTI2_SaveRegistry UTI2_SETIPDNS UTI2 psIPDNS POINTER TO STRING 80 UTI2 SetlPDns BYTE Figure 114 UTI2_SetIPDNS Table 62 Input variables for UTI2_SetIPDns Input variables Meaning UTI2_psIPDns Pointer to a string variable which contains the IP address to be written Table 63 Return values for UTI2 SetlPDns ReturnVal Meaning 1 Write successful 0 Write failed 4 No valid pointer transferred Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 11 Libraries function blocks and functions 11 2 XC200 specific functions UTI2 SetlPGateway Setting IPGateway address UTI2 SETIPGATEWAY UTI2_psIPGatewayAddress POINTER TO STRING 80 UTI2 SetlPGateway BYTE Figure 115 UTI2 SetlPGateway Table 64 Input variables for UTI2 SetlPGateway Inp
14. UTI2 psSubnetmask Pointer to a string in which the read address of the subnet mask is written UTI2_psIPGatewayAddress Pointer to a string in which the read address of the standard gateway is written Table 19 Return values for UTI2 GetlPConfig ReturnVal Meaning 1 Read successful 0 Read fault general fault 4 No valid pointer transferred 106 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MNO5003001Z EN www eaton eu 11 Libraries function blocks and functions 11 2 XC200 specific functions UTI2 GetlPDns Output of the IP address of the DNS server currently entered in the Registry UTI2 GETIPDNS UTI2_psIPDns POINTER TO STRING 80 UTI2 GetlPDns BYTE Figure 92 UTI2 GetlPDns Table 20 Input variables for UTI2 GetlPDns Input variables Meaning UTI2_psIPDns Pointer to a string in which the read IP address is written Table 21 Return values for UTI2_GetlPDns ReturnVal Meaning 1 Read successful lt 0 Read failed 4 No valid pointer transferred UTI2_GetIPWins Output of the IP address of the WINS server currently entered in the Registry UTI2_GETIPWINS UTI2_psIPWins POINTER TO STRING 80 UTI2_GetIPWins BYTE Figure 93 UTI2_GetIPWins Table 22 Input variables for UTI2_GetlPWins Input variables Meaning UTI2 psIPWins Pointer to a string in which the read IP address is written Table 23 Return values for UTI2 GetlPWins Ret
15. WERTEN 06 14 MN05003001Z EN Modular PLC XC CPU201 XV XC CPU202 XV NON TAM DOC i _ Ej uj aj aJ z E T N Powering Business Worldwide All brand and product names are trademarks or registered trademarks of the owner concerned Emergency On Call Service Please call your local representative http www eaton com moeller aftersales or Hotline of the After Sales Service 49 0 180 5 223822 de en AfterSalesEGBonn eaton com Original Operating Instructions The German language edition of this document is the original operating manual Translation of the original operating manual All editions of this document other than those in German language are translations of the original German manual 18t published 2003 edition date 12 03 nd edition 2004 edition date 12 03 rd edition 2004 edition date 04 04 h edition 2004 edition date 06 04 edition 2004 edition date 08 04 edition 2004 edition date 11 04 edition 2005 edition date 03 05 edition 2005 edition date 11 05 edition 2006 edition date 09 06 10th edition 2006 edition date 12 06 11th edition 2007 edition date 04 07 12th edition 2008 edition date 01 08 13th edition 2010 edition date 10 10 14th edition 2013 edition date 08 13 15th edition 2014 edition date 06 14 See revision protocol in the About this manual chapter 2010 by Eaton Industries GmbH 53105 Bonn 00 1001 5 OQ hN2 Production
16. Antje Panten Nonnen Translation globaldocs GmbH All rights reserved including those of the translation No part of this manual may be reproduced in any form printed photocopy microfilm or any other process or processed duplicated or distributed by means of electronic systems without written permission of Eaton Industries GmbH Bonn Subject to alteration without notice Eaton Industries GmbH Safety instructions A Danger Dangerous electrical voltage Before commencing the installation Disconnect the power supply of the device Ensure that devices cannot be accidentally restarted Verify isolation from the supply Earth and short circuit Cover or enclose neighbouring units that are live Follow the engineering instructions AWA IL of the device concerned Only suitably qualified personnel in accordance with EN 50110 1 2 VDE 0105 Part 100 may work on this device system Before installation and before touching the device ensure that you are free of electrostatic charge The functional earth FE must be connected to the protective earth PE or to the potential equalisation The system installer is responsible for implementing this connection Connecting cables and signal lines should be installed so that inductive or capacitive interference does not impair the automation functions Install automation devices and related operating elements in such a way thatthey are well protected against uninten
17. RS232 of the CPU COMT LocalCOM RS232 of the XIOC SER and XIOC TC1 COM2 5 COM2 5 xSysCom200 lib for XIOC SER and XIOC TC1 SyslibCom lib for RS232 of CPUs gt If the RS232 interface of the XC CPU201 is in Transparent mode programming via this interface not possible However you can test the program via the Ethernet interface so called joint operation This type of joint operation is not possible on the XC CPU202 The RS232 is set by default for programming mode The Serial Programming Off and Serial Programming On browser command or the library functions FUN Disable Com Programming and Enable Com programming enable the RS232 interface to be switched from programming mode to Transparent mode Character formats in transparent mode are 8E1 801 8N1 8N2 This functionality is provided with the XC200 via the xSysCom200 lib or SysLibCom lib libraries Thus one of these libraries must be integrated into the library manager The SysLibCom lib library is introduced from version 01 03 xx in order to guarantee the compatibility between the XC200 and other XControl devices Both libraries contain functions for opening and closing the interface for sending and receiving the data and for setting the interface parameters The control lines of the RS232 of the XIOC SER modules are controlled with the SysComWriteControl function from the xSysCom200 lib library and monitored with the SysComReadControl function In contrast
18. Saving of the registry UTI2 SAVEREGISTRY UTI2 Dummy BYTE UTI2_SaveRegistry BYTE Figure 100 UTI2_SaveRegistry Table 36 Input variables for UTI2_SaveRegistry Input variables Meaning UTI2 Dummy A dummy byte which is not evaluated in the function Table 37 Return values for UTI2 SaveRegistry ReturnVal Meaning 1 Function completed successfully 1 Errors Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN050030017 EN www eaton eu 111 11 Libraries function blocks and functions 11 2 XC200 specific functions 11 2 5 Additional functions of the XC200 Util2 lib library for the XC CPU202 112 The functions of the XC200_Util2 lib library can be seen in the following overview easy Soft CoDeSys test1 pro Bibliotheksverwalter t Datei Bearbeiten Projekt Einf gen Extras Online Fenster Hilfe lez sa XC200 UTIL2 lib 18 6 10 14 30 02 C3 Bausteine 2 PLC_PAG PRG Standard lib 7 6 02 10 26 00 3 Bausteine XC200 Util2 Lib a ComProgramming TI2 DisableComProgramming FUN TI2 EnableComProgramming FUN TI2 GetComConfig FUN TI2 SetComConfig FUN net Lltilities TI2 EnableDHCP FUN TI2_GetlPConfig FUN TI2 GetlPDns FUN TI2 GetlPwWins FUN TI2_GetKeep liveTime FUN T T T 2_GetMac ddress FUN 2 IsDHCPEnabled FUN 2 SetlPConfig FUN TI2 SetlPDns FUN 2 SetlPGateway FUN 2 SetlPwWins FUN 2_SetKeep liveTime FUN Prg_Utilities
19. TI2_CopyProjectT oMme FUN TI2_CopyProjectT oUsb FUN TI2_CreateStartuplni FUN TI2_GetPlcVersionList FUN TI2 Reboot FUN T T T T 2 RemoveProjectFromMmc FUN 2 RemoveProjectFromUsb FUN 2 RemoveStartuplni FUN 2 SaveRegistry FUN RIP UIP_AddUserlPAddress FUN UIP_DeleteUserlPAddress FUN UIP_GetFirstUserlPAddress FUN UIP_GetNextUserlP ddress FUN UIP_GetUserlPAddressCount FUN UIP_MakeUserlP FUN Bausteine 4 Datentypen Visualisierun amp Globale Vari Figure 101 Overview of the XC200_Util2 lib for the XC CPU202 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 11 Libraries function blocks and functions 11 2 XC200 specific functions 11 2 5 1 ComProgramming UTI2 DisableComProgramming Deactivates the serial interface as a programming interface local COM2 UTI2 DISABLECOMPROGRAMMING UTI2 DisableComProgramming BOOL Figure 102 UTI2 DisableComProgramming Table 38 Input variables for UTI2 DisableComProgramming Input variables Meaning None Table 39 Return values for UTI2 DisableComProgramming ReturnVal Meaning TRUE Function completed successfully FALSE Errors UTI2 EnableComProgramming Activates the serial interface as a programming interface local COM2 UTI2 ENABLECOMPROGRAMMING UTI2 EnableComProgramming BOOL Figure 103 UTI2_EnableComProgramming
20. This can occur with a centrally assigned module as well as a module which is a component of a decentral PROFIBUS DP slave or CAN station 66 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 5 Program processing multitasking and system times 5 9 Addressing inputs outputs and markers If you add a module the addresses of all the subsequent modules independently of the line are offset by the address value of the added module and the added module is assigned with an address Modules which are located in the configuration before the added module are not changed If you remove the tick in the Automatic calculation of addresses checkbox the addresses remain unchanged with modifications expansions 5 92 Activating Check for overlapping addresses If the check for overlapping addresses is activated addresses which are assigned twice will be detected and an error message is generated during compilation This setting should not be modified 5 9 3 Uneven word addresses If you assign an odd offset address e g IB5 to a word addressable module in the Entry address field the next even word address IW6 automatically appears in the PLC configurator This is completed automatically and is not controlled by the Check address overlap setting Kf PLC Configuration B BDI SLOT i i Base parameters g EMPTY SLOT SLOT f EMPTY SLOT SLOT Module id 25857 EMPTY SLOT SLOT Node id
21. This function returns the number of entered error messages esd XI FUNCTION IEC_GetNrOf rrors BYTE E Returns the number of Errors written in the Error List Bl IEC_GETNROFERRORS VOID BYTE IEC_GetNrOfErrors BYTE Figure 86 IEC_GetNrOfErrors function 11 2 2 6 IEC_GetNrOfEvents This function returns the number of entered event messages FUNCTION IEC GetNrOfEvents BYTE Returns the number of Events written in the Event List IEC_GETNROFEVENTS VOID BYTE IEC_GetNr fEvents BYTE Figure 87 IEC_GetNrOfEvents function 104 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 11 Libraries function blocks and functions 11 2 XC200 specific functions 11 2 2 7 IEC WriteError This function writes an error message into the error list of the control FUNCTION IEC_WriteError BYTE Writing an Error to the Error List IVAR INPUT ErrorD WORD Figure 88 IEC_WriteError function 11 2 2 8 IEC_WriteEvent This function writes an event message into the event list of the control FUNCTION IEC_WriteEvent BYTE E Writing an Event to the Event List El IVAR INPUT EventID WORD END VAR VAR END_VAR IEC NRITEEVENT EventID WORD IEC WiriteEvent BYTE Figure 89 IEC WriteEvent function 11 2 3 XIOC functions The XIOC functions include functions for processing interrupts Page 95 and for programming of the direct
22. UINT Slot 0 7 uiBit UINT Bitposition 0 63 xValue BOOL Data value END VAR VAR END VAR WRITEBITDIRECT uiSlot UINT WriteBitDirect UINTI Figure 43 WriteBitDirect function 5 5 5 1 Parameters of the WriteBitDirect function 5 5 6 WriteWordDirect uiSlot Slot number of the signal module For possible parameters see Table 8 on Page 59 uiBit Output bit within the signal module For possible parameters see Table 8 on Page 59 xValue The pointer points to the variable in which the value for the output bit is located WriteBitDirect Display of the failure code see Table 9 on Page 63 A word of an output module can be written directly with this function At the time of access the respective output image is also refreshed in addition to the physical output A further refresh of the output word occurs at the end of the cycle 5 5 6 1 Parameters of the WriteWordDirect function 62 uiSlot Slot number of the signal module For possible parameters see Table 8 on Page 59 uiOffset Output word within a signal module For possible parameters see Table 8 on Page 59 wValue The pointer points to the variable in which the value for the output word is located WriteWordDirect Display of the failure code see Table 9 on Page 63 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 5 5 7 GetSlotPtr 5 Program processing multitasking and system
23. XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 81 8 Programming via CAN open Network Routing 8 2 Routing features of the controller The ID for basis communication is defined in the CanMaster folder in the CAN parameters tab Figure 58 fff PLC Configuration o ggConfiguration KC 5 AT IB0 B j EMPTY SLC j EMPTY SLC j EMPTY SLC j EMPTY SLC Base parameters CAN parameters Mo Baud rate 125000 Com Cycle Period usec o Sync Window p Lenght usec 0 Sync COB ID 1128 activate v j EMPTY SLC Node ld 1 VW Autostart VW Support DSP301 V4 01 and DSP306 Figure 58 CAN Master Node ID for basis communication 8 2 3 Communication with the target PLC 82 Connect the PC to the routing PLC gt Select the target PLC with which you want to communicate for the project gt Determine the communication settings for the PC and the PLC connected to the PC gt Enter the target ID Target ID Node ID of the target PLC as in the example and log on You can run the following functions e Program Download e Online change e Program test Debugging e Create boot project e Source code storing Note for project creation Assign two Node IDs to the target PLC e One ID for basic communication e One ID for routing You set the routing ID node ID e g 54 and the baud rate of the target PLC e g XC200 in the PLC configuration in the Other parameters w
24. an update of the inputs 6 0 to 7 7 of input module 1 occurs At the start of the second task the inputs 8 0 to 9 7 of input module 2 follow as well as the outputs 2 0 to 3 7 of output module 1 progtes1 PRG ST Fe protest PRG BEBI PROGRAM progtest i mer Boot t DOO4 END VAR Update Inputmodul Domem jInputs 6 0 7 7 EE mem 61X6 1 s B progtes2 PRG B001 PROGRAM progtes2 Update Inputmodul mem in2 BOOL Inputs 8 0 9 7 mem out1 BOOL Update Outputmodul 000 OX3 4 mem_outt Figure 39 Program for example 2 54 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MNO5003001Z EN www eaton eu 5 Program processing multitasking and system times 5 4 Task monitoring with the watchdog 5 3 1 2 Creating a task with consistent 1 0 Avoid access to the physical outputs from several tasks In order to guarantee a clear PLC sequence create for the local central inputs outputs a task in which all inputs are copied in global variables and at the end of the interval all outputs of global variables are written to the output module I O update task The I Os are consistent data integrity within this task The global variables can then be used instead of the I Os in other tasks On the XC200 PLC a maximum of 10 tasks are possible The parameterization of a task as free wheeling is not supported Note with parametric programming of the watchdog time that the POU called with the i
25. dO Q0 3 00 5 c 0 Vq 0v Figure 3 Terminals of the power supply unit and local inputs outputs 10 0 to 10 7 local digital inputs 00 0 to 00 5 local digital outputs 0Vo 24Vo supply voltage for the local inputs outputs 0V 24V supply voltage to the processor unit The LEDs indicate the signal status for the inputs and outputs An LED that is ON indicates a H level signal on the corresponding connection terminal Inputs 10 0 to 10 3 Jo Inputs 10 4 to 10 7 Outputs 0 0 and 0 3 LI L1 L jv Outputs 0 4 and 0 5 OS _ E A E Ll LE1 LE1eL1 In Figure 4 LEDs for the local inputs outputs The two upper rows of LEDs show the signal status for the eight digital inputs of the CPU module 10 0 to 10 7 and the two lower rows show the signal status for the six digital outputs 00 0 to Q0 5 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 11 1 Design of the XC200 PLC 1 1 Rack 1 1 5 Processor unit with interfaces 1 1 6 Real Time Clock 1 1 7 Battery 12 Belonging to the processor unit are Real Time Clock Page 12 Battery Page 12 Multi media card MMC secure digital card SD USB stick Page 13 CPU drives Page 13 USB interface Page 27 ETH232 programming interface Page 14 CAN easyNet interface Page 15 Add on functions of the CPU local inputs Page 17 The XC200 features a real
26. none 1 32Bit Up Down Counte Interrupt 1 Interrupt 2 had 2x 16Bit Up Down Counte Setpoint Value 4294967295 Cancel Figure 71 Parameterization of 1 x 32 Bit counter input gt When the configuration is complete press the Apply button See also e Interrupt processing Page 95 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 93 10 Configuration and parameterization of the inputs outputs 10 2 Inputs outputs for additional functions 10 2 5 Representation of the inputs outputs of the 32 bit counter Real inputs AT IX0 0 BOOL Bit0 AT IX0 1 BOOL Bit1 Representation of the virtual I Os in the PLC configurator AT IX1 0 BOOL State CHANNEL I AT 94IXI 1 BOOL N0 CHANNEL T AT IX1 2 BOOL N1 CHANNEL I AT IX1 3 BOOL Error CHANNEL 1 AT IW2 WORD Counter Value Low Word CHANNEL I AT IW4 WORD Counter Value High Word CHANNEL 1 AT QX1 0 BOOL Reference Window CHANNEL Q AT QX1 1 BOOL Reset Counter0 CHANNEL Q AT QX1 2 BOOL Reset Counter1 CHANNEL Q AT QX1 3 BOOL NO Quit CHANNEL Q AT QX1 4 BOOL N1 Quit CHANNEL Q AT QX1 5 BOOL Error Quit CHANNEL Q Input for counter pulses Input for direction signal L no zero crossing H zero crossing H Error Counter state Low Word Counter state High Word Reset to 0 Acknowledgeme
27. 5 5 7 5 5 8 Interlaceassignments een ret diete pia aa 27 US BibiteLtaees 2m RISE E ide 27 XC200 programming IDterTaG8 qu cer io etude dee odia d ied 27 CAN easyNet interface sssssssssssssssseee e 28 Operation cs oria Er Rd uS Ov FIR Re SUR Dag MER NR RN 29 Start p behaviors 2c tite deeem boda peel 29 Startup behavior of the XC CPU201 eessssssessesessl 30 Startup behavior of the XC CPU202 ssesssssssssesseeeeeees 31 Configuring the start up behavior with CODESYS 32 Program Stab meo Stet ero ae 33 Program start STOP RUN sssssssssssssseseeerern nnns 33 Program stop RUN STOP eeenennnnnenenneennnn 33 Power off Interruption of the power supply 33 CPU operating state display re ee een 34 Test and commissioning Debugging 34 Breakpoint single step mode sssssesse 34 Single cyble ModE tee EI eet teet SEPA ea LIH on Dele pila tB Gordo 35 eet 35 Status display RM 35 Reset nn RT 36 Programs and projects eto uev test ertet tte tag agate 37 I oading lie progra assu temi pta nct oth e roe t exes et 37 General information on RETAIN PERSISTENT 38 Storing and deleting the boot project enn 39 Updating the operating systeM nennen 41 Seer 5 V4 9 ERECTO 41 RP EAE MM A M re eee 45 Program processing multitasking and system times 48 TASK configut atioD
28. Enable CHANNEL Q EMPTY SLOT SLOT J XlOC 2AO U1 2AO I2 SLOT MORD 0 10VDC Output CHANNEL Q WORD 0 10VDC Output CHANNEL NORD 4 20mA Output CHANNEL Q WORD 4 20mA Output CHANNEL Q j EMPTY SLOTISLOT 3 EMPTY SLOTISLOT g X IOC 16DX SLO t AT IW6 WORD 16 Inputs 12 Outputs CHANNEL 1 AT g6QW10JWORD 12 Outputs 16 Inputs CHANNEL Q EMPTY SLOT SLOT XIOC 8DI SLOT H E AT seiBa BYTE 8 Inputs CHANNEL 0 Figure 65 Configuration change by changing the modules SO S1 S7 slot number of the rack Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 10 Configuration and parameterization of the inputs outputs 10 1 Input output general fff PLC Configuration E nl x E AT QX1 6 BOOL 32BitCounter Counter Enable CHANNEL as so l AT 360X1 7 BOOL Counter Enable CHANNEL Q S1 g EMPTY SLOTISLOT sz g EMPTY SLOTISLOT S3 g EMPTY SLOTISLOT S4 B E JBYTE 8 Inputs CHANNEL EIS g EMPTY SLOTISLOT je S MOC 2A0 U1 2A0 I2 8LOT E AT QW2 WORD t 0 10VDC Output CHANNEL Q amp 3 awaawa WORD 0 10VDC Output CHANNEL Q t ES ATIKAWEIWORD c 4 20mA Output CHANNEL Q tE angeowa wORD 4 20mA Output CHANNEL Q A Figure 66 Configuration change through removal of the module SO S1
29. IP address or hc nel Port 1200 Remove Mari by a Gateway Update Figure 51 Enter the IP address gt Perform a double click on the localhost field and enter the default address 192 168 119 200 or 192 168 119 202 gt Confirm your details by first pressing on another field and then on OK Communication Parameters x ne Lxx OK Cancel 192 168 119 60 IP address or hostname New Port 1200 Targetld 0 Bemow Motorola byt No DE B Mus Update Figure 52 Communication parameters with IP address gt Compile the program and log in 72 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 6 Connection set up PC XC200 6 4 Scan modify the IP address 6 4 Scan modify the IP address 6 4 0 1 Example 1 6 4 0 2 Example 2 The setipconfig and getipconfig browser commands are available for modifying and scanning the IP address section Browser commands on Page 128 Restart the XC200 after you have changed the IP address The DHCP function DHCP Dynamic Host Configuration Protocol is not activated Ensure that the IP address of the programming device 2 PC belongs to the same address family as the PLC This means that the IP address of the programming device and the XC200 match in the following number groups IP address XC200 192 168 119 xxx IP address PC 192 168 119 yyy IP address XC200 192 168 100 xxx IP address PC 192 168 100 yyy The follo
30. IR 93 CONNECCION seesi eens voa per TRDAE AS 25 Download of programs 0 05 37 BI cn 14 139 E easyNET interface 00000 15 28 Electromagnetic interference 20 Error St adr te sd tod toate aoe 133 Ethernet cable properties 135 Ethernet interface 22 0 000 000 005 14 Event controlled task 22222 2 50 EVENS ts esse ee 133 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 149 F Failure code with direct peripheral access 63 Sla S Eo inima m ende mee ie ee 14 FOCOS BERE ERE 35 Function blocks 22 auauna aaua 100 Functional areas CPU 2 2 9 FUNCTIONS ee ee ba cha 100 CAN BUSLOAD 2 2 2 101 Disablelnterrupt 0005 96 Enablelnterrupt 00 00 0005 96 GetSlotPtl eos ke ch on eM 63 IEC DeleteErrorList 102 IEC_DeleteEventList 102 IEC_GetErrorlD 2 222 2 222 222 103 IEC_GetEventlD 222 222 103 IEC_GetNrOfErrors 104 IEC_GetNrOfEvents 104 IEC_WriteError 22 202002 105 IEC_WriteEvent 0 0 105 Read DISC secs et ea ae 60 SVSbllG 4 Zus Sa ans CERA tac 140 UIP_AddUserlPAddress 124 UIP_DeleteUserlPAddress 125 UIP GetFirstuserlPAddress 125 UIP_GetNextUserlPAddress 126 UIP_GetUse
31. IX1 0 to IW4 and OX1 0 to OX1 7 indicate the add on functions such as e g the counters The inputs and outputs of the add on functions only become active after you have selected a function in the Other parameters tab ff PLC Configuration AT IBO BYTE Local Inputs Counter CHANNEL D Settings Other Parameters AT 1X1 0 BOOL State CHANNEL D ee pes are AT IX1 1 BOOL NO CHANNEL AT 1X1 2 BOOL N1 CHANNEL Start Behaviour WARMSTART We I AT 3611 3 BOOL Error CHANNEL 4 none AT IX1 4 BOOL Referencing activated CHANNEL I R5232 TCP CAN Routingsettings AT 9612 WORD Counter Value Low Word CHANNEL D lt E AT 961W4 WORD Counter Value High Word CHANNEL D Enable p Input 10 5 AT QB0 BYTE Local Outputs CHANNEL Q none v AT 96QX1 0 BOOL Reference Window CHANNEL Q C ks en EASYNetSellings none AT 96QX1 1 BOOL Reset Counter CHANNEL Q AT QX1 2 BOOL Reset Counter CHANNEL Q Enable L Configure Counter Encode AT 96QX1 3 BOOL NO Quit CHANNEL Q AT 96QX1 4 BOOL N1 Quit CHANNEL Q AT 96QX1 5 BOOL Error Quit CHANNEL Q AT 9601 8 BOOL 32BitCounter Counterd Enable CHANNEL Pate Operating System MN available with operating AT 0X1 7 BOOL Counter Enable C
32. Interruption of the power supply All outputs in which the I O tasks are used are set to 0 or switched off gt chapter Program processing multitasking and system times to Page 48 The behavior of retentive variables in shown in can be seen in Table 4 The remaining program cycle will not be completed when power is reconnected If the consistency of the data is absolutely necessary for an application other measures are required such as the use of a uninterrupted power supply with battery back up The PLC is started as shown in Figure 20 and Figure 21 4 3 1 CPU operating state display The operating state of the CPU is displayed on the RUN STOP and SF LEDs CPU status RUN STOP LED SF LED RUN on off STOP flashes off NOT READY flashes on The NOT READY state is indicated by the RUN STOP and SF LEDs The PLC goes into this state when an error has occurred during the start The CPU remains in STOP state The CPU can be restarted after elimination of the fault 4 3 2 Test and commissioning Debugging The PLC supports the following test and commissioning features Breakpoint Single step mode Single cycle mode Forcing Online modification PLC programming with CODESYS manual Chapter Online functions e Status display Powerflow 4 3 3 Breakpoint single step mode 34 Breakpoints can be set within the application program If an instruction has a breakpoint attached then the program will halt at this
33. Libraries function blocks and functions 11 2 XC200 specific functions This function returns the Module ID and Error ID of the requested error message FUNCTION IEC_GetErrorlD BYTE VAR INPUT ucErrorNr BYTE p usModullD POINTER TO WORD p usEventlD POINTER TO WORD END VAR VAR END VAR IEC_GETERRORID ucErrorNr BYTE p usModullD POINTER TO WORD p usEventlD POINTER TO WORD IEC_GetErrorlD BYTE Figure 84 IEC GetErrorID with declaration section function The description of the error messages and the error identity can be found in the Online documentation of the CODESYS software relating to function IEC GetErrorID This function returns the Module ID and Error ID of the requested event message FUNCTION IEC GetEventlD BYTE VAR INPUT ucEventNr BYTE p usModullD POINTER TO WORD p usEventlD POINTER TO WORD END VAR VAR END VAR IEC_GETEVENTID ucEventNr BYTE p usModullD POINTER TO WORD p usEventlD POINTER TO WORD IEC GetEventlD BYTE Figure 85 IEC_GetEventID with declaration section function The description of the event messages and the event identity can be found in the Online documentation of the CODESYS software relating to function IEC GetEventID Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN050030017 EN www eaton eu 103 11 Libraries function blocks and functions 11 2 XC200 specific functions 11 2 25 IEC GetNrOfErrors
34. On the one hand a 24 V connection exists for the processor unit inscription 24V OV and on the other a 24 V connection for the local inputs outputs inscription 24VO 0VQ If there is a voltage dip of the 24 V supply voltage switching threshold is about 10 V then a power down logic switches of the 5 V supply to the signal modules central I O 1 1 4 Local inputs outputs 10 On the right half of the CPU an 18 pole terminal block is located behind the front cover of the CPU This is used to connect the power supply of the CPU and the local inputs outputs as well as the sensors and actuators The eight digital inputs 10 0 to 10 7 and six semiconductor outputs Q0 0 to 00 5 are designed for 24 V signals and have a common 0VO 24VQ power supply which is potentially isolated right up to the bus The outputs 00 0 to O0 5 can be loaded with 500 mA a duty factor ED of 100 and a utilization factor g of 1 The outputs are short circuit proof A short circuit state should however not be permitted to exist over a longer period See also e Add on functions of the CPU local inputs Page 17 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 1 Design of the XC200 PLC 1 1 Rack 1 1 4 1 Terminal assignments 1 1 4 2 LED indicators Oooo OoOoo OoOoo oa e 10 1 10 3 dO 10 5 8 amp 10 7 Q0 1
35. Output IEC task list with task information tskclear Clear IEC task information Cyclecount accumulated max and min cycle updatefrommmc update windows image from disk_mmc MOELLER XC CPU201 btsxc201_Vxxxxx nbk 1 You can call up help with extended information for these Browser commands in the CoDeSys software Enter a question mark followed by a space before the command e g plcload in the command line of the PLC browser Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN050030017 EN www eaton eu 129 12 Browser commands 12 1 Calling browser commands 12 1 Calling browser commands gt Activate the Resources tab in the CODESYS software and select the PLC browser folder gt Click at the top right of the window on the button gt Double click the required browser command to select it Add other settings to the command if necessary e g baud rate withsetcomconfig Table 100 gt The command may require additional parameters gt Press the Return button The result will be displayed 12 2 Accessing communications parameters Settings of the communication parameters via Browser commands such as device names Ethernet addresses gateway addresses or baud rates of the serial interface are only modified and not directly accepted or saved in the database entry in Windows CE REGISTRY with the following commands The function is only accepted after the next Windows CE start e setcomconfig setipcon
36. PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 91 10 Configuration and parameterization of the inputs outputs 10 2 Inputs outputs for additional functions 10 2 3 Representation of the inputs outputs of the incremental encoder Real inputs AT IX0 0 BOOL Bit0 AT IX0 1 BOOL Bit1 AT IX0 2 BOOL Bit2 AT IX0 3 BOOL Bit3 AT IX0 4 BOOL Bit4 AT IX0 5 BOOL Bit5 AT IX0 6 BOOL Bit6 AT 94IX0 7 BOOL Bit7 Representation of the virtual inputs outputs in the PLC configuration AT IX1 0 BOOL State CHANNEL I AT IX1 1 BOOL N0 CHANNEL T AT IX1 2 BOOL N1 CHANNEL T AT IX1 3 BOOL Error CHANNEL I AT IX1 4 BOOL Referencing activated AT IW2 WORD Counter Value Low Word CHANNEL I AT IW4 WORD Counter Value High Word CHANNEL 1 AT QX1 0 BOOL Reference Window CHANNEL Q AT QX1 1 BOOL Reset Counter0 CHANNEL Q AT QX1 2 BOOL Reset Counter1 CHANNEL Q AT QX1 3 BOOL NO Quit CHANNEL Q AT QX1 4 BOOL N1 Quit CHANNEL Q AT QX1 5 BOOL Error Quit CHANNEL Q AT QX1 6 BOOL 32BitCounter Counter0 Enable CHANNEL Q AT QX1 7 BOOL Counterl Enable CHANNEL Q Signal A Signal B Reference signal Enable referencing Local input Local input Local input Local input H referencing implemented L no zero crossing H zero crossing
37. PROJEKT e The file XCSTARTUP ini is stored on the memory card of the XC CPU202 in the directory disk_mmc CONTROL XC CPU202 EC4M 8DI 6DO XV PROJEKT 7 3 Creating the Startup ini file Generally the control operates when first activated initial state with default system parameters the STARTUP data regardless of if the PLC contains a project or boot project If you load the project into the PLC which is in the initial state the PLC will immediately start to operate with the parameters of the project With the browser command createstartupini you will transfer from the PLC either the STARTUP data or if a project is contained the system parameters onto the memory card This creates the Startup INI file which contains this data Precondition the memory card must be plugged in formatted and empty i e without Startup ini file It is not possible to overwrite or change an already existing file with the createstartupini browser command If you still enter the command a warning appears In order to create a new file the existing file must be deleted first section Deleting the Startup ini file on Page 77 7 4 Entry of the ini file HOST NAME 76 The parameter HOST NAME enables the controller to be addressed via the Ethernet with this device name It can also be addressed with its IP address The device name for the XC CPU201 is available from operating system version 1 04 It receives from the system the entry NoNameSet If
38. Table 40 Input variables for UTI2 EnableComProgramming Input variables Meaning None Table 41 Return variables for UTI2_EnableComProgramming ReturnVal Meaning TRUE Function completed successfully FALSE Errors UTI2 GetComConfig Shows the interface parameters of the local COM interface UTI2 GETCOMCONFIG UTI2 GetComConfig D WORD Figure 104 UTI2 GetComConfig Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN050030017 EN www eaton eu 113 11 Libraries function blocks and functions 11 2 XC200 specific functions Table 42 Input variables for UTI2_GetComConfig Input variables Meaning None Table 43 Return values for UTI2_GetComConfig ReturnVal Meaning DWORDCOM Baud rate of the local COM port 4800 9600 19200 38400 57600 115200 UTI2_SetComConfig Setting of the baud rate of the local serial interface UTI2 SETCOMCONFIG dwBaudrate DWORD UTI2 SetComConfig BOOL Figure 105 UTI2 SetComConfig Table 44 Input variables for UTI2 SetComConfig Input variables Meaning dwBaudrate 4800 9600 19200 38400 57600 115200 Table 45 Return values for UTI2 SetComConfig ReturnVal Meaning TRUE FALSE 11 2 52 Ethernet Utilities UTI2 EnableDHCP Activates the DHCP function of the PLC UTI2 ENABLEDHCP qUTI2 Dummy BYTE UTI2 EnableDHCP BOOL Fi gure 106 UTI2 EnableDHCP Table 46 Input variables for
39. UTI2 EnableDHCP Input variables Meaning Dummy BYTE 114 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 11 Libraries function blocks and functions 11 2 XC200 specific functions Table 47 Return values for UTI2_EnableDHCP ReturnVal Meaning TRUE always true To work with DHCP you must reboot the UTI2 SaveRegistry function and the PLC After booting the controller requests an IP address from the DHCP server To deactivate the DHCP function you must call the function UTI2 SetlPConfig or the browser command setipconfig UTI2 GetlPConfig Issue of the IP address subnet mask address and IP gateway address UTI2_GETIPCONFIG UTI2 pslPAddress POINTER TO STRING 80 UTI2 GetlPConfig BYTE UTI2 psSubnetmask POINTER TO STRING 80 UTI2 psIPGatewayAddress POINTER TO STRING 80 Figure 107 UTI2 GetlPConfig Table 48 Input variables for UTI2_GetlPConfig Input variables Meaning UTI2 pslPAddress Pointer to a string in which the read IP address is written UTI2 psSubnetmask Pointer to a string in which the read address of the subnet mask is written UTI2_psIPGatewayAddress Pointer to a string in which the read address of the standard gateway is written Table 49 Return values for UTI2 GetlPConfig ReturnVal Meaning 1 Read successful 0 Read failed 4 No valid pointer transferred UTI2 GetlPDns Output of the IP address of the DNS server currently
40. and then switch the controller off and on again The controller will now operate with the parameters of the project 7 4 3 Deleting the Startup ini file The following browser commands can be used to access the memory card e removestartupini Always deletes the controller system parameters If a memory card is plugged in the INI file on the memory card is deleted The parameters from the project is accepted next time the device is switched on e removeprojfrommmc Deletes the boot project and the INI file on the memory card The system parameters in the controller are retained The behavior of the Startup ini file with the Hard Reset and Default Settings menu commands on the controller and with the factoryset browser command is described in section Reset on Page 36 If you execute the Full reset command in online mode the operating system and the project on the Disk sys are deleted The XCSTARTUP ini file is retained Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 77 8 Programming via CAN open Network Routing 8 1 Prerequisites 8 Programming via CAN open Network Routing 8 1 Prerequisites 78 Routing is the capability to establish an Online connection from a programming device PC to any desired routing capable control in a CAN network without having to directly connect the programming device directly with the target PLC It can instead be connected to any other PLC in th
41. both libraries Standard lib and SYSLIBCALLBACK lib are copied in to the Library Manager If you need further libraries for your application you have to install these manually The libraries in the Library Manager are assigned to the project after saving When you open the project the libraries are then automatically called up as well The following overview lists the documents in which the function blocks and functions are described Document Library AWB2700 1437 Standard lib Util lib N050030047 EN XC100 Util lib previously called AWB 2724 1453 N05003001Z EN XC200 Util lib previously called AWB 2724 1491 anual 2724 1566 XN PLC Util lib Online help or PDF files SysLib lib N05010002Z EN XS40_MoellerFB lib Visu lib previously called AWB 2786 1456 AN2700K20 3S CanOpenDevice lib 3S CanOpenManager lib gt 2700K19 3S CANopenNetVar lib AN2700K27 XC SysLibCan lib XN PLC SysLibCan lib N05010001Z EN previously called AWB 2786 1554 CANUser lib CANUser Master lib Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 99 11 Libraries function blocks and functions 11 2 XC200 specific functions 11 1 1 Installing additional system libraries You can install libraries manually as follows XSoft XN PLC DOK1 pro File Edit Project Insert Extras Online Window Help Resources 9 Global Variab
42. events do not have an image If outputs from various tasks or events are modified in an application the following rules should be observed e f an output bit with the WriteBitDirect function is processed with an event interrupt or event task the Q WORD output word in which the bit is situated may not be referenced to any other task The other bits of the output word may still be assigned in other tasks as the O BOOL output bit e f an output bit is modified for fast processing with the WriteBitDirect function and this bit is also processed at another location task event or interrupt the WriteBitDirect function must be used at all locations no Q BOOL declaration and no referencing 5 5 4 1 Example Output variable declaration Q BOOL e g Qbit3 AT QX1 2 BOOL Q WORD e g Qword0 AT QWO WORD Referencing assignment in the application Qbit3 TRUE Qword0 16 Test Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 61 5 Program processing multitasking and system times 5 5 Direct peripheral access 5 5 5 WriteBitDirect A bit of an output module can be controlled directly with this function The respective output image is refreshed in addition to the physical output Writing to the output is possible and not subject to limitation for only the local 6 outputs of the XC200 CPU with slot O FUNCTION WriteBitDirect UINT Returnvalue 0 or Errorcode D VAR INPUT uiSlot
43. i editus epi alle AURA 48 Creating the Basic cyclic taSk cost be 49 Creating event controlled task Param and defining the program calli pa IE 50 S stemn Events anenee a o sitet ette estt deco t AE 51 Assigning a POU to a system event 51 Ml ltitaSKiBlg d Hte tee Pete Uter tete ove C RS 52 Updating the input output images nennen 52 Behavior of the CAN stack with multitasking ssss 55 Task monitoring with the watchdog nee 55 Multiple tasks with the same priority seeesssssssssssssse 58 Direct peripheral access eenseennnnnnnnnnnnnn nenn 58 ReadBitDireetin er ee ie einig 60 HeadWWordlIFect ui su 60 Read DWord Dire Cte cide ui ee teet tete eere ed dee 61 Werte DISCE eom nete neos notet 61 Witte BItDITG GEO iuo teren in 62 Write VordDireet 2 2 2 62 GetolotPl 4 oiii eet b eu a 63 Failure code with direct peripheral access 63 Modular PLC XC CPU201 XV XC CPU202 XV 08 13 MN05003001Z EN www eaton eu Contents 5 6 Operating SEEDS en ee ee at testa eta 5 7 Web visualizations sa rot e TR Eee euius 5 8 Limit values for memory usage ssssssss 5 9 Addressing inputs outputs and markers nenee 5 9 1 Activate Automatic addresses nnnnnnnnn 5 9 2 Activating Check for overlapping addresses 5 9 3 Uneven word addresses
44. load calculation is not yet completed or the CAN controller has not yet been initialized the function returns FALSE Each read cycle has a duration of 500 ms See also Display the loading of the CAN bus canload Page 131 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN050030017 EN www eaton eu 101 11 Libraries function blocks and functions 11 2 XC200 specific functions 11 2 2 Event functions Events are special occurrences from the operating system or application These events are stored in a ring buffer The following functions allow read and write access to this event ring buffer 11 2 2 1 IEC_DeleteErrorList This function erases all error messages listed in the error list FUNCTION IEC DeleteErrorList BYTE A Deleting all Messages written in the Error List IN IVAR INPUT VOID BYTE END VAR VAR END_VAR IEC DELETEERRORLIST VOID BYTE IEC DeleteErrorList BYTE Figure 82 IEC DeleteErrorList with declaration section function 11 2 22 IEC_DeleteEventList This function erases all error messages listed in the event list FUNCTION IEC_DeleteEventList BYTE Deleting all Messages written in the Event List IEC_DELETEEYENTLIST VOID BYTE IEC DeleteEventList BYTE Figure 83 IEC DeleteEventList with declaration section function 102 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 11 2 2 3 IEC_GetErrorlD 11 2 2 4 IEC_GetEventiD 11
45. loaded into the target PLC the target PLC accepts the modified routing node ID however the communication connection will be interrupted Reconnection with a corrected routing Node ID is possible e faPLC receives a program without valid routing parameters baud rate node ID this PLC cannot be accessed via a routing connection Erasing of the parameters can for example be implemented via a FULL RESET if the PC with the programming software was directly connected with the target PLC The parameters are retained if the FULL RESET is implemented via the routing PLC e The routing is independent of the configuration Master Device it is possible to access a target PLC which has not been configured as a master or as a device It must only receive the basic parameters such as node ID and baud rate as well as a simple program Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 8 2 2 Addressing 8 Programming via CAN open Network Routing 8 2 Routing features of the controller Controllers on the CAN bus can be configured a master or as a slave device The PLCs are assigned with a Node ID node number address in order to uniquely identify them with the basis communication To use the routing function to access a target PLC you must assign a further routing ID to the routing and target PLC An RS232 or Ethernet interface can be used as a connection between the PC and XC200 rU Routing control Tar
46. modules and the decentral connection of CAN devices this control forms the basis for the implementation of a comprehensive automation system The PLC consists of the e Rack gt Page 8 e CPU with PSU and local inputs outputs Page 9 e XlOC signal modules gt separate manual Hardware and Engineering MN05002002Z EN Local inputs outputs Central inputs outputs igure 1 Layout of the XC CPU201 with XIOC modules F gt CODESYS programming software from Version 2 3 is required for programming the XC200 There are basic backplanes and expansion racks The basic backplane XIOC BP XC features two slots for the central processing unit The XIOC BP XC1 provides three slots so that there is also place available for an XIOC signal module beside the central processing unit A basic backplane can be expanded using several expansion racks Expansion backplanes are fitted with XIOC signal modules The rack establishes the connection between the CPU and the modules using an integrated bus rail Detailed information on the module racks and the XIOC signal modules is provided in the manual XI OC signal module Hardware and Engineering MNO5002002Z EN Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 1 Design of the XC200 PLC 1 1 Rack 1 1 1 Performance scope of the CPU 1 1 2
47. ms Overvoltage category Pollution degree 2 Degree of protection P20 Rated insulation voltage V 500 Emitted interference EN 61000 6 4 Class A Interference immunity EN 61000 6 2 Battery lifespan Worst case 3 years typical 5 years Weight kg 0 23 Dimensions W x H x D mm 90 x 100 x 100 connection terminals Plug in terminal block Terminal capacity Screw terminals flexible with ferrule mm 0 5 1 5 solid mm 0 5 2 5 Spring cage terminals Flexible mm 0 34 1 0 solid mm 0 14 1 0 Electromagnetic compatibility EMC gt Page 146 142 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MNO5003001Z EN www eaton eu Power supply for the CPU 24 V 0 V 13 Appendix 13 6 Technical Data XC CPU201 EC256 8DI 6DO XV XC CPU201 EC512 8DI 6DO XV XC CPU202 EC4M 8DI 6DO XV Mains failure bridging Duration of dip ms 10 Repetition rate S 1 Input rated voltage V DC 24 admissible range V DC 20 4 28 8 Current consumption A normally 0 85 Residual ripple 5 Maximum heat dissipation without local 1 0 Py CO 6 TVSS Yes Protection against polarity reversal Yes External line filter Part no XT FIL 1 Internal line filter Yes Inrush current X In No limitation limited only by upstream 24 V DC power supply unit Output voltage for the signal modules Output rated voltage V DC 5 Output current A 3 2 Off load stability Yes Short cir
48. of the XC CPU200 with the XT RJ45 ETH RS232 See also e Connect PC Page 26 e Configuration of the programming interface Page 27 e Connection set up PC XC200 gt Page 70 1 1 12 CAN easyNet interface The CAN easyNet interface is isolated The connections of the interfaces are the same The CPU can be run both as a network NMT master as well as an NMT slave device on the CAN bus The CPU can run the CANopen and the easyNet protocol at the same time See also e Detailed information for engineering and programming CAN stations gt Application note AN2700K27 e easy800 control relay operator manual MN04902001Z EN previously called AWB2528 1423GB e Network easyNet page 73 Bus terminating resistors Bus termination resistors must be installed at the first or last station on the line Module Bus termination resistor XC CPU201 MFD4 120 Q external easy800 MFD EASY NT R XC CPU202 switched neutral Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 15 1 Design of the XC200 PLC 1 1 Rack 6 5 H EN e 1200 1 Figure 7 Example network with bus termination resistor on XC CPU201 Terminals 1 and 4 2 and 5 as well as 3 and 6 are internally connected The bus terminating resistor on the XC CPU202 can be switched This switch is located above the battery switch facto
49. parameters via the STARTUP INI file 11 05 Complete revision of the manual 09 06 75 chapter Setting system parameters via the Startup ini file 112 Chapter The easyNet network 12 06 48 chapter Program processing multitasking and system times 78 chapter Programming via CAN open Network Routing 04 07 112 Chapter The easyNet network 01 08 Chapter 13 The easyNet network and chapter 14 Programming via easyNet routing are now found in manual MN050060047 EN 01 08 publication 16 Fig 7 date unchanged 10 10 XC CPU202 added V 08 13 145 Typical current consumption 4 0 85 A v 06 14 Firmware update for XC CPU202 V Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 5 0 About this manual 0 2 Writing conventions 0 2 Writing conventions gt Short notation for XC200 Whenever this manual uses the designation XC200 it is referring to both the XC CPU201 and XC CPU202 device versions Whenever it needs to refer to the XC CPU201 or XC CPU202 version specifically it will explicitly indicate which version it is referring to Symbols with the following meaning are used in this manual gt Indicates instructions to be followed 0 2 1 Hazard warnings of material damages NOTICE Warns about the possibility of material damage 0 2 2 Hazard warnings of personal injury CAUTION Warns of the possibility of hazardous situations that may possibly cause slight injury
50. peripheral access gt Page 58 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN050030017 EN www eaton eu 105 11 Libraries function blocks and functions 11 2 XC200 specific functions 11 2 4 Additional functions of the XC200 Util2 lib library for the XC CPU201 The functions of the XC200_Util2 lib library can be seen in the following overview XC200 UTIL2 lib 4 11 04 13 51 34 XC200 Ultil lib 8 03 14 12 06 XC Util lib 27 10 04 14 31 28 X840 MollerFB lib 4 6 02 15 16 10 Standard lib 7 6 02 09 26 00 I POUs 2 9 Expansion of XC200_Util Lib aa Ethemet Lltilities i UTI2_GetIPConfig FUN lt X gt UTI2 GetlPDns FUN X UTI2 GetlP wins FUN lt gt UTI2_GetMacAddress FUN lt UTI2 SetlPConfig FUN X UTI2 SetlPDns FUN X LITI2 SetlPGateway FUN X UTI2 SetlPwWins FUN X UTI2 Reboot FUN X UTI2 SaveRegistry FUN X Figure 90 Overview of the XC200 Util2 lib library for the XC CPU201 11 2 4 1 Ethernet Utilities UTI2 GetlPConfig Issue of the IP address subnet mask address and IP gateway address UTI2 GETIPCONFIG UTI2 pslPAddress POINTER TO STRING 80 UTI2 GetlPConfig BYTE UTI2_psSubnetmask POINTER TO STRING 80 UTI2_psIPGatewayAddress POINTER TO STRING 80 Figure 91 UTI2 GetlPConfig Table 18 Input variables for UTI2 GetlPConfig Input variables Meaning UTI2 pslPAddress Pointer to a string in which the read IP address is written
51. settings are only taken into consideration when the power supply is switched on Select one of the following start conditions in the STARTUP BEHAVIOR drop down menu in the Other Parameters tab of the PLC configurator e STOP e COLDSTART e WARMSTART The user program is not started independently of the switch position of the RUN STOP switch 4 1 3 2 COLDSTART WARMSTART 32 Precondition The RUN STOP switch is in the RUN position The variables are initialized in accordance with Table 4 before the control starts Table 4 Behavior of the variables after COLDSTART WARMSTART Behavior of the variables after Variable type COLDSTART WARMSTART Non retentive Activation of the initial values Activation of the initial values Retain Activation of the initial values Values remain in memory Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 4 2 Program start 4 Operation 4 2 Program start Behavior of the variables after Variable type COLDSTART WARMSTART Persistent Values remain in memory Activation of the initial values Retain Persistent Values remain in memory Values remain in memory 1 Physical operands such as Q or M cannot be declared as retain variables When a program starts the CPU checks whether the configured inputs and outputs match the physically present ones It also checks whether the actual module corresponds with the parameterized module type I
52. the program a boot project must be generated by the user program With the Create boot project command the program is loaded from the PC into the system memory and saved as a zero voltage safe boot project The following steps are necessary in order to create a boot project gt Change over to the Online folder gt Select the Login command gt Select the Create boot project command Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 37 4 Operation 4 4 Programs and project 4 4 2 General information on RETAIN PERSISTENT The data of variables declared as RETAIN PERSISTENT are retained in the memory of the XC200 when a new program is loaded via MMC SD or CODESYS as long as the following conditions are fulfilled e Aboot project must be created for the loaded program e The names of the variables of the loaded program and the new program must be identical e The data types of the variables of the loaded program and the new program must be identical or interconvertible The following always apply The data for all standard data types will be used 1 1 in the new program Strings may be truncated depending on the declared string length If different data types are assigned to the variable names in the new program the data is converted automatically by the operating system of the XC200 when the program is loaded Normally zeros are filled depending on type SINT DWORD or the
53. time clock which can be referenced in the user program via the functions from the SysLibRTC lib library Possible functions are e Display of the battery charge state e Display mode for hours 12 24 hour display e Reading and setting of the real time clock A description of the functions can be found in the SysLIbRTC pdf file Furthermore you can set or scan the real time clock via the following browser commands setrtc set the real time clock Page 129 e getrtc query the real time clock Page 128 A Lithium battery of type 1 2 AA 3 6 V is used for saving of retentive data and for operation of the real time clock The battery compartment can be found on the left side of the central processing unit unit behind a blanking plate The charge level of the battery is monitored If the battery voltage exceeds a preset fixed limit value a common group fault is indicated The battery backup times are e Worst case 3 years continuous buffering e Typical 5 years of continuous buffering NOTICE Only change the batteries when the supply voltage is switched on Otherwise data may be lost The order designation of the battery is XT CPU BAT1 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 1 Design of the XC200 PLC 1 1 Rack 1 1 8 Multi media card MMC secure digital card SD USB stick 1 1 9 CPU drives MMC SD and USB serve as mass memory You can load the r
54. times 5 6 Operating states This function is not available 5 5 8 Failure code with direct peripheral access Verify all functions as far as possible for the validity of the call parameters Verification is undertaken to determine if the access occurs in dependence on the parameterized signal module and the physical existence of the signal module If a fault is determined access is not undertaken and a failure code is output The data fields for the value transfer remain unchanged The DisableInterrupt and EnableInterrupt functions do not generate a failure code The following return values are possible Table 9 Failure codes with direct peripheral access O0 ACCESS NO ERROR no error O0 ACCESS INVALIDE SLOTNUMBER Slot 0 or greater than 15 O ACCESS INVALIDE OFFSET BitWord offset is too large O0 ACCESS DENIED nvalid access e g write access to input module read access to output module or access to non available address range offset too large 0 ACCESS NO MODULE o module available at the parameterized slot O ACCESS INVALIDE Buffer 0 or incorrect pointer to the output variables O0 ACCESS INVALIDE Value Event is not 0 or 1 with WriteBitDirect 5 6 Operating states The following overview provides you with the state definitions for the CPU The LED indications for the various states are also shown Table 10 Definition of the states of the XC200 with LED display
55. to the COMBICON connector of the CPU additional details concerning stub lines are not required The bus users are configured in the PLC Configuration window of the CPU in the programming software Cable recommendation LAPP cable UNITRONIC BUS LD Table 104 Standard parameters for CAN network cable according to the ISO 11898 Bus length Loop resistance Core cross Bus Baud rate at cable section termination length resistor m mO m mm Q Kbit s 0 40 70 0 25 0 34 124 1000 at 40 m 40 300 60 0 34 0 6 150 300 gt 500 at 100 m 300 600 40 0 5 0 6 150 300 100 at 500 m 600 1000 26 0 75 0 8 150 300 gt 50 at 1000 m Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 13 Appendix 13 3 Transparent mode Text output via RS232 example 13 3 Transparent mode Text output via RS232 example The example shows a text output via the RS232 interface of the CPU in transparent mode PROGRAM PLC PRG VAR BRAKE TONE STEP UINT dwSioHandle DWORD WriteBuffer STRING 26 nWriteLength DWORD typComSettings COMSETTINGS typComSetSettings BOOL out AT QBO0 BYTE INP AT IX0 0 BOOL STEPERR UINT Closeresult BOOL Coun DWORD RESET BOOL END_VAR Cycle time 50ms CASE STEP OF 0 IF INP 1 THEN Start IX0 0 TRUE STEP 1 END IF Offnen Open IF dwSioHandle 0 THEN dwSioHandle xSysComOpen Port Com1 IF dwSi
56. without prior download of a user program default 125 kBaud Node Id 127 The target PLC must not be configured as a CAN Master or CAN Device for this purpose You can for example load a program from the PC via a PLC of the XC device series into the XC200 Assign a Routing Node ld to the XC200 target PLC in this case 8 2 0 1 Routing through XC200 To perform a program transfer or routing using TCP IP through a connection between XC200 and PC you must first set the block size for the transferred data The block size 4 kByte or 128 kByte depends on the transfer type program transfer or routing and the operating system gt Table 14 Table 14 Block size for data transfer Program file transfer Routing XC CPU201 XC CPU201 XC CPU201 XC CPU201 XC CPU202 OS version OS version OS version OS version OS version V1 03 02 V1 03 02 lt V1 03 02 V1 03 02 V1 00 07 Block size 128 kByte 128 4 kByte Routing 4 kByte 4 kByte Default 128 kByte not possible BTS operating system NOTICE The program download with a block size of 4 KByte to an XC CPU201 with an operating system version lt V1 03 02 causes a malfunction If a program download is performed the progress bar on the programming device monitor will only change erratically about every 10 seconds The setting of the block size change of the value in the registry is explained as follows You can change this setting only if you have admini
57. 0 a Figure 37 Task configuration for the examples Example 1 Table 6 Task details for example 1 Task name Priority Cycle time Prog 1 2 50 ms Prog 2 1 10 ms In the first task Prog1 the inputs IX1 of input module 6 0 and 96IX1 of input module 8 3 are programmed in the program progtes 2 Before the start of the first task Prog1 the inputs of these modules are updated In the second task Prog2 the input IX7 1 of input module 1 is programmed in the program progtes 2 Before the start of the 2nd task Prog2 the inputs of this input module are not updated as this only occurs in the 1st task Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 53 5 Program processing multitasking and system times 5 3 Multitasking progtes1 PRG ST progtes1 PRG 0001 PROGRAM progtes1 mem1 BOOL mem2 BOOL BDOOS END VAR B001 mem 1 z535 6 0 Update Inputmodul illnputs 6 0 7 7 i Inputs 8 0 8 7 00031mem2 1x8 3 0001 PROGRAM progtes2 0OD2 vAR mem3 BOOL OO04 END_VAR 0001 mem3 z 9617 1 0002 Figure 38 Program for example 1 ME progtes2 PRG no Update Example 2 Table 7 Task details for example 2 Task name Priority Cycle time Prog 1 2 50 ms Prog 2 1 20 ms In example 2 in the first task the input 6 1 is programmed and in the second task the input 8 4 and output 3 4 is programmed At the start of the first task
58. 01 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 43 4 Operation 4 5 Updating the operating system 4 5 1 2 Transferring the operating system from the PC to the MMC of the XC CPU201 This is only possible via an Ethernet connection The XC CPU201 must contain an operating system from version 01 03 00 or higher After the transfer the operating system is located in the directory disc mmcWmnoellerWC CPU201 PC MMC The process operates analog to the transfer of the operating system from the PC to the PLC Simply click on the button Transfer to MMC see Figure 25 MMC PLC If the operating system of an XC CPU201 is to be updated via the MMC the controller must have an operating system from version 01 03 00 The operating system is updated during the startup procedure 4 5 1 3 Deleting the operating system boot project from the MMC of the XC CPU201 You can delete the operating boot project system from the PC e g with Internet Explorer gt Establish a connection to the XC CPU201 via the default address ftp 192 168 119 200 gt Open the disc mmcWnoellerWC CPU201 directory All the operating system files are stored in this directory and can be deleted there 44 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 4 5 2 XC CPU202 4 Operation 4 5 Updating the operating system The following description firmware update applies to version 2 4 13 and higher target firmwar
59. 32 connection Please use the XT SUB D RJ45 article no 262186 programming cable to make a connection between the XC200 and PC RJ45 plug Programming cable SUB D socket CONDO BRWN Figure 19 Pin assignment RS232 programming cable See also e Connection set up PC XC200 gt Page 70 e RS 232 interface in Transparent mode gt Page 85 3 5 Interface assignments 3 5 1 USB interface Table 1 Configuration of the USB interface Signal 1 4 1 5 V 2 USB 3 USB 4 GND 3 5 2 XC200 programming interface Table 2 Configuration of the programming interface Signal RJ45 socket RS232 Ethernet 8 RxD 8 7 GND 6 Rx 5 5 TxD 4 4 GND 3 Rx 1 2 E T 1 Tx Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 3 Engineering 3 5 Interface assignments 27 3 Engineering 3 5 Interface assignments gt The Ethernet socket on the XC CPU202 is reversed by 180 degrees However the pin assignment is identical to that of the XC CPU201 3 5 3 CAN easyNet interface Table 3 Configuration of the CAN easyNet interface Terminal Signal CAN easyNet 6 GND GND JE 5 CAN L ECAN L e 4 CAN H ECAN_H 2j 3 GND GND 1 2 CAN_L ECAN_L 1 CAN H ECAN_H Connector type 6 pole plug in spring loaded terminal block conductor cross s
60. 4 3 7 1 Warm reset 4 3 7 2 Cold reset 4 3 7 3 Full reset 36 There are three different types of Reset commands e Warm reset e Cold reset Full reset Table 5 The commands also affect the state of the CPU shows the commands to use for initializing a retentive variable range The commands also affect the state of the CPU The program is stopped The variables are initialized The program can be restarted The program is stopped The variables are initialized The program can be restarted The program in the PLC and the boot project are deleted The variables are initialized The PLC is set into the NOT READY state Table 5 Behavior of the variables after a Reset Reset command Variable type Warm reset Cold reset Full reset Non retentive Activation of the initial Activation of the initial Activation of the initial values values values Retain Values remain in memory Persistent Activation of the initial Values remain in memory values Retain Persistent Values remain in memory Values remain in memory 1 After a full reset the program must be reloaded In online operation the Start command can now be issued 2 Physical operands such as I Q or M cannot be declared as retain variables Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 4 Operation 4 4 Programs and project 4 4 Programs and project 4 4 1 Loading the program You must log on in order to loa
61. Abbrechen Schreibgeschiitzt ffnen Figure 24 Selecting the operating system for XC CPU201 gt Opening of the operating system file to be transferred The following window appears XC200 MFD Series Operating System Download Tool Serial communication parameter for download to PLC r IP address for download to MMC Serial port COM1 v 115 2 kBaud 192 168 119 200 Change Download progress Output logging Operating system lt 15 41 18 gt Open image file and start reading lt 15 41 18 gt Image file successfully read lt 15 41 18 gt Ready for image download Figure 25 Download of the XC CPU201 operating system 42 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 4 Operation 4 5 Updating the operating system Click on the Download to PLC button The Connecting to target PLC window entry appears Please reboot target now gt Switch off the control voltage of the XC CPU201 and wait a few seconds This will ensure that the residual voltage is discharged gt Switch the control voltage of the XC CPU201 back on The transfer of the operating system into the XC CPU201 is started It can take a few minutes Please observe the signal states of the operating LEDs The read SF LED is lit during the transfer When the transfer display shows 100 96 the SF LED goes out after a short delay It will light up later after approx 1 minute an
62. C 11801 and EN50173 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN050030017 EN www eaton eu 135 13 Appendix 13 2 Properties of the CAN cable 13 2 Properties of the CAN cable 136 Use only cable that is approved for CAN application with the following characteristics e Characteristic impedance 100 to 120 Q e Capacitance lt 60 pF m The specifications for cable plugs and bus termination resistor are defined in ISO 11898 Some requirements and specifications for the CAN network are listed below In Table 104 standard parameters for the CAN network with fewer than 64 CAN stations are listed the table complies with the specifications of ISO 11898 The length of the CAN bus cable is dependant on the conductor cross section and the number of bus users connected The following table includes values for the bus length in dependance on the cross section and the connected bus users which guarantee a secure bus connection table corresponds with the stipulations of the ISO 11898 Table 103 Cable cross section bus length and number of bus users conform to ISO 11898 Cable cross section mm Maximum length m n 32 n 64 n 100 0 25 200 170 150 0 5 360 310 270 0 75 590 470 410 n number of connected bus users If the bus length is greater than 250 m and or are more than 64 slaves connected the ISO 11898 demands a residual ripple of the supply voltage of s 596 As the bus cable is connected directly
63. C 24 Vo 0 V DC Voltage supply of CPU Voltage supply of the I local digital inputs outputs XC CPU200 Figure 12 Example of wiring for power supply unit Main switch 2 Circuit protection device 3 24 V DC supply voltage Earthed operation 5 In floating i e non earthed operation an isolation monitor must be used IEC 204 1 EN 60204 1 DIN EN 60204 1 24 V DC line filter ensures that a rated operating voltage of up to 24 V DC maximum is available at a rated voltage of 2 2 A Use of the filter ensures that the EMC stipulations for devices Instructions The filter is nota component of the central processing unit and must therefore be ordered separately Type XT FIL 1 Article no 285316 Supplier Eaton Industries GmbH Dimensions on Page 141 gt Technical data on Page 147 1 Internal jumper 2 Additional PE connection via contact spring on rear 3 4 2 Connecting inputs outputs central processing unit This figure shows the connection of inputs outputs and their power supply o alrfolofaly ww a eo 24V 24V 0 Vo 24V 0V Figure 13 Connecting inputs outputs to the central processing unit Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 23 3 Engineering 3 4 Connections Wiring examples on the XIOC modules are provided in the manual XI OC Signal Modules Hardware and Engineering MN05002002Z EN 3 4 3 Con
64. C CPU202 XV 06 14 MN050030017 EN www eaton eu 59 5 Program processing multitasking and system times 5 5 Direct peripheral access 5 5 1 ReadBitDirect 5 5 1 1 Parameters of the 5 5 2 ReadWordDirect 5 5 2 1 Parameters of the 60 A bit of an input module can be read directly with this function The state of an input bit is stored in the variables which indicate to the parameterized pointer ptr xValue The pointer variable will not be changed when a fault occurs during processing FUNCTION ReadBitDirect UINT Returnvalue 0 or Errorcode gt 0 VAR INPUT uiSlot UINT Slot 0 7 uiBit UINT Bitposition 0 63 ptr x value POINTER TO BOOL Pointer to read data value END VAR VAR END VAR READBITDIRECT uiSlot UINT uiBit UINT ptr xvalue POINTER TO BOOL ReadBitDirect UINTI Figure 42 Function ReadBitDirect ReadBitDirect function uiSlot Slot number of the signal module For possible parameters see Table 8 on Page 59 uiBit Bit position within the input value of the signal module For possible parameters see Table 8 on Page 59 ptr xValue Pointer to the variable value ReadBitDirect Display of the failure code see Table 9 on Page 63 A word of an input module can be read directly with this function The state of an input word is stored in the variables which indicate to the parameterized pointer ptr wValue The pointer variable wil
65. CE a x FTP Parameters N What are the FTP parameters Please specify the login information and dick Next to continue IP Address 192 168 119 202 Username anonymous Password quest www eaton automation com lt Back Cancel Figure 29 FTP parameters Select the XC202 device type and click on Next Select the PLC operating system component and click on Next Click on Install to start downloading the firmware Wait until the window shows a message saying Update finished Then close the window with RETURN Click on Done to exit the Setup Wizard The update process when using removable media or a local directory Figure 28 page 45 is similar to that for FTP installation Procedure Plug the USB flash drive or SD card into the computer Go to the Setup TargetFirmwareWinCE gt fig 28 window and select Install using removable media Select the removable media directory and click on Next Select the XC202 device type and click on Next Select the PLC operating system component and click on Next Click on Install to start downloading the firmware Click on Done to exit the Setup Wizard vvvvv vv The firmware files will be found in a directory on the removable medium called CONTROL XC CPU202 gt Plug the USB flash drive or SD card into the XC CPU202 The system will check whether there is a different operating system on
66. Functional spans In order to better cover the requirements for different applications the CPU is available with different performance levels This affects the speed the size of the user memory and function of the integrated web server The following part numbers are available e XC CPU201 EC256K 8DI 6DO XV e XC CPU201 EC512K 8DI 6DO XV e XC CPU202 ECAM 8DI 6DO XV EC256K ECB12K and ECAM are a measure for the size of the user memory XV identifies a visualization CPU with integrated web server According to the size of the user program the following memory values apply XC CPU201 8DI 6DO XV XC CPU202 EC256K EC512K ECAM Program code 512 kByte 2048 kByte from 4 MB operating system 1 04 01 Program data of which 256 kByte 512 kByte 2M Bytes Marker 16 kByte 16 kByte 16 kByte Retain data 32 KByte 32 KByte 64 kByte The CPU is arranged into three functional areas e Power supply Page 10 e Local inputs and outputs gt Page 10 e Processor unit with interfaces Page 12 z gt o Figure 2 XC CPU201 a CPU of the XC200 series D Processor unit with interfaces 2 Power supply with local inputs outputs Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 9 1 Design of the XC200 PLC 1 1 Rack 1 1 3 Power supply Two separate voltage supplies are available for the power supply of the processor unit and the local inputs outputs
67. HANNEL Q Start system version gt 71 03 04 jj EMPTY SLOT SLOT 4 EMPTY SLOT SLOT Figure 63 PLC configuration The processing unit transfers states and events to the virtual input The required inputs and outputs for the incremental encoder function are shown in Figure 69 or on Page 91 the necessary inputs and outputs for the counter functions can be found on Page 94 In order to expand the local inputs and outputs simple add XIOC modules by clicking on the EMPTY SLOT folder With the replace element command select a module from the list The new module name is indicated instead of the EMPTY SLOT 10 1 1 Local digital inputs outputs Each physical change of the modules on the slots of the rack slot exchange or replacement for another function is detected by the CPU since the input output offset is changed so that access errors are caused when assigning the input and output parameters If you have reserved free slots in the configuration for later upgrades and if these slots are later assigned this will also cause an imparity and change of the input output offset between the configuration and the program Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 87 10 Configuration and parameterization of the inputs outputs 10 1 Input output general 88 CAUTION e Match the inputs and outputs in the program each time you make a change to the configuration e f the
68. I Figure 131 UIP GetUserlPAddressCount Table 96 Input variables for UIP GetUserlPAddressCount Input variables Meaning None Table 97 Return values for UIP GetUserlPAddressCount ReturnVal Meaning 0 up to maximum number Number of the values currently entered in the user IP address table 23 126 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 11 Libraries function blocks and functions 11 2 XC200 specific functions UIP MakeUserlP Converts the IP string to IP DWORD Bigendianness UIP_MAKEUSERIP IPAddress POINTER TO STRING 80 UIP_MakeUserlP DWORD Figure 132 UIP MakeUserlP Table 98 Input variables for UIP MakeUserlP Input variables Meaning IPAdress Pointer to IP address apostrophe e g 192 168 119 1 Table 99 Return values for UIP MakeUserlP ReturnVal Meaning IP address in hexadecimal IP as DWORD e g 16 C0A8770B corresponds to the above IP address representation 192 168 119 11 0 Error in the input string or invalid string Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN050030017 EN www eaton eu 127 12 Browser commands 11 2 XC200 specific functions 12 Browser commands The PLC browser is a text based PLC terminal monitor Commands for scanning particular information from the PLC are entered in an entry line and sent to the PLC as a string The response string is shown in a result window of the browser This fun
69. MBit s 10 MBit s 10 MBit s 100 MBit s 100 MBit s 100 MBit s Surface mounting Stranded every two Stranded every two Stranded every two cores cores cores Without screen with full screen with full screen each core pair is additionally screened Flexibility Medium Medium Medium Screening None Single double Topology Point to point Point to point line star Point to point line star Maximum segment length 00 m 00m 100 m 1 Use in industrial environments is not recommended due to poor EMC characteristics 2 The conductor pairs are shrouded in a full shield The task of the full screen is to prevent external interference This cable is conditionally suitable for industrial use due to the high crosstalk values between the individual conductor pairs 3 This cable has a separate internal screen for every conductor pair as opposed to the STP cable This significantly reduces the crosstalk values and the cable also demonstrates a good level of protection against EMC This characteristic makes the SSTP cable particularly good for industrial use The maximum segment length is 100 m If the network expansion is greater suitable infrastructure components must be used For this transceivers hubs and switches must be considered The cable to be selected depends on the the ambient conditions at the installation location interference flexibility transmission speed The installation guidelines for the Ethernet wiring are described in ISO IE
70. Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 55 5 Program processing multitasking and system times 5 4 Task monitoring with the watchdog CAUTION If you want to parameterize a task without a Watchdog or want to deactivate the Watchdog at a later time all the outputs which have been accessed up to this time can continue to remain active This is the case for example when the task can t be ended due to a continuous loop programming error and or missing end condition stepping condition The outputs continue to retain their High potential until the operating mode is changed from RUN to STOP or until the control voltage for the outputs is switched off 5 4 0 1 Watchdog configuration 56 You can select the following settings in the task configuration e Watchdog on off e Watchdog time e Watchdog sensitivity These settings apply for time controlled and event controlled tasks Watchdog active The watchdog is started at the commencement of every processing cycle and reset again at the end of the task The following rule applies for definition of the watchdog time with several tasks each watchdog time must be longer than the sum of task interval times If the processing time is longer than the watchdog time sensitivity 1 e g with a continuous loop in a program the watchdog becomes active If the processing cycle is shorter than the watchdog time the watchdog is no
71. N www eaton eu
72. N www eaton eu 19 3 Engineering 3 1 Control panel layout 3 Engineering 3 1 Control panel layout 3 1 1 Ventilation 20 The layout of the components inside the control panel is a major factor for achieving interference free functioning of the plant or machinery During the project planning and design phase as well as its implementation care must be taken that the power and control sections are separated The power section includes e Contactors e Coupling interfacing components e Transformers e Variable frequency drives e Current converters In order to effectively exclude any electromagnetic interference it is a good idea to divide the system into sections according to their power and interference levels In small control panels it is often enough to provide a sheet steel dividing wall to reduce interference factors In order to ensure sufficient ventilation a minimum clearance of 50 mm to passive components must be observed If the adjacent components are active elements e g power supplies transformers a minimum clearance of 75 mm must be observed The values that are given in the technical data must be observed Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 3 Engineering 3 2 Preventing interference 3 1 2 Layout of units Build the module racks and the controls into the control panel in a horizontal position
73. N05003001Z EN www eaton eu 4 Operation 4 1 Startup behavior 4 12 Startup behavior of the XC CPU202 Power on Start No Update and reboot save settings IP address COM boot project Yes Yes Version or Disc Sys Several OS on SD MMC Determine newest version VIN nein CONTINUE m Update and reboot save settings CIP COM Bootproj Yes Version lt or gt Disc_Sys Several OS OS on USB on USB Yes Determine newest version No No CONTINUE Yes icati i gt Copy the application project to disk_sys Application projec on SD MMC Nee Copy the application project to disk_sys Uu 1 Application project on USB ie CONTINUE is Note Startup ini on SDIMMC mm If both SD MMC and USB are fitted SD MMC has priority The SD MMC is scanned in startup ini Figure 21 Boot procedure with SD MMC and USB Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 31 4 Operation 4 1 Startup behavior i Load retentive data Start behavior COLDSTART WARMSTART RUN STOP No switch in RUN I RUN STOP gt section Program start 4 1 3 Configuring the start up behavior with CODESYS 4 1 3 1 HALT The start up behavior setting primarily defines the handling of the retentive variables The following
74. RUPT CH Disablelnterrupt BOOL Figure 72 Disablelnterrupt function With this function the physical interrupt which was deactivated beforehand can now be re enabled as an active interrupt FUNCTION Enablelnterrupt BOOL IVAR INPUT typChannel INTERRUPT CHANNEL END VAR ENABLEINTERRUPT typChannel INTERRUPT CH Enablelnterrupt BOOL Figure 73 Enablelnterrupt function 10 3 2 Parameter definition 96 The parameterization and prioritization of the interrupt occurs in the PLC and Task Configuration of the CODESYS activate the Resources tab and call up the Task configuration gt system events folder Each interrupt can be assigned with a POU here Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 10 Configuration and parameterization of the inputs outputs 10 3 Interrupt processing 10 3 3 Example for interrupt processing A Basic task contains a POU PLC PRG A further POU Fastprog should be processed if an L gt H rising edge on the input 10 5 generates an interrupt gt Create the POUs PLC PRG and Fastprog as shown in Figure 74 Fastprog Pl ET Fastprog PRG 0002 VAR PLC_PRG PRG 0003 b BYTE D00AEND_VAR 0001 1 PLC_PRG PRG i 0001 PROGRAM PLC PRG 0001 a a 1 000 000 A pie PRAN Figure 74 PLC and Task configuration gt Changeover to the PLC configuration and assign input 10 5 L H edge e g t
75. SIONS i o eek Le 141 Technical Data ren en tette eer d eee 142 echnical data Filtet 3 e IRR 147 LI ce rn Ener ee tee eee 149 Modular PLC XC CPU201 XV XC CPU202 XV 08 13 MN05003001Z EN www eaton eu O About this manual 0 1 List of revisions 0 About this manual 0 1 List of revisions The following significant amendments have been introduced since previous issues Publication date Page Subject New Modification 12 03 Reprint 38 Data remanence 1st paragraph 4 04 04 64 Limit values for memory usage V 62 WriteBitDirect v 06 04 23 86 91 External 24 V DC line filter for the XC200 power supply V 08 04 38 Data remanence note v 42 Download of programs V 65 RS 232 interface of the XIOC SER in transparent mode COM2 3 4 5 4 90 Electromagnetic compatibility V 11 04 13 85 ulti media card MMC secure digital card SD USB stick v 14 Splitting of the ETH232 interface V 35 Status display 45 Connection set up via RS 232 interface 100 XC200 specific functions 106 Additional functions of the XC200 Util2 lib library for the XC CPU201 85 RS 232 interface in Transparent mode 03 05 14 Splitting of the ETH232 interface 17 Figure 20 65 Segment size of the XC CPU201 EC256k 66 Addressing inputs outputs and markers 69 Diagnostics 78 Programming via CAN open Network Routing 09 05 43 Set the system
76. ST p ersionList POINTER TO UTI2 VersionList UTI2 GetPlcVersionList BOOL Figure 121 UTI2 GetPlcVersionList Table 76 Input variables for UTI2_GetPlcVersionList Input variables Meaning pVersionList Pointer to UTI2_VersionList Table 77 Return values for UTI2_GetPlcVersionList ReturnVal Meaning TRUE Function completed successfully FALSE Errors Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN050030017 EN www eaton eu 121 11 Libraries function blocks and functions 11 2 XC200 specific functions UTI2 Reboot Restart of the PLC UTI2 REBOOT QUTI2 Dummy BYTE UTI2 Reboot BYTELI Figure 122 UTI2 Reboot Table 78 Input variables for UTI2 Reboot Input variables Meaning UTI Dummy Set variable to 0 Table 79 Return values for UTI2 Reboot ReturnVal Meaning 1 Dummy return value Reboot executed afterwards UTI2 RemoveProjectFromMmc Removes the backup project from the MMC SD UTI2 REMOVEPROJECTFROMMMC UTI2 RemoveProjectFromMmc BOOL Figure 123 UTI2 RemoveProjectFromMmc Table 80 Input variables for UTI2 RemoveProjectFromMmc Input variables Meaning None Table 81 Return values for UTI2 RemoveProjectFromMmc ReturnVal Meaning TRUE Function completed successfully FALSE Errors 122 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 11 Libraries function blocks and functions 11 2 XC200 sp
77. V capacitive connection Surge IEC EN 61000 4 5 Digital 1 0 asymmetric 0 5 kV Analog 0 asymmetric 1kV connection on the screen Mains DC asymmetric 1kV Mains DC symmetrical 0 5 kV Cable conducted interference induced by high frequency fields previously 3V radiated RFI IEC EN 61000 4 6 146 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 13 7 Technical data Filter 13 Appendix 13 7 Technical data Filter 24 V DC filter XT FIL 1 General Standards IEC EN 61131 2 EN 50178 Ambient temperature C 0 455 Storage RE 25 70 ounting position horizontal vertical Relative humidity non condensing IEC EN 60068 2 30 10 95 Air pressure in operation hPa 795 1080 Vibration resistance 5 8 4 Hz 43 5 mm 8 4 150 Hz 1 0g echanical shock resistance 15 g 11 ms Impact strength 500 g 50 mm 25 g Overvoltage category l Pollution degree 2 Degree of protection P20 Rated surge voltage V 850 Emitted interference EN 61000 6 4 Class A nterference immunity EN 61000 6 2 Weight g 95 Dimensions W x H x D mm 35 x 90 x 30 connection terminals Screwed terminal Terminal capacity Screw terminals flexible with ferrule mm 0 2 2 5 AWG22 12 solid mm 0 2 2 5 AWG22 12 power supply Input voltage V DC 24 admissible range V DC 20 4 28 8 Residual ripple 5 TVSS Yes Potent
78. a tint 131 Memor oreet ath Eee tinis 14 Parameter predefined in Startup ini file 75 MNES nennen etna ES 48 System events vs mn ESL DENS 51 T Task ORIG EOIN EA ee ea i eme DE eres 48 Configuration nasse oes scc aes 48 UG IIS xc iu aree buh etd ee 49 Monitoring 22222 22222 55 TCP IP connection for routing 79 Technical Data 00 0 0 00 02 ee 142 Terminal assignment 000008 11 Test and commissioning 05 34 Text output via the RS 232 interface 137 Transparent mode 00 85 137 Type task condition 0008 48 U Up COUDter i ded bete EDS 93 CONDECION sui ate tacit A exte ae 25 Up down counter 2 2222er 17 USB interface assignment 27 USB StCk ziehe e tette 13 14 User memory SIZ 2222er 9 User program memory values 9 Sel nsa Se titur elation wt DA oto m aab ites we 124 V Voltage dip a toss tens 10 Voltage supply CCOBEIGO DIOE dentato e Re Cae e oe nta 23 W WARMSTART startup behavior 32 Watchdog 5 cece ee 55 Web SENET areren qa RI A E MI ee det 9 Web visualization iilii less 64 WNININGE 224208 M une bare ee 21 Wiring example Inputs outputs 00 0 0 0 0 2 23 Power SUpply 2 2 eel px ust 23 X SION MOUSE qusc qs cU e geen I toes I 8 152 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z E
79. am DE S uS Ea 48 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 151 Program Call task re er rh eR DS 49 PROCESSING aiio tates do ese t RE etary 48 Stat ct ido Mode a Piet MI reo 33 SION up seed eere d teo e ede 33 Programming oue eene Eee se 8 Programming interface sac sss ae 14 27 Pulse generators n tee anh a lessen 25 R HGdClOIS d se v emet d NIRE VE URS 22 realtime clock 2 Hana een ESTEE 12 Helterenoce Sighal so vo ee IRR eb 91 Reference window esses 91 Registry save ara eee eese 111 Reset scone ir oaks d dde e bsc la qd ee d 36 RJ 45 interfacan n eet ms Me en cene 26 ROUTING et wid di eta ads ET DIA I 78 RS232 interface 0 eee 14 S Secure Digital Card 0 00 0005 13 Segmebts x uv sauren ar quos des hte tet 64 Shielding 22 2 EP past ns 22 Signal state inputs outputs 11 Single cycle mode 2 0 0 0 aaan 35 Single step mode 00 00 0000 cea 34 Startup behavior 0 0 0 0 0 eae 29 Configuring with CoDeSys 32 Sta rt pntitile coco ee der 75 Stdtus display s sesto LM A ex b bos ed C E 35 Subnet mask address 05 106 Suppressor circuit for interference sources 22 Switching threshold 0 0005 10 SySLibPTG PAT iud oti tto some Tae eoo SER fe 12 System EVENTS tein ae eee Nee 48 Libr ties ient RET teen nate et 100 Gad GPW cal o otto o erred c
80. and system times 5 10 Diagnostics You can run diagnostics with the help of the diagnostics function block The following possibilities are available Type of diagnostics Function block Library Documentation Inspection of the XIOC modules XDiag SystemDiag xSysDiag lib MN05010002Z EN e Does the configuration of the hardware correspond with the previously called configurator AWB2786 1456 e sthe module function OK Note These tests are undertaken once during switch on or after loading or start of the program Inspection of the XIOC NET DP M module and the stations on the DP line XDiag SystemDiag XSysDiag lib 05010002Z E XDiag_ModuleDiag previously called AWB2786 1456 DiagGetState BusDiag lib 05002002Z E previously called AWB2725 1452 Inspection of the XIOC NET DP S module XDiag_SystemDiag xSysDiag lib 050100027 E XDiag ModuleDiag previously called AWB2786 1456 DP slave provides the master with additional diagnostics data XDPS SendDiag xSysNetDPSDiag lib 05002002Z E previously called AWB2725 1452 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 69 6 Connection set up PC XC200 6 1 Connection set up via RS 232 interface 6 Connection set up PC XC200 The connection between the PC and CPU can be established via e the RS232 interface e the Ethernet interface In this chapter you will get to know the settings to be made in
81. are programmed in several tasks an update refresh of the input output level of the input output image is performed according to special rules The system starts searching the first task for programmed inputs e g after the start The term First task is the first task in the task configuration irrespective of priority and the cycle time of the individual tasks The name of the first task Prog1 is in the Figure 37 If the system detects an input that is connected by the configuration with an input module e g XIOC 16DI all the inputs of this module are updated in the image If other inputs are present in this task that are assigned to other modules the inputs of these modules are also updated module update procedure If for example the inputs 961X6 0 and 961X7 1 of input module 1 are addressed by different tasks the inputs of this module are only updated from the first task Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 5 Program processing multitasking and system times 5 3 Multitasking 5 3 1 1 Examples The examples are based on the following configuration r input module 1 input module 2 XC200 output module 1 local 1 0 central 1 0 Figure 36 XC200 configuration The task configuration appears as follows Past configuration MIETE B Task configuration E i _ 4 System events B Prog iE progtest0 El Le Prog2 L B progtes2
82. as parameters Pay close attention to the respective special characters when entering commands e filecopy e FileRename e filedelete e filedir Examples for XC CPU201 filedir without parameter details the default setting is Wdisk sys Wproject filedir Wdisk sys filedir disk_sys project filedir disk_mme MOELLER XC CPU201 EC512k 8DI 6DO filedir disk_mmc MOELLER XC CPU201 EC5 12k 8DI 6DO project aaa prg filedir disk_usb MOELLER XC CPU201 ECS512k 8DI 6DO filedir disk_usb MOELLER XC CPU201 EC512k 8DI 6DO project bbb prg filecopy disk_sys project default prg disk_sys project yyy prg filerename disk_sys project yyy prg disk_sys project xxx prg filecopy disk_sys project default prg disk_mme MOELLER XC CPU201 EC512k 8DI 6DO project default prg filedelete disk_mmc MOELLER XC CPU201 ECS512k 8DI 6DO project default prg If the CPU XC CPU201 EC256K 8DI 6DO is available the instruction section 512 is replaced by 256 On the XC CPU202 CONTROL is used instead of MOELLER Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 12 Browser commands 12 3 Display CPU loading pldoad 12 3 3 Error and event list after calling browser commands The dialog language for error and event lists is available in German English French and Italian The active language is displayed with getlanguage the conversion of the language is implemented with se
83. cement of the second consecutive task which is longer than the defined watchdog time Variant 4 Endless loop The watchdog is triggered because the task time takes longer than the watchdog time multiplied by the watchdog sensitivity 2 x 15 ms 30 ms IZ 10 ms Z ot Z i IZ 3 IZ IZ IZ ud IZ IZ IZ l l amp wr Ea mea l l ig I I OM E continuous l loop 1 f Figure 40 Watchdog active multiple tasks with differing priority 5 4 0 3 Watchdog deactivated The cycle time of a task is not monitored when the watchdog is deactivated If a task has not ended within the preselected interval time when the watchdog is deactivated this task will not be called or started in the following cycle A task is only started again if it has been ended in the previous cycle Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 57 5 Program processing multitasking and system times 5 5 Direct peripheral access 5 4 0 4 Example Watchdog deactivated 5 4 1 Multiple tasks with The interval time IZ is 10 ms Variant 1 The interval time IT of a task was set to 10 ms The actual task time TT is 15 ms The task is started on the first call but is not terminated before the second cycle Therefore the task is not started again in the second cycle Only in the third cycle after 20 ms is it possible to restart the task The task d
84. ciiicet een 96 Parameter definition an 96 Example for interrupt processing sssssssse 97 Libraries function blocks and functions 99 Using IbFarles cei o et et e ee ir tpe tr Sd 99 Installing additional system libraries sssss 100 XC200 specific Tunclons Sco oia Sapa epddeoD ep QUU 100 CAN BIOS ois dt ederent ns 101 Event TUnctlons een et e DM ei verum 102 XIO GS functions AIN irren 105 Additional functions of the XC200_Util2 lib library for the PS 0 92 aa MEN ERE PIE 106 Additional functions of the XC200_Util2 lib library for the pot m UID e TER 112 Browser commands 222 222222020020220000n000nnonn ann rnnt nan nnns 128 Calling browser comMmmandS usine url 130 Accessing communications parameters neenn 130 Display CPU loading RE een 131 Display the loading of the CAN bus canload 131 Access to memory objects sssssssssseee ee 132 Error and event list after calling browser commands 133 Appendix iiie te our ch XR indies 135 Characteristic of the Ethernet cable nne 135 Properties of the CAN cable 136 Transparent mode Text output via RS232 example 137 Access to the CPU drives memory card nenn 139 SV SITIO My MOG Vase does e ee re 139 Modes for Opening Tile sir ri 139 Examples of the SysFile functions 140 DIMEN
85. configuration and program do not match or if an unavailable module is configured the PLC can t change over to the RUN mode A difference between the configuration and the physical existence non existence of signal modules is entered as a Fault event in the buffered memory range The geterrorlist browser command issues this fault as a General IO access error A unique slot assignment is not possible here The following illustrations indicate the changes of assignment of the input and output parameters when exchanging or adding or removing signal modules fff PLC Configuration E mici x E AT QX1 6 BOOL 32BitCounter Counter0 Enable CHANNEL l fi AT 96QX1 7 BOOL Counter Enable CHANNEL Q EMPTY SLOT SLOT XlOC 16DX SLOT t Atfa we WORD 16 Inputs 2 Outputs CHANNEL 0 E i AT seQw2 WORD 12 Outputs Inputs CHANNEL g EMPTY SLOTISLOT g EMPTY sLOT SLOTI n g MIOC 8DI SLOT H E AT IB8 BYTE 8 Inputs CHANNEL g EMPTY SLOTISLOT 2 wn NS wn w nin ale WORD 0 10VDC Output CHANNEL Q WORD 0 10VDC Output CHANNEL Q NORD 4 20mA Output CHANNEL Q Figure 64 Current configuration SO S1 S7 slot number on rack fff PLC Configuration 40l xl i AT QX1 6 BOOL 32BitCounter Counter Enable CHANNEL a AT 96QX1 7 BOOL Counter
86. ction can be used for diagnosing and debugging The browser commands available for the XC200 target system are as follows Table 100 Browser commands in alphabetical order Attribute ID Description Get a list of implemented commends caninfo Display CAN controller information canload Display of the loading of the CAN fieldbus clearerrorlist Erase error list cleareventlist Delete event list copyprojtomme Copy the boot project onto a Multi Media Card incl directory structure project directory copyprojtousb Copy the boot project onto the USB drive incl directory structure project directory createstartupini Create the Startupini file on the disk sys and disk mmc delpwd Erase password for online access dpt Output data pointer table enabledhcp Activates the DHCP function of the PLC filecopy Copy File filedelete Delete File filedir irectory list First folder in the list filerename ename file getbattery isplay battery status getcomconfig isplay baud rate of serial interface 1 getcommunicationport ead the interface parameters for the TCP IP communication geterrorlist isplay error lis geteventlis getipconfig isplay Ethernet address getipdns isplay current DNS address getipgateway isplay Gateway address getipwins isplay current WINS address getlanguage isplay dialog language for the erro
87. cuit strength Yes Potential isolation from supply voltage No CPU Microprocessor XC CPU201 Risc processor XC CPU202 ARM 532MHz memory Program code kByte XC CPU201 EC256 512 from operating system version V1 04 01 XC CPU201 EC512 2048 from operating system version V1 04 01 XC CPU202 ECAM 4096 Program data kByte XC CPU201 EC256 256 XC CPU201 EC512 512 XC CPU202 EC4M 512 Marker EC256K EC512K EC4M kByte 16 16716 Retain data EC256K EC512K EC4M kByte 32 32 64 Persistent data EC256K EC512K EC4M kByte 32 32 64 Watchdog Yes RTC Real Time Clock Yes Interfaces Multi Media Card or Secure Digital Card Yes optional order separately Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MNO5003001Z EN www eaton eu 143 13 Appendix 13 6 Technical Data Ethernet interface XC CPU201 EC256 8DI 6DO XV XC CPU201 EC512 8DI 6DO XV XC CPU202 EC4M 8DI 6D0 XV Baud rate MBit s 10 100 Terminal type RJ45 RS 232 serial interface without handshake line Baud rate Bit s 4800 9600 19200 38400 57600 115200 Terminal type RJ45 potential isolation No in the transparent mode Baud rate Bit s 300 600 1200 2400 4800 9600 19200 38400 57600 115200 Character formats 8E1 801 8N1 8N2 CAN open easyNet Baud rate Kbits s 20 50 100 125 250 500 800 1 000 Potential isolation Yes Device profile Accordi
88. d recently created or modified programs The question Load the new program will appear The load operation will start once this prompt has been confirmed Please note that the Retain variables are initialized during the load process but the PERSISTENT variables retain their value Program download is monitored After the default transfer time is exceeded communication ends and the error message Communications fault 0 Logging out This happens if the programs are very large or if the number of Persistent variables and or Retain Persistent variables are greater than 5000 The number is independent of the data type The transfer time can be extended to 30000 ms to eliminate this problem The transfer time can be set in CODESYS Options Category Load amp Save ala IV Tool bar Show print area margins IV MDI representation Cancel M Status bar F4 ignores wamings Cancel Colors Disbiones I Online in security mode og Build Query communication parameters before login Passwords eo A Source download Do not save communication parameters in project Symbol configuration wets r Database connection Do not manage communication settings via source control Macros Communications timeout ms 10000 Communications timeout for download ms 140000 XML encoding ISO 8859 1 Latin 1 Awest European _ Language Engish e n igure 22 Setting the transfer time In order to safely store
89. d the green RUN STOP LED flashes The waiting time depends on the programming of the internal flash memory comparable with the booting of a PC Further inputs appear on the download window The progress of the download is also indicated by the status bar on the transfer field Please do not engage in the download process until the green LED flashes and Ready for operating system transfer appears for a second time on the download window The download is only complete after both attributes have appeared H xC200 Series Operating System Download Tool xil m Serial parameter for download to PLC PS gt IP address for download to MMC Serial port cow x 115 2 kBaud 192 168 119 200 Change r Download proaress 100 r Output logging m Operating system 12 54 41 Open image file and start reading 12 54 41 Image file successfully read 12 54 41 Ready for image download 13 05 52 Connecting to target Please reboot target Download to MMC lt 13 07 09 gt Device communication is up 13 07 08 Downloading now Download to PLC lt 13 09 29 gt Flash erasing and programming Please be lt 13 09 56 gt Disconnecting 13 08 56 Download successfully done Abort download lt 13 09 56 gt Ready for image download Close Figure 26 Download of the XC CPU201 operating system ended gt End the download with the Close button Modular PLC XC CPU2
90. dli s ae wine 9 SYSTEMS sre 0 54 ere bel heb ue Pit 14 Usage limit values 0005 64 Memory Gard oe eec ener 139 Memory system elis TICs o aot dorm ud du ee anis 13 diSKSSyS nu nen as enfe eo moss e wed ea 13 disk Usb ana ooo e ett 13 MMC memory card 0 lees ee eee 14 Monitoring time Task 222222 55 Mounting position 0 0 0 0 ce eee 21 Multi media card 0 00000200 13 M ltitasking 15 5 vere ere bee 48 52 N Node vae ee etur a ea tes 81 N de Number unseren ek 81 O Online documentation 00008 7 Operating states CPU LED display 34 63 Operating system Updating ode ERR ER en 41 Operation esce er pes P SN PET en 29 Output MAC address 108 117 Outputs Addressing 0 00 cece eee ee 66 configuration and parameterization 87 signal STATS peas Ss 11 Wiring example 00000 23 P Parameterization inputs outputs 87 PC CORRE EID hoe iod se ee tetti de ee ee ee USE N 26 Performance scope CPU 0 9 PING response s sous nenn ar se 74 plecloads 2 2 Set potere be tea 131 Ple Pro Utilities terrai setae nr Rn tes 120 Port assignrtient e cos n ri hain gy oe 70 Power down logic 0 002 een 10 Power supply 00 00 00 cece eee 23 for processor unit and local inputs outputs 10 Power off interruption behavior 33 Priority task ccs ott dem
91. e network The routing connection enables you to carry out all the operations that are possible with a direct online connection between the programming device and the controller Program Download Online changes Program test Debugging Generation of boot projects Writing files in the PLC Reading files from the PLC Routing has the advantage that a PLC connected to the programming device can access all routing capable PLCs on the CAN bus You can determine in the project selection which controller you wish to communicate with This provides an easy way of controlling remote PLCs However the data transfer from routing connections is significantly slower than with direct serial or TCP IP connections This results for example in slower display refresh rates of variables and longer download times The following prerequisites must be fulfilled to use routing The routing PLC and the target PLC must both support routing Both PLCs must be connected via the CAN bus The PLCs must both have the same active CAN baud rate The valid routing node ID must be set on both PLCs The routing with the XC CPU201 is possible from operating system version V1 03 02 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 8 Programming via CAN open Network Routing 8 2 Routing features of the controller 8 2 Routing features of the controller The controller supports routing via the CAN bus Routing can be implemented
92. e version The operating system of the XC CPU202 is updated inside the XSOFT CODESYS 2 programming system Procedure gt Establish a serial connection via the Ethernet interface of the PC with the XC202 Information on this is provided in Section 3 4 6 Connect PC page26 and Chapter 6 Connection set up PC XC200 Page 70 gt Gotothe PLC Configuration window in XSOFT CODESYS 2 and open the Firmware tab babas Settings Other Parameters Firmware J PLC Configurati Update operating system Figure 27 PLC configuration window Click on the Start button under Update operating system gt Select the firmware file for the XC202 and click on the Open button gt Click on Next to start the Setup Wizard gt Select the FTP installation option and then click on Next B Setup TargetFirmwareWinCE baha Installation Type ES Select Installation Type Please specify the Installation Type then dick Next 9 FTP Installation Installation to a removable drive Installation to a local directory A Figure 28 FTP installation window gt Enter the PLC s IP address and click on Next Note The default network setting will be IP address 192 168 119 202 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 45 4 Operation 4 5 Updating the operating system B Setup TargetFirmwareWin
93. e with Figure 32 gt Define the Boolean variable a as the result of the event gt Enter the program call Param prog Task configuration EWTask configuration Taskattributes i4 System events Name Param El G Basic Basic_prog0 Priority 0 31 1 i progy Type cyclic 15 freewheeling triggered by event triggered by external event Properties Event s Watchdog Activate watchdog Timefe g t 200ms E Sensitivity fr Figure 32 Creating an event controlled task 50 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 5 Program processing multitasking and system times 5 2 System events 5 1 2 1 Writing a program gt Change over to the Modules tab and insert an object POU with the name Param prog You can now enter a program The program example Param prog Figure 33 increments the variable value by the value 1 The Param prog is processed if the variable a TRUE EIT nix 0001 PROGRAM Param prog OO004 END_VAR DOO1 value value 1 m nnn bn Figure 33 Programmed element for event controlled task 5 2 System events A POU can be called with the help of a system event It can be used when the PLC is started to initialize modules with parameters The system events are independent of the task 5 2 1 Assigning a POU to a system event gt Activate under System events in t
94. ecific functions UTI2 RemoveProjectFromUsb Removing the backup project from the USB stick UTI2 REMOVEPROJECTFROMUSB UTI2 RemoveProjectFromUsb BOOL Figure 124 UTI2 RemoveProjectFromUsb Table 82 Input variables for UTI2 RemoveProjectFromUsb Input variables Meaning None Table 83 Return values for UTI2 RemoveProjectFromUsb ReturnVal Meaning TRUE Function completed successfully FALSE Errors UTI2 RemoveStartuplni Removes the Startup ini file from the disk sys and the disk mmc UTI2 REMOVESTARTUPINI UTI2 RemoveStartuplni BOOLI Figure 125 UTI2_RemoveStartuplni Table 84 Input variables for UTI2 RemovesStartuplni Input variables Meaning None Table 85 Return values for UTI2_RemoveStartuplni ReturnVal Meaning TRUE Function completed successfully FALSE Errors Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 123 11 Libraries function blocks and functions 11 2 XC200 specific functions 11 2 5 4 USER IP 124 UTI2 SaveRegistry Saves the changes retentively in the Registry UTI2 SAVEREGISTRY UTI2 Dummy BYTE UTI2 SaveRegistry BYTEL Figure 126 UTI2_SaveRegistry Table 86 Input variables for UTI2_SaveRegistry Input variables Meaning UTI2 Dummy Set variable to 0 Table 87 Return values for UTI2 SaveRegistry ReturnVal Meaning 1 Function completed successfully 1 Errors UIP_AddUserlPAdd
95. ecipe data general data and the user program onto them The operating system OS supports memory types with the FAT 16 file system If you want you can use an SD memory card instead of an MMC memory card From operating system version 01 03 of the XC CPU201 you can transfer the operating system to the MMC in order to load it from there to other controllers operating system update From this operating system version in XC CPU201 it is also possible to use a USB stick for data storage NOTICE The file system of the memory card is not transaction safe Make sure that all the files of the program are closed before you plug or un plug a card or turn off the voltage See also e XC CPU 202 gt Page 40 e Deleting the operating system boot project from the MMC of the XC CPU201 gt Page 44 e Configuration of the USB interface Page 27 Erasing of files is implemented in the same way as erasing the operating system The XC200 has the following drives available e internal e Memory system disk sys e external optional e Multi media card MMC or secure digital card SD disk mmc USB stick disk usb The external CPU drive will continue to be called disk mmc even if you are using an SD card The boot system and the operating system are saved in compressed format and protected against failure of the power supply in the transaction safe system memory In the operating state the boot project and
96. ection up to 0 5 mm2 Terminals 1 and 4 2 and 5 as well as 3 and 6 are internally connected 28 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 4 Operation 4 1 Startup behavior 4 Operation 4 1 Startup behavior Several different user programs boot projects can be saved on the CPU They can be located on the MMC SD USB as well as on the disk sys system memory However the CPU simply runs a user program The following flow diagrams Fig 20 and Fig 21 show which program is used The charts also show the updating of the operating system OS using the MMC SD USB After voltage recovery a boot project saved in the XC200 will be started in accordance with the position of the operating mode switch and the programmed start conditions Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 29 4 Operation 4 1 Startup behavior 4 1 1 Startup behavior of the XC CPU201 Power on Start No Yes Determine newest version Update and reboot save settings IP address COM boot project Version Yes lt or gt Disc Sys Several OS on MMC CONTINUE Y CONTINUE j Yes Copy the application project to disk_sys CONTINUE lt i Startup ini on MMC Transfer of data from startup ini Figure 20 Boot procedure with MMC 30 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 M
97. edgement zero for counter 0 Acknowledgement zero for counter 1 Error acknowledge 0 L inhibit count pulse H enable count pulse 1 L inhibit count pulse H enable count pulse Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 10 Configuration and parameterization of the inputs outputs 10 3 Interrupt processing 10 3 Interrupt processing If an interrupt occurs the operating system executes the program organizational unit POU which is linked to the interrupt source CAUTION The execution of the interrupt POU is not time monitored Inadvertently programmed endless loops cant be exited A maximum of six interrupt sources IO Interrupt1 IO Interrupt6 are supported which differentiate only by the number at the end of the name Interrupt generators e Input 10 4 L H edge e Input 10 4 H L edge e Input 10 56 L H edge e Input 10 56 H L edge e 32 bit counter actual value setpoint value or e 16 bit counter 1 actual value setpoint value e 16 bit counter 2 actual value setpoint value The POU initiated by the interrupt is always run to completion and cannot be interrupted by a new interrupt A new interrupt is only carried out after the current interrupt has ended NOTICE All the outputs controlled H signals up to this point remain active and can t be switched off The interrupts are enabled in the RUN state of the CPU and i
98. ending on the module you can assign modify the input output and the diagnostics marker addresses In order to make the modifications visible in the PLC configurator it is necessary to click once on the PLC Configurator or to select another module after the address has been edited They will be accepted in all cases during compilation 5 9 6 Run Automatic calculation of addresses With the Automatic calculation of addresses function which you can run either via the context menu or the menu bar all the respective addresses are recalculated If you are dealing with a bus master module the calculation is also carried out for the modules which are constituents of the slave on the bus line The freely entered addresses of subordinate modules are overwritten when the address of a higher level module is calculated If the addresses have changed and you wish to implement the Automatic calculation of addresses you must first of all activate the change Click first of all on the node to drop down the structure or set the cursor in the PLC Configuration field and press the left mouse button If you mark the Configuration XC CPU text and call the Automatic calculation of addresses all the addresses are recalculated Enter the addresses in an ascending order and in continuous blocks 68 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 5 10 Diagnostics 5 Program processing multitasking
99. entered in the Registry UTI2 GETIPDNS UTI2_psIPDns POINTER TO STRING 80 UTI2 GetlPDns BYTE Figure 108 UTI2 GetlPDns Table 50 Input variables for UTI2_GetIPDns Input variables Meaning UTI2_psIPDns Pointer to a string in which the read IP address is written Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN050030017 EN www eaton eu 115 11 Libraries function blocks and functions 11 2 XC200 specific functions Table 51 Return values for UTI2 GetlPDns ReturnVal Meaning 1 Read successful 0 Read failed 4 No valid pointer transferred UTI2 GetlPWins Output of the IP address of the WINS server currently entered in the Registry UTI2 GETIPWINS UTI2 psIPWins POINTER TO STRING 80 UTI2 GetlPWins BYTE Figure 109 UTI2_GetIPWins Table 52 Input variables for UTI2 GetlPWins Input variables Meaning UTI2_psIPWins Pointer to a string in which the read IP address is written Table 53 Return values for UTI2 GetlPWins ReturnVal Meaning 1 Read successful 0 Read failed 4 No valid pointer transferred UTI2_GetKeepAliveTime Output of KeepAliveTime in seconds UTI2 GETKEEPALIVETIME UTI2 Dummy BYTE UTI2_GetKeepAliveTime DWORDI Figure 110 UTI2 GetKeepAliveTime Table 54 Input variables for UTI2 GetKeepAliveTime Input variables Meaning Dummy BYTE Not evaluated in the function Table 55 Return values for UTI2 GetKeepAliveTime Retu
100. er as normal inputs outputs Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 5 Program processing multitasking and system times 5 5 Direct peripheral access Table8 Direct peripheral access overview Card 1 0 bit access 1 0 word access 1 0 slot Read Write Parameters module Read Write Parameters Parameter module XC CPU201 EC256K 8DI 6DO DI 0 to 7 DO 0 to 5 0 0 XC CPU201 EC256K 8DI 6DO XV DI 0 to 7 DO 0 to 5 0 0 XC CPU201 EC512K 8DI 6DO DI 0 to 7 DO 0 to 5 0 0 XC CPU201 EC512K 8DI 6DO XV DI 0 to 7 DO 0 to 5 0 0 XC CPU202 ECAM XV DI 0 to 7 DO 0 to 5 0 0 XIOC 8DI 0to7 0 015 XIOC 16DI Oto 15 0 0 XIOC 8DO Oto7 0 015 XIOC 16D0 0 to 15 0 015 XIOC 16D0 S 0 to 15 0 015 XIOC 12D0 R 0to 11 0 0 15 XIOC 16DX 0 to 15 0 0 15 XIOC 8AI I2 Oto7 015 XIOC 8AI U1 Oto7 015 XIOC 8AI U2 0to7 0 15 XIOC 4T PT 0 to3 0 15 XIOC 4AI T 0 to3 015 XIOC 2A0 U1 2A0 I2 4 0t03 0 15 XIOC 4A0 U1 0 to 3 0 15 XIOC 4A0 U2 0 to 3 0 15 XIOC 2A0 U2 0 to 1 0 15 XIOC 4AI 2A0 U1 NEO SY 015 A0 0 1 XIOC 2AI 1A0 U1 A0 1 0 15 AO 0 XIOC 1CNT 100KHZ 1 to 15 XIOC 2CNT 100KHZ 1to 15 XIOC 2CNT 2AO0 INC 1to 15 XIOC NET DP M 108 Modular PLC XC CPU201 XV X
101. er in status Bus Off 16 Task monitoring fault 17 Hardware monitoring fault 18 Bus error 19 Checksum error 20 Field bus error 21 1 0 update fault 22 Cycle time exceeded 80 Invalid instruction 81 Access violation 82 Privileged instruction 83 Page fault 84 Stack overflow 85 Invalid scheduling 86 Invalid access Identity 87 Access on protected page 256 Access to uneven address 257 Array limit exceeded 258 Division by zero 259 Overflow 260 Exception cant be overlooked 336 Floating decimal point General fault 337 Floating decimal point Not normalized operand 338 Floating decimal point Division by zero 339 Floating decimal point Inexact result 340 Floating decimal point Invalid instruction 341 Floating decimal point Overflow 342 Floating decimal point Stack verification error 343 Floating decimal point Underflow 134 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 13 Appendix 13 1 Characteristic of the Ethernet cable 13 Appendix 13 1 Characteristic of the Ethernet cable Only use the intended cable type for wiring the Ethernet network The cable must be at least category Cat 5 compatible Cat 5 cables are suitable for data transfer rates of between 10 and 100 MBit s Table 102 Characteristics of the Ethernet cable UTP STP2 SSTP Transmission medium Unshielded Twisted Pair Shielded Twisted Pair Shielded Twisted Pair Transfer speed 10
102. f the wrong module type is identified the CPU changes to NOT READY state 4 2 1 Program start STOP RUN You have the following possibilities to start the program Program exists in main memory Program should be loaded Prerequisite e CPU in STOP e CPU in STOP e RUN STOP switch in STOP e RUN STOP switch in RUN Action e Switch RUN STOP switch to RUN or Load program e inonline operation issue the Start e in online operation issue the Start command command Result for all CPU in RUN CPU in RUN variables Values are retained at the start Initial values are activated 4 2 2 Program stop RUN STOP A change of the RUN STOP switch to the STOP position leads the central processing unit to the STOP state after completion of the program cycle ending of all active tasks After the task has ended the outputs used by the O task are set to 0 gt chapter Program processing multitasking and system times on Page 48 You can stop the program in one of two ways e nonline operation issue the STOP command e Set the RUN STOP switch in the STOP position 4 3 Power off Interruption of the power supply When the program is running the switching off or interruption of the CPU power supply will cause the program cycle or task to be aborted immediately The data is no longer consistent Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 33 4 Operation 4 3 Power off
103. fe rH A esc Ue 17 Inerementing 2o eedem 82282338 17 25 Inputs Addressing x sete ER Bee TEN 66 configuration and parameterization 87 Signal Stat lt 2a eee Soy Yu teat ee RAS 11 Wiring example 200 0000 0c eee 23 Installation central processing unit 19 Interface CANopen configuration 28 Definition communication 70 easyNET configuration 28 ETH232 configuration 27 USB configuration 2 2222222 27 Interference factors 00 00 00 eae 20 ligue PER aha niin tens ara tap goth ays eo 95 Actuator connection 25 IMBUlS PETERE 18 Interrupt CAN Bus 2 2 00 00 0000 16 IP Address 2 2 24 pr Riv Ede 72 Psadelt8S Se ans soupe ots ean stie ng 106 Scan Modify ooa dee ste x va oh d 73 IP Gateway address ISSUGS Aen deed ie br thi gr oak oo 106 PGateway address SETING Ss oe ure D ae es 109 119 L Language switchover error and event list browser commands 0505 133 Layout Oi unsre 21 LED FUNIS REOR ei coit a pares on d een 34 sj tid site hah an Ratko tide Nae Ata ean 34 E ED diSplaye exscr Odeo ein 11 Eibrany aie sn mie Pepe Lc an A 139 Installation ia et ERR Rss 100 Lightning protection 00 0000 22 Limit values for memory usage 64 Load prograri cuts ke aa 37 M Markers Addressing 0 0005 66 Memory Application pror
104. fig e setipgateway settargetname After one of these browser commands has been executed saving of the Registry is necessary The following browser commands are available for that e saveregistry saves the registry e shutdown saves the registry and waits for voltage off e reboot saves the registry and generates a software reset The commands setcomconfig setipconfig setipgateway and settargetname must be supplemented in the command line of the PLC browser e g B with the Baud rate at setcomconfig Table 100 Close the line by pressing RETURN An answer is received in the window with the grey background The setipconfig browser command automatically generates a settargetname The target name is comprised of a short description of the target system and the last numeric block of the IP address e g Xc201 Nr010 The target name is automatically generated according to the IP address and the target system It can be called via gettargetname 130 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 12 Browser commands 12 3 Display CPU loading pldoad 12 3 Display CPU loading plcload The plcload browser command provides information on the current system loading of the central processing unit A utilization of more than 95 percent can cause a failure of the serial and Ethernet communication and or an impairment of the real time response 12 3 1 Display the loading of the CAN bus ca
105. get controller Master Device Node ID 1 Routing ID n Routing ID k Node ID m I gt Sa kn m 2 127 RS232 Ethernet CANopen A ctos Figure 56 Routing via XC ECAP Table 15 Example for setting the Node Id Baud rate Control Function Node ID Routing ID Baud Rate Fig Routing controller master 1 127 125 KB 58 Target controller Device 3 54 125 KB 59 gt The following applies for device PLCs The Routing ID must not be equal to the Node ID Basis communication The exception is the XC100 with operating system 2 V2 0 the Routing ID must be equal to the Node ID The Routing ID with the master can be set in the PLC configurator in the Other parameters tab ze Configuration z ol x Settings Other Parameters AT 96lB Setlinns Interrupt Sources Counte AT 9614 Start Behaviour WARMSTART X Input 10 4 AT 936 4 Reser Che gt CAN Routingsettings 5 AT I 2 none AT l rang Nodeldtt 127 iz none v AT 96lv EASYNet Settings Input 10 5 E AT 96h Enable Enang none z 8 AT 9G dus 1 a none none AT 96 CAN EASYNet S pus 125KBaud x AT 9 amp G AT 96G AT 9c AT C Configure Counter Encoder Start All options only available system version gt V1 0 Update Operating System Figure 57 CAN Master routing settings Modular PLC XC CPU201 XV
106. he CODESYS software however only the boot project with the name Default is active 3 Delete boot project on SD MMC Click on the folder Resources PLC Browser and enter for the XC CPU202 the following command filedelete Ndisk mmc CONTROL WXC CPU202 ECAM 8DI 6DO project Wdefault prg 4 Delete boot project on USB stick Click on the folder Resources PLC Browsen and enter for the XC CPU202 the following command filedelete disk_usb CONTROL XC CPU202 EC4M 8DI 6DO project default prg Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 4 Operation 4 5 Updating the operating system 4 5 Updating the operating system With the XC200 it is possible to replace the operating system with the latest version Eaton offers the latest operating system version on the Internet at http www eaton com moeller Support If you transfer a current operating system to an older hardware version it is possible that not all functions of the operating system will be supported by the hardware 4 5 1 XC CPU201 4 5 1 1 Transferring the operating system from the PC to the XC CPU201 When an operating system is loaded onto the PLC the existing operating system and user program will be deleted The Baud rate is set to a fixed value of 115200 Bit s for loading the operating system Procedure gt Establish a serial connection via the RS232 interface of the PC with the XC201 Informat
107. he interrupt source IO Interupt3 from the drop down menu ioi x E Settings Other Parameters r Settinas 34jr Interrupt Sources Counter Start Behaviour WARMSTART v Gl 10 4 4 none x r RS232 TCP gt CAN Routingsettings 5 fore F none hd Enable E Wem m Input 10 5 m Update Operating System amp ioimeneca IO Interrupt 3 Y Start xe l Configure Counter Encoder Figure 75 Allocation of 10 5 gt interrupt source gt Change over to the Task configuration and open the System events folder Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 97 10 Configuration and parameterization of the inputs outputs 10 3 Interrupt processing L Task configuration Task configuration System events Called when program starts Called when program stops Called before reset takes place Called after reset took place Interrupt Channel 1 10 Interrupt 2 Interrupt Channel 2 10 Interrupt 3 Interrupt Channel 3 10 Interrupt 4 Interrupt Channel 4 10 Interrupt 5 Interrupt Channel 5 10 Interrupt 6 Interrupt Channel 6 Interface for Event Start START Figure 76 System events gt Enable IO Interrupt 3 by clicking in the check box on the left beside the name IO Interrupt 3 The box is checked to indicate that it has been activated gt Mark the area of column Called POU and the area and the line
108. he task configuration the event e g Start and enter the name of the POU e g Power_prog that is to be processed L Task configuration Description called POU Called when program starts Power_prog Called when program stops Called before reset takes place Called after reset took place Interrupt Channel 1 IO Interrupt 2 Interrupt Channel 2 IO Interrupt 3 Interrupt Channel 3 IO Interrupt 4 Interrupt Channel 4 O Interrupt 5 Interrupt Channel 5 O Interrupt amp Interrupt Channel 6 Interface for Event Start START Figure 34 Assigning the POU to a system event Change over to the Resources Modules and add the object POU Power prog gt Program the application Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 51 5 Program processing multitasking and system times 5 3 Multitasking 5 3 Multitasking XSoft task1 xc200 pro Power prog PRG ST ni x H E Basic prog PRG 0001 PROGRAM Power prog C3 POUs 11 gt D001 i program for e g sending parameters Figure 35 Programming a POU Further information concerning the system events can be found in the online help of the programming system The XC200 run time system is a multitasking system This means that multiple tasks can be run at the same time in parallel 5 3 1 Updating the input output images 52 If the local and central inputs outputs
109. higher bytes are truncated DWORD BYTE However there is some data that is not convertible e g WORD UINT The result for this is always ZERO 38 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 4 Operation 4 4 Programs and project The following table shows the conversions rp typN Type X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X 0 X X X X X X X X X X 0 X X X X X X X X X X X X X X X X X X X X X X X X Program sections 1 2 3 4 5 6 7 8 9 10 11 rp RETAIN PERSISTENT X Conversion executed The data is adapted to the new data type from MMC program Preceding zeros are added or or higher bytes are truncated No conversion required Data is identical RETAIN PERSISTENT data is deleted if e the new program does not contain identical variable names e the Full reset command is executed e the battery was removed 4 4 3 Storing and deleting the boot project XC CPU201 1 Save boot project on MMC Click on Resources PLC Browser folder and enter the command copyprojtommc The boot project is stored on the MMC in the subdirectory project under the name Default prg A file is also created with the name Default chk The Bro
110. ial isolation Input voltage against PE Yes Input voltage against output voltage No Output voltage to PE Yes Output voltage VDC 24 Output current A 2 2 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN050030017 EN www eaton eu 147 13 Appendix 13 7 Technical data Filter 148 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu Index A Addressing Inputs outputs and markers 66 PLC on CAN BUS essen 81 Aeration ess cer er or io trate A ata tuti 20 Alter parameters 2222 22222 71 B Backup time battery 00 12 Batterys es oett a Bia ae 12 Baud Hate zu u un age sidak te mle rte td m err d 81 Baud rate Specifying changing 71 Block size for data transfer 79 Boot pro ect vule a EPI 39 Deleting on SD MMC 40 Deleting on USB stick 40 Breakpoint s o tr even Basen 34 Browser commands iussus 128 C Cable routing Cerda dede yt doble LE 21 Cache memory os unse hd 14 CAN Device parameters 0000 83 Interface eoo ste pando CRUS 15 Interface configuration 28 Master routing settings 81 Telegrams receive send from user program 16 DAN SEO us actor uem ea cot nS EN e etr EDAD cd 55 CANopen cable properties 136 CODESYS gateway server 0 45 80 COLDSTART startup behavior
111. id range 11 2 5 3 Plc Prg Utilities 120 UTI2_CopyProjectToMmc Copies a project to MMC SD UTI2_COPYPROJECTTOMMC UTI2_CopyProjectToMme BOOLI Figure 118 UTI2 CopyProjectToMmc Table 70 Input variables for UTI2_CopyProjectToMmc Input variables Meaning None Table 71 Return values for UTI2 CopyProjectToMmc ReturnVal Meaning TRUE Function completed successfully FALSE Errors UTI2 CopyProjectToUsb Copies a project to the USB stick UTI2 COPYPROJECTTOUSB UTI2 CopyProjectToUsb BOOL Figure 119 UTI2 CopyProjectToUsb Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 11 Libraries function blocks and functions 11 2 XC200 specific functions Table 72 Input variables for UTI2_CopyProjectToUsb Input variables Meaning None Table 73 Return values for UTI2_CopyProjectToUsb ReturnVal Meaning TRUE Function completed successfully FALSE Errors UTI2 CreateStartuplni Creates the Startup ini on disk sys and disk mmc UTI2_CREATESTARTUPINI UTI2 CreateStartuplni BOOL Figure 120 UTI2 CreateStartuplni Table 74 Input variables for UTI2_CreateStartuplni Input variables Meaning None Table 75 Return values for UTI2_CreateStartuplni ReturnVal Meaning TRUE Function completed successfully FALSE Errors UTI2_GetPlcVersionList Display of device version list UTI2 GETPLCVERSIONLI
112. ile length of O bytes is generated 13 4 2 3 a mode The a mode append opens a file in the w mode When data is written to this file then new text is added to the end of the file The SysFileRead and SysFileWrite functions are each transferred with a buffer and a file handle return value from the SysFileOpen function In order to close a file the SysFileClose is called with the return value from the SysFileOpen function 13 4 3 Examples of the SysFile functions The SysFileOpen function is used to open a file The function receives the file names complete with file path transferred to it Furthermore the function receives the mode in which the file should be opened Open in r mode OpenFilel SysFileOpen disk_sys project File1 r Open in w mode OpenFile2 SysFileOpen disk mmc MOELLER XC CPU201 EC512k 8DI 6DO Project File2 w Open in a mode OpenFile3 SysFileOpen disk usb MOELLERVXC CPU201 EC512k 8DI 6DO Project File3 a Closing a file CloseFile SysFileClose OpenFile2 CloseFile SysFileClose OpenFile3 On the XC CPU202 NCONTROL is used instead of MOELLER 140 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 13 Appendix 13 5 Dimensions 13 5 Dimensions XT FIL 1 line filter XC CPU200
113. indow gt Figure 57 First click the Activate box in the RS232 TCP CAN Routing field The activation is required so that the PLC can communicate via the CAN bus Then enter the Node ID node number and the baud rate on the CAN bus in the appropriate entry fields To guarantee a fast data transfer the routing should be performed only with a CAN baud rate of at least 125 Kbits s Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 8 Programming via CAN open Network Routing 8 2 Routing features of the controller The ID for basis communication is defined in the CanDevice in the CAN setting tab Figure 59 fifi PLC Configuration Base settings CAN settings Defau Node id g Device Type 0x191 Baud rate 125000 IV Automatic startup Mie eter Figure 59 CAN device parameters ID and baud rate are transferred with the project download to the PLC Example The following example based on Figure 60 shows the access to a PLC program OR KS el es Doo CAN Figure 60 Diagnostics possibilities D XC100 with Node ID 1 2 XC200 with node ID 2 routing ID 127 3 PLC e g XC EC4P with node ID 3 and routing ID 54 You have connected the PC to the controller with node ID 2 and wish to access the target PLC with routing ID 54 gt Open the project of the target PLC whose program you wish to edit or tes
114. ion on this is provided in the sections Connect PC on Page 26 and Connection set up PC XC200 on Page 70 gt Activate in the CODESYS software the Other Parameters tab in the PLC Configuration window and click on the Start button FE PLC Configuration Settings Other Parameters Settings Interrupt Sources Counter Start Behaviour WARMSTART v RS232 TCP gt CAN Routingsettings Enable u Input 10 4 4 none Ii none Input 10 5 easy NET Settings 4 none m Enable F none i Configure Counter Encoder Update Operating System All options only available with operating Statt system version gt 1 04 00 Figure 23 Updating the operating system of the XC CPU201 The Download Tool window opens Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 41 4 Operation 4 5 Updating the operating system gt Click on the Open button and enter the path in which the update of the operating system is located XC200 MFD Series Operating System Download Tool Ix r Serial communication parameter for download to PLC r IP address for download to MMC Serial port COM v 115 2 kBaud 192 168 119 200 Change Download progress Suchen in v01 04 08 Build 2805 e ter amp E btsxc201 _v010408 nbk Dateiname btsrc201_v010408 nbk Dateityp Brooklyn Image File nb0 nbk A
115. ket This means that normal commercial RJ45 connectors or Ethernet patch cables can be used Direct connection PC XC200 The XC200 can be connected directly to the programming PC via a crossover Ethernet cable Figure 17 18 Crossover cables have the following design features Noun PWN Ou BWN 8888 m 8 LI 1 18 Figure 17 Connection set up of an 8 pole crossover cable 1 1 2 2 3 3 6 6 Figure 18 Connection set up of a 4 pole crossover cable The following cross over cables are available e XT CAT5 X 2 2 m long article no 256487 e XT CAT5 X 5 5m long article no 256488 PC XC200 via Hub Switch connection If you use a Hub or a Switch between the PC XC200 connection you must use a standard Ethernet cable which is connected 1 1 for the connection between PC Hub Switch and Hub Switch XC200 The cable EU4A RJ45 USB CAB1 Art no 115735 is provided for programming via the USB interface of a PC gt Please note that when there is a double assignment of the RJ45 interface with the RS232 and Ethernet the connections 4 and 7 are connected to GND potential because of the RS232 interface For this reason we recommend the use of 4 core cables for the connection of the XC200 to the Ethernet See also e Characteristic of the Ethernet cable gt Page 135 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 3 4 6 2 RS2
116. l R5232 eat Cancel Name 1 Gateway Motorola byteorder No Update igure 48 Defining the PC s communication settings n For more information on these communication settings please refer to the programming system s online help From operating system version V01 03 xx of the XC CPU201 the serial RS232 Level 2 Route communication channel can be selected and a target ID can be defined If you enter O for the target ID communication is implemented with the local PLC 6 2 0 1 Changing settings To change settings such as the baud rate or the port do the following gt Double click the appropriate value e g 38400 The field is dimmed gt Enter the desired value Double click this field once more to choose the Baud rate e g 57600 Bit s 6 2 1 Changing the CPU s communication settings Select PLC Browser in the Resources Select the setcomconfig browser command and add the required baud rate after inserting a space Acknowledge the selection with RETURN Select the save registry browser command Select the reboot browser command After reboot has been completed the new baud rate is activated in the XC200 vvv vv Now access the CPU e g by a login you will receive the following fault message Communication Error HC Figure 49 Communications fault In order to communicate with the CPU you must adapt the communication settings of the PC section Defini
117. l for the web visualization is as follows http 192 168 119 200 8080 webvisu htm The XC CPU202 specific call for the web visualization is as follows http 192 168 119 202 8080 webvisu htm Prerequisite You have not changed the default setting of the IP address If you have changed the IP address replace the IP address in the http call with the address you have selected NOTICE A max of 10 clients may access the XC200 5 8 Limit values for memory usage 64 The data memory of the XC200 is divided into memory segments for data The segment sizes are shown in Figure 44 The global data utilizes multiple segments The required amount can be specified to suit the size of the loaded program The segment size for the different control types can be found under Resources Target Settings Memory Layoub Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 5 Program processing multitasking and system times 5 8 Limit values for memory usage Example Target Settings Configuration lt C CPU201 EC256K 8DI 6D0 Target Platform Memory Layout General Network Size Code Global 512 KB 128 KB per segmer Memoy Regan 16KB gt number segment Input fie i000 4KB Output fi 6 1000 4KB Retain 32 KB 316 KB 16 4F000 Figure 44 Segment size of the XC CPU201 EC256k The hexadecimal values of the other PLC types must be conve
118. l not be changed when a fault occurs during processing ReadWordDirect function uiSlot Slot number of the signal module For possible parameters see Table 8 on Page 59 uiOffset Word offset within a signal module For possible parameters see Table 8 on Page 59 ptr wValue Pointer to the variable value ReadWordDirect Display of the failure code see Table 9 on Page 63 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 5 Program processing multitasking and system times 5 5 Direct peripheral access 5 5 3 ReadDWordDirect With this function you can directly read a double word of an input module or an input function such as a counter value of the 32 bit counter The state of the double word is stored in the variables which point to the parameterized pointer ptr dwValue The pointer variable will not be changed when a fault occurs during processing 5 5 3 1 Parameters of the ReadDWordDirect function uiSlot Slot number of the signal module For possible parameters see Table 8 on Page 59 uiOffset Word offset within a signal module For possible parameters see Table 8 on Page 59 ptr_dwValue Pointer to the variable value ReadDWordDirect Display of the failure code see Table 9 on Page 63 5 5 4 Write Direct Fundamentally the outputs of the PLC should only be modified by a task or an interrupt Please always work within interrupts with direct access functions as the
119. lar PLC XC CPU201 XV XC CPU202 XV 06 14 MN050030017 EN www eaton eu 109 11 Libraries function blocks and functions 11 2 XC200 specific functions 110 Table 31 Return values for UTI2 SetlPGateway ReturnVal Meaning 1 Write successful 0 Write failed general fault 4 No valid pointer transferred UTI2 SetlPWins Setting of the IP address of a WINS server in the registry if necessary must be saved with UTI2_SaveRegistry UTI2 SETIPWINS UTI2 psIPWINS POINTER TO STRING 80 UTI2 SetlPWins BYTE Figure 98 UTI2 SetlPWins Table 32 Input variables for UTI2 SetlPWins Input variables Meaning UTI2_psIPGatewayAddress Pointer to a string variable which contains the IP address to be written Table 33 Return values for UTI2_SetIPWins ReturnVal Meaning 1 Write successful 0 Write failed 4 No valid pointer transferred UTI2_Reboot Restart with registry save UTI2 REBOOT UTI2 Dummy BYTE UTI2 Reboot BYTEL Figure 99 UTI2 Reboot Table 34 Input variables for UTI2 Reboot Input variables Meaning UTI2 Dummy A dummy byte which is not evaluated in the function Table 35 Return values for UTI2 Reboot ReturnVal Meaning 1 Dummy return value Reboot executed afterwards Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 11 Libraries function blocks and functions 11 2 XC200 specific functions UTI2 SaveRegistry
120. les GI library SYSLIBCALI Eg Log Bistable Function Blocks ig Parameter Manager Counter Ej PLC Browser 3 String Functions FEE PLC Configuration G Timer CH Sampling Trace Trigger f Target Settings A Task confiquration Figure 78 Libraries installing manually gt In your project click the Resources tab in the object organizer gt Double click the Library Manager element Clickdnsert Additional Library Ins The new window will show the libraries available depending on the target system Look in C Ub XN PLC CANopen et E3 a 35_CanDrv a CANopen Utilities jn XN PLC Lil a 3s CanOpenDevice SvsLibCallback 5 35_CANopenManager 5 SysLibREc js 35 CANopenMaster 5 SysLibSem amp 3S CanOpenNetVar XN_PLC_SysLibCan a BUSDIAG XN_PLC_SysLibCom Files of type CoDesys Bibliothek lib Cancel Figure 79 Selecting a library Select the library to install and click Open The library now appears in the Library Manager 11 2 XC200 specific functions The XC200 specific functions are contained in the XC200_UTIL lib library From operating system version V01 03 xx of the XC CPU201 the XC200 Util2 lib library with additional functions has been introduced The additional functions are described from Page 106 100 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN050030017 EN www eaton eu 11 2 1 CAN Utilities 11 Libraries f
121. m the subnet mask Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 11 Libraries function blocks and functions 11 2 XC200 specific functions Table 27 Return values for UTI2 SetlPConfig ReturnVal Meaning 1 Write successful 0 Write failed general fault 4 No valid pointer transferred UTI2_SetIPDNS Setting of the IP address of a DNS server in the registry if necessary must be saved with UTI2_SaveRegistry UTI2_SETIPDNS UTI2 psIPDNS POINTER TO STRING 80 UTI2 SetlPDns BYTE Figure 96 UTI2_SetIPDNS Table 28 Input variables for UTI2 SetlPDns Input variables Meaning UTI2_psIPDns Pointer to a string variable which contains the IP address to be written Table 29 Return values for UTI2 SetlPDns ReturnVal Meaning 1 Write successful 0 Write failed 4 No valid pointer transferred UTI2 SetlPGateway Setting IPGateway address UTI2 SETIPGATEWAY UTI2 pslPGatewayAddress POINTER TO STRING 80 UTI2 SetlPGateway BYTE Figure 97 UTI2 SetlPGateway NOTICE A newly entered value must be saved as a non volatile value by a SaveRegistry or a Reboot command The newly entered value is accepted only after a restart of the PLC Table 30 Input variables for UTI2 SetlPGateway Input variables Meaning UTI2_psIPGatewayAddress Pointer to a string variable which contains the value to be entered from the gateway address Modu
122. md g EMPTY SLOT SLOT i g EMPTY SLOTISLOT Input address 1B5 p J EMPTY SLOT SLOT Figure 47 Uneven address 5 9 4 Address range Addresses can only be assigned within the valid ranges The range details can be found under Target Settings Memory Layout gt Size The addresses are checked during compilation It is essential to ensure that the addresses of the configured module are used referenced in the program If the address exceeds the range a fault is signalled Table 11 Address ranges Control Input Output Marker Size Max Max Size Max Byte Max Size Max Max Word Byte Word address Word Byte address address address address address kByte kByte kByte XC101 64k 2 2047 2046 2 2047 2046 4 4095 4094 XC101 128k 4 4095 4094 4 4095 4094 8 8191 8190 XC101 256k 16 16383 16382 16 16383 16382 16 16383 16382 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 67 5 Program processing multitasking and system times 5 9 Addressing inputs outputs and markers Control Input Output Marker Size Max Max Size Max Byte Max Size Max Max Word Byte Word address Word Byte address address address address address kByte kByte kByte XC201 256k 4 4095 4094 4 4095 4094 16 16383 16382 XC201 512k 4 4095 4094 4 4095 4094 16 16383 16382 XC202 EC4M 4 4095 4094 4 4095 4094 16 16383 16382 5 9 5 Free assignment or modification of addresses of input output modules and diagnostic addresses Dep
123. mode 86 You can access the data of the RS232 interface using the user program The libraries xSysCom200 lib or SysLibCom lib are provided for this purpose Note that only one of the two libraries can be incorporated in the Library Manager Both libraries provided a large number of functions such as for opening and closing the interface The library functions are shown here next to each other the functions of the xSysCom200 lib library on the left and the SysLibCom lib library xSysComClose FUN j SysComClose FUN xSysComGetVersion1000 FUN i SysComGetV ersion1 000 FUN i lz xSysComO pen FUN SysComOpen FUN E SysComRead FUN SysComRead FUN FE xSysComReadControl FUN SysComSetSettings FUN xSysComSetSettings FUN g SysComwrite FUN xSysComwrite FUN E xSysComwriteControl FUN Figure 62 Overview of functions left xSysCom200 lib right SysLibCom lib The functions are described in the manual Function blocks of easySoft CoDeSys MN05002002Z EN See also Transparent mode Text output via RS232 example gt Page 137 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 10 Configuration and parameterization of the inputs outputs 10 1 Input output general 10 Configuration and parameterization of the inputs outputs 10 1 Input output general In the PLC configuration the local inputs outputs IX0 0 to IX0 7 QX0 0 to QX0 5 and the inputs outputs
124. mple by means of separate limit switches mechanical interlocks etc Contents Contents 0 About this manual nennen nen 5 0 1 EIST OP revision S au ee a ee ee 5 0 2 Writing conventions ssssssssee mmm 6 0 2 1 Hazard warnings of material damages ssssssssssss 6 0 2 2 Hazard warnings of personal injury ssssssee 6 023 TIPS tib e uem icti utet iee E e 6 0 3 Additional documentation ssssssssssssee 7 1 Design of the XC200 PLC eeeeeeeeeee eere eere 8 1 1 RACK sf Beale tease RN Eee eR T dere eaten lese 8 Ties Performance scope of the CPU sen 9 1142 Functional Spatis zi eer pete e Pe oi ve e Cv IT HR SE en 9 Teo Powersupply ii c eti ih a e vt o Po e e ee 10 1 1 4 Local inputs outputs sssssssssssseeeeeeeeee een 10 1 1 5 Processor unit with interfaces anne 12 1 16 dieses GlOC esa ee sad enisi AE 12 rM I 12 1 1 8 Multi media card MMC secure digital card SD USB stick 13 B CPU GIVES mer NR 13 1 1 10 ETH232 programming Interfaee ea coit rame eese nens 14 1 1 11 Splitting ot the ETH232 interface anna 14 1 1 12 cCAN eSSVINaEIIterfaee sputo een eiiis iste 15 1 1 13 Reaction of the station on the CAN bus 16 1 1 14 Add on functions of the CPU local inputs nen 17 CPU installations ner D Re rrr eri ea ER 19 2 1 D t ching the CPU Se ots LU elder a bites 19 3 Enginieering
125. n Counter none z C 2x 16Bit Up Down Counter Figure 67 Incremental encoder preselection Select Incremental encoder The window changes its appearance Configure Inputs Counter Encoder P x Inputs 10 0 10 3 3 r Inc Encoder C Digital Inputs p Reference Marks Single C Permanent c 2 Reference Mode 1x 32Bit Up Down Counte wien Hard C 24 16Bit Up Down Counte EET Reference Value 0 Figure 68 Incremental encoder parametric programming gt When the configuration is complete press the Apply button 10 2 2 Functionality of the inputs outputs If you have selected the Incremental encoder add on function the inputs 10 0 to 10 3 are assigned with a new function The inputs 10 4 to 10 7 retain their standard function The functions of the virtual inputs and outputs for the incremental encoder can be seen in the following illustrations 90 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 10 Configuration and parameterization of the inputs outputs 10 2 Inputs outputs for additional functions Program Processing Unit Inputs Encoder Encoder Counter 1 0 Je state Signal A Ix1 1 Value 0 lt 10 0 Sn Ix1 3 amp Error Signal B 1x1 4 Je Referencing 10 1 activated Reference W2 Value L Word Signal wa Value H Word e T 10 2 eK QX1 0 Refere
126. n to the right of the term Target ID Enter there the number 54 and confirm with OK gt Login and complete the operation 8 2 4 PLC combinations for routing The following PLC support routing Tov XC100 XC121 x x x x XC CPU2011 x x x x XC CPU202 x x x x ECAP x x x x 1 XC CPU201 from operating system version V01 03 01 8 2 5 Number of communication channels 84 Several communication channels can be opened e g PC PLC 2 PC lt gt PLC 3 in dependence on the PLC communication channel which is connected to the PC This therefore enables the status of PLC 2 and PLC 3 to be displayed at the same time Table 16 Type and number of communication channels Communication Channel Control Max channel number TCP IP Level 2 Route XC200 5 Serial RS232 Level2 Route XD ECAR 1 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 9 RS 232 interface in Transparent mode 8 2 Routing features of the controller 9 RS 222 interface in Transparent mode In Transparent mode data is exchanged between the XC200 and data terminal devices e g terminals printers PCs measuring devices without any interpretation of the data For this purpose the serial RS232 interface of the CPU or XIOC SER modules is to be switched using the user program in the transparent mode This applies from operating system version 01 03 xx for the RS232 interface of the XC CPU201 XC CPU201 XC CPU202
127. nce Window Reference QX1 1 gt Reset Counter Window ax al gt Value 2 0 Quit 9 103 Qx1 5 29 Error Quit Qxt e 2 Enable Figure 69 Inputs outputs for incremental encoders Referencing In many positioning controllers the reference point is approached at the start The referencing operation can be controlled via the hardware reference window signal of the encoder on 10 3 or via the software OX1 0 You can make the selection in the PLC configuration If one of the two signals is High this is indicated at input IX1 4 If a pulse is generated in this state at 10 2 reference signal of the encoder the counter status is set to the reference value you have stated in the PLC configuration Set the reference window large enough for the reference signal to be present only once and still be evaluated reliably Reference Signal Reference Window ALL m Figure 70 Relationship between reference signal and reference window T1 Impulse repeattime of 2 successive marker signals with a single rotation of the incremental encoder T2 Maximum permissible duration of the reference window Must be sufficiently less than T1 to ensure that a second marker pulse is not detected T3 Mustbe long enough to ensure that the L H edge of the marker pulse is safely detected T2 and T3 depend on the frequency of the reference pulse and must be determined for each application by trial and error Modular
128. necting the incremental encoder The incremental encoder is shown in the following figure in the manner in which it is to be connected to the control mo d m Ag A o 0Vq 69 e 24V OV Figure 14 Connection of the incremental value encoder with a reference window switch 24 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 3 Engineering 3 4 Connections 3 4 4 Connecting up down counter amp 69 69 69 69 69169 e 24 Vo 0 Vq S 24V OV Figure 15 Connection of pulse generator with signal for incrementing decrementing 3 4 5 Connecting interrupt actuators The inputs 10 4 and 10 5 can be parameterized as interrupt inputs ooo nnnm Bae E Zee 9 9 9 9 9 9 9 9 9 e 24V OV Figure 16 Interrupt input connections Please note that when an XC100 PLC is replaced by an XC200 PLC the interrupt inputs are situated at other physical input addresses Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 25 3 Engineering 3 4 Connections 3 4 6 Connect PC 3 4 6 1 Ethernet connection 26 From a purely physical mechanical point of view the programing devices interface is an RJ45 interface soc
129. nfiguration of the CAN easyNet interface Page 28 e Properties of the CAN cable Page 136 1 1 14 Add on functions of the CPU local inputs The inputs 10 0 to 10 5 can be parameterized as e Incremental encoder inputs 10 0 to 10 3 e Counter inputs 32 bit 10 0 10 1 e Counter inputs 16 bit 10 0 10 1 and 10 2 10 3 e Interrupt inputs 10 4 and 10 5 The input signals in the CPU are preprocessed with these functions 1 1 14 1 Incremental encoder input 32 Bit The function is available once On inputs 10 0 and 10 1 the incremental signals A and B of the encoder are directed to input 10 2 of the reference signal which the encoder generates once per revolution The switch is connected on input 10 3 which maps the reference window in the closed state in which the reference signal 10 2 is processed The incremental signals A and B are phase shifted by 90 degrees in order to indicate the count direction The falling and rising edges are processed 4 fold evaluation The maximum input frequency is 50 kHz This results in a total frequency of 200 kHz See also e Connecting the incremental encoder gt Page 24 e Incremental encoder parameterization gt Page 90 1 1 14 2 Up down counter 32 Bit The function is available once The counter input 10 0 accepts the impulses with a maximum frequency of 50 kHz The directional signal on input 10 1 defines if the counter impulse is to be incremented or decremented when the co
130. ng changing the PC s communication settings Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 71 6 Connection set up PC XC200 6 3 Connection set up with Ethernet 6 3 Connection set up with Ethernet After you have connected the PC with the CPU using a cable select the TCP IP communication channel in the CODESYS software and enter the IP address of the CPU The XC CPU201 has the default address 192 168 119 200 the XC CPU202 has the default address 192 168 119 202 The selection of the Baud rate of the Ethernet connection is performed in Autosensing detect mode Components with this feature automatically recognize if it is a 10 or 100 MBit connection 6 3 1 Selecting communication channel and address gt Access the menu with Online Communication parameters Communication Parameters New Channel E x Name Cancel Device Serial AS232 35 Serial R5232 driver Serial Modem 35 Modem driver CANopen DSP302 35 CANopen DSP302 dris Tcp lp Level 2 Route 35 Tcp lp Level 2 Router Serial R5232 Level 2 Route 35 RS232 Level 2 Router Figure 50 Channel selection P Push the New button gt Select the overview of the communication channel TCP IP Level 2 Route and change the name local e g to Ethernet Test gt Confirm with OK Communication Parameters x r Channels Ethernet T es tep Levele Rouo Cancel localhost
131. ng system This interface features network capabilities and is electrically isolated The XC CPU202 also allows you to update the operating system of the controller via the Ethernet interface You can also execute programming via the RS232 interface From operating system version V01 03 of the XC CPU201 you can also switch the RS232 interface to Transparent mode in order to establish a point to point connection without handshake lines 1 1 11 Splitting of the ETH232 interface The cable switch XT RJ45 ETH RS232 enables you to communicate with the XC200 via the RS232 and Ethernet interfaces simultaneously 14 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 1 Design of the XC200 PLC 1 1 Rack The connection between the CPU and the cable splitter is established using the EASY NT 30 80 130 cable Then connect the cable from the IN socket of the cable splitter to the ETH232 connecter of the CPU For example you can connect the programming device to the Ethernet interface of the cable switch and the RS232 interface in Transparent mode to a printer The pin assignment of the RS232 and the Ethernet plug socket of the cable switch is the same as that of the ETH232 socket of the central processing unit XC CPU200 EASY NT 30 80 150 RJ45 E RJ45 nwwu mzzmr m Figure 6 Connection
132. ng to DS 301 V4 29 Bit Identifier XC CPU201 No XC CPU202 Yes PDO type asyn Cyc acyc Connection Plug in spring loaded terminal block 6 pole Bus terminating resistors With XC CPU201 external with XC CPU202 switchable Module Count max 126 USB interface V1 1 with XC CPU201 V2 0 with XC CPU202 Baud rate Autochanging MBit s 1 5 12 Potential isolation No Power supply for connected devices Rated operating voltage V DC 5 max current A 0 5 Terminal type Downstream plug Power supply of local inputs outputs 24 Vo 0 Vo Rated operating voltage V DC 24 Voltage range V DC 20 4 28 8 Current consumption A max 3 load dependent Potential isolation Power supply against CPU voltage Yes TVSS Yes Protection against polarity reversal Yes 144 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 13 Appendix 13 6 Technical Data XC CPU201 EC256 8DI 6DO XV XC CPU201 EC512 8DI 6DO XV XC CPU202 EC4M 8DI 6DO XV Digital inputs Input rated voltage V DC 24 observe polarity Voltage range V DC 192 30 Input current per channel at rated operating voltage Functionality Normal digital input mA normally 3 5 Functionality Fast digital input mA normally 7 Heat dissipation per channel Functionality Normal digital input mW normally 85 Functionalit
133. nhibited in the STOP state Interrupt sources which are not enabled in the configuration do not initiate an interrupt If a POU is not assigned to an enabled interrupt source the interrupt is recognized and executed but without running a POU Frequent occurrence of an interrupt during program execution can cause the programmed task time to time out and result in a RESET being initiated by the Watchdog User interrupts can be inhibited and re enabled from the program The functions DisableInterrup and Enablelnterrupt are provided for this purpose A call parameter in the CoDeSys software determines if an individual interrupt or all interrupts are enabled or inhibited Enabling of an inhibited interrupt must be performed with the same parameter used to inhibit it Both the DisableInterrupt and EnableInterrupt functions are components of the XC200_Util lib library This library must if not already done so be integrated into the library manager of the CoDeSys Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 95 10 Configuration and parameterization of the inputs outputs 10 3 Interrupt processing 10 3 0 1 Disablelnterrupt 10 3 1 Enablelnterrupt With this function you disable deactivate a parameterized physical interrupt by accessing it from the user program FUNCTION Disablelnterrupt BOOL VAR_INPUT typChannel INTERRUPT_CHANNEL END VAR 4 DISABLEINTERRUPT itypChannel INTER
134. nload The PLC browser command canload belongs to the XC200 Util lib library It indicates the loading of the CAN bus Examples for display XSoft Test AS pro PLC Browser HIB File Edit Project Insert Extras Online Window t Belu escasa olole canload Resources E Bibliothek Stf eanload H Bibliothek sy CAN Busload 39 Percent a 2 0 Global variat Baudrate 250 k Te Integration Time 505 ms m Figure 133 Loading of the CAN bus Example 1 D Loading of the CAN bus in the last integration interval 2 Current baud rate of the CAN bus 3 Time via which the loading of the CAN bus has been integrated The integration time is set by default to 500 ms and can t be changed via the browser 13_1 pro PLC Browser Insert Extras Online Window Help On canload icanload Figure 134 Loading of the CAN bus with alarm message example 2 D Alarm message gt Table 101 Table 101 Possible alarm messages Alarm message Meaning ATTENTION HIGH BUSLOAD Loading of the CAN bus 2 75 96 CAN bus not activated The CAN bus is not active CAN Busload Invalid Calculation Monitoring of the bus load has failed Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN050030017 EN www eaton eu 131 12 Browser commands 12 3 Display CPU loading plcload 12 3 2 Access to memory objects 132 These commands have the name of the memory card the directory structure and the file names
135. nt zero crossover Error acknowledge AT QX1 6 BOOL 32BitCounter Counter0 Enable CHANNEL Q L inhibit count pulse H enable count pulse AT QX1 7 BOOL Counterl Enable CHANNEL Q Real inputs AT IX0 0 BOOL Bit0 AT IX0 1 BOOL Bit1 AT IX0 2 BOOL Bit2 AT IX0 3 BOOL Bit3 Representation of the virtual I Os in the PLC configurator AT IX1 0 BOOL State CHANNEL I AT IX1 1 BOOL N0 CHANNEL T AT IX1 2 BOOL N1 CHANNEL T AT IX1 3 BOOL Error CHANNEL T AT IW2 WORD Counter Value Low Word CHANNEL I AT IW4 WORD Counter Value High Word CHANNEL 1 AT QX1 0 BOOL Reference Window CHANNEL Q AT QX1 1 BOOL Reset Counter0 CHANNEL Q AT QX1 2 BOOL Reset Counter1 CHANNEL Q AT QX1 3 BOOL NO Quit CHANNEL Q AT QX1 4 BOOL N1 Quit CHANNEL Q AT QX1 5 BOOL Error Quit CHANNEL Q AT QX1 6 BOOL Counter0 Enable CHANNEL Q AT QX1 7 BOOL Counterl Enable CHANNEL Q 10 2 6 Representation of the inputs outputs of two 16 bit counters Input for counter pulses counter 0 Input for direction signal counter 0 Input for counter pulses counter 1 Input for direction signal counter 1 L no zero crossing H zero crossing L no zero crossing H zero crossing H Error Counter status counter 0 Counter status counter 1 Reset to zero counter 0 Reset to zero counter 1 Acknowl
136. nterrupt service routines extends the task run times accordingly 5 3 2 Behavior of the CAN stack with multitasking A CAN stack call occurs before every task in which the CAN variables are used A multitasking system can contain individual tasks which can be interrupted as required according to their priority This behavior can lead to an inconsistency in the CAN stack when it is called by a higher priority task before the CAN stack has been processed by the interrupted task The CAN stack of the XC200 does not have multitasking capability Only a single user task in which CAN variables are used can be created 5 4 Task monitoring with the watchdog The processing time of a task can be monitored in terms of time required using a watchdog The following applies for defining the monitoring time Processing time Interval time of the task Watchdog time If the processing time exceeds the interval time the end of the second interval time is awaited until the task is restarted Watchdog deactivated The watchdog interrupts the program processing if the processing time of the task exceeds the watchdog time Furthermore the frequency sensitivity can be set which the number of exceeds allows In this case the outputs of the PLC are switched off and the user program is set to the Halt state Afterwards the user program must be reset with RESET gt If the watchdog is deactivated task monitoring does not occur
137. oHandle gt 0 THEN typComSettings typBaudRate Baud 9600 typComSettings typDataLength Data 8Bit typComSettings typParity NO PARITY typComSettings typPort COMI typComSettings typStopBits xSysComSetSettings dwHandle dwSioHandle ComSettings ADR typComSettings STEP 2 RESET TRUE ELS ONE STOPBIT STEPERR STEP STEP 99 END IF WriteBuffer This is the sent text END IF Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 137 13 Appendix 13 3 Transparent mode Text output via RS232 example 2 Ausgabe Output IF dwSioHandle gt 0 THEN nWriteLength xSysComWrite dwHandle dwSioHandle dwBufferA ddress ADR WriteBuffer dwBytesToWrite LEN WriteBuffer 1 dwTimeOut 0 END IF IF nWriteLength LEN WriteBuffer 1 THEN STEP 3 Coun coun 1 END IF 3 Schliessen Shut Closeresult xSysComClose dwHandle dwSioHandle IF Closeresult TRUE THEN dwSioHandle 0 STEP 4 ELSE STEPERR STEP STEP 99 END IF 4 Verz gerung Delay BRAKE IN 1 PT T 2s IF BRAKE Q 1 THEN STEP 5 BRAKE IN 0 PT T 2s END IF 5 End STEP 0 99 Fehler Error STEPERR STEPERR END CASE 138 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 13 Appendix 13 4 Access to the CPU drives memory card 13 4 Access to the CPU drives memory card 13 4 1 SysLibFile lib library The SysLibFile library allows yo
138. oes not run every 10 ms but rather only at a time interval of 2 x 10 ms Variant 2 The running cycle is not ended Z l0m TZ z w t wt UZ wy l l l I l l l l I Or gt z MEN a7 EAA l l l l l l OU endless loop 1 1 1 1 1 1 Figure 41 Watchdog deactivated the same priority You can assign several tasks with the same priority The tasks are split according to the Time Slice principle and are practically executed simultaneously as part intervals Round Robin 5 5 Direct peripheral access 58 The Direct peripheral access function enables access directly to the local and central input and output signals of the control The I O access does not occur via the input output image The local and central input and output signals you can find the input and output signals of the CPU and the centrally expanded XC 200 control with the XIOC signal modules XIOC signal modules which can be integrated via a bus system cant be accessed via the Direct peripheral access Addressing is dependent on the slot number 0 to 15 of the signal modules Further differentiation within the slot exists and relates to bit number 0 to max 63 of the Inputs Outputs Depending on the functionality of the XIOC signal modules access occurs as a bit word or read write operation The access parameter indicates the Table 8 The inputs outputs which are required for Direct peripheral access are physically connected in the same mann
139. of all currents to equal zero The generated electromagnetic fields cancel each other out 3 22 Suppressor circuit for interference sources 3 2 3 Shielding 3 3 Lighting protection gt Connect all suppressor circuits as close to the source of interference contactors relays solenoids as possible Switched reactors should always have suppressor circuitry fitted gt Use shielded cables for the connections to the data interfaces The general rule is the lower the coupling impedance the better the shielding effect 3 3 1 External lightning protection All cables between buildings must be shielded Metal conduits are recommended for use here Fit signal cables with overvoltage protection Such as varistors or other surge arresters Implement these measures ideally where the cable enters the building and at least at the control panel 3 32 Internal lightning protection 22 Internal lightning protection covers all those measures taken to reduce the effects of a lightning strike and the resulting electrical and magnetic fields on metallic installation and electrical plant These measures are e Potential equalizing earthing e Shielding e Using surge protective devices Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 3 4 Connections 3 Engineering 3 4 Connections 3 4 1 Connecting the power supply 0O nm nl nn an nn Omen a 24V 0VD
140. of the counter level L no fault H internal error A and B edges occur simultaneously H referencing has been enabled Counter state Low Word Counter state High Word Enable referencing Reset to reference value Acknowledgement zero crossover Error acknowledge L inhibit input pulse H enable input pulse 1 Precondition The Hardware configuration type has been selected in the configurator 2 Precondition The Software configuration type has been selected in the configurator 92 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 10 2 4 Counter 10 Configuration and parameterization of the inputs outputs 10 2 Inputs outputs for additional functions Select between the following functions for the detection of counter pulses e 1x 32 Bit up down counter or 2x 16 Bit up down counter Parameterization occurs in the PLC Configuration gt Activate the Other Parameters tab in the PLC Configuration window and click on the Configure Counter Encoder button gt Select 1 x 32 Bit Up Down Counter or 2 x 16 Bit Up Down Counter and click on the Apply button Another window opens for the configuration gt State the Interrupt Source and the Setpoint Value here Configure Inputs Counter Encoder x Inputs 10 0 10 3 3 r 32Bit Up Down Counte C Digital Inputs Interrupt Source C Inc Encoder F ome e none
141. ote The parameter IP ENABLE DHCP only exists on an XC CPU202 Table 13 Example contents of the XCSTARTUP ini file STARTUP TARGET XC CPU202 to the Ethernet connection HOST NAME NoNameSet IP ADDRESS 192 168 119 200 IP SUBNETMASK 255 255 255 0 IP GATEWAY IP DNS IP WINS to the programming interface RS232 COM BAUDRATE 4800 9600 19200 38400 57600 to the CAN interface CANI BAUDRATE 10 20 50 100 125 250 500 CANI NODEID 1 127 CAN ROUTEID 1 127 CAN ROUTING CHANNEL 1I for addresses of the PROFIBUS slaves NET DPSI BUSADDRESS DP S in Slot 1 NET DPS2 BUSADDRESS DP S in Slot 2 NET DPS3 BUSADDRESS DP S in Slot 3 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 75 7 Setting system parameters via the Startup ini file 7 2 Structure of the ini file 7 2 Structure of the ini file An ini file is a text file with a defined data format From a named section such as STARTUP followed by an equals sign and the corresponding value The line is terminated with CR LF Carriage Return COMI BAUDRATE 38400 Carriage Return Lines commencing with a semicolon are interpreted by the PLC as comments and are ignored CAN_NODEID 2 The parameters can be changed or created with a text editor if you insert the memory card into the memory card slot of a PC e The file XCSTARTUP ini is stored on the memory card of the XC CPU201 in the directory disk_mmc MOELLER XC CPU201 EC256K 8DI 6DO
142. ply from 168 119 68 bytes 32 TTL 128 Ping statistics for 192 168 119 660 Packets Sent 4 Received 4 lt 8 loss Approximate round trip times in mill econ Minimum ms Maximum ms Average ri TAS Figure 53 PING response with a correctly established Ethernet connection 74 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 7 Setting system parameters via the Startup ini file 7 Setting system parameters via the Startup ini file 1 1 Overview 7 1 Overview System parameters independent of the project can be set by you and saved on the memory card They are compiled there to a Startup ini file The memory card can also be plugged into other PLCs The PLC accepts the parameters during start up The Startup ini file is always created will all controller parameters gt Table 12 The term Startup ini file is generally applicable The file name of the Startup ini file for the XC200 is XCSTARTUP ini 7 1 1 Parameters in the Startup ini file Some parameters e g such as the Baud rate of the COM interface have already been entered by the system to ensure that communication can take place between the PC and PLC The parameters can be adjusted later Table 12 Predefined default parameters in the XCSTARTUP ini file TARGET XC CPU202 HOST NAME NoNameSet IP ENABLE DHCP 0D IP ADDRESS 192168119202 IP SUBNETMASK 255 255 255 0 COM BAUDRATE 38400 CAN ROUTING CHANNEL 1I 1 N
143. point The following instructions can be executed in single step mode Task monitoring is deactivated NOTICE Any outputs already set when the program reaches the breakpoint remain set Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 4 3 4 Single cycle mode 4 3 5 Forcing 4 3 6 Status display 4 Operation 4 3 Power off Interruption of the power supply In single cycle operation one program cycle is performed in real time The outputs are enabled during the cycle At the end of the cycle the output images are cancelled and the outputs are switched off Task monitoring is active Task monitoring is active All variables of the user program can be forcibly set A local output is only forced if the corresponding variable is forced and the central processing unit is in the RUN state The inputs outputs are to be referenced in order to visualize the states of the configured inputs outputs in an interval controlled task in the PLC configurator The following syntax is sufficient in the ST programming language in order to be able to display individual I O bits Example IBO referencing of inputs 10 0 10 7 QB referencing of outputs Q0 0 Q0 7 0 in IL LD IBO ST Default byte LD Default byte ST QBO Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 35 4 Operation 4 3 Power off Interruption of the power supply 4 3 7 Reset
144. r list getmacaddress D R D D R D Display event list D D D D D D isplay MAC address 80 80 99 2 x x getprgprop Read program information getprgstat Read program status getrtc Display data and time YY MM DD HH MM SS getswitchpos Display status of the operating switch gettargetname Display device names getversion Display version information isdhcpenabled Scanning whether DHCP is activated 128 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 12 Browser commands 11 2 XC200 specific functions Attribute ID Description memdisk_sys Displays the free memory at disk_sys pid Output project ID pint Output project information plcload Display system performance CPU usage pp Output module pointer table reboot Accept changes registry save and restart PLC reflect Mirror current command line for test purposes reload Reload boot project again removeprojfrommmc Removes the backup project from the MMC SD removestartupini Frases the Startup ini file from the disk sys and disk mmc resetprg Reset user program resetprgcold User program cold reset resetprgorg Reset user program to original state restoreretain Restore retentive data from file file name rtsinfo runtime system information version IO drivers saveregistry Accept modifications
145. re explained on the basis of an example Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 5 Program processing multitasking and system times 5 1 Task configuration Creating task example First create the cyclic task Basic with the assigned program Basic prog Then you can add the event controlled task Param with the program Param prog In the program Basic prog an event is programmed which invokes the Param task The following steps are necessary in order to create a task e Add a task Define the program call Create the program 5 1 1 Creating the Basic cyclic task gt Open the Task configuration folder in the Resources tab Click with the right mouse button on the Task configuration folder and select the Add task command in the popup menu Enter in the Name field a name such as Basic gt Set the task in the dialog as in Figure 30 gt Click on the Task configuration folder and the configuration is accepted Eg Task configu Taskattributes Name Basic Briority D 31 1 r Type cyclic te ES TI C triggered by event triggered by extema event enl Properties LEER Interval e g t 200ms T 20ms ms z r Watchdog IV Activate watchdog Timefe g t 200ms T 50ms rs z Sensitivity 1 Figure 30 Parameterization of the cyclic task 5 1 1 1 Define the program call With the program call
146. ress Adds a new IP address to the system UIP_ADDUSERIPADDRESS IPAddress DWORD UIP_AddUserlPAddress BOOLI IPMask DWORD Figure 127 UIP AddUserlPAddress Table 88 Input variables for UIP_AddUserlPAddress Input variables Meaning IPAddress IP address to be added IPMask Associated IP screen to be added Table 89 Return values for UIP_AddUserlPAddress ReturnVal Meaning TRUE IP address was successfully added FALSE Table full Address already present in the User IP table address already present in operating system table Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 11 Libraries function blocks and functions 11 2 XC200 specific functions UIP DeleteUserlPAddress Deletes an IP address from the system UIP_DELETEUSERIPADDRESS IPAddress DWORD UIP_DeleteUserlPAddress BOOLI Figure 128 UIP DeleteUserlPAddress Table 90 Input variables for UIP DeleteUserlPAddress Input variables Meaning IPAddress Identifies the entry to be deleted from the user IP table Table 91 Return values for UIP_DeleteUserlPAddress ReturnVal Meaning TRUE Associated user IP table entry was deleted FALSE Associated user IP table entry was not present UIP GetFirstuserlPAddress Reads the first user IP address entered from the user IP table UIP GETFIRSTUSERIPADDRESS IPAddress POINTER TO DWORD UIP GetFirstUserlPAddress BOOLI IPMask POINTER TO DWORD
147. rlPAddressCount 126 UIP MakeUserlP 22222222 127 UTI2 CopyProjectToMmc 120 UTI2_CopyProjectToUsb 120 UTI2 Createstartuplni 5 od veo ye um 121 UTI2 DisableComProgramming 113 UTI2 EnableComProgramming 113 UTI2 EnableDHCP sss 114 UTI2_GetComConfig Lux xe ener Xs 113 UTI2_GetlIPConfig uec mr eS dmn 106 115 UTI GetlPDias 2 223 0 22 2200 ss 115 UTI2_GetlPWins 2 2 2222 22 116 UTI2_GetKeepAliveTime 116 UTI2 GetMacAddres 108 UTI2_GetMacAddress 117 UTI2_GetPlicVersionList 121 UTI2_IsDHCPEnabled 117 UTI2 Reboot nr s 110 122 UTI2_RemoveProjectFromMmc 122 UTI2_RemoveProjectFromUsb 123 UTI2_RemoveStartupIni 123 UTI2_SaveRegistry 111 124 UTI2_SetComConfig isons ee rene E 114 UTI2_SetlPConfig ics uut dae 108 118 UTI2 SetlPDns us sess 118 UTI2 SetlPGateway 109 119 UTI2_SetIPWins 2 2 2222 119 UTI2_SetKeepAliveTime 120 Wrulte z DIFGCU oemei Rt Osee vr mes 61 150 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu H HALT startup behavior 0 32 Help for browser commands 129 Incremental encoder 05 90 CORNEGTION sra erred ee 24 IY DUI Sets eripuit 6h Leclerc ei
148. rnVal Meaning KeepAliveTime KeepAliveTime in seconds 116 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 11 Libraries function blocks and functions 11 2 XC200 specific functions UTI2 GetMacAddress Issue of the MAC address MAC Media Access Control UTI2 GETMACADDRESS UTI2_pbyMacAddress POINTER TO BYTE UTI2_GetMacAddress BYTE Figure 111 UTI2_GetMacAddress Table 56 Input variables for UTI2_GetMacAddress Input variables Meaning UTI2_pbyMacAddress Pointer to an array of 5 byte values in which the read MAC address is entered Table 57 Return values for UTI2_GetMacAddress ReturnVal Meaning 1 Read successful 0 Read fault general fault 4 No valid pointer transferred UTI2 IsDHCPEnabled Read DHCP status UTI2 ISDHCPENABLED QUTI2 Dummy BYTE UTI2 IsDHCPEnabled BOOLI Figure 112 UTI2 IsDHCPEnabled Table 58 Input variables for UTI2 IsDHCPEnabled Input variables Meaning Dummy BYTE Not evaluated in the function Table 59 Return values for UTI2 IsDHCPEnabled ReturnVal Meaning TRUE DHCP is active FALSE DHCP inactive Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN050030017 EN www eaton eu 117 11 Libraries function blocks and functions 11 2 XC200 specific functions 118 UTI2 SetlPConfig Set IP and subnet mask address UTI2 SETIPCONFIG UTI2 pslPAddress POINTER TO STRING 80 UTI2 SetlPConfig BYTE
149. rted to decimal values In order to ensure that you use the available memory for the global data in an optimum and efficient manner we recommend that you make the following settings when a new project is being created Control Type Number of data segments global XC CPU201 EC256K 2 XC CPU201 EC512K 4 XC CPU202 ECAM 1 The number of segments is set to 1 by default The number of segments is changed as follows gt Choose Project Options Conversion Options and then the Number of data segments field and enter the appropriate number of segments shown above for the selected controller type Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 65 5 Program processing multitasking and system times 5 9 Addressing inputs outputs and markers Options Category Load amp Save User Information Editor Desktop Colors Directories Lo Passwords Source download Symbol configuration Database connection Debugging Replace constants Number of data segments E v Nested comments Create binary file of the application Exclude objects Actions hide programs Treat LREAL as REAL Check signed unsigned comparisons Cancel No check functions for libraries Macros Macro before compile m m Macro after compile Compiler version v Use latest Fi pss Check automatically Unused variables Overlapping memory areas Concurrent access
150. ry setting ON Figure 8 XC CPU202 XT CPU BAT1 1 1 13 Reaction of the station on the CAN bus Station bus monitoring CAN telegrams are sent and received directly by the user program An interruption on the CAN Bus will only be recognized when the respective CAN slave is monitored by the PLC Nodeguarding function Start Stop behavior If you set the STOP position on the operating mode selector switch all outputs of the decentral devices are set at the end of the cycle to O Switch on voltage The order in which you switch on the power supply of the individual CAN stations has no effect on the functioning of the CAN bus Depending on the parameters set the controller waits for stations that are not present or starts them when the station is connected to the CAN net Communication with CAN stations The communication with the CAN stations and their configuration is described in the following application notes and operating manuals e Connection of an XION station to the XC100 200 via CAN AN27K18D e Communication between two controls using network variables via CAN AN27K19D e Connection of multiple autonomous controls CAN Device via CAN AN27K20D e Engineering of CAN stations AN27K27D 16 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 1 Design of the XC200 PLC 1 1 Rack e Librarydescription CANUser lib CANUser_Master lib MN05010001Z EN See also e Co
151. strator rights on your PC Setting the block size gt Close all CoDeSys applications gt Close the CODESYS gateway server Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 79 8 Programming via CAN open Network Routing 8 2 Routing features of the controller 8 2 1 Notes 80 About Help Change password Inspection Figure 55 Closing the CODESYS gateway server gt Change the block size to the required value The following reg files are available in the CODESYS installation directory to enter the block size in the registry BlockSizeDefault reg Enters a block size of 20000hex 128 KByte default value in the Registry BlockSizeRout reg Enters a block size of 1000hex 4 KByte in the Registry Alternatively you can use the BlockSizeEditor application to change the block size The download block size is defined in the following Registry key HKEY LOCAL MACHINE SOFTWARE 3S Smart Software Solutions GmbH Gateway Server Drivers Standard Settings Tcp Ip Level 2 Route Blocksize dword 00020000 The default block size is 20000hex 128 kByte the block size for routing is 1000hex 4 kByte e flarge files are written to the target PLC or read from the PLC it is possible that the online connection will be interrupted after the transfer process has been completed Renewed connection is possible e fa program with a modified routing node ID is
152. t 1 1 14 4 Interrupt inputs The digital inputs 10 4 and 10 5 can be parameterized as interrupt inputs The leading or the lagging edge can be parameterized of the input signals are evaluated If an XC100 PLC is replaced by an XC200 PLC the interrupt inputs are connected to other physical input addresses See also e Time constraints placed on the interrupt inputs Technical data input delay fast digital input gt Page 145 Programming in the Interrupt function is described on Page 95 e Connecting up down counter gt Page 25 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 2 CPU installation 2 1 Detaching the CPU 2 CPU installation Detailed information on mounting the module rack and the XIOC signal modules is provided in the manual XI OC Signal Modules Hardware and Engineering MN05002002Z EN gt Insert the loop on the bottom of the CPU module into the hole in the module rack m gt Press the top of the CPU module onto the module rack until you hear it click into position Figure 9 CPU installation 2 1 Detaching the CPU gt Press in the catch 0 gt Keep the catch pressed in and pull the top of the CPU module forwards 2 Lift up the CPU module and remove it 3 1 uL Dit Figure 10 Detaching the modules Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z E
153. t First configure the parameters for the hardware connection PC lt gt PLC Node ID 2 gt Choose Online Communication parameters menu gt Click the New button under local channels The New Channel window appears gt Select the channel in the Device window Serial RS232 Level 2 Route or TCP IP Level 2 Route gt You can assign a new name e g Rout 232 in the Name field gt Confirm with OK You will return to the initial window Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 83 8 Programming via CAN open Network Routing 8 2 Routing features of the controller Communication Parameters E m Channels l omm tik Communication Parameters New Chan x O ER Device Nene Tine Lip Serial AS232 35 Serial R5232 driver Serial Modem 35 Modem driver CANopen DSP302 35 CANopen DSP302 dris Tcp lp Level 2 Route 35 Tcp lp Level 2 Router Serial AS232 Level 2 Route 35 AS232 Level 2 Router Figure 61 Channel parameter setting You have now determined the parameters for the hardware connection between the PC and the PLC node ID 2 gt Call up the communications parameters in the Online menu once again and select the PLC which you want to program or test Enter the number 54 as the target ID in the example The target ID is identical to the routing ID To enter the target ID click the field in the Value colum
154. t activated The triggering of the watchdog continues to be dependant on the watchdog sensitivity The watchdog sensitivity determines when the watchdog will be triggered after the watchdog time has been exceeded by a determined number of consecutive occasions The watchdog is triggered e immediately when the watchdog time is exceeded with a watchdog sensitivity of 1 e immediately after the x th consecutive time that the watchdog time is exceeded with a watchdog sensitivity of x For example a task with a watchdog time of 10 ms and a watchdog sensitivity of 5 will end at the latest after 5 x 10 ms 50 ms Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 5 Program processing multitasking and system times 5 4 Task monitoring with the watchdog 5 4 0 2 Example Watchdog active The interaction of interval time IZ task run time TZ watchdog time WT and watchdog sensitivity are illustrated by the following configuration example e Watchdog on e Watchdog time WT 15 ms e Watchdog sensitivity 2 The interval time IZ of the task is 10 ms Variant The watchdog is not triggered as the task time always remains below the defined watchdog time Variant The watchdog is triggered 15 ms after commencement of the second interval as both times are longer than the defined watchdog time and occur consecutively Variant G The watchdog is triggered 15 ms after commen
155. the removable medium If one is found the system will start updating the firmware When this occurs the RUN STOP green and SF red LEDs will flash alternately 46 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 4 Operation 4 5 Updating the operating system If you are updating a 01 00 xx firmware version to a 2 4 xx firmware version the filesystem for the local disk sys memory will be changed This change may take up to 10 minutes The XC CPU202 s RUN STOP green and SF red LEDs will flash alternately when the system is writing to the PLC s internal memory The new firmware version will not be enabled until the PLC is restarted NOTICE If you are updating a 01 00 xx firmware version to a 2 4 xx firmware version the filesystem will be replaced All data stored on the local disk sys memory PLC program registry settings your own data will be deleted This data will not be deleted if you are updating from a 1 00 xx to another 1 00 xx firmware version or from a 2 4 xx to another 2 4 xx firmware version Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 47 5 Program processing multitasking and system times 5 1 Task configuration 5 Program processing multitasking and system times 5 1 Task configuration 48 Processing of the project can be controlled via tasks Each task can be assigned with a range of programs which should be r
156. the CODESYS software See also e Connect PC gt Page 26 6 1 Connection set up via RS 232 interface To establish a connection between PC and CPU the two devices communication parameters must be the same e To match them first adjust the PC s communication parameters to the CPU s standard parameters settings to section Defining changing the PC s communication settings The CPU features the following standard parameters Baud Rate 38400 Parity No Stop bits 1 Motorola Byte No If you get an error message during login the CPU s default settings have already been changed In that case try a baud rate of 57600 Bit s e After logging on the CPU parameters can be redefined 9 section Changing the CPU s communication settings 6 2 Defining changing the PC s communication settings 70 Define the communication parameters of the interface in the CODESYS software You can use either the COM1 or the COM2 port of the PC Select menu point Online Communicationsparameters Specify the port COM1 or COM2 interface gt section Changing settings Use the remaining settings as shown in Figure 48 Confirm the settings with OK Log on to the PLC vvv ww Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 6 Connection set up PC XC200 6 2 Defining changing the PC s communication settings Communication Parameters m Channels b ia
157. the eontroller oci ea 8 2 1 NOTES anstatt anmerken H A 82 2 JNOdOressing sitis Cette He pu vet vv Y CUM ded iE EYES 8 2 3 Communication with the target PLC ana 8 2 4 PLC combinations Tor Lounge ae 8 2 5 Number of communication channels uneeeeeeeennneneennn 9 RS 232 interface in Transparent mode 9 1 Programming of the RS 232 interface in transparent mode Modular PLC XC CPU201 XV XC CPU202 XV 08 13 MN05003001Z EN www eaton eu Contents 10 10 1 10 1 1 10 2 10 2 1 10 2 2 10 2 3 10 2 4 10 2 5 10 2 6 10 3 10 3 1 10 3 2 10 3 3 11 1 1 11 2 1 11 2 2 11 2 3 11 2 4 11 2 5 12 12 1 12 2 12 3 12 3 1 12 3 2 12 3 3 13 13 1 13 2 13 3 13 4 13 4 1 13 4 2 13 4 3 13 5 13 6 13 7 Configuration and parameterization of the inputs outputs 87 Inp uto tputgenetal erir Ra HET DIR np 87 Local digital inputs outputs ir ar e r i 87 Inputs outputs for additional functions eneeen 90 Incremental encoder uu eec e ihe lee testet one niet ei 90 Functionality of the inputs outputs ssssssssseeee 90 Representation of the inputs outputs of the incremental encoder 92 Counter zs tton i ure c A Ue SL LIA D cet 93 Representation of the inputs outputs of the 32 bit counter 94 Representation of the inputs outputs of two 16 bit counters 94 Interrupb precessiDgi eerte re e its e E e eR etes 95 Eriablelnterrupt s
158. the relevant sections of operating system are unpacked and copied into the working memory The retentive data are stored in the battery buffered SRAM memory Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 13 1 Design of the XC200 PLC 1 1 Rack Transaction safe means that if there is a voltage dip when the file is being processed the file system and the opened file are generally not destroyed It is possible however that data which you have written into the file last opened may be lost Figure 5 indicates the interaction of the differing XC CPU200 memory systems drives disk mmc Memory card MCC System or memory card SD memory disk sys flash Disk USB USB stick Working memory SDRAM Fi gure 5 XC CPU200 memory organization See also e Data access on the memory card e with the aid of browser commands such as for example copyprojtomme to copy the user program onto the MMC Page 128 Functions such as SysFileOpen or SysFileRead Page 139 Limit values for memory usage Page 64 1 1 10 ETH232 programming interface The communication between the PLC and the programming device is implemented via the ETH232 programming interface of the CPU It consists of an Ethernet interface and an RS232 interface The Ethernet interface is used for programming and debugging as it is processed more quickly by the operati
159. this is not changed the device linked to the Ethernet can only be addressed via its IP address You can enter a new device name using the browser command settargetname The device name must be assigned uniquely for each device Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 7 Setting system parameters via the Startup ini file 7 4 Entry of the ini file HOST NAME It can also be used as a communication parameter in Figure 54 alias if the parameters are defined in the programming software in the menu Online Communication parameters The parameters define the properties of the programming connection between the PC and the PLC Communication Parameters xil Channels OK E localhost ber Tcp lp Feptp Level 2 Route localhost uber T cp lp Cancel Name Value Comment Address alias IP address or hostname New Port 0 Targetld 0 Benove Motorola No Gateway Update Figure 54 Communication parameters The device name can be read with the browser command gettargetname 7 4 1 Switch on of the control with inserted memory card with XCSTARTUP ini file 7 4 2 Alter parameters When the controller is started up the data from the Startup ini file on the memory card is transferred to the controller These system parameters are also active after a new program is loaded The parameters are retained until you enter the browser command removestartupini
160. tional operation Suitable safety hardware and software measures should be implemented for the 1 0 interface so that a line or wire breakage on the signal side does not result in undefined states in the automation devices Ensure a reliable electrical isolation of the low voltage for the 24 volt supply Only use power supply units complying with IEC 60364 4 41 VDE 0100 Part 410 or HD 384 4 41 S2 Deviations of the mains voltage from the rated value must not exceed the tolerance limits given in the specifications otherwise this may cause malfunction and dangerous operation Emergency stop devices complying with IEC EN 60204 1 must be effective in all operating modes of the automation devices Unlatching the emergency stop devices must not cause restart Devices that are designed for mounting in housings or control cabinets must only be operated and controlled after they have been installed with the housing closed Desktop or portable units must only be operated and controlled in enclosed housings Measures should be taken to ensure the proper restart of programs interrupted after a voltage dip or failure This should not cause dangerous operating states even for a short time If necessary emergency stop devices should be implemented Wherever faults in the automation system may cause damage to persons or property external measures must be implemented to ensure a safe operating state in the event of a fault or malfunction for exa
161. tlanguage Examples for language conversion If the error and event list is to be displayed in German the setlanguage deu browser command should be entered The input is ended with Return You receive the following displayed window setlanguage deu setlanguage deu k Q ojx Er Figure 135 Browser command setlanguage The following is an overview of the messages which can occur in the browser error and event lists The module ID indicates which program type the fault signals Modul ID Program Type 1 RTS runtime system 2 CST Moeller specific adaption 3 XIO XIOC 4 CAN 5 IEC TheEvent ID defines the fault number of the program The error number can start at O for every module ID Modul ID Event ID Error Message 2 1 Stop program 2 2 Start program 2 3 Reset warm 2 4 Cold reset 2 5 Reset Hard 2 6 Battery empty 2 7 No program loaded 2 8 Task monitoring 4 10 CAN controller started 4 20 CAN controller stopped 4 30 Overflow Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN050030017 EN www eaton eu 133 12 Browser commands 12 3 Display CPU loading plcload Modul ID Event ID Error Message 4 31 Overflow 4 40 Overflow 4 41 Overflow 4 42 Overflow 4 50 Critical CAN fault 4 60 CAN controller in status error warning 4 70 CAN controll
162. to the RS232 interface of the XIOC SER module the RS232 interface of the CPU does not feature control lines Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 85 9 RS 232 interface in Transparent mode 9 1 Programming of the RS 232 interface in transparent mode The data types of the libraries are not identical The baud rate selection differs xSysCom200 lib 300 115200 SysLibCom lib 4800 115200 The RS232 interface of the CPU is addressed in contrast to the interface of the XIOC SER module via the operating system Therefore execution of the interface functions can take up to 50 ms The task in which the RS232 interface is contacted should have an interval time of at least 50 ms and be assigned with a low priority high value in multitasking mode so that time critical tasks are not hindered The functions x SysComRead Write therefore only process parts of the required data length To transfer data blocks completely repeated calls with adjusted offset values must be carried out in several task intervals The number of calls depends on the baud rate and the data volume The performance of the RS232 of the CPU depends on the load of the PLC PLCLoad and the selected baud rate Due to the high interval times of the COM task it may be displaced by time critical tasks When data is received at high baud rates characters may be lost 9 1 Programming of the RS 232 interface in transparent
163. u access to the file system of the XC200 the MMC SD and the USB stick The library contains the following functions SysFileClose SysFileCopy SysFileDelete SysFileEOF SysFileGetPos SysFileGetSize SysFileGetTime SysFileOpen SysFileRead SysFileRename SysFileSetPos SysFileWrite Information about these functions can be found in the online documentation of the CODESYS programming system under the SysFile Function search term CAUTION e The PLC may not be switched off when files from the MMC SD or the USB stick are opened e A power failure when a file is opened can destroy the memory card e All the open files must be closed before switch off of the voltage 13 4 2 Modes for opening a file 13 4 2 1 r mode The r mode opens the file for reading The file handle which is returned by the SysFileOpen function is invalid if this file does not exist The value 1 or 16 FFFFFFFF is then displayed The file is opened for sequential reading and with each read access the read position will be advanced by the number of bytes which have been read Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN050030017 EN www eaton eu 139 13 Appendix 13 4 Access to the CPU drives memory card 13 4 2 2 w mode The w mode opens the file in write mode An existing file with this name will be overwritten CAUTION If you open a file with w mode and close it again this file is overwritten and a f
164. un during execution of the task The task is defined by a name a priority and a type which defines under which conditions a task starts Task condition and priority determine the sequence in which the tasks are to be processed You can set Cyclic or Event triggered as the task condition A cyclical task is restarted after the set interval time has elapsed An event triggered task is only started when the event occurs You can also link system events such as Start Stop or Reset with the execution of a program The task priorities can be parameterized with a value from 0 to 31 where 0 is the highest priority and 31 is the lowest priority In principle the output image is written onto the physical outputs before every task is called and the map is read by the inputs updating of the input output map The task is executed thereafter In addition all system activities are carried out before or after the task call This includes for example communication with the CODESYS or Online changes Updating of the input output image by multiple tasks is described in the section Multitasking on Page 52 All IEC tasks including those with the highest priority can be interrupted by an interrupt or an event controlled task Time monitoring Watchdog can be activated for each task For a detailed task configuration description please refer to the manual for programming PLCs with CODESYS At the end the control specific settings a
165. unction blocks and functions 11 2 XC200 specific functions The functions of the XC200 Util lib library are divided into the following groups e CAN functions CAN Utilities Event functions EVENT e XIOC functions XIOC SysLibFile lib 7 6 02 10 26 50 SysLibTime lib 7 6 02 10 29 00 XC200_Util lib 6 8 03 15 12 06 X840 MollerFB lib 19 1 05 12 23 52 Standard lib 7 6 02 10 26 00 SYSLIBCALLBACK LIB 9 7 02 17 14 54 a ES CAN_Utiities B CAN_BUSLOAD FUN EVENT IEC_DeleteErrorList FUN IEC_DeleteE ventList FUN IEC_GetErrorlD FUN IEC GetEventlD FUN IEC GetNr fErors FUN IEC GetNrOfE vents FUN IEC_WriteError FUN IEC_WriteE vent FUN xoc Disablelnterrupt FUN Enablelnterrupt FUN GetSlotPtr FUN ReadBitDirect FUN ReadDWordDirect FUN ReadwordDirect FUN WriteBitDirect FUN WriteWordDirect FUN Figure 80 XC200 specific functions of the XC200 Util lib library The CAN BUSLOAD function is contained in the XC200 Util lib library in the CAN Utilities folder CAN BUSLOAD p dwintegrationTime POINTER TO DWORD p_bBusload POINTER TO BYTE CAN BUSLOAD BOOL Figure 81 CAN_BUSLOAD function This function can be called cyclically in a user program If a read cycle has been completed successfully the function returns TRUE and writes the determined integration time and the bus utilization values to the passed addresses If the bus
166. unting pulse arrives The direction signal is a static signal which must be present before the counting pulses The count value is incremented decremented with each counter value until the setpoint value is reached After the setpoint value is achieved an interrupt is initiated which is used to branch to a programming routine POU The reaction after the setpoint value is reached is determined by the direction of counting Incrementing Count direction up If a setpoint value is achieved the parameterized interrupt is activated With the next counting pulse the counter begins at O The interrupt source is defined in the control configurator Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 17 18 1 Design of the XC200 PLC 1 1 Rack Decrementing f a setpoint value is achieved the parameterized interrupt is activated When the next count pulse occurs the counter begins to count at the preselected setpoint value The interrupt source is defined in the control configurator See also e Interrupt processing Page 95 e Input of the setpoint value in the control configuration Page 93 e Connecting up down counter Page 25 1 1 14 3 Up down counter 16 Bit Two of these counters are available It corresponds with the up down counter 32 bit Inputs Counter 1 10 0 Pulse input 10 1 Directional input Counter 2 10 2 Pulse input 10 3 Directional inpu
167. urnVal Meaning 1 Read successful lt 0 Read failed 4 No valid pointer transferred Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN050030017 EN www eaton eu 107 11 Libraries function blocks and functions 11 2 XC200 specific functions 108 UTI2 GetMacAddress Issue of the MAC address MAC Media Access Control UTI2 GETMACADDRESS UTI2_pbyMacAddress POINTER TO BYTE UTI2_GetMacAddress BYTE Figure 94 UTI2 GetMacAddress Table 24 Input variables for UTI2_GetMacAddress Input variables Meaning UTI2_pbyMacAddress Pointer to an array of 5 byte values in which the read MAC address is entered Table 25 Return values for UTI2_GetMacAddress ReturnVal Meaning 1 Read successful 0 Read fault general fault 4 No valid pointer transferred UTI2 SetlPConfig Set IP and subnet mask address UTI2 SETIPCONFIG UTI2 pslPAddress POINTER TO STRING 80 UTI2 SetlPConfig BYTE UTI2 psSubnetmask POINTER TO STRING 80 Figure 95 UTI2 SetlPConfig NOTICE A newly entered value must be saved as a non volatile value by a SaveRegistry or a Reboot command The newly entered value is accepted only after a restart of the PLC Table 26 Input variables for UTI2 SetlPConfig Input variables Meaning UTI2 pslPAddress Pointer to a string variable which contains the IP address to be written UTI2_psSubnetmask Pointer to a string variable which contains the value to be entered fro
168. ut variables Meaning UTI2_psIPGatewayAddress Pointer to a string variable which contains the value to be entered from the gateway address Table 65 Return values for UTI2 SetlPGateway ReturnVal Meaning 1 Write successful 0 Write failed general fault 4 No valid pointer transferred UTI2 SetlPWins Setting of the IP address of a WINS server in the registry if necessary must be saved with UTI2 SaveRegistry UTI2_SETIPWINS UTI2 psIPWINS POINTER TO STRING 80 UTI2 SetlPWins BYTE Figure 116 UTI2 SetlPWins Table 66 Input variables for UTI2 SetlPWins Input variables Meaning UTI2_psIPGatewayAddress Pointer to a string variable which contains the IP address to be written Table 67 Return values for UTI2_SetIPWins ReturnVal Meaning 1 Write successful lt 0 Write failed 4 No valid pointer transferred Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN050030017 EN www eaton eu 119 11 Libraries function blocks and functions 11 2 XC200 specific functions UTI2 SetKeepAliveTime Sets the KeepAliveTime in seconds UTI2 SETKEEPALIVETIME dwkKeepAliveTime DWORD UTI2 SetKeepAliveTime BOOLI Figure 117 UTI2 SetKeepAliveTime Table 68 Input variables for UTI2 SetKeepAliveTime Input variables Meaning 5 500 Meaningful values in seconds Table 69 Return values for UTI2 SetKeepAliveTime ReturnVal Meaning TRUE Value valid FALSE Value outside of val
169. wing conditions apply in examples 1 and 2 e Xxx is not equal to yyy e the addresses must be between the limits 1 and 254 e the addresses must be part of the same address family If a connection is not established the transfer route can be checked with the PING function in order to ensure that the connection has not failed due to a fault on the transmission path The following steps are necessary gt Open the DOS window via the Start field and the Run command gt Enter CMD in the input field and confirm with OK You are presented with a window indicating a drive and a flashing cursor behind the drive designator gt For the example mentioned you would enter the following text ping 192 168 119 200 for XC CPU201 or ping 192 168 119 202 for XC CPU202 Confirm this with OK If the routing is functioning correctly you will receive a response indicating the response time Otherwise a time out will indicate problems with the connection set up Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 73 6 Connection set up PC XC200 6 4 Scan modify the IP address The following figure indicates the result of a correct connection set up ex C WINDOWS system32 cmd exe Microsoft Windows XP Wersion 5 1 2606 lt C gt Copyright 1985 2861 Microsoft Corp G ping 192 168 119 68 Pinging 192 168 119 6 with 32 bytes of data 168 119 68 bytes 32 TTL 128 168 119 68 168 119 68 Re
170. wser commands filecopy or filerename can be used to copy the boot project e g for a backup copy and change the name of the file In the CODESYS software however only the boot project with the name Default is active 2 Delete boot project on MMC Click Resources PLC Browser and enter the following command for the XC CPU201 EC256K filedelete disk_mmc MOELLER XC CPU201 EC256K 8DI 6DO project Wdefault prg Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 39 4 Operation 4 4 Programs and project 40 XC CPU 202 1 Save boot project on MMC Click on the folder Resources gt PLC Browser and enter the copyprojtommc command The boot project is stored on the MMC in the subdirectory project under the name Default prg Furthermore a Default chk file is generated You can copy the boot project with the browser commands filecopy or filerename e g as a backup copy and change the name of the file In the CODESYS software however only the boot project with the name Default is active 2 Save boot project on MMC Click on the folder Resources gt PLC Browser and enter the copyprojtommc command The boot project is stored on the MMC in the subdirectory project under the name Default prg Furthermore a Default chk file is generated You can copy the boot project with the browser commands filecopy or filerename e g as a backup copy and change the name of the file In t
171. y Fast digital input mW normally 168 Switching levels as per EN 61131 2 Limit values type 1 V DC low 5 high 15 Input delay Functionality Normal digital input Off gt On ms normally 0 1 0n 0 ms normally 0 1 Functionality Fast digital input Off gt On us normally 7 0n 0 us normally 1 Inputs Coun 8 Channels with the same reference potential Coun 8 Of which can be used as Interrupt inputs Coun 2 Counter input 32 Bit or Coun 1 Counter input 16 Bit or Coun 2 Incremental encoder input Track A B C Coun 1 Max input frequency kHz 50 Status display LED Digital outputs Heat dissipation per channel QX0 0 and QX0 5 CO 0 08 Load circuits QX0 0 and QX0 5 A 0 5 Output delay Off gt On typ 0 1 ms On Of typ 0 1 ms Channels Count 6 Channels with the same reference potential Count 6 Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MNO5003001Z EN www eaton eu 145 13 Appendix 13 6 Technical Data XC CPU201 EC256 8DI 6DO XV XC CPU201 EC512 8DI 6DO XV XC CPU202 ECA4M 8DI 6DO XV Status display LED duty factor 9o DF 100 Utilization factor g 1 Electromagnetic compatibility Interference immunity ESD IEC EN 61000 4 2 Contact discharge 4 kV Air discharge 8kV RFI IEC EN 61000 4 3 AM 80 96 80 1000MHz 10V m GSM mobile IEC EN PM 800 960 MHz 10 V m 61000 4 3 Burst IEC EN 61000 4 4 Network digital 1 0 direct 2 kV Analog 1 0 fieldbus 1k
172. you define which program is to be called with the task Basic vv Click with the right mouse button on the clock symbol of the Basic task created beforehand and select the Program call command in the popup menu Enter the name Basic prog in the Program call window Click on the button at the end of the input field and confirm the program name in the Entry help window Modular PLC XC CPU201 XV XC CPU202 XV 06 14 MN05003001Z EN www eaton eu 49 5 Program processing multitasking and system times 5 1 Task configuration 5 1 1 2 Writing a program Change over to the Global Variables tab and click with the right mouse button on the default program element PLC_PRG and select the Rename object command Designate the element as Basic_Prog You can now enter a program In the program example Figure 31 the variable count is incremented On counter status 9 a TRUE 0001 vVAR GLOBAL 000 a BOOL DOOSIEND VAR Y pasic proa Lini xi D006 0001 PROGRAM Basic prog T007 O002 VAR 9 POUs s Basic prog PRG 0001 count count 1 O002 IF count 9 THEN 0003la TRUE O004 END_IF Figure 31 Creating a program element for a cyclic task 5 1 2 Creating event controlled task Param and defining the program call The procedure corresponds to the creation of a cyclic task gt Create a task of the event controlled type with the name Param in accordanc

Download Pdf Manuals

image

Related Search

XC CPU202 xc cpu 201 xc cup 2022

Related Contents

Samsung 1000P Manual de Usuario    magicolor 2210 Installationsanleitung  Panduit JBX3510IW-A outlet box  縄 タ靴クシ 防振 ペー ス 取扱説明書  TC-344C User`s Manual  Pioneer DV-383-K User's Manual  en pdf - Clan des Tritons  manual de instalação - kyocera - fs4020dn  Pioneer SX-650 User's Manual  

Copyright © All rights reserved.
Failed to retrieve file