Xn Plc Canopen

download Xn Plc Canopen

of 54

Transcript of Xn Plc Canopen

  • 8/11/2019 Xn Plc Canopen

    1/54

    Modular PLC

    XN-PLC-CANopen

    Hardware, Engineering andFunctional Description

    02/05 AWB 2724-1566GB

    AThink future. Switch to green.

  • 8/11/2019 Xn Plc Canopen

    2/54

    All brand and product names are trademarks or registeredtrademarks of the owner concerned.

    1stpublished 2005, edition date 02/05

    Moeller GmbH, 53105 Bonn

    Authors: Pe ter RoerschEditor: Thomas KrachtTranslator : Dominik Kreuzer

    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 withoutwritten permission of Moeller GmbH, Bonn.

    Subject to alteration without notice.

  • 8/11/2019 Xn Plc Canopen

    3/54

  • 8/11/2019 Xn Plc Canopen

    4/542

  • 8/11/2019 Xn Plc Canopen

    5/54

    02/05 AWB2724-1566GB

    1

    About this manual 5

    Device application 5Abbreviations and symbols 5Additional documentation 5

    1 Layout of the XN-PLC 7System and field voltage 7XI/ON I/O module 7CPU functions 7 Operating mode switch 7 SET button 8 APPLICATION switch 8

    LED status indicator 1 8 LED status indicator 2 9 Real-time clock 9 Battery 9 Limit values for memory usage 9 Service (programming) interface 10 CANopen fieldbus interface 11

    2 Mounting 13Mounting the XN-PLC 13Mounting the XI/ON modules 13

    3 Engineering 15Control panel layout 15 Ventilation 15 Layout of units 15Preventing interference 15 Suppressor circuitry for interference sources 15 Shielding 15Lighting protection 16Connecting system and field voltage 16

    4 Using the XN-PLC 17

    Switch-on behaviour 17CPU status indicator 17Configuring the start-up behaviour with XSoft 17Program start 18 Program start (STOPlRUN) 18Behaviour after power off or power interruption 18Program stop (RUN lSTOP) 18Program processing and system time 18Monitoring cycle time 18Reset 19 Warm reset 19 Cold reset 19

    Full reset 19

    Contents

  • 8/11/2019 Xn Plc Canopen

    6/54

  • 8/11/2019 Xn Plc Canopen

    7/54

    02/05 AWB2724-1566GB Contents

    3

    9 Programming through CANopen network (routing) 39Prerequisites 39Notes 40

    Addressing 40Procedure 40PLC combinations for routing 42Number of communication channels 42

    10 RS 232 interface in transparent mode 43

    Appendix 45Dimensions 45Technical data 46

    Stichwortverzeichnis 49

  • 8/11/2019 Xn Plc Canopen

    8/54

    02/05 AWB2724-1566D

    4

  • 8/11/2019 Xn Plc Canopen

    9/54

    02/05 AWB2724-1566GB

    5

    About this manual

    Device applicationThe XN-PLC-CANopen, referred to as XN-PLC below, is intendedfor use in machine and plant control systems. The PLC has anRS 232 programming device (service) and a built-in CANopen fieldbus interface conforming to CIA specification DS301 V4.0. Youcan use the PLC as CAN master or as a slave in a CAN network.

    Abbreviations and symbols

    The symbols used in this manual have the following meanings:

    X Indicates instructions for user actions.

    Menu items, window titles, button labels and field names areprinted bold. File names, user input and function names areshown in italics.

    To improve legibility, the title of the current section is given at thetop of each left-hand page and the current subsection at the topof each right-hand page (except on blank pages and the first pageof each section).

    Additional documentationIn some places this manual contains references to more detaileddescriptions in other manuals, which are described with their titleand documentation number (e.g. AWB2786-1452GB).

    For specific information about selecting, installing, configuringand using the XI/ON modules, see the documents listed below:

    Power supply modules and digital I/O modules(AWB h1533g.pdf) XI/ON station general Integration in CANopen.

    XI/ON gateway for CANopen (AWB2725-1530GB)Product description Communication Interfacing with automation products.

    Product description XI/ON XN-1RS232 (h1494g.pdf) Product description XI/ON XN-1RS485/422 (h1495g.pdf) Product description XI/ON XN-1SSI (h1496g.pdf).

    All manuals are available in PDF format. If you cannot find aparticular manual on the product CD, you can download it as aPDF file from our website: Go to http://www.moeller.net/supportand enter the document number in the Quick Searchfield.

    h Indicates useful advice and additional information.

    ImportantIndicates a risk of material damage.

    Caution!Indicates a risk of serious material damage or slight injury.

    Warning!Indicates a risk of serious material damage or serious or

    fatal injury.

    http://www.moeller.net/supporthttp://www.moeller.net/support
  • 8/11/2019 Xn Plc Canopen

    10/54

    02/05 AWB2724-1566GB

    6

  • 8/11/2019 Xn Plc Canopen

    11/54

    02/05 AWB2724-1566GB

    7

    1 Layout of the XN-PLC

    The PLC has a compact design and can be expanded centrally withXI/ON modules and/or remotely through the CANopen bus.

    System and field voltage

    The system voltage supplies the CPU functional span and through the module bus the XI/ON modules logic circuitry. Thesystem voltage is monitored for power failure. If the voltage dropsoff, a data backup is run.

    The field voltage supplies the load connected to the XI/ONmodules.

    For further informationachapter Engineeringon page 15.

    XI/ON I/O moduleYou can expand the XN-PLC centrally with the available XI/ONmodules.

    For further informationaXI/ON Digital I/O Modules manual(AWB2725-1533GB).

    CPU functions

    Operating mode switch

    With the operating mode switch, you can set the functions shownin table 1.

    Table 1: Operating mode switch functions

    For further information achapter Using the XN-PLC frompage 17.

    Figure 1: Layout of the XN-PLC-CANopen

    a SET button

    b LED display 1

    c I/O module

    d End plate

    e LED display 2

    f CANopen

    g System and field voltage

    h Operating mode switch(0 = Stop, 1 = RUN, 7 = Mode, 8 = Factory, 9 = Reset)

    i APPLICATION switchj Service/programming interface

    b

    j

    f

    a

    i

    g

    e

    h

    SERVICE

    SET

    APPLICATION

    USys

    GNDSys

    UL

    GNDL

    PLC

    CANopen

    GW

    SF

    IOs

    RUNSTP

    Err BUS

    11 21

    12 22

    13 23

    c d

    Figure 2: Operating mode switch for RUN, STOP, etc.

    Switchposition

    Function

    0 STOP

    1 RUN; to put the CPU in the RUN condition,from operating system Version 1.0.1 upwards, aftersetting the switch the SET button must be pushed.

    2 STOP

    3 STOP

    4 STOP

    5 STOP

    6 STOP

    7 STOP

    8 STOP; when you press the SET button for at least threeseconds, the default values are read.

    9 STOP; when you press the SET button for at least threeseconds, a Reset is performed.

    0987654

    32

    1

    http://-/?-http://-/?-
  • 8/11/2019 Xn Plc Canopen

    12/54

    Layout of the XN-PLC 02/05 AWB2724-1566GB

    8

    SET button

    The SET button is enabled only in connection with setting 8 and 9of the operating mode switch. When you press the SET button,

    setting 8 or 9 becomes active (atable 1).

    APPLICATION switch

    You can query the number set with this switch in the user programwith the GetApplicationSwitch function. You can find this functionin the XN_PLC_UTIL.lib library.

    LED status indicator 1

    Table 2: LED status indicator 1

    Figure 3: SET button

    Figure 4: APPLICATION switch

    Figure 5: LED status indicator 1

    SERVICE

    SET

    APPLICATION

    098

    76543

    21

    PLCCANopen

    GW

    SF

    IOs

    RUNSTP

    LED Meaning

    GWGreen Rated field voltage ULis in valid range

    Green, flashing at1 Hz

    Rated field voltage not available or < 15 V DC

    Green, flashing at5 Hz

    Rated field voltage > 35 V DC

    I/Os

    Green Configured constellation of module busstation corresponds with the actual selection;communication running

    Green, flashing at

    1 Hz

    Station is in Force mode

    Red andGW LED off

    PLC not ready for operation or operatingvoltage not in the required range

    Red Module bus not ready for operation

    Red, flashing at1 Hz

    Non-adaptable change of actual constellationof module bus stations

    Red/green,flashing at 1 Hz

    Adaptable change of actual constellation ofmodule bus stations

    Red flashing No communication through the module bus

    SF + RUN/STP

    Red + Off System test being run (up to 6 seconds afterstart; after 6 seconds no user program present)

    Red + green System update in progress

    Both flashing System test found a fault

    Red + greenflashing

    User program loaded, PLC in STOP state

    Off + green User program loaded, PLC in RUN state

    Red + greenflashing

    Group error/diagnosis message issued,apage 24

    Red (dependent ongroup error Off/On)

    + green (f lashingquickly duringReset)

    Reset through operating mode switch(switch position 9)

    http://-/?-http://-/?-http://-/?-
  • 8/11/2019 Xn Plc Canopen

    13/54

    02/05 AWB2724-1566GB CPU functions

    9

    LED status indicator 2

    Table 3: LED status indicator 2

    Real-time clock

    The XN-PLC features a real-time clock, which can be referenced inthe user program using the functions in the SysLibRTC library, for

    example to read or set the time.

    The functions are described in the online help and in theSysLibRtc.pdf file. This file is located in theXSoft\Dok\English\XSoftSysLibs folder.

    Battery

    The battery is permanently installed and can not be replaced by the

    user. It supplies the built-in real-time clock (RTC) with power whenthe XN-PLC is switched off.

    The backup time is normally about 10 years.

    Limit values for memory usage

    The XN-PLCs memory is segmented. The segment sizes are shownin figure 7.The number of segments available to global data canbe specified to suit the size of the loaded program.

    To view the specified segment size for a PLC type, select theResourcestab in the object organizer and double-click Target

    Settings. In the dialog select the Memory Layouttab:

    To allow optimized, efficient usage of the memory range availablefor global data, set the number of global data segments to 12when you create a new project. The default value is one. The nextsection contains a description of how to change the number ofallocated segments.

    Figure 6: LED status indicator 2

    LED Meaning

    Err

    Off Error-free communication between XN-PLC and otherCANopen stations

    Red Faulty or interrupted communication between XN-PLCand other CANopen stationsCheck whether: the field bus is terminated with a terminating resistor if

    the XN-PLC is the last station in the bus topology; the CANopen bus connector or the direct connection is

    secure and whether all connections are correct; the CANopen cable is correctly connected or shows

    signs of damage; the correct bit rate is set; the CAN communication is still working correctly.

    Bus

    Off Field bus not in operationWait until the Firmware download is completed. If the LEDremains red, there is a hardware fault. Replace the PLC inthat case.

    Red CAN device status of the XN-PLC is Stopped

    Orange

    CAN device status of the XN-PLC is Pre-operational

    Green CAN device status of the XN-PLC is Operational

    Err BUS

    h The XN-PLC does not support functionsSysRtcCheckBattery and SysRtcGetHourMode!

    Figure 7: Segment size of the XN-PLC

    http://-/?-http://-/?-
  • 8/11/2019 Xn Plc Canopen

    14/54

    Layout of the XN-PLC 02/05 AWB2724-1566GB

    10

    Changing segment allocationX Select PLC type XN-PLC-CANopen. Select menu Projectl

    Optionsto open the Optionsdialog. In the Categoryfieldselect Buildand enter a 12 in the Number of datasegmentsfield.

    Service (programming) interface

    You can use this interface:

    as a programming interface or for transparent mode/SUCOM-A protocol.

    Through the RS 232 programming interface, communicationsbetween the XN-PLC and the programming device takes place.The handshake lines of the RS 232 interface can not be used.

    You can also switch the RS 232 interface to transparent mode(achapter RS 232 interface in transparent mode on page 43).

    The interface port is a PS/2 socket. It is not electrically isolated.

    Programming cableUse programming cable XN-PS/2-CABLE to connect the PC withthe XN-PLC.

    Figure 8: Memory management: changing the number of datasegments

    h ImportantYou can not use commercial standard PS/2 cables.

    Figure 9: Assignment of programming cableXN-PS/2-CABLE

    XN-PLCPS/2 socket(front view)

    PC9-pin RS 232 socket

    2 GND 5 GND

    4 TxD 2 RxD

    6 RxD 3 TxD

    12

    3

    45

    6

    5

    9 8 7 6

    4 3 2 1

  • 8/11/2019 Xn Plc Canopen

    15/54

    02/05 AWB2724-1566GB CPU functions

    11

    CANopen fieldbus interface

    The XN-PLC can be connected to the CANopen bus through theisolated ISO 11898 interface. The device can be operated as CAN

    master or CAN device.

    Power supply for CAN network stationsYou can connect the power supply for the individual CAN stationsin any order.

    Bus termination resistorsThe ends of the network link must be terminated with 120 Obustermination resistors:

    Properties of the CANopen cableUse only cable approved for CANopen applications and with thefollowing characteristics:

    Characteristic impedance 100 to 120 O Capacitance < 60 pF/m

    The demands placed on the cable, connectors and bus terminationresistors are specified in ISO 11898. Listed below are a fewrequirements and rules for CANopen networks.

    table 4 lists default parameters for CANopen networks with fewerthan 64 CANopen stations.

    Table 4: Standard parameters for CANopen network cable according toISO 11898

    Figure 10:Pin assignment, CANopen

    CAN H Non-inverted data signal (dominant high)

    Shield Fieldbus screen connection

    CAN L Inverted data signal (dominant low)

    GND Chassis (optional for the CAN data signals)

    Figure 11: Possible configuration of a CANopen bus with bustermination resistors

    a Screen

    CAN H

    SHIELD

    CAN L

    GND

    CAN H

    120 O

    CAN L

    CAN H

    120 O

    CAN LGND GND

    a a

    Buslength

    Loopresistance

    Conductorcross-section

    Busterminationresistor

    Transferrate

    atcablelength

    [m] [mO/m] [mm2] [O] [kbit/s]

    0 40 70 0.25 0.34 124 1000 at 40 m

    40 300 < 60 0.34 0.6 150 300 > 500 at 100 m

    300 600 < 40 0.5 0.6 150 300 > 100 at 500 m600 1000 < 26 0.75 0.8 150 300 > 50 at 1000 m

    http://-/?-http://-/?-
  • 8/11/2019 Xn Plc Canopen

    16/54

    02/05 AWB2724-1566GB

    12

  • 8/11/2019 Xn Plc Canopen

    17/54

    02/05 AWB2724-1566GB

    13

    2 Mounting

    Mounting the XN-PLCX Hook the XN-PLC onto the mounting rail from below.X Pull the locking slider upwards.X Press the top of the XN-PLC against the mounting rail.X Push the locking slider down again.

    Mounting the XI/ON modulesThe XI/ON modules consist of a base module and an electronicsmodule.

    X Connect the systems base module with the PLC from the right-hand side.

    X Secure the XN-PLC and the base modules on a 35 mm mountingrail.

    Yo can connect up to 74 I/O modules in slice design. Engagingbase modules XN-P3x-SBB and XN-P3x-SBBC immediately next tothe XN-PLC is not possible for mechanical reasons.

    X Clip any electronics modules onto the base modules.

    During commissioning or for maintenance, you can connect anddisconnect the electronics modules without affecting the wiring.

    The base modules are wired through tension spring or screwconnectors.

    h ImportantMake sure that the XN-PLC is securely attached to thetop-hat rail.

    Figure 12:Mounting the XN-PLC

    12

    3

  • 8/11/2019 Xn Plc Canopen

    18/54

    02/05 AWB2724-1566GB

    14

  • 8/11/2019 Xn Plc Canopen

    19/54

    02/05 AWB2724-1566GB

    15

    3 Engineering

    Control panel layoutThe layout of the components inside the control panel is a majorfactor for achieving interference-free functioning of the plant ormachinery. During the project planning and design phase, as wellas its implementation, care must be taken that the power andcontrol sections are kept physically separated from each other. Thepower section includes:

    Contactors Coupling/interfacing components Transformers Frequency inverters Converters

    To effectively exclude any electromagnetic contamination, it is agood idea to divide the system into sections, according to theirpower and interference levels. In small control panels it is oftenenough to provided a sheet steel dividing wall, to reduceinterference factors.

    Ventilation

    A clear space of at least 50 mm must be kept between passivecomponents, to ensure adequate ventilation. If the neighbouringcomponents are active elements, such as power supplies ortransformers, then the minimum spacing should be 75 mm. Thevalues given in the technical specifications must be observed.

    Layout of units

    Mount the PLC horizontally in a control panel:

    Preventing interferenceCable routing and wiringCables are divided into the following categories:

    Power cables (e.g. cables that carry high currents, or cables toconverters, contactors or solenoids)

    Control and signal cables (e.g. for digital inputs) Measurement and signal cables (e.g. for fieldbus connections)

    Take care to implement proper cable routing both inside andoutside the control panel, to keep interference as low as possible:

    X Avoid parallel routing of cable sections in different powercategories.

    X Always keep AC cables and DC separated.X Keep to the following minimum spacing:

    at least 10 cm between power cables and signal cables; at least 30 cm between power cables and data or analog

    cables. When routing cables, make sure that the outgoing and return

    leads of a circuit pair are routed together: The opposingcurrents and therefore the generated electromagneticfields cancel each other out.

    Suppressor circuitry for interference sources

    X Connect all suppressor circuits as close to the source ofinterference (contactors, relays, solenoids) as possible.

    Shielding

    X Use shielded cables for the connections to the data interfaces.The general rule is: the lower the coupling impedance, thebetter the shielding effect.

    Figure 13: Control panel layout

    a Spacing > 50 mmb Spacing > 75 mm to active elements

    c Cable duct

    c

    ba

    ba

    b

    a

    b

    a

    h Always route power cables and control cables as far apartas possible This avoid capacitive and inductive coupling.If the cables cannot be routed separately, shield the cable

    causing interference.

    h Switched inductors should always have suppressorcircuitry fitted.

  • 8/11/2019 Xn Plc Canopen

    20/54

    Engineering 02/05 AWB2724-1566GB

    16

    Lighting protection

    External lightning protectionAll cables routed outside buildings must be shielded. Metal

    conduit is best for this purpose. Fit signal cables with overvoltageprotection, such as varistors or other surge voltage protectors.Where possible, protective elements should be fitted at the pointof entry of the cable into the building, but no further away thanthe control panel.

    Internal lightning protectionInternal lightning protection covers all measures to reduce theeffects of a lightning strike and the resulting electrical andmagnetic fields on metallic installations and electrical plants.These measures are:

    Equipotential bonding/earthing Shielding Using overvoltage protection devices

    Please consult the following manuals for advice on cable routingand shielding measures:

    AWB27-1287 EMC Engineering Guidelines for AutomationSystems.

    TB27-001-GB Electromagnetic Compatibility (EMC) forAutomation systems.

    TB02-022-GB Electromagnetic Compatibility (EMC) forMachinery and Plant.

    Connecting system and field voltage

    Connect the system voltage at terminals USysand GNDSys, and thefield voltage at terminals ULand GNDL. Use separate power supplycabling for the system and field voltage.

    You do not need a separate power source for the system and fieldsupply.

    Table 5: Rated values for the XN-PLCs system and field voltage

    You can connect up to 74 XI/ON modules in slice design to the XN-PLC. The power consumption of all modules must be less than thesupply current supplied by the XN-PLC. If current consumption ishigher, you can use additional modules for power supply, forexample a bus refreshing module or a power feeding module.

    Bus refreshing modules supply the built-in module bus with5 V DC and the XI/ON modules with 24 V DC.

    Power feeding modules supply the XI/ON modules with the fieldvoltage of 24 V DC. A further module type provides 120/230 V AC.You can use these modules create groups of different potentialswithin the PLC. The 120/230 V AC modules can be arranged

    immediately to the right of the XN-PLC.

    For configuring the PLC, please refer to manuals XI/ON: Digital I/O Modules and Supply Modules (AWB2725-1533GB) and XI/ON Gateways for CANopen (AWB2725-1530GB).

    Figure 14:Terminals for system and field voltage

    USys GNDSys UL GNDL

    Rated system

    voltage

    24 V DC 0 V DC

    Rated fieldvoltage

    24 V DC 0 V DC

    USys

    GND

    Sys

    UL

    GND

    LFigure 15:Rating of XI/ON module supply

    XN-PLC

    XI/ON module bus 1.5 A/5 V DC

    XI/ON field voltage 10 A/24 V DC

    USys24 V DC

    UL24 V DC

  • 8/11/2019 Xn Plc Canopen

    21/54

  • 8/11/2019 Xn Plc Canopen

    22/54

    Using the XN-PLC 02/05 AWB2724-1566GB

    18

    Program start

    When a program starts, the XN-PLC checks whether theconfigured inputs and outputs match the physically present ones.

    It also checks whether the actual module corresponds with theparameterized module type. If the wrong module type is identified,the CPU changes to NOT READY state. If no module is connected,the start-up procedure continues.

    Program start (STOP l RUN)

    You can start the program in one of two ways:

    In online operation, issue the START command, for exampleafter loading a program. The CPU must be in STOP state and theoperating mode switch in the RUN position.

    Set the operating mode switch to its RUN position.

    Behaviour after power off or power interruption

    If you switch off or interrupt the CPU power while a program isrunning, the program cycle or the task is interrupted immediately,so that data integrity is no longer given. All outputs are set to 0 orswitched off.

    table 6 on page 18shows the behaviour of retentive variables.

    The remaining program cycle will not be completed when power is

    reconnected!If inconsistent data is not acceptable in your application, you can,for example, use an uninterruptible power supply (UPS).

    The PLC restarts as defined by the settings in the PLCConfigurationwindow,afigure 16.

    Program stop (RUN l STOP)

    When you set the operating mode switch to STOP, the CPUchanges to STOP state, as soon as the program cycle is completed.

    The outputs are set to 0.

    You can stop the program in one of two ways:

    In online operation, issue the STOP command. Set the operating mode switch to its STOP position.

    Table 6: Behaviour of the variables at PLC start

    Program processing and system time

    The user program is processed cyclically. The states of the inputsare read before the start of each program cycle, and the outputstates are written to the outputs at the end of the cycle.

    The run-time systems software architecture can cause timing jitterbetween individual processing cycles.

    You can also program application routines that are started by theoccurrence of system events;asection System eventsonpage 20.

    Monitoring cycle timeA hardware timer monitors the cycles of the user program and theindividual event tasks. If the cycle time exceeds a user-definedvalue, the PLC goes into STOP state and the outputs are switchedoff.

    You can specify the timeout value on the Other Parameterstabin the PLC Configurationwindow between 20 ms (default value)and 1000 ms.

    Start-up condition Variable type

    Non-retentive Retentive

    COLDSTART Initial values are loaded

    WARMSTART Initial values areloaded

    Valuesremain inmemory

    Program loaded and started inonline operation

    Initial values are loaded

    Start/Stop/Start... Values remain in memory

    h You can not declare physical operands, such as I, Q andM, as retentive variables.

  • 8/11/2019 Xn Plc Canopen

    23/54

    02/05 AWB2724-1566GB Reset

    19

    Reset

    There are three different Reset commands:

    Warm reset Cold reset Full reset

    table 7 shows the commands to use for initializing a retentivevariable range. The commands also affect the CPUs state:

    Warm reset

    This Reset command has the following effect:

    The program is stopped. The variables are initialized.

    The program can be restarted.

    Cold reset

    The program is stopped. The variables are initialized. The program can be restarted.

    Full reset

    This Reset command has the following effect:

    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 7: Behaviour of the variables after a Reset

    Test and commissioning

    The PLC supports the following test and commissioning features:

    Breakpoint/single-step mode Single-cycle mode Forcing Online modification Status indication (power flow).

    Breakpoint/single-step mode

    You can set breakpoints within the user program. If an instructionhas an associated breakpoint, the program will halt at this point.The following program instructions can be executed in single-stepmode. Cycle-time monitoring is disabled.

    Single-cycle mode

    In single-cycle operation, one program cycle is performed in realtime. The outputs are enabled during the cycle. At the end of thecycle, the output states are cancelled and the outputs are switchedoff. Cycle-time monitoring is active.

    Forcing variables and I/Os

    All variables of a user program can be forced into fixed values.Forced outputs of the XI/ON modules are only switched through to

    the I/O in the RUN state.

    Variable type

    Reset Non-retentive Retain

    Warm reset Initial values are loaded Values remain inmemory

    Cold reset Initial values are loaded

    Full reset1) Initial values are loaded

    1) After a full reset, the program must be reloaded. In online operation,you can then restart the PLC.

    i Caution!Any outputs already set when the program reaches thebreakpoint remain set!

    h Use breakpoint/single-step mode and single-cycle modeonly in the applications actual main program. Do notusethem in den event routines, for example for start, stop andinterrupt events, as this can cause problems in the controlsequence.

    XSoft does not prevent the use of breakpoints in the eventroutines.

    h The I/O connected through the CANopen field bus can notbe forced.

    http://-/?-http://-/?-
  • 8/11/2019 Xn Plc Canopen

    24/54

    Using the XN-PLC 02/05 AWB2724-1566GB

    20

    XSoft status indication

    The signal states of the physical, Boolean inputs are displayedin both the CPUs RUN state and in STOP.

    The signal states of the physical, Boolean outputs are displayedonly in RUN state.

    Low signals are displayed as FALSE with a black background. High signals are displayed as TRUE with a blue background. All other variables are shown with their current value only in the

    RUN state.

    System events

    You can respond to PLC system events with a user applicationroutine that runs once when a particular event occurs. Itsexecution is time-monitored. The time base is the configured

    longest permissible cycle time.

    Possible events include:

    STOP: User program stop (does not apply to cycle time timeoutor hardware watchdogs)

    START: User program start (cold and warm start) COLDSTART: User program cold start WARMSTART: User program warmstart TIMER-INTERRUPT: A timer interrupt channel is available.

    Timer interrupt

    The timer interrupt is triggered after an adjustable delay of 500 to2500000 microseconds. It interrupts the user program and

    executes a user-defined application routine.

    To program the delay time, include the TimerInterruptEnablefunction from library XN_PLC_UTIL.lib in your user program.

    At input dwTimerTickUS enter the delay time.

    The value is accepted with the start of the timer and can not bemodified for the run time. If the time falls below 500 or exceeds2500000, the function returns FALSE and is not executed.

    If, for example, a delay of 2 seconds is to be started by externalinput I0.0, add the following line to the user program:

    TimerInterruptEnable(%IX0.0,2000000)

    Creating application routine time_Int:X In the object organizer, select the Resourcestab and double-

    click the Task configurationresource.

    The System eventstab appears.

    Figure 17:System events

    h Single step mode can not be used for system eventprogram blocks.

    Figure 18:The TimerInterruptEnable function

    Figure 19:Programming a function

    TIMERINTERRUPTENABLE

    BOOL xEnable TimerInterruptEnable BOOL

    DWORD dwTimerTickUS

  • 8/11/2019 Xn Plc Canopen

    25/54

  • 8/11/2019 Xn Plc Canopen

    26/54

    Using the XN-PLC 02/05 AWB2724-1566GB

    22

    Downloading/updating the operating system

    You can replace the XN-PLCs operating system (OS) with a currentversion, which is always available for download at the Moeller

    website (http://www.moeller.net/support). It is also included oneach XSoft Service Pack CD.

    To download the OS, you have to log in first.

    Procedure:

    X Log in to the PLC. In the object organizers Resourcestabdouble-click PLC Configurationand select the OtherParameterstab.

    X Click the Start...button.

    The Download operating systemdialog opens.

    The system reports that the COM port is not initialized.

    X Click the OS-Filebutton and select the required operatingsystem file (*.hex).

    The target type and file version are displayed.

    X Click Transfer OS to MMC.

    The transfer begins. Programming of the flash EPROMs takesabout 10 to 20 seconds.

    h ImportantWhen you download the OS, all files saved on the PLC aredeleted (the existing operating system as well as the userprogram).

    Figure 24:Starting OS update

    Figure 25:Download operating system

    h From the drop-down list, you can select the most recentlyopened files.

    Figure 26:Operating system file selection

    h While the warning symbol appears in the Statusfieldnext to the text Programming Flash, do not switch off

    the supply voltage!

    http://www.moeller.net/supporthttp://www.moeller.net/supporthttp://www.moeller.net/supporthttp://www.moeller.net/supporthttp://www.moeller.net/support
  • 8/11/2019 Xn Plc Canopen

    27/54

    02/05 AWB2724-1566GB Downloading/updating theoperating system

    23

    Wait for the following dialog.

    X Click Exit.

    Because the PLC is rebooted after every OS download, themessage Communication interruptedmay appear after the OShas been downloaded to the PLC. You must log in again after each

    reboot.

    As soon as you have logged on, the following message appears:No program on the PLC! Should the new program be loaded?

    Click Yesto load the program.You can now create the bootproject.

    Figure 27:Warning during download

    Figure 28:OS successfully transferred to the PLC

  • 8/11/2019 Xn Plc Canopen

    28/54

  • 8/11/2019 Xn Plc Canopen

    29/54

    02/05 AWB2724-1566GB

    25

    5 Browser commands

    You can directly access the states and events of the XN-PLC withthe browser commands.

    For a description of the available commands, select the XSoftobject organizers Resources taband double-click PLC Browser.

    Place a ? before the selected browser command, followed by aspace, and press the Enter key. Detailed information about thebrowser command is then shown.

    Calling browser commands

    The browser commands can be used only in connection with XSoft.

    To run these commands:X Under Resourcesin the object organizer, double-click PLC

    Browser.

    A new window, PLC-Browserappears in the workspace.

    X Click .

    The selection field lists the available browser commands.

    X Double-click the required command to select it.

    The selected command now appears in the PLC Browserwindow.

    X To view the result of the browser command, press the Enter key.

    Figure 29:Running a browser command

  • 8/11/2019 Xn Plc Canopen

    30/54

    Browser commands 02/05 AWB2724-1566GB

    26

    Using and evaluating browser commands

    reflectReflects the command line, for testing communications betweenbrowser and PLC.

    'reflect ?' is not transferred to the PLC!

    Example:

    mem

    Shows a memory range.

    Syntax:

    You can enter addresses as decimal, hexadecimal (prefixed 16#) or

    as a macro.Example:

    memc

    As mem, but addresses are added to the start address of the coderange.

    Example:

    memdAs mem, but addresses are added to the start address of the datarange.

    Example:

    pinf

    Shows project information.

    Example:

    ppt

    Displays the program block pointer table.

    Example:

    Figure 30:Browser command reflect

    mem

    Figure 31:Browser command mem

    Figure 32:Browser command memc

    Figure 33:Browser command memd

    Figure 34:Browser command pinf

    Figure 35:Browser command ppt

  • 8/11/2019 Xn Plc Canopen

    31/54

    02/05 AWB2724-1566GB Using and evaluating browsercommands

    27

    dpt

    Displays the data pointer table.

    Example:

    pid

    Displays the project ID.

    Example:

    cycle

    Displays the cycle time.

    Example:

    canload

    Displays the utilization of the CANopen field bus.

    Example:

    This browser command returns, for example, the followinginformation:

    CAN busload = 0 Percent Baud rate 125 Kbit/s Integration Time: 510 ms.

    GetNodeId

    Displays the node ID of the CANopen field bus.

    Example:

    Figure 36:Browser command dpt

    Figure 37:Browser command pid

    Figure 38:Browser command cycle

    Figure 39:Browser command canload

    h In addition to the browser command, function blockCAN_BUSLOAD can be used to determine the CAN busutilization from the user program.asection FunctionCAN_BUSLOADpage 32

    h ImportantWith a bus utilization of 75 percent or higher, the warningATTENTION: HIGH BUSLOAD also appears. Overload ofthe local CAN bus in conjunction with further short termload peaks can lead to CAN data loss.

    Figure 40:Browser command GetNodeId

  • 8/11/2019 Xn Plc Canopen

    32/54

    Browser commands 02/05 AWB2724-1566GB

    28

    SetNodeId

    Changes the node ID of the CANopen field bus.

    Example:

    metrics

    Displays specific XN-PLC information.

    Example:

    reload

    Loads the boot project from flash memory to the user memory.

    Example:

    If you run the reload command again after the XN-PLC is in STOP

    state, the following information is displayed:

    remove

    Deletes the boot project in the flash memory of the XI/ON-PLC.

    Example:

    Figure 41:Browser command SetNodeId

    Figure 42:Browser command metrics

    Figure 43:Browser command reload

    Figure 44:Browser command reload ok

    Figure 45:Browser command remove

  • 8/11/2019 Xn Plc Canopen

    33/54

  • 8/11/2019 Xn Plc Canopen

    34/54

  • 8/11/2019 Xn Plc Canopen

    35/54

    02/05 AWB2724-1566GB

    31

    6 Libraries, function blocks and functions

    The libraries contain IEC function blocks and functions that youcan use, for example, for the following tasks:

    Data exchange through the CANopen bus Controlling the real-time clock Determining bus load of the CANopen bus Triggering interrupts Sending/receiving data through the interfaces

    The libraries are located in the following folders:

    Lib_Common for all PLCs Lib_CPUxxx for PLCs XC100 and XC200 Lib_XN_PLC_CANopen for PLC XN-PLC.

    Using libraries

    When you open a project, libraries Standard.lib andSYSLIBCALLBACK.lib are copied in to the Library Manager. If youneed further libraries for your application, you have to install thesemanually.

    The libraries in the Library Manager are assigned to the projectafter saving. When you open the project, the libraries are thenautomatically called up as well.

    The following overview lists the documents in which the functionblocks and functions are described.

    Installing additional system librariesYou can install libraries manually as follows:

    X In your project, click the Resourcestab in the object organizer.X Double-click the Library Managerelement. From the Insertmenu, select Additional Library....

    The Opendialog appears.

    X Select the library to install and click Open.

    The library now appears in the Library Manager.

    Document Library

    AWB 2700-1437 Standard.libUtil.lib

    AWB 2724-1453 XC100_Util. Lib

    AWB 2724-1491 XC200_Util. Lib

    AWB 2724-1566 XN_PLC_Util. Lib

    Online help or PDFfiles in folder

    XSoft\Dok\English\XSoftSysLibs

    SysLib . lib

    AWB 2786-1456 XS40_MoellerFB. Lib/ Visu. Lib/

    AN2700K20 3S_CANopenDevice. Lib3S_CANopenManager. Lib

    AN2700K19 3S_CANopenNetVar. Lib

    AN2700K27 XC._SysLibCan. LibXN_PLC_SysLibCan. Lib

    AWB 2786-1554 CANUserLib. LibCANUser_Master. Lib

    Figure 49:Libraries, installing manually

    Figure 50:Selecting a library

  • 8/11/2019 Xn Plc Canopen

    36/54

    Libraries, function blocks andfunctions

    02/05 AWB2724-1566GB

    32

    XN-PLC-specific functions

    Library XN_PLC_Util.libThis library contains the functions shown in the illustration below:

    Function CAN_BUSLOAD

    This function can be called cyclically in a user program. If a readcycle has been completed successfully, the function returns TRUEand writes the determined integration time and the bus utilizationvalues to the passed addresses.

    If the bus load calculation is not yet completed or the CANcontroller has not yet been initialized, the function returns FALSE.

    Each read cycle has a duration of 500 ms.

    For information about evaluating the returned value, see canloadon page 27.

    The function call in the user program is as follows:

    Function GETAPPLICATIONSWITCH

    With this function you can query the position of the applicationswitch. After an H signal at input xEnable, the number to which

    the switch is set is displayed. This allows an external programselection.

    Figure 51:Functions of library XN_PLC_Util.lib

    h The Timer functions are described in section Timerinterrupton page 20.

    Figure 52:Function CAN_BUSLOAD

    CAN_BUSLOAD

    POINTER TO DWORD p_dwIntegrationTime CAN_BUSLOAD BOOL

    POINTER TO BYTE p_bBusload

    Figure 53:Function GETAPPLICATIONSWITCH

    GETAPPLICATIONSWITCH

    BOOL xEnable GetApplicationSwitch USINT

  • 8/11/2019 Xn Plc Canopen

    37/54

    02/05 AWB2724-1566GB

    33

    7 Establishing a PC XN-PLC connection

    To establish a connection between PC and XN-PLC, the twodevices communication parameters must be the same.

    To match them, first adjust the PCs communication settings to theCPUs settings. Use the CPUs default parameters, transferringthem as shown in figure 54.

    You can then change the CPUs parameters (afigure 55),always making sure that you have the same settings on the PC.

    Communication settings of the PC

    Using XSoft, specify the PCs communication settings. You can useeither the COM1 or the COM2 port of the PC.

    X In the Onlinemenu of XSoft, select CommunicationParameters....

    X Specify the port (COM1 or COM2),asection Changingsettings

    X Use the remaining settings as shown in figure 54.X Confirm the settings with OK.X Log on to the PLC.

    Changing settingsTo change settings such as the baud rate or the port, do thefollowing:

    X Double-click the displayed value, for example 38400. The fieldbecomes grey.

    X Enter the desired value.

    You can double-click the field again to select the required baudrate, e.g. 57600 bit/s.

    Communication settings (baud rate) of the CPUX In the Resourcestab, select PLC Configuration.X In the PLC Configurationdialog, click the Other Parameters

    tab.X In the Baudratelistfield, select the baud rate (for

    example 57600 bit/s as shown in figure 55).

    X Log on to the PLC.

    The following prompt appears:

    X Click Yes.

    The program is loaded. After a short while, a communication errormessage appears, since the baud rate settings of PC and CPU areno longer the same:

    X Acknowledge the message with OK.

    To reestablish communications, change the PCs baud rate again.

    h If you get an error message, the CPUs default settingshave already been changed. In that case try a baud rate of57600.

    Figure 54:Defining the PCs communication settings

    Figure 55:Specifying the CPUs communication settings

    Figure 56:Program change prompt

    Figure 57:Communications fault

    http://-/?-http://-/?-http://-/?-http://-/?-
  • 8/11/2019 Xn Plc Canopen

    38/54

    02/05 AWB2724-1566GB

    34

  • 8/11/2019 Xn Plc Canopen

    39/54

    02/05 AWB2724-1566GB

    35

    8 Creating a sample project

    The following example aims to help you learn how to use the XSoftsoftware. We will create a project consisting of a configurationand a program, which you can then load and test.

    Our configuration assumes the following hardware layout:

    Function

    Establish an AND link between inputs IX0.0 and IX1.1. The resultof this logical operation will be output at Q2.1.

    Setting up a target system

    After starting XSoft, create a new file:

    X From the Filemenu, select New.

    The possible target settings are listed.

    X From the pull-down list field, select your target system (in our

    example XN-PLC-CANopen) and double-click it.

    Figure 58:Hardware layout for the sample project

    %IX0.0 %IX1.1 %QX2.1

    SERVICE

    RESETRS232

    APPLICATION

    USys

    GND

    Sys

    UL

    GND

    L

    PLCCANopen

    GW

    SF

    IOs

    RUNSTP

    Err BUS

    11 21

    12 22

    13 23

    11 21

    12 22

    13 23

    11 21

    12 22

    13 23

    11 21

    12 22

    13 23

    11 21

    12 22

    13 23

    11 21

    12 22

    13 23

    11 21

    12 22

    13 23

    11 21

    12 22

    13 23

    11 21

    12 22

    13 23

    11 21

    12 22

    13 23

    11 21

    12 22

    13 23

    XN-2

    DI-24VDC-P

    XN-2

    DI-24VDC-P

    XN-2

    D0-2

    4VDC-0.5

    A-P

    XN-2

    D0-2

    4VDC-0.5

    A-P

    XN-2

    D0-2

    4VDC-0.5

    A-P

    XN-2

    AI-U(-1

    0/0

    ...

    +10VDC

    )

    XN-2

    AI-U(-1

    0/0

    ...

    +10VDC

    )

    XN-2

    AI-U(-1

    0/0

    ...

    +10VDC

    )

    XN-2

    AI-U(-1

    0/0

    ...

    +10VDC

    )

    XN-2

    AI-U(-1

    0/0

    ...

    +10VDC

    )

    XN-2

    AI-U(-1

    0/0

    ...

    +10VDC

    )

    Figure 59:Selecting the target system

  • 8/11/2019 Xn Plc Canopen

    40/54

    Creating a sample project 02/05 AWB2724-1566GB

    36

    The dialog with the target system settings appears. In this examplewe are using the XN-PLC in stand-alone operation so that you donot have to change the default settings.

    X Click OKto confirm.

    The New POUdialog appears.

    X Select the POU type Programand programming language IL:Confirm your selection with OKand save the project under thename Example-1.

    The following window opens.

    The object organizer, on the left of the XSoft window, containsfour tabs: POUs, Data types, Visualizationsand Resources. Inthe illustration, the POUstab is selected. The upper section of thePOU window in the main workspace contains the variabledeclarations, and the lower section is the program editor.

    Configuring the PLC

    X To configure the PLC, select the Resourcestab in the objectorganizer and double-click the PLC Configurationresource.

    The PLC Configurationeditor that opens in the workspaceshows the PLCs configuration in the tree view and further settingsin the tabs to the right.

    Click the plus symbol next to Configuration XN-PLC-CANopen. Afurther control element, XN-PLC-CANopen [SLOT] is displayed.

    Click this element. The right editor section now contains threetabs. Select the Input/Outputtab.

    One at a time, select the modules listed in figure 62:

    X In the left field, select, for example, input module 2DI-24VDC-Pand click Select to move it to the Selected Modulesfieldon the right.

    X In the tree view, click the plus symbol of each module to viewits I/O addresses.

    For input module 2DI-24VDC-P, with two inputs, 8 addresses aredisplayed. The modules inputs can be addressed throughaddresses IX0.0 and IX0.1. Addresses IX0.2 to IX0.7 can not be

    used.

    Figure 60:Selecting a POU

    Figure 61:Main project window

    Figure 62:Selecting the I/O modules

  • 8/11/2019 Xn Plc Canopen

    41/54

    02/05 AWB2724-1566GB Writing a program

    37

    Writing a program

    In the object organizer, select the POUstab and double-click thePLC_PRG(PRG) resource. Create the variables declaration and theprogram as shown in figure 64.

    Compile the project:

    X From the Projectmenu, select Rebuild all.

    A message with the number of errors or a warning appear.

    Log on to the PLC:

    X From the Onlinemenu, select Login.

    The project is transferred. You can now test the program.

    Figure 63:Viewing the addresses

    Figure 64:Program with declaration

  • 8/11/2019 Xn Plc Canopen

    42/54

    02/05 AWB2724-1566GB

    38

  • 8/11/2019 Xn Plc Canopen

    43/54

    02/05 AWB2724-1566GB

    39

    9 Programming through CANopen network (routing)

    Routing means to establish an online connection from aprogramming device (PC) to any (routing-capable) PLC in a CANnetwork without having to directly connect the programmingdevice to the target PLC. The target can instead be connected toany other PLC in the network. All actions that are availablethrough a direct PCPLC connection can also be implementedthrough the routing connection:

    Program download Online modifications 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 theprogramming PC can access all routing capable PLCs on the CANbus. The selected project determines the PLC to communicatewith. This provides an easy way of controlling remote PLCs.

    However, the data transfer from routing connections issignificantly slower than with direct (serial or TCP/IP) connections.This results, for example, in slower display refresh rates ofvariables and longer download times.

    PrerequisitesThe 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.

    Routing through XC200To perform a program transfer or routing using TCP/IP through aconnection between XC200 and PC, you must first set the blocksize for the transferred data. The packet size (4 Kbyte or128 Kbyte) depends on the transfer type (program transfer orrouting) and the operating system,atable 8.

    Table 8: Block size for data transfer

    Routing with the XC200 is possible from BTS version 1.03.02.

    The block size can be changed only directly in the WindowsRegistry.

    Changing the block size

    X Close all XSoft applications.X Close the CoDeSys gateway server.

    X Change the block size to the required value.

    The XSoft installation folder contains the following *.reg files forentering the block size in the Windows Registry:

    Alternatively, you can use the BlockSizeEditor application tochange the block size.

    The download block size is defined in the following Registry key:

    [HKEY_LOCAL_MACHINE\SOFTWARE\3S-Smart Software SolutionsGmbH\Gateway Server\Drivers\Standard\Settings\Tcp/Ip (Level 2Route)]"Blocksize"=dword:00020000

    The default block size is 20000hex(=128 Kbyte), the block size forrouting is 1000hex(= 4 Kbyte).

    Program/file transfer Routing

    BTS< V1.03.02

    BTSf V1.03.02

    BTS< V1.03.02

    BTSf V1.03.02

    Block sizeDefault:128 Kbyte

    128 Kbyte 128/4 Kbyte Routingnot possible

    4 Kbyte

    hImportantThe program download with a block size of 4 Kbyte to aPLC with an operating system version earlier than 1.03.02will cause faulty behaviour!

    If a program download is performed, the progress bar onthe programming device monitor will only changeerratically (about every 10 seconds).

    h You can change this setting only if you have administratorrights on your PC.

    Figure 65:Closing the CoDeSys gateway server

    BlockSizeDefault.reg Enters a block size of 20000hex=128 Kbyte(default value) in the Registry.

    BlockSizeRout.reg Enters a block size of 1000hex= 4 Kbytein the Registry.

  • 8/11/2019 Xn Plc Canopen

    44/54

    Programming throughCANopen network (routing)

    02/05 AWB2724-1566GB

    40

    Notes

    If large 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 connectionis possible.

    If a program with a modified routing node ID is loaded into thetarget 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.

    If a PLC receives a program without valid routing parameters(baud rate/node ID), this PLC cannot be connected via a routingconnection.

    The routing is independent of the configuration (master/slave):a target PLC that has not been configured as a master or as aslave can be accessed. It must only receive the basic parameters

    such as node ID and baud rate, as well as a simple program.

    Addressing

    PLCs on the CANopen bus can be configured as a master or as aslave. The PLCs are assigned with a node ID/node number(address) in order to uniquely identify them. To use the routingfunction to access a target PLC, you must assign a further node IDto the PLC.

    Procedure

    X Connect the PC to a PLC.X Select the target PLC with which you want to communicate for

    the project.X Determine the communication settings for the PC and the PLC

    connected to the PC.X Enter the target PLCs target ID (target ID = node ID!) as shown

    in the example and log on.

    You can run the following functions:

    Program download Online modification Program test (Debugging) Create bootable project Filing source code.

    Note for project creation:

    The node ID/node number and the baud rate of the target PLC tothe routing function can be defined in the Additionalparameterstab in the PLC Configurationwindow:

    Enter the baud rate on the CANopen bus and the Node-ID/nodenumber in the RS232 lCAN routing settings field.

    This field appears with the XC200, after you have confirmed it inthe Activatefield. This activation is necessary to ensure that thePLC can communicate via the CANopen bus.

    Node ID and baud rate are transferred with the project download.

    The following illustrations indicate independently of the routing

    settings where the baud rate and the node ID of the PLCs whichhave been configured as masters or devices are to be entered. Thesettings are to made in the master PLC in the CAN Parameterstab or with the device PLC in the CAN Settingstab.

    Figure 66:XC100/200, XN-PLC on the CANopen bus, routingprinciple

    1) The following applies for the node ID of the device function and therouting function:

    XC100 with operating system < V2.0 or XC200:The routing node ID must be not equal tothe device node ID.

    XC100 with operating system fV2.0 or XN-PLC:The routing node ID must be equal tothe device node ID.

    PC

    Routing PLC XC100/200/XN-PLC

    (master/device)

    Node ID 1

    Target PLCXC100/200/XN-PLC

    (device)

    Routing node ID n1)

    Node ID n1)

    CANopen

    h To guarantee a fast data transfer, the routing should beperformed only with a CANopen baud rate of at least125 Kbit/s.

    Figure 67:CANopen routing settings

  • 8/11/2019 Xn Plc Canopen

    45/54

    02/05 AWB2724-1566GB Procedure

    41

    ExampleThe example below illustrates the procedure for accessing a PLCprogram.

    You have connected the PC to the PLC with node ID 2 and wantto access the target PLC with node ID 3.

    X Open the project of the target PLC (node ID 3) whose programyou wish to edit or test.

    X First configure the parameters for the hardware connection PCnPLC (node ID 2).

    X From the Onlinemenu select CommunicationParameters....

    X Click the Newbutton under local channels.

    The New Channeldialog appears.

    X Select the channel in the Devicefield.XC200: Serial [RS232] [Level 2 Route] Tcp orIp [Level 2 Route].

    X In the Namefield you can assign a new name, e.g.Rout_232.

    X Confirm with OK and return to the original window.

    You have now determined the parameters for the hardwareconnection between the PC and the PLC (node ID 2).

    Figure 68:CAN master parameters

    Figure 69:CAN device parameters

    Figure 70: Diagnostics possibilities

    a XC100 with node ID 1

    b XC200 with node ID 2

    c XN-PLC with node ID 3

    Figure 71:Channel parameter setting

    a b c

    CANopen

    XI/ON

  • 8/11/2019 Xn Plc Canopen

    46/54

    Programming throughCANopen network (routing)

    02/05 AWB2724-1566GB

    42

    X From the Onlinemenu select Communication Parameters...again and select the PLC you want to program or test.

    X Enter the number 3 as the target ID in the example. The targetID is identical to the node ID!Click in the field on the Value column on the right beside thetarget ID term to enter the target ID. Enter the figure 3 andconfirm with OK.

    X Log on and carry out the action.

    PLC combinations for routing

    The following PLC support routing:

    Number of communication channels

    Several communication channels can be opened, e.g. PC nPLC2, PC nPLC 3 depending on the PLC (communication channel)

    connected to the PC. The status indicator of PLC 2 and 3 can beimplemented simultaneously.

    Table 9: Type and number of communication channels depending onthe PLC

    From P XC100 XC200 HPT100 XN-PLC-CANopen

    To O

    XC100 x x x x

    XC200 x x x x

    HPT100 x x

    XN-PLC-CANopen

    x x x

    Communicationschannel

    PLC Max. channelcount

    TCP/IP Level2Route XC200 5

    Serial RS 232 Level2Route XC100/XC200/XN-PLC

    1

  • 8/11/2019 Xn Plc Canopen

    47/54

  • 8/11/2019 Xn Plc Canopen

    48/54

    02/05 AWB2724-1566GB

    44

  • 8/11/2019 Xn Plc Canopen

    49/54

    02/05 AWB2724-1566GB

    45

    Appendix

    Dimensions

    113.

    25

    114.

    75

    50.6 74.4

  • 8/11/2019 Xn Plc Canopen

    50/54

    Appendix 02/05 AWB2724-1566GB

    46

    Technical data

    XION-PLC-CANopen

    General

    Standards and regulations IEC/EN 61131-2EN 50178

    Ambient temperature C 0 to +55

    Storage C 25 to +85

    Mounting position Horizontal

    Relative humidity, no condensation (IEC/EN 60068-2-30) % 10 to 95

    Air pressure (in operation) hPa 795 to 1080

    Vibration resistance 10 to 57 Hz g0.075 mm57 to 150 Hz g1.0 g

    Mechanical shock resistance 15 g/11 ms

    Overvoltage category II

    Pollution degree 2

    Enclosure protection IP 20

    Rated insulation voltage V 500

    Interference emission EN 50081-2, Class A

    Interference immunity EN 50082-2

    Battery lifetime Normally 10 years

    Weight kg 0.15

    Dimensions (W xH xD) mm 50 x112 x75

    Connecting terminals Plug-in terminal block

    Conductor cross-section

    Screw terminals

    Stranded with ferrule mm2 0.5 to 1.5

    Solid core mm2 0.5 to 2.5

    Electromagnetic Compatibility (EMC)

    Electrostatic discharge IEC/EN 61000-4-2, Level 3, ESD)

    Contact discharge kV 4

    Radiated (IEC/EN 61 000-4-3, RFI) V/m 10

    Burst Impulse (IEC/EN 61000-4-4, Level 3)

    Supply cables kV 2

    Signal cables kV 1

    Surge (IEC/EN 61 000-4-5) kV 0.5

    Conducted (IEC/EN 61 000-4-6) V 10

  • 8/11/2019 Xn Plc Canopen

    51/54

    02/05 AWB2724-1566GB Technical data

    47

    Supply voltage for the CPU (24 V/0 V)

    Mains failure bridging

    Dropout duration ms 10

    Repeat rate s 1

    Input voltage V DC 24

    Permissible range V DC 20.4 to 28.8

    Power consumption W Up to 26

    Residual hum and ripple % F 5

    Maximum power dissipated (without local I/O) Pv W 6

    Overvoltage protection Yes

    Polarity protection Yes

    Switch-on current surge xIn Not limited, (limiting only by a supply-side 24 V DCPSU)

    Output voltage for the signal modules

    Nominal value V DC 5

    Output current A 3.2

    Off-load stability Yes

    Short-circuit proof Yes

    Electrically isolated from supply voltage No

    CPU

    Microprocessor Infineon C164

    Memory

    Program code Kbyte 128

    Program data Kbyte 128

    Marker and/or retain data Kbyte 4/8/16

    Cycle time for 1 k instructions (bit, byte) ms 0.5

    Interfaces

    Serial interface (RS 232) without handshake line

    Data transmission rate kbit/s 38.4 or 57.6

    Connection by PS/2 socket

    Potential isolation No

    In transparent mode:

    Data transfer rates 300, 600, 1200, 2400, 4800, 9600, 19200, 38400,57600 bit/s

    Character formats 8E1, 8O1, 8N1, 8N2, 7E2, 7O2, 7N2, 7E1

    Number of send bytes in a block 190 bytes

    Number of received bytes in a block 190 bytes

    XION-PLC-CANopen

  • 8/11/2019 Xn Plc Canopen

    52/54

  • 8/11/2019 Xn Plc Canopen

    53/54

  • 8/11/2019 Xn Plc Canopen

    54/54

    Index 02/05 AWB2724-1566GB

    Program stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .18Program, creating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Programming cable . . . . . . . . . . . . . . . . . . . . . . . . . . . .10Programming interface . . . . . . . . . . . . . . . . . . . . . . . . .10Project ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27

    R Rated voltages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16Real-time clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39

    S Sample project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35Segments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9Select POU type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36

    Service interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10SET button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8Setting up a target system, example . . . . . . . . . . . . . . .35Shielding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15Single-cycle mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Single-step mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19Source code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24Start-up behaviour, configuring . . . . . . . . . . . . . . . . . .17Status indication, LED . . . . . . . . . . . . . . . . . . . . . . . . . . .8Status indication, XSoft . . . . . . . . . . . . . . . . . . . . . . . . .20Supply voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16Suppressor circuitry for interference sources . . . . . . . . .15Switch-on behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . .17

    System events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20System voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7, 16

    T Target ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40TCP/IP connection (for routing) . . . . . . . . . . . . . . . . . . .39Test and commissioning . . . . . . . . . . . . . . . . . . . . . . . .19Time, display/edit function . . . . . . . . . . . . . . . . . . . . . .29Timer interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20Transfer rate, CANopen . . . . . . . . . . . . . . . . . . . . . . . .11Transparent mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10

    U Utilization, CANopen fieldbus . . . . . . . . . . . . . . . . . . . .27

    V Ventilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15Voltage source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16

    W WARMSTART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15