Home

netPLC with CoDeSys - Commissioning

image

Contents

1. hilscher COMPETENCE IN COMMUNICATION User Manual netPLC with CoDeSys Commissioning V3 5 Hilscher Gesellschaft fur Systemautomation mbH www hilscher com DOC120113UMO2EN Revision 2 English 2014 01 Released Public Introduction 2 93 Table of Contents 1 INTRODUCTION SEE TRUE NND NON 5 1 1 ADOULINE Man a aal 5 1 1 1 KISLOLMEVI SION Sn ee en id DE ea EU t MAI 5 1 1 2 Conventions in this Manual cccooonncnnncccccnnnnnccconncnnncnonnnnnnnnnnnnnnnnnononnnnnnnononnnnnnnnnos 6 1 2 HEIP LEO WIT C OD CGY E 7 1 2 1 Reference to Hardware Firmware Server Driver and Software 7 1 2 2 Documentation OTE LG osito dador tdi 8 1 3 SCA S nimer O 9 1 3 1 SO VIG Msn ocio aia ica 9 1 3 2 Important Notes ccocooccccccoccnccconococoncncnonannnnononnnnonnnnnnnnnnnnnononnnnononnnnnnnannnnenannnnanas 9 1 3 3 EXCIUSION OF abla 10 1 3 4 Wanani em seen ee Tears 10 1 3 5 EX DOM THOOUIADIOINS iii esse 11 1 3 6 Registered Trademarks 42 ee een ea 11 1 4 Mee O ernste 11 2 e e o eE PEO E EEE ree ee 12 2 1 Satan INSTA iO 12 2 2 Mrended USE 12 2 3 meae estern UE 12 2 4 Obligation to Read and Understand the Manual ccccoocccnccnccccnnoccncnnncnnoconnnonononoos 12 3 DESCRIPTION AND REQUIREMENTS eene eem 13 3 1 DES EIDPIONG Sera ere rene a 13 3 2 System Reqliremehlessnen tee Dee ee lee 13
2. OIC ius a CAA CiA 405 C44 Technical Workgroup C14405 5 App run E i il Library Manager E PLC PRG PRG 8 2 Symbol configuration A 48 Task Configuration Figure 42 Add Library 1 In the Devices tree A double click Library Manager entry In the Library Manager click Add library 2 Y The Add Library window opens Y Add Library Company Hilscher Swiss GmbH 1 HE Miscellaneous Group by category 2 Inthe Company field select Hilscher Swiss GmbH from the drop down list gt Click the plus symbol in front of the Miscellaneous category 2 to display subordinate entries gt Select HilPlcSysFunctions entry O gt Click OK button 4 The library has been added to the Library Manager netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Functions 64 93 C100 1 prnject CoDeSys PEE File Edit View Project Libraries Build Online Debug Tools Window Help Devices T EA Start Page la PLC PRG a PROFIBUS Master Bi Device i il Library Manager x ER CHNLI 4 ame Namespace e dd lib pe Device connected NPLC C104 anna x E PLC Logic ia Stande System Standard Properties Ai Te 219 HilPlcSvsFunctions Hilscher Swiss GmbH HIL Remove library C App run i Library Manager B 15 PLC PRG PRG Details s
3. Note You need the Node Address see position 2 in the figure above to configure the OPC Server netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 51 93 4 8 Download PLC Program and Bus Configuration 4 8 1 Login and Download 1 Login to the PLC gt Inthe menu choose Online gt Login C100_1 project CoDeSys File Edit View Project Build Online Debug Tools Window Hel Ae d S wen 2 are Devices Sl cro Cha Mewire CAIDO The software verifies if the project in the PLC component is the same as the project currently opened on the PC If no PLC program is in the PLC component yet then the message Application App does not exist on device Do you want to create it and proceed with download is displayed If the projects are different the message Unknown version of application App on target Do you want to perform a download and replace the application is displayed a evitc Create boot application Aooli CoDeSys 9 Application App does not exist on device Do you want to create iE and proceed with download Important A download of the PLC program only by login does not store the PLC program in the PLC component zero voltage secure If the netPLC component is disconnected from power supply th
4. Fieldbus Protocal Figure 41 Host I O Interface The Host I O Interface uses addresses IBO IB511 and QBO QB511 in the PLC memory when the Host I O Interface is the first device in the CoDeSys project and slave devices are behind the Host I O interface The Host l O Interface uses the next free addresses in the PLC memory when the Host I O Interface is inserted in the CoDeSys project behind the slave devices Example When addresses IBO IB15 and QBO QB15 are already used for slave devices the Host l O Interface then uses addresses IB16 IB527 and QB16 QB527 The input and output data in the host memory are always for the cifX Device Driver at offsets O 511 netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Functions 63 93 7 Functions 7 1 Add Functions Library Before you can use the functions described in this section you first have to add them to the functions library of CoDeSys To do so proceed as follows Seles 100_1 project CoDeSys File Edit View Project Libraries Build Online Debug Tools Window Help H ur dd oc m 4 E 87 9 m DEEST ERE E ES StartPage 2 PLC PRG jj PROFIBUS Master 4j Device fff Library Manager X zm CIO0 1 GEESE Name Namespace 2 ibrary d Device connected NPLC C10q ig PLC L fa Standard System Standard
5. M 3 Symbol configuration Fie Gateway 1 scanning i Task Configuration Mi weLC cro0 D cps oPc 0002 0515 C Add gateway SE MainTask id met PRoFIBUS Master PROFIBUS li cB aBs2 DPS CB AB324 dil 2 byte input nutpul Filter Sorting arder Don t save network path in project Secure online made Figure 36 Set Active Path 2 Set active path gt Select NPLC C100 DP device O below Gateway 1 gt Click Set active path 2 to establish a connection to the device C100 1 project CoDeSys DER Ele Edit Wew Project Build Online Debug Tools Window Help cux amp lt A E p E OS Devices Xx Start Page 1 Device f PROFIBUS Master 5 PLC PRG 3 Symbols X 3e Device NPLC C100 Communication Settings Applications Log PLC settings Task deployment Status Information EJ PLC Logic App Select the network path to the controller i i Eg Library Manager Gstemay 1 0002 0515 v E PLC PRG PRG r 3 E 9 3 Symbol configuration Bie Gateway ep Der DPICDS OPC S rack Configuraien 1 NPLC C100 DP CDS OPC 0002 0515 active i E MainTask a PROFIBUS Master PROFIE U ce A832 pes CB AB32 i 2 byte input output Fiter Target ID v Sorting order Name b v Dont save network path in project Secure online mode Figure 37 Path Set Active Y Next to the NPLC C100 device entry a message indicating active state appears
6. Visualizing 58 93 3 Set interface to GATEWAYS gt Inthe Interface field select GATEWAY3 from the dropdown menu OPCConfig C Programme 3S CoDeSys CoDeSys OPC Server 3 0PCServer ini SEE File Edit 7 Server Settings for PLCI ii Connection Interface GATEWAY Project name Timeout mz Number of Ines Buffer Size Byte Wait Time s Reconnect Time s Active Logging iw Enable logging D efaulteventz Log Additional Events Add Debug Events slow 4 Edit Connection gt Inthe tree select Connection entry e OPCConfig C Programme 35 CoDeSys CoDeSys OPC Server 3 0PCServer ini File Edit Settings for connection to PLC gt Connection Expert Gateway Unknown Device Parameter Value Comment netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Visualizing 59 93 5 Edit settings gt Click Edit button The window to enter the address appears 6 Enter CoDeSys PLC address CoDeSys address of PLC Gateway IP Address localhost Part 1217 PLC name recommended or address 0002 0515 2 Use Tcp lp blackdrver IP Address of PLE IP Part of PLE Use 1217 for Port 4 In the PLC name or address field enter the address by which the 3S Gateway can access the NPLC C100 slot PLC e g 0002 0515 Important Use the address shown in the CoDeSys p
7. gt Check if the netPLC CoDeSys server is running This is indicated by the symbol tes in the system tray gt If the netPLC CoDeSys server is not running start it by choosing Start gt All Programs gt Hilscher GmbH gt netPLC CoDeSys Server Y The system tray shows the symbol Bw 4 2 2 Start CoDeSys Start CoDeSys gt Select Start gt All Programs gt 3S CoDeSys gt CoDeSys gt CoDeSys V3 5 Or gt Start CoDeSys by a double click on the desktop icon Y CoDeSys is started gt CoDeSys 3 5 netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 The CoDeSys GUI appears Coles yi De E Yee Dopad o Bald Grins eb ess cer eb LN eth farted 2 Create sew prope Se Opera project From dai i Opens protect archie pees di Jj er d png athe Iram PLL zm l Learn about tunc concept ii Visit the Homage enn oma LOL WS Your start with CoDeSys e Ondine Coll ars Fonum Dhscuss Ful programming questiong with oer Cola Da users P Dam Colletys Sample Projects Download tempia projects lo hele you when pro 2 king your Ap ion 5 Pete ies rare n Figure 1 CoDeSys Main Window The main window is divided into the following areas Engineering E Page Ha 16 93 Hendi beyond Technology Company Contact CoDeSys V3 5
8. 3 2 1 System Requirements PG u s u ee 13 3 2 2 System Requirements CoDeSys oocccccccccccccoonnnnccoconononcnnnnnnnonnnnnncnnnnnnnnnnnncnnnnnnns 13 4 CREATE FIRST PROJECT FOR NETPLC COMPONENT EXAMPLE NPLC C100 oM ERRORI OPEN NUN edici 14 4 1 o DUMP eU 14 4 2 Fare Dar o 15 4 2 1 netPLC CoDeSys PC Card Server ssiri a e a 15 4 2 2 Stat OODE SS O ea eee ee a 15 4 3 Create a PLC Program Selecting Device and Programming Mode 17 4 3 1 Add Host I Os to NPLC C100 Slot PLC eeeeeeeeseeeeeeeeeee 19 4 3 2 Add Local I Os to NPLC M100 Module occccccccoccconccccoccnncccnonccnncncnnnconncnnnnns 22 4 4 Greate BlsOhflglldllOl reunido creo lina erui ina deque EE Les EE cete u ERU UE 25 4 4 1 Select Fieldbus System for the Controller ooooncccncccccccconnccnnnnnccoonoconnnnnnnss 25 4 4 2 Gonmigure PROFIBUS Master usual ib 27 4 4 3 Add CANopen Master Configuration WiNdOW occccccccccconccconcnccocononnccnnnnnononon 29 4 4 4 Configure DeviceNet Scanner sseeeeessessssseeeee nennen enne 33 4 5 Map BUS STUC G eurai E 37 4 5 1 Import Slave Device Fil S oi di 37 4 5 2 Add and configure Slave Device resrey ioira onean ann aa nennen 38 4 5 3 Identify I O Addresses of the Slave oocccccccccccnnncccnnnccncnnoonnononononononannnennnnnnnnnnns 40 netPLC with CoDeSys Commissioning DOC120113UMO2EN Revision 2 English 2014 01 Released Public Hilsch
9. Commissioning UM xx Create first project for netPLC EN PDF Creating a PLC program Create bus configuration Connect to PLC Download PLC program and bus configuration Visualizing Functions Bus diagnostic Troubleshooting Description of LEDs User documentation CoDeSys V3 Installation and first steps CoDesys Installation and Start paf User documentation OPC Server 3 Installtion and Usage OPC V3 how to use E pdf User manual Wiring instructions PROFIBUS CANopen Wiring Instructions UM xx EN pdf DeviceNet AS Interface CompoNet CC Link That document contains information about cable characteristics max cable length in dependence of the baudrate as well as termination resistors Table 7 Documentations netPLC CoDeSys Note After having installed the CoDeSys programming system you will find additional documents in the installation directory usually under C Programs 3S CoDeSys CoDeSys Documentation netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Introduction 9 93 1 3 Legal Notes 1 3 1 Copyright Hilscher 2009 2014 Hilscher Gesellschaft f r Systemautomation mbH All rights reserved The images photographs and texts in the accompanying material user manual accompanying texts documentation etc are protected by German and international copyright law as well as international trade and protection provisions You are not aut
10. Information E Name CB_AB32 DPS endor Hilscher GmbH Categories DP Slave Version HIL_7508 65D Wersion 1 001 HW Version 1 000 Sw aversian 1 000 Order Number Description Profibus DP Slave imported From HIL_7508 35D Append selected device as last child of PROFIBUS Master ou can select another target node in the navigator while this window is open e i Add Device Figure 27 Select Slave Device The Device area see figure above lists all devices available for the fieldbus system Select your slave device O gt Click Add Device 2 gt Click Close 3 C100_1 project CoDeSys File Edit View Project Build Online Debug Tools Window Help ahi amp o Bm X 4 a 3 amp o Devices RES Be StartPage jj PROFIBUS Master fj CB AB32 DPS Cio 1 v I Device NPLC C100 DP Parameters Status Information Bj PLC Logic G Identification Parameter Watchdog A Station addres 2 2 2 T SDR tBit 11 5 Wakchdog control ZSEE in Library Manager 18 PLC_PRG PRG Ident number 0x7508 Lock Unlock 2 Lock v Time ms 400 3 4 Task Configuration gt eS ATA User parameters j PROFIBUS Master PROFIBUS Master i Length of user parameters Byte 5 iJ 2 byte input output 2 byte input B Parameter Value Allowed values Byte 0 16 00 0 255 Byte 1 16 00 0 255 Byte 2 16 00 0 255 Byte 3 16 00 0 255 Byte 4 16 00 0 255 Figure 28 Added Slave Device netPLC with CoDeSys Commissioni
11. 2 Select CANopen_Manager O Click Add Device gt Click Close The dialog window closes VN V WV You have gathered all dialog windows for the configuration of the CANopen bus netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 31 93 4 4 3 1 Configure CANopen Master The Device tree has been expanded as follows C100 1 project CoDeSys File Edit View Project Build Online Debug Tools Window Help 1 asu sos Devices p cron I Device NPLC C100 Metx configuration CANbus Status Information Ei PLC Logic Net settings App Slat rial Library Manager FL E PLC PRG PRG Nets Com Channel 4 netxComchanneio ON 38 Task Configuration ES MainTask 1 9 EAN _Metwork CAN Network f t CANopen Manager CAMopen Man Figure 17 NetX CANbus NetX Configuration Under CAN Network O gt NetX Configuration 2 set the following parameters gt Slot Always select Slot 0 3 gt NetX Com Channel 4 Always select NetXComChanel0 C100_1 project CoDeSys o File Edit View Project Build Online Debug Tools Window Help abe a amp a F 13 i mi de MI a e 1 eS 1 X f Start Page CAN_Network SU cum D e Device NPLC C100 Nets configuration
12. 8 1 Start Up and Test the Bus Note By downloading the PLC program to the PLC component the bus gt configuration is also downloaded 8 1 1 Login and Download Program 1 Login to the PLC gt Inthe menu choose Online gt Login C100 1 project CoDeSys File Edit View Project Build Online Debug Tools Window Hel ose Om Devices Create boot application a evitc Cras u Dewine ND C C1005 Aooli The software verifies if the project in the PLC is the same as the project on the PC If no PLC program is in the PLC then the message Application App does not exist on device Do you want to create it and proceed with download appears If the projects are different then the message Unknown version of application App on target Do you want to perform a download and replace the application appears CoDeSys p Application App does not exist on device Do you want bo create it and proceed VL with download 2 Start Download Answer the question Application App does not exist on device Do you want to create it and proceed with download with Yes O 3 gt The application is downloaded to the PLC 3 gt With the start of the download the PLC goes into STOP mode netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public O Hilscher 2009 2014 Bus Diagnostic 73 93 8 1 2 Device Assignment 1 Open Devi
13. CANbus Status Information lll PLC Logic wn Network il Library Manager p s E PLC PRG PRG Baudrate bit s e 250000 Task Configuration de MainTask 1 Al CAN_Network CAN Network t CANopen Manager C4Nopen_Mane Figure 18 NetX CANbus gt CANbus Under CAN Network gt CANbus 2 set the following parameters gt Network 3 Always select 0 gt Baudrate 4 You can choose one of the following rates 10000 20000 50000 100000 125000 250000 500000 800000 and 1000000 netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 32 93 C100_1 project CoDeSys File Edit View Project Build Online Debug Tools Window Help 388 4 amp E d Bo 3 CAN_Network 3 CANopen_Manager Devices HAEN art Page cio j e Device NPLC C100 CANopen Manager CANopen 1 0 Mapping Status Information BI PLC Logic 2 me wil p 34 Am wen iz 3 s CANopen it Library Manager Network Management E E PLC PRG PRG Autostart CANopenManager Polling of optional slawes Fr Task Configuration Cheek and Fix 19 CAM Metwork CAN Network NMT Start All if possible j I CANopen Manager CAMopen Mana 5 Sync Enable Syne Producing COB ID 128 e Cycle Period us 1000 Window Length us 1200 Enable Sync Con
14. PLC PR er k 4 Byten 22 Task Configuration i Bytel de MainTask Mukpuro iH PROFIBUS Master PROFIBUS Master f Bytel li CB_AB32_DPS CB_AB32 DP5 l Bytel fl 2 byte input output 2 byte input Figure 29 Ascertain I O Addresses of Slave gt gt In the Device tree A double click the I O entry D of the slave Y The dialog view of the slave I O opens in the main area see figure above Click DP Module I O Mapping tab O In the Variable column O click on the plus symbols to expand the list where necessary gt n the Address column 4 you can see the values which can be used in the PLC program to address the I Os Note The addresses 4 are IBO IB1 QBO and QB1 when no Host l O interface is used The addresses 4 will be IB512 IB513 QB512 and QB513 when Host I O interface is used in front of the master device and its slave devices netPLC with CoDeSys Commissioning DOC120113UMO2EN Revision 2 English 2014 01 Released Public O Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 41 93 4 6 Create PLC Program 1 Open Editor for function module PLC_PRG C100_1 project CoDeSys File Edit View Project Build Online Debug Tools Window Help amp se A mp Ne c pou p m Bah e Bm X Ai AA TER Devices a X 5 Start Page PROFIBUS Master E PLC_PRG pl Cf 1 y i PROGRAM PLC PRG m Device NPLC C100 gt wan Elf
15. Redundant Mode The active Master was not found Table 17 LEDs PROFIBUS DP Master netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Error Codes 79 93 11 Error Codes 11 1 Error Codes Functions HilPlcSysFunctions Error codes are of data type INT Error code Name Description NO_ERROR No error occurred Unexpected internal error has occurred 1001 BATTERY BAD ERROR The status of the battery is bad The battery has to be changed 1010 FCT NOT SUPPORTED ERROR This function is not supported Table 18 Error Codes Functions HilPlcSysFunctions netPLC 1000 INTERNAL ERROR netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Technical Data Protocols 80 93 12 Technical Data Protocols 12 1 CANopen Master and DeviceNet Master The same firmware file is used for both CANopen Master and DeviceNet Master Communication functions of CANopen are running as IEC code in CoDeSys Control CANopen Master Parameter Description Maximum number of CANopen nodes 126 Maximum number of cyclic input data 3584 bytes Up to 512 bytes from them can be used for Host input data for NPLC C100 Maximum number of cyclic output data 3584 bytes Up to 512 bytes from them can be used for Host output data for NPLC C100 Maximale Anzahl empfangener PDOs 512 Maximale Anzahl Ub
16. right click the CAN_Network Q in the Devices tree A to open context menu gt Inthe context menu select Add Device 2 Y The Add Device dialog opens netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 30 93 i Add Device Mame CANopen Manager Action 1 Append device Insert device Plug device Update device Device Vendor lt All vendors gt 2 Name Wendor 113 Fieldbusses Ci CANopen amp if CANopenManager 7 CaNopen_Manager Hilscher Gesellschaft F Systemautomation mbH 3 CANopen Manager FDT 35 Smart Software Solutions GmbH CIA Local Device DeviceNet lt DeviceNet Scanner T DeviceNet Scanner 35 Smart Software Solutions GmbH 113 DeviceNet Scanner Hilscher Gesellschaft F Systemautomation mbH SE 11939 Display outdated versions Information A Name CAMopen Manager Vendor Hilscher Gesellschaft F Systemautomation mbH Categories C AMopenManager Version 3 5 0 0 Order Number 1506 ZF Description CANopen Manager O bo Append selected device as last child of LAM Mebwork You can select another target node in the navigator while this window is open GY vers Figure 16 CANopen Manager Set the following parameters Select Action Append device O Select Device gt lt All vendors gt
17. 2 in the main window gt In the indicated lines see position O in the figure above you can watch the variables being incremented The PLC program increments in each PLC cycle the output byte QB1 by one Check if the output data at the PROFIBUS DP Slave changes Change the input data of the PROFIBUS DP Slave device and check if this data reaches the PLC netPLC with CoDeSys Commissioning DOC120113UMO2EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 55 93 4 9 Disconnect from the PLC Log out gt Inthe menu select Online gt Logout Ctrl F8 to log out Online Debug Tools Window O Logout Ctrl F8 The connection to the PLC is disconnected netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public O Hilscher 2009 2014 Visualizing 56 93 5 Visualizing Data can be read from and written to the PLC from a visualization software with OPC interface called OPC client in the following sections via the OPC server For this a configuration is necessary The following sections describe the configuration steps to connect a visualization software via OPC to the PLC Requirements Operational PLC which means e installed hardware e installed device driver cifX Device Driver e installed and operational server netPLC CoDeSys Server e the slot PLC has already been prog
18. 2014 Appendix 88 93 13 2 4 NPLC C100 DP PROFIBUS Simple IO NPLC C100 DP Profibus Simple IO project Folder Supplements amp Examples CoDeSys Sample Projects netPLC PROFIBUS Simple IO Short description The project consist of a slot PLC card as PROFIBUS DP Master and a PROFIBUS DP slave device CBAB32 DPS The PROFIBUS DP slave device has two bytes input process data occupying IBO and IB1 and two output process data occupying QBO and QB1 PLC program The PLC program increments the 6QBO each cycle to act as a counter And the PLC program copies the input process data byte IB1 to output process data byte QB1 Table 26 Example NPLC C100 DP PROFIBUS Simple IO 13 2 5 NPLC C100 DP with Host lOs Project name NPLC C100 Host lOs project Folder o Supplements Examples CoDeSys Sample Projects NPLC C100 DP with Host lOs Short description The project consist of a slot PLC card as PROFIBUS DP Master and a PROFIBUS DP slave device CBAB32 DPS The PROFIBUS DP slave device has two bytes input process data occupying IBO and IB1 and two output process data occupying QBO and QB1 PLC program The PLC program increments the 6QBO each cycle to act as a counter And the PLC program copies the input process data byte IB1 to output process data byte QB1 The addresses for host I O data start from IB2 and QB2 QB2 is incremented by 1 in each PLC cycle IB513 is copied to QB513 The sum of the values of IB5 and IBO are
19. 93 EE Gateway Gateway Driver TCP IP a Settings Param Value IP A localhost Port 1217 3 Accept Gateway gt Click OK to take over Gateway 1 settings The window Gateway is closed 4 7 2 Scan Network and Set Active Path Note Make sure that the netPLC CoDeSys Server runs when the NPLC C100 card communicates via parallel PC system bus Note If you want to connect to the netPLC component via USB check if USB cable is connected 1 Scan the network Click Scan Network to search for PLC devices Devices are searched via the USB connection via the parallel system bus of the slot PLC via the netPLC CoDeSys server as well as via Ethernet Found devices also non PLC devices are displayed below Gateway 1 netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 50 93 C100_1 project CoDeSys File Edit wiew Project Build Online Debug Tools Window Help iue E x Ms 31 188 Devices X 5 Start Page f Device PROFIBUS Master PLC PRG 3 Symbols SR crad i B E zu E i Device NPLC C100 Communication Settings Applications Log PLC settings Task deployment Status Information El PLC Logic App Select the network path to the controller il Library Manager TESEN Set active path 2 E PLC PRG PRG
20. In the Devices tree right click App entry to open context menu then select Add Object then select Symbol configuration 2 Add object symbol configuration The following dialog window opens Add Symbol configuration M3 Remote access symbol configuration Orm gt Click Open O 3 gt In the Devices tree the Symbol Configuration entry appears Devices 2 x z M Cr 1 gt Device NPLC C100 BM PLE Logic C3 App it Library Manager E PLC PRG PRG Omm 8 3 Symbol configuration F Task Configuration d MainT ask H PROFIBUS Master PROFIBUS Master li cB_AB32_DPS CB_AB32 DP5 fil 2 byte input output 2 byte inpu In the editor window the Symbols configuration tab appears netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 45 93 C100 1 project CoDeSys AE File Edit View Project Build Online Debug Tools Window Help o ye A pg Ne S Hah amp a ey ES Devices Y X Bj StartPage PROFIBUS Master PLC_PRG 3 Symbols AA AA CIOQ ij gt Qe Device NPLC C100 Available variables Refresh Selected variables T a O aw Available Items Access Rights Selected Items Access Rights pp o Variables 83 Data Types variables Library Manager i r E 83 Data Types E PLC PRG PRG 5 Symbol configuration Task Configurat
21. PLC Logic 3 END VaR 0 App ral Library Manager E PLC PRG PRG Task Configuration de MainTask t PROFIBUS Master PROFIBUS Master tell CB AB32 DPS CB_AB32 DPS i 2 byte input output 2 byte input Figure 30 Slave Device Added gt In the Devices tree A double click PLC PRG PRG CD EN Note You can use the program editor only if you are not logged into the PLC component The editor window appears The following figure shows the Editor without any variables 8 and without PLC program 2 Create a variable Create following variables varl BYTE ope 160 r BYTE opc xbtr BYTES ope bU BYTE DB StartPage fj PROFIBUS Master PLC PRG 1 PROGRAM PLC PRG 3 2 VAR 3 varl BYTE 4 ope ibO BYTE B 5 opc_ibl BYTE 6 opc_qb0 BYTE 7 END VAR i l si netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public O Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 42 93 3 Edit PLC program gt Fill in the following PLC program varl ve varl 1 OBl varl opc ib0 IBO Opec XII S1BL OBO opc qb0 gt Start Page j PROFIBUS Master PLC PRG 1 PROGRAM PLC PRG VAR 3 varl BYTE 4 opc ibO BYTE 5 opc ibl BYTE 6 opc qb BYTE 7 END VAR varl warl 1 S Bl varl opc ibU 150 opc ibl X
22. Sy E30 Devices Y t X f StartPage jj Host 1 Mi Interface vx y FistFroject e Device NPLC C100 Internal Configuration Internal I O Mapping Status Information ll PLC Logic Channels o App Variable Mapping Channel Address Type Default Value Unit Description in Library Manager A 3 0 Input IBO E PLC PRG PRG Block0 IB0 9 Task Configuration 5 9 Block 1B64 MainTask 4 Block2 1B128 J Host_I_O_Interface Host 1 0 Interface E 9 Block3 1B192 t Block4 IB256 Y Block5 IB320 5 0 Block6 IB384 Block7 016448 9 Output oQB0 9 BlockO oQBO Y Block1 QBE4 Block2 QB128 Block3 oQB192 Y Block4 voQB256 Block5 QB320 A Block6 QB354 S Block oQB448 Reset mapping _ Always update variables 9 Create new variable 4 Map to existing variable Bus cycle options Bus cycle task Use parent bus cycle setting v D POUs 3 Devices Figure 8 C100 Configure Host I Os 2 gt f not already selected double click Host O Interface N in the Devices tree gt Select Internal I O Mapping tab 3 gt Now you can double click individual fields in the table in order to configure signals for bits or words 8 netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 22 93 4 3 2 Add Local I Os to NPLC M100 Mo
23. Symbol configuration Fr Task Configuration SE MainTask G f PROFIBUS Master PROFIE lica as32 DPS CB AB Gl 2 byte input out E GetCompany Name Type Inherited From Address Initial Corr B Gethirberrrope jy GetTile WSTRING Z GetTextProperty fr GetTitle GetVersion GetVersionProperty 15 StatusOfBattery 5 StatusOfExtz4VDC 15 statusOFPCIPower Figure 43 Add Library zi Aipicsystunctiong v34310 Inputs Outputs Graphical Documentation A ERROR 13 GetBooleanProperty FUNCTION GetTitle The upper area of the Library Manager displays the integrated libraries the lower area lists the functions belonging to the library selected in the upper area 8 7 2 Functions HilPlcSysFunctions The function library HilPlcSysFunctions supports three functions for the netPL C components StatusOfBattery Checks the status of the battery and measures the battery voltage level StatusOfExt24V Checks if the netPLC component is supplied by an external power supply StatusOfPClPower Checks if the netPLC component is supplied via PCI power Table 8 System Functions HilPlcSysFunctions To insert these functions into the PLC program the input assistant can be used To open the input assistant proceed as follows Press F2 or gt Inthe menu choose Edit gt Input Assistant or gt Inthe editor choose from the context menu the Input Assistant entry Y The Input Assistant op
24. cB_AB32_DPS CB AB32 DPS fl _2_byte_input_output 2 byte input P A e Y v v Display invalid variables Copy Instance Path Figure 32 Editor Symbols 2 Add symbols to selected variables In the Available Variables tree 8 select opc_ibO variable Add this variable to the Selected Variables area by clicking Add in the same manner also variables opc_ib1 and opc_qb0 to the V VW Y 0 netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 Stark Page 4 PROFIBUS Master Available variables Available Items Refresh Access P 63 Variables loConfig_Globals Z PLC PRG 4 opc ibd sr 4 opc ibi BYE gt opc_qbO srr vari BYTE 4 I amp ecVarAccessLibrarv 13 IoDreCIFXPrafibusLibrar 11 Iostandard Selected Variables area PLC PRG 8 3 Symbols Selected variables Selected Items F Variables Access Rights E PLC_PRG 4 opc ib 4 opc ibi opc qbO Sy x d Data Tvpes 46 93 UH Shaw libraries in Available variables Instance Path Figure 33 Editor Symbols Access Rights Display invalid variables clicking the symbols in the Access Rights column In the Selected Variables area you can set Read Write directions by Copy Instance Path netPLC with CoDeSys Commissioning DOC120113UMO0
25. to the right to claim rectification netPLC with CoDeSys Commissioning DOC120113UMO2EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Introduction 11 93 1 3 5 Export Regulations The delivered product including the technical data is subject to export or import laws as well as the associated regulations of different counters in particular those of Germany and the USA The software may not be exported to countries where this is prohibited by the United States Export Administration Act and its additional provisions You are obligated to comply with the regulations at your personal responsibility We wish to inform you that you may require permission from state authorities to export re export or import the product 1 3 6 Registered Trademarks Windows XP Windows 7 are registered trademarks of Microsoft Corporation Adobe Acrobat is a registered trademark of the Adobe Systems Incorporated 1 4 Licenses Operating the netPLC component with CoDeSys PLC function requires a license This license is embedded in the netPLC device hardware and is included in the scope of delivery It allows the use and operation of the CoDeSys programming system and of the PLC runtime environment in the hardware A license can not be deleted in the netPLC hardware nor converted For operating as fieldbus master a master license is embedded in the netPLC hardware This license allows operation as master in the corres
26. written to QB5 Table 27 Example NPLC C100 DP with Host lOs netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Appendix 89 93 13 3 Information on Utilized Capacity Information about required and available memory is displayed in the Messages area scroll down to the bottom of Messages area when you build code for the netPLC component menu Build gt Generate Code Messages 1 X Build Derror s 0 warnings 6 message s Description Project Build started Application Device pp The application is up to date IP Size of generated code 293420 bytes c100_1 Size of global data 24042 bytes C100 1 Total allocated memory size For code and data 348096 bytes C100 1 Memory area O contains Data Input Output Memory and Code highest used address 1048576 largest contiguous memory gap 700492 66 95 C100 1 Memory area 1 contains Retain Data highest used address 65488 largest contiguous memory gap 65488 100 c100_1 C100 1 Precompile ok Figure 54 Storage Requirement of Project Information on storage requirement is indicated by position O in the picture above Information on the processor load caused by the project can be provided by the cifX Test Application given that the netPLC component can be addressed via PCI bus or Ethernet gt Inthe Control Panel of Windows open cifX Test Appl
27. xError has the value TRUE then INTERNAL_ERROR 1000 NOT SUPPORTED 1010 xStatusOfExt24VDC BOOL Output FALSE TRUE External 24 V power supply available Uext gt 18 V FALSE External 24 V power supply not available Uext lt 18 V Table 11 System Function StatusOfExt24VDC netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public O Hilscher 2009 2014 Functions 69 93 7 2 3 Status PCI Power Supply StatusOfPClPower SEabkusDfPLIPower Done xBus xErrar Errar xSkatus fPciPower Figure 47 System Function StatusOfPCIPower Function StatusOfPCIPower Description Checks if the slot PLC is supplied with the PCI power xDone BOOL Output FALSE TRUE System function ready FALSE This function will be called in the next PLC cycle again xBusy BOOL Output FALSE TRUE System function in process FALSE System function not in process xError BOOL Output FALSE TRUE Error occurred The error code will be saved in iError FALSE no error occurred iError Output In case xError has the value FALSE then NO_ERROR No Error 0 In case xError has the value TRUE then INTERNAL_ERROR 1000 NOT SUPPORTED 1010 xStatusOfPciPower BOOL Output FALSE TRUE PCI power supply available FALSE PCI power supply not available Table 12 System Function StatusOfPCIPower netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public H
28. 00 1 Total allocated memory size for code and data 384020 bytes C100 1 Memory area 0 contains Data Input Output Memory and Code highest used address 1048576 largest contiguous memory gap C100 1 Memory area 1 contains Retain Data highest used address 65488 largest contiguous memory gap 65488 100 C100 1 Memory area 2 contains Persistent Data highest used address 65488 largest contiguous memory gap 65488 100 945 C100 1 Build complete 0 errors 0 warnings ready For download ES w Precomple ok 1 Ju Program loaded Program unchanged Current user nobody Figure 38 Messages Building Process After download is complete the footer shows the state of the loaded program and the PLC of the Messages area see position O in the figure above This is also indicated in the Devices tree behind the App entry netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public O Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 53 93 4 8 2 Create Boot Application Important lt is mandatory to create a boot application to store the PLC program and the bus configuration permanently zero voltage secure in the netPLC component Note In order to create a boot application on the netPLC component you have to be connected online logged in to the component If this is not the case you will be asked to specify a location on t
29. 100 Add Host I Os 2 In the Device list select Host l O Interface O located below Miscellaneous Click Add Device Click Close 3 FirstProject project CoDeSys f fef File Edit view Project Build Online Debug Tools Window Help 1 En A pe u d cju amp d ry B OF Devices TER Staflaoe F Host I O Interface X Se Device NPLC C100 Internal Configuration Internal I O Mapping Status Information ll PLC Logic App w Library Manager RES 8 PLC PRG PRG Parameter Type Value Default Value Unit Description T me vendo STRING Hilscher lileche Vendor of the device 4 Task Configuration db T dis ee 2 gt MainTask ModelName STRING Host Interface IJO Host Interface NO Model name of the device 5 3 Host 1 e Host 1 0 Interface CommunicationChannel DWORD 0 0 DPM communication channel number 0 5 Figure 7 C100 Configure Host I Os 1 gt In the Devices tree item Host O Interface N has been added gt Inthe Devices tree double click Host O Interface MN gt Select Internal Configuration tab gt Use for the CommunicationChannel 3 the default value 0 netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 21 93 FirstProject project CoDeSys DER File Edit View Project Build Online Debug Tools Window Help Aaah amp d L E
30. 1000 NXF NPLC M100 DP PROFIBUS DP Master Table 3 Reference to Firmware Driver Driver Driver version USB Driver 5 1 2600 2180 Table 4 Reference to Driver Server and TCP IP Gateway Software SoftwareVersion CoDeSys Gateway 3 5 0 0 CoDeSys Service Control 3 5 0 0 CoDeSys Control Win V3 3 5 0 0 Table 5 Reference to Server Software CoDeSys Table 6 Reference to Software netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Introduction 8 93 1 2 2 Documentation netPLC The following documentation overview gives information about where to find further information and refers the corresponding manual Documentation directory on the CD delivered in the Adobe Acrobat X Reader format PDF Title Contents User manual netPLC with CoDeSys software installation netPLC with CoDeSys Software Installation Contents of the product DVD UM xx EN pdf This document Requirements System overview Installing software Technical data User manual Slot PLC NPLC C100 hardware installation Slot PLC NPLC C100 Hardware Installation Requirements UM xx EN pdf Device drawings Installing hardware slot PLC Changing battery Hardware description Technical data hardware Remark The description of the LED is part of the document netPLC with CoDeSys Commissioning User manual netPLC with CoDeSys Commissioning netPLC with CoDeSys
31. 2EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 47 93 4 6 2 Build Project Before loading the program to the netPLC component the program has to be built 1 Build Project gt Inthe menu choose Build gt Build F11 in order to build the project C100 1 project CoDe ps Build Online File Edit View Project Debug Tools Window 5 SED Bui 2 Devices Rebuild Generate code gt de Device NPLC C100 la Generate runtime system Files Clean lean all MS PA TEN FRI mnm The project is being built 2 Check the message window Check if the message Compile complete 0 errors 0 warnings appears in the message window INN Project Object Position Description Build started Application Device App typify cade Compile complete 0 errors O warnings Figure 34 Messages After Building Process 3 gt The project has successfully been built 3 Save project gt Inthe menu select File gt Save Project to save the project The project is saved netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 48 93 4 7 Connect to the PLC 4 7 1 Define Gateway 1 Open the Communication Settings
32. 3 5362 0521 E Mail info hilscher jp Support Phone 81 0 3 5362 0521 E Mail jp support hilscher com Korea Hilscher Korea Inc Suwon Gyeonggi 443 734 Phone 82 0 31 695 5515 E Mail info hilscher kr Switzerland Hilscher Swiss GmbH 4500 Solothurn Phone 41 0 32 623 6633 E Mail info hilscher ch Support Phone 49 0 6190 9907 99 E Mail ch support hilscher com USA Hilscher North America Inc Lisle IL 60532 Phone 1 630 505 5301 E Mail info hilscher us Support Phone 1 630 505 5301 E Mail us support hilscher com Hilscher 2009 2014
33. CFC nm ne iy rent Col amp Seat Pret f wih Code Sys Application gallery Cole Supper Pas delenit erect Colle Ss Forum Cobra Training iaa Patrona Colon FI Dig Tracking Cola Du Tasche wirfs SOLA Technical Lites ae Current weer nbachr Shows objects belonging to a project like used Devices or POUs Program Organization Units Areas 8 C and D form the actual Start Page It consists of Area showing recently used objects C Area featuring links for starting a project D HTML Browser featuring links to 38 CoDeSys homepage E Messages area Description area netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 17 93 43 Create a PLC Program Selecting Device and Programming Mode 1 Create a new project gt Select File gt New Project C Z0Desys Eile Edit View Project Build Online Debug Tools Window Help d New Project Ctrl M E Start Page me Open Project Cirio or use Create a new project link in area as indicated in Figure 1 The New Project window opens B New Project Categories Templates 3 Libraries i p Y Projects 1 9 Empty project Feine project project w 4 project containing one device one application and an empty implementation For PLC_PRG Mame c100_1
34. CoDeSys Server window t netPLC CoDeSys Server Function Available netPLC Devices Hardware Options ciao 1800410 20136 J0x0050 1740 3801 10 8582282373292 10416 9 23728585 858584 000 e Figure 53 netPLC CoDeSys Server Window The displayed items have the following meaning The upper area A of the window displays the available components The lower area of the window displays the components to which a connection has been established Description 1 index Consecutive numbering on Shows which slot PLC NPLC C100 cifX0 cifX1 the netPLC CoDeSys Server is able to access via the device driver 3 Device No Part number of the component 4 Serial No Serial number of the component ate Shows interface type id Options 6 oan Shows to which slot PLC NPLC C100 cifX0 cifX1 access has been established via the PC card device driver 7 UDP Port Port the netPLC CoDeSys Server is using to send and receive data packets from and to the 3S Gateway UDP s t p Counter for transmitted packets UDP s send as well as for P received packets UDP r receive via the connection to the 3S gateway UDP sir b Counter for transmitted bytes UDP s send as well as for received bytes UDP r receive via the connection to the 3S gateway 10 DPM s r p Counter for transmitted packets DPM s send as well as for j received packets DPM r receive via the device driver to the s
35. D VAR 1 PROGRAM PLC PRG rd VAR 3 varl BYTE 4 opc_ib0 BYTE 5 opc_ibl BYTE 6 opc qb0 BYTE 7 END VAR a VAR BETAIH E uiRemCount UIHT E e EHD VAR 43 93 Note Persistent variables can be created via the context menu of the APP entry in the Devices tree CoDesys online help netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public For more information on retain and persistent variables please refer to the Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 44 93 4 6 1 Create Symbol Configuration Symbol configuration is used to create symbols with certain access rights which in turn can be used to access project application variables from the outside e g from an OPC client 1 Add object gt EXT dL x Start Page j PROFIBUS Master PLC_PRC rar e 1 PROGRAM PLC PRG gt bw Device MPLC C100 Z VAR E PLC Logic 3 varl BYTE Cm oo ae er 4 opc ibO BYTE Library d Cut 5 opc ihl BYTE E PLC PRG ES Copy 6 opc qb BYTE 28 Task Co 7 END VAR de Main E PROFIBUS Maste Delete m tal CB_AB32_DP NER varl varl 1 HL 2 byte SOR z varl Add Object DUT Global Variable List Persistent Variables POU A Wb f Sr Add Folder POU For implicit checks Edit Object M3 symbol configuration Edit Object with visualization
36. DPV1 services class 2 are not supported DPV2 services are not implemented Reference to firmware stack version V4 0 x x V2 6 x x Table 21 Technical Data PROFIBUS DP Master Protocol netPLC with CoDeSys Commissioning DOC120113UMO2EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Appendix 83 93 13 Appendix 13 1 netPLC CoDeSys Server Program The netPLC CoDeSys server program is the link between the 3S gateway and thus to the CoDeSys programming interface on one side and the device driver cifX device driver on the other to communicate finally with the netPLC component via PCI The 3S gateway may be installed on the same PC as the PLC or it may be installed on a remote machine connected via the local Ethernet network 13 1 1 Starting netPLC CoDeSys Server The netPLC CoDeSys Server will be installed under autostart in windows thus starting automatically each time the PC is powered To start the server manually select Start gt All Programs gt Hilscher GmbH gt netPLC CoDeSys Server In case the netPLC CoDeSys Server Program is started and running you will find the following icon in the system tray m Figure 52 netPLC CoDeSys Server Tray Icon netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Appendix 84 93 13 1 2 netPLC CoDeSys Server Window Double click the CoDeSys server tray icon to open the netPLC
37. Ds for the fieldbus when the firmware of the DeviceNet Master protocol is loaded to the device Up Go swe Meng Duo LED red green green On Device is online and has established one or more connections Flashing Device is online and has established no connection dy Green Red Selftest after power on green red Off Green on for 0 25 s then red on for 0 25 s then off off Critical connection failure device has detected a network error duplicate MAC ID or severe error in CAN network CAN bus off Flashing Connection timeout ec a After start of the device and during duplicate MAC ID check Table 16 LEDs DeviceNet Master netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 LEDs 78 93 10 5 LED PROFIBUS DP Master Name COMO in the device drawing The following table describes the meaning of the LED when the firmware of the PROFIBUS DP Master protocol is loaded to the device LED Color Site meann O OO COM Duo LED red green all green Flashing No configuration or stack error acyclic green Flashing Profibus is configured but bus communication is not yet released from cyclic the application green Communication to all Slaves is established wi ed Flashing Communication to at least one Slave is disconnected cyclic red On Communication to one all Slaves is disconnected or annother serious error has occured
38. Gap update Factor Retry limit 2 Maximum retries in case of Failure Slave interval 10 100 ps Minimum slave interval Pall timeout 10 10 ms Minimum poll timeout Data control time 2400 ms Data control time Figure 14 PROFIBUS Master DP Parameter Configuration gt Set the Station address 1 gt Set the Baud rate 2 gt All other parameters can only be set after the box next to Use defaults O has been unchecked netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public O Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 29 93 4 4 3 Add CANopen Master Configuration Window The configuration of a CANopen Master is done in several steps 7 C100 1 project CoDeSys File Edit View Project Build Online Debug Tools Window Help cux amp e d Er 5 5 08 Devices ci al E Start Page 3 CAN_Network SE CHM f D be Device MPLC C100 Nets configuration CAMbus Status Information EM PLE Logic Metx settings G App Slot Slot il Library Manager E PLC_PRG PRG Metx Com Channel MetxComcChannel v EE Task Configuration e MainTask on A EAN Network CAN Network d Cut Copy 7X Delete A Properties e m Add Device Figure 15 CANopen 2 Open Add Device Dialog After the CAN bus has been added to the Devices tree according to the instructions given in section Create Bus Configuration on page 25 gt
39. IBIl C SQB0 opc qb0 1 4 5 6 A short explanation of the programming example varl varl 1 Variable var1 is incremented each PLC cycle SOBl varl The value of variable var1 is written to the output byte QB1 opc_ib0 IBO and opc ibl SIBl Input bytes IBO and IB1 are copied to the variables opc ibO and opc_ib1 This is the preparation for the OPC server to be able to access the input data OBO opocqb0 The value of variable opc qbO is copied to the output byte QBO This is the preparation for the OPC server to be able to access the output data Remark Output byte QB1 is set by the PLC program and therefore can t be accessed by the OPC server Note The addresses IBO and QBO area starts from 0 because no Host I O interface is used When Host I O interface is used in front of the master device and its slave devices then the addresses will start from 512 and thus are IB512 and QB512 and higher 4 Save the project Save project using menu entry File gt Save Project The project is saved netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 To create retain variables 1 Create retain variables gt Create the section VAR RETAIN END VAR gt Create a variable inside this section VAR RETAIN uiRemCount UINT EN
40. LC programming software Matching the IEC 61131 3 standard it supports all standard programming languages This user manual describes the device dependant programming for netPLC components including the description of the functions implemented in CoDeSys for monitoring netPLC components netPLC components are e Slot PLC NPLC C100 and e Module PLC NPLC M100 3 2 System Requirements 3 2 1 System Requirements PC e PC with min 1 8 GHz processor recommended 3 0 GHz e Windows XP or Windows 7 e DVD ROM drive e Graphic resolution min 1024 x 768 pixel or higher e Keyboard and Mouse e For slot PLC NPLC C100 PC with PCI interface with 3 3 V respectively 5 V for hardware revision 4 of the NPLC C100 3 2 2 System Requirements CoDeSys System requirements for the programming system CoDeSys e PC with min 1 8 GHz processor recommended 3 0 GHz e Windows XP or Windows 7 e NET Framework 4 0 will be installed together with CoDeSys if not already installed Access to the internet is required e Free disk space min 600 MByte recommended 1 GByte e RAM min 512 MByte recommended 1024 MByte e Graphic resolution min 1024 x 768 pixel e Keyboard and Mouse netPLC with CoDeSys Commissioning DOC120113UMO2EN Revision 2 English 2014 01 Released Public O Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 14 93 4 Create first Project for netPLC Component Example NPLC C100 4 1 Overvi
41. Location D CoDesysProjects Figure 2 New Project Set up project relevant information Select Categories gt Projects D Select Templates Standard project In the Name field O fill in the project name e g FirstProject In the Location field select a folder to save the project data e g D ACoDeSys Projects V VV ON WM Use the browse button 4 to open the Browse For Folder dialog in which you can select an existing folder or create a new folder gt Click OK netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 18 93 Y The New Project window is closed and the Standard Project selection window appears Standard Project You are about to create a new standard project This wizard will create the following objects within this project One programmable device as specified below A program PLC PRG in the language specified below Acyclic task which calls PLC PRG every 20 milliseconds A reference to the newest version of the Standard library currently installed Device NPLC C100 Hilscher Gesellschaft F Systemautomation mbH PLC PRGin Structured Text ST Figure 3 Standard Project Device Selection 3 Specify Standard Project In the Device field O select the netPLC device which you want to use in your project see Figure 3 This example uses t
42. MainTasl Properties A wu 2 r gt Inthe context menu select Add Device 2 Or gt Inthe Devices tree A select the device 1 C100 1 project LoDeSys Fle Edit View Project Build Online Debug Tools Win Start Page t projects Update Device 00_1 E puc 4 Add Folder 7 Edit Object i M Edit Object With gt Inthe Project menu 2 select Add Device 3 The following window opens netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 26 93 i Add Device Mame PROFIBUS Master Action Append device Insert device Plug device Update device Device Vendor lt All vendors gt ke Name vendor P Fieldbusses EAN CAMbus A CAM Network Hilscher Gesellschaft F Systemautomation mbH C EE Profibus UU DP Master t PROFIBUS Master Hilscher Gesellschaft F Systemautomation mbH 2 Display outdated versions Information jj Name PROFIBUS Master Vendor Hischer Gesellschaft F Systemautomation mbH Categories DP Master Version 3 5 0 0 Nrder Sumber Append selected device as last child of Device V vou can select another target node in the navigator while this window is open OM Figure 12 Select Fieldbus 2 Choose Fieldbus gt For CANope
43. Master Device f Library Manager X 5 cro d 7 9 Device connected NPLC C10 E PLC Logic Cr app run i il Library Manager E PLC PRG PRG 8 3 Symbol configuration dj Task Configuration GE MainTask DH PROFIBUS Master PROFIE Profibus DP Last diagnostic message MasterDiag ProfiBus DP master diagnostic information al AU cB_AB32_DPS CB_AB CommunicationCOs A fl 2 byte input oul Communicationstate 4 D Unknown 1 Not Configured 2 Stop 3 Idle 4 Operate Version 1 Version number of diagnosis strucbure Watchdog 1000 Configured Watchdog Timeout Error Count 0 Totol number of detected errors since startup Slave State 2 0 Unknown 1 OK 2 Failed 3 2 Warning i3 L mo pf om Figure 49 Bus Diagnostics 2 PROFIBUS Example netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Bus Diagnostic 74 93 If errors have been diagnosed on the Fieldbus system The field indicated at position 2 informs you that diagnostic messages are available These messages are listed in the main area 8 of the tab 8 1 3 Verify Input and Output Data 1 Verify the input and output data by using the I O Mapping tab C100 1 praject CoDeSys Ele Edit Wew Project Build Online Debug Joos Window Help Ex o asa amp M E T S a X Sta
44. Online Debug Tools Window Help Nets configuration C Nbus Status Information Network e o B Baudrate bit s 4 zom v C n N B Figure 23 NetX_CANbus gt CANbus Under CAN_Network O gt CANbus 2 set the following parameters gt Network 3 Always select 0 gt Baudrate 4 You can choose one of the following rates 125000 250000 500000 netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 36 93 C100 1 project CoDeSys File Edit View Project Build Online Debug Tools Window Help 1 El dW amp e de X 5 Ban Devices Bl Bt Page CAN Metwork t DeviceNet Scanner Sj c100_1 Be Device NPLC C100 Scanner settings DeviceNet 1 0 Mapping Status Information El DI General Settings LOW App mr il Library Manager MAC ID D 3 O corte DeviceNet j PLC PRG PRG 12 Task Configuration E MainTask 1 CAM Network CAN Network H DeviceNet Scanner DeviceNet Scanne Figure 24 Set Fieldbus Address of Device In the Devices tree A double click DeviceNet_Scanner N to open the configuration dialog Under DeviceNet Scanner O gt Scanner Settings 2 set the following parameter gt MAC ID 3 Set the fieldbus address of device netPLC
45. PLC C100 M100 Battery The battery voltage of the hardware components NPLC C100 and NPLC M100 can be monitored with the StatusOfBattery system function For further information see Battery Status StatusOfBattery section on page 66 Example of a code for this function a rising edge on S1 1 on the M100 evaluation board is used for triggering the measure ment ig qeria o a IF fTriggerstate AND NOT fLastTriggerState THEN fMeasurementEnabled TRUE iMeasurementCycles 0 END 14 fLastTriggerState fTriggerState IF fMeasurementEnabled THEN iMeasurementCycles iMeasurementCycles 1 check external 24 VDC power supply StatusOfExt24VDC xDone gt fExt24VDone xBusy gt fExt24VBusy xError gt fExt24VError iError gt iExt24VError xStatusOofExt24VDC gt fExt24VState echeck 3 3 VDG power supply irom PCI bus Sa als bee LTPoOwEer Done PE Dore BU PAL VS Busy error gt CEP Gls yom leone EWEODB c ee CWS VOR COL stereo rPerPower ppomns55tdue check battery voltage Sx du NSQNE xDOne gt EE cmo One XBUSY gt Rooms XKACroOr gt E een AE OT iError iBatteryError xStatusOfBattery gt fBatteryState BatteryVoltage gt rBatteryVoltage E SE air By DO noO RE ce Te E o THAHEN fMeasurementEnabled FALSE ENDETE ENDE netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Bus Diagnostic 72 93 8 Bus Diagnostic
46. Real Time lO A 87 13 2 4 NPLC C100 DP PROFIBUS Simple lO i 88 13 2 5 NPEG G100 DP With Host IOS sisi ai tton QURE ca 88 13 3 Irirormation on Utilized Gapaocllyioi eor tti baton pa a 89 13 4 BISEOTRIQUF Se ns EET Tnm 91 13 5 Sor Tabla DESEE 92 13 6 26 q fcc PR NI ee ne 93 netPLC with CoDeSys Commissioning DOC120113UMO2EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Introduction 5 93 1 Introduction 1 1 About the Manual This user manual describes the commissioning of netPLC components with the PLC programming software CoDeSys netPLC components are e Slot PLC NPLC C100 and e Module PLC NPLC M100 1 1 1 List of Revisions Index Date Chapter Revisions S a fosar al owated 2 2014 01 27 1 2 1 Section Reference to Hardware Firmware Server Driver and Software updated 4 Chapter Create first Project for netPLC Component Example NPLC C 100 updated 4 3 1 Section Add Host I Os to NPLC C 100 Slot PLC added 6 Chapter Host I O Interface added 12 1 Technical data for CANopen Master and DeviceNet Master together in one section and updated 12 2 Technical data for PROFIBUS DP Master updated and DPV1 functions added 13 2 4 Section about example NPLC C100 DP PROFIBUS Simple IO added 13 2 5 Section about example NPLC C100 DP with Host lOs added Table 1 List of Revisions netPLC with CoDeSys Commissioning DOC120113UMO2EN Revision 2 En
47. and Test iNe DU Sa stos nee deca cede teen 72 8 1 1 L gin and Download Program write eect ada 72 8 1 2 Device ASSIM iii ae 73 8 1 3 Veni Input and OuipUbDald nic ia 74 TROUBLE SHOO TMIN Starr gesehene 15 9 1 Error Message During Boot Application Creation ccooccncccccnncccccnncnnnnncnannncnnnconononos 75 EDS es NEE INNE 76 10 1 LED DV ee nee 76 10 2 BEA ee A A 77 10 3 VEDIGANOBEN Master ann ie 17 10 4 LEDDevViceNet Master zen ee seite 77 10 5 EED PROFIBUS DP M sier ita 78 ERBOR GODES 3 29 ii A ADA A RA 19 11 1 Error Codes Functions HilPlcSysFunctions cccoooccnccccccnnccnonnnnnnnnancnnnnoncnnnnnnnncncnnnns 79 TECHNICAE DATA PROTOCOLS saciar 80 12 1 CANopen Master and DeviceNet Master ococooccccccccncoconnnoconcncnnnconononencnnannnonanenos 80 netPLC with CoDeSys Commissioning DOC120113UMO2EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Introduction 13 4 93 12 2 PROFIBUS BP M ster u in 82 APRENDO Eee ee 83 13 1 netPLC CoDeSys Server Program ccccccccsseecececeeseeeeceeeeeeseeeeeseeeeeeesseeeeeseaeeeees 83 13 1 1 Starting netPLC CoDeSys Server rinci a a a a 83 13 1 2 netPLC CoDeSys Server WindOW ooccccccccccooncccnnnccnccnononccnnnnonononannccnnnnnnnnnannnnnns 84 13 1 3 Stopping netPLC CoDeSys Server siocair T A 85 13 2 Example Prot S aaa nee 86 13 2 1 netP EG System FUNCTION estaras aii 86 13 2 2 netPLC Open Process Control OPG resisite a 87 13 2 3 netPEG
48. ces tree C C100_1 project CoDeSys O File Edt View Project Build Online Debug Tools Window Help Du amp AO AA LO AE Devices ax Start Page 5 PLC PRG 3 PROFIBUS_Master Bi Device fM Library Manager xX Lg crows G be Device connected NPLC CiG Netx configuration DP Parameters Profibus DP I O Mapping Status Information Bl Pic Loge App mn Library Manager IE PLC PRG PRG Profibus DP 8 2 Symbol configuration ine Y ta C TEOR Last diagnostic message E MainTask gt J PROFIBUS Master PROFIE MasterDiag A GH ca aB32 Des CB_AB CommunicationCOS DM 2 byte input cul CormunicabionStabe Mer sion Watchdog ErrarCount Slavestabe 3 Figure 48 Bus Diagnostic 1 PROFIBUS Example gt n the Devices tree a double click bus master entry O to open the Fieldbus information gt Click Status tab 2 to open the bus information If no errors have been diagnosed on the bus system the tab looks as shown in the figure above The field indicated at position O provides information about the PCI Bus if it is a netPLC C100 component The field indicated at position 4 provides information about the Fieldbus In case of error the tab looks as shown in the figure below C100 1 praject CoDeSys ER File Edit View Project Build Online Debug Tools Window Help BSAS B x M dau TC Devices A X f StartPage E PLC PRG j PROFIBUS
49. d configure Slave Device The integration of the bus structure is exemplified by using PROFIBUS The procedure is the same for other bus systems C100 1 project CoDeSys File Edit wiew Project Build Online Debug Tools Window Help ote y A Mr fuel p fai 8 0 d 5j EL E Devices MERE E Start Page j PROFIBUS Master CHO f D Device MPLC C100 Nets configuration DP Parameters Profibus DP 1 0 Mapping Status Information EI PLC Logic Metx settings FS App Slot Slot 0 v rial Library Manager E PLC PRG PRG Nets Com Channel NetsCamChanneld Ww 8 Task Configuration MainTask auto initialize bus Qo PROFIBUS Master PROFIBUS Mast n Cut Copy 7X Delete Properties O HET Figure 26 Add Slave Device gt Inthe Devices tree A right click PROFIBUS Master 1 gt Select Add Device gt The Add Device window opens netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 39 93 i Add Device Mame CB AB32 DPS Action Append device Insert device Plug device Update device Device Vendor lt All vendors gt Mame vendor 1 Fieldbusses 7 Profibus 7 DP Slave HH 35 CIFX DP Slave 35 Smart Software Solutions GmbH tell CB AB3z DP5 Hilscher GmbH Display outdated versions
50. dule If you are using a NPLC M100 module PLC you can use local inputs and outputs In order to use these in the control program you have to make them known to the project To do so proceed as follows Add local inputs outputs C Untitled1 project CoDeSys File Edit View Project Build Online Debug Took Window Help Iu E x do X 85 i Devices ax n E Start Page A El inttiedi Recent projects Bu Device NPLC MIOQ Bll PLC Logic cu App Ba Copy in Library Manager jS PLC PRG PRG 28 Task Configuration X Delete MainTask E Properties ed Figure 9 NPLC M100 Add Local I O 1 gt n the Devices tree right click on Device NPLC M100 O to open context menu gt Select Add Device 2 in the context menu The Add Device window opens netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 23 93 i Add Device Mame NPLC_M100_Local_Io Action Append device Insert device Plug device Update device Device Vendor lt Al vendors Mame vendor Ei Miscellaneous e y Hilscher Gesellschaft F Systemautomation mbH 1 Fieldbusses CAN CANbus US Profibus Display outdated versions Information b Name NPLC 41100 Local IC Vendor Hischer Gesellschaft F Systemautomation mbH Categories Y
51. e Bus Diagnostics 2 PROFIBUS Example Bus Diagnostic 3 Slave I O Data Object reference not set netPLC CoDeSys Server Tray Icon netPLC CoDeSys Server Window Storage Requirement of Project netPLC with CoDeSys Commissioning DOC120113UMO2EN Revision 2 English 2014 01 Released Public 91 93 O Hilscher 2009 2014 Appendix 92 93 13 5 List of Tables Table 1 List of Revisions 5 Table 2 Reference to netPLC Components Hardware 7 Table 3 Reference to Firmware 7 Table 4 Reference to Driver 7 Table 5 Reference to Server 7 Table 6 Reference to Software 7 Table 7 Documentations netPLC CoDeSys 8 Table 8 System Functions HilPlcSysFunctions 64 Table 9 System Function StatusOfBattery 66 Table 10 System Function StatusOfBattery Hardware without AD Converter 67 Table 11 System Function StatusOfExt24VDC 68 Table 12 System Function StatusOfPClPower 69 Table 13 RUN STOP Switch 70 Table 14 LED Benennung in der Geratezeichnung und LED Bedeutung und Benennung nach Protokoll Feldbus Systeme 76 Table 15 System LED 76 Table 16 LEDs DeviceNet Master 77 Table 17 LEDs PROFIBUS DP Master 78 Table 18 Error Codes Functions HilPlcSysFunctions_netPLC 79 Table 19 Technical Data CANopen Master Protocol 80 Table 20 Technical Data DeviceNet Master Protocol 81 Table 21 Technical Data PROFIBUS DP Master Protocol 82 Table 22 netPLC CoDeSys Server Windows Items 84 Table 23 Example netPLC System Function 86 Table 24 E
52. e downloaded PLC program and bus configuration are deleted Thus it may happen that an old program which had been loaded to the remanent FLASH memory of the target component earlier before is started again It is mandatory to create a boot application to store the PLC program and the bus configuration permanently zero voltage secure in the slot PLC This is described in the Create Boot Application section on page 53 2 Start download Answer the question Application App does not exist on device Do you want to create it and proceed with download with Yes MN 3 gt The application is downloaded to the PLC J With the start of the download the PLC goes into stop mode 3 gt The footer shows the progress of the download procedure Sending download info Downloading and shows the size of the already downloaded program and the complete size of the program netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 52 93 Messages E x pul s 0 nerti wand 6 measat Description Project Build started Application Device App The application is up to date generate code generate global initializations generate code initialization generate relocations Size of generated code 330704 bytes C100 1 Size of global data 35590 bytes C1
53. ens netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public O Hilscher 2009 2014 Functions 65 93 Input Assistant x M Al pul m ell ell pil ril FUNCTION StatusOfBattery xDone BOOL VAR OUTPUT TRUE if done otherwise FALSE If FALSE call again next cycle xBusy BOOL VAR OUTPUT TRUE if busy otherwise FALSE xError BOOL VAR OUTPUT TRUE if error occured see Error for details otherwise FALSE ERROR OK if xErn Error NT VAR OUTPUT EDO 2 Figure 44 Input Assistant Module Calls gt Inthe Categories list a select Module Calls entry MN gt In the Items list 8 select e g StatusOfBattery entry In the documentation area of the window the function parameters are displayed gt Click OK button 3 to add the function to the PLC code netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Functions 66 93 7 2 1 Battery Status StatusOfBattery StatusOfBattery xDone xBusy xError Error xSbatusOfBakkery BatteryVvaltage Figure 45 System Function StatusOfBattery Function StatusOfBattery Description Checks for the status of the battery and measures the battery voltage level Attention During the check the battery will be unloaded for a very short time i e a discharge takes place This is the reason why this function should not be cal
54. er 2009 2014 Introduction 3 93 10 11 12 4 6 create PEC Program 41 4 6 1 Greate Symbol GONTIQUEAION creado 44 4 6 2 Bula Protect ree M 47 4 7 CGonmnecho inercia susi 48 4 7 1 Define Gateway oooocccnncccccccnononnnccnonnonnncnnnnnonononnnncnnnnnnnnnnnnnnnnnnnnnnnnannnnnnnnononannenns 48 4 7 2 Scan Network and Set Active Path occcccccconnccnncccconcnnnccooncnnnnncnannnnononononononos 49 4 8 Download PLC Program and Bus Configuration cccccseeeeeeeeeeeeeeeeeeeeeesaeeeeeeaaees 51 4 8 1 LOGIN ANG DOWMIO AG M 51 4 8 2 Create Boot Application id 53 4 8 3 Remove BOOAPPIC AM ld 53 4 8 4 SAPEO rers E O ose nunca ced 54 4 9 DISCOMMEGE Om tne P LO asia 55 A SIBUNEALICMT OC 99t COO OQOOE 56 5 1 OPC COMIGO EO Me reelle 57 5 2 ORSAI Eee ET 61 HOSTIO INTER SAGE rd 62 mee EE 63 7 1 Add FUNCTIONS EIDEM es n 63 7 2 FUNCTIONS FIIPICSYSFUNCHONS nenne ae ai 64 7 2 1 Battery Status StatusOfBattery oooccccccccccoconnncconncconononcnnnnnonononannnnnnnnononanennnns 66 7 2 2 Status External Voltage Supply StatusOfExt24VDC sssssssss 68 7 2 3 Status PCI Power Supply StatusOfPCIPOowWerF oooooooccccncccccccnocccnncnnnonanaccnnnnnnnos 69 7 3 RES BellaViOE nei a naar 70 7 4 RUN STO Eel lc 70 7 5 Monitor netPLC C100 M100 Battery ccccooccnnccccnconoccnoconcnnnoconnnnnnnnncononnnncononnnncnnnnnos 71 BUS DIAGNOSTIG S carie een 72 8 1 stat UP
55. ersion 3 5 0 0 Order Number n a Description Local 1 0 interface of NPLC M100 Append selected device as last child of Device ou can select another target node in the navigator while this window is open 1 OMITEN Figure 10 NPLC M100 Add Local I Os 2 gt n the Device list select NPLC M100 Local lO 1 located below Miscellaneous gt Click Add Device Click Close 3 Untitled1 project CoDeSys File Edit View Project Build Online Debug Tools Window Help B A amp o d 3 B o Devices Y 2X B Start Page NPLC qEOO Local IO 8 PLC PRG 3 Untitleds ee cae w Device NPLC M100 Internal Configuration Internal I O Mapping Status Information El PLC Logic Channels 5 o App Variable Mapping Channel Address Type Default Value Unit Description i Library Manager 5 9 Input 9 IBO 3 PLC_PRG PRG 5 4 Output QBO 9 Task Configuration 50 Byte0 QBO BYTE MainTask 4 App ploConfig Bio 95QX0 0 BOOL 0_ NPLC_M100_Local_IO NPLC M100 Local IO DR A 9 uk en Bit2 WQXD 2 BOOL Bit3 Q 0 3 BOOL Bit4 Q 0 4 BOOL B p Bits QX0 5 BOOL Bit6 O 0 6 BOOL Bit OX0 7 BOOL Y App ploConfigTas Bytel oQB1 BYTE Y Byte2 OBZ BYTE Y Byte3 YoQBS BYTE 3 Reset mapping dp Create new variable Map to existing variable Figure 11 M100 Configure Local I Os Y In the Devices tree A item NPLC M100 Local lO O has been added netPLC with CoDeSys Commiss
56. ertragener PDOs 512 Exchange of process data Via PDO transfer synchronized remotely requested and event driven change of date Functions Emergency message consumer and producer Node guarding life guarding heartbeat PDO mapping NMT Master SYNC protocol producer Baud rates 10 kBits s 20 kBits s 50 kBits s 100 kBits s 125 kBits s 250 kBits s 500 kBits s 800 kBits s 1 MBits s Data transport layer CAN Frames CAN Frame type for CANopen 11 Bit Table 19 Technical Data CANopen Master Protocol netPLC with CoDeSys Commissioning DOC120113UMO2EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Technical Data Protocols 81 93 DeviceNet Master Maximum number of total cyclic input data 3584 bytes Up to 512 bytes from them can be used for Host input data for NPLC C100 Maximum number of total cyclic output data 3584 bytes Up to 512 bytes from them can be used for Host output data for NPLC C100 Maximum number of cyclic input data 255 bytes connection Maximum number of cyclic output data 255 bytes connection Maximum Configuration data 1000 bytes slave Connections Bit Strobe Change of State Cyclic Poll Explicit Peer to Peer Messaging for paramerization only Fragmentation Explicit and I O UCMM Supported Objects Identity Object Class Code 0x01 Message Router Object Class Code 0x02 DeviceNet Object Class Code 0x03 Connection Object Class Code 0x05 Ackn
57. ew This chapter describes how to use the CoDeSys programming system to create a project for a netPLC component The following example features a NPLC C100 DP Prerequisite for operation is the presence of at least one PROFIBUS DP slave and a PROFIBUS cable The subsequently described procedures are in general also practicable for other netPLC components Possible deviations from the given example which would occur if other netPLC components were used are pointed out in the corresponding section If the CoDeSys project is to be loaded to the netPLC component via USB interface an A to Mini B type USB cable is required netPLC with CoDeSys Commissioning DOC120113UMO2EN Revision 2 English 2014 01 Released Public O Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 15 93 4 2 Preparation 4 2 1 netPLC CoDeSys PC Card Server The netPLC CoDeSys Server is only needed if communication with a slot PLC NPLC C100 takes place via the PCI bus of a PC Information on when the server is needed can be inferred from the figures in the System Overview section of the user manual netPLC with CoDeSys Software Installation The netPLC CoDeSys PC card server program is installed to start automatically with each start of the PC Note Make sure that the server runs if communication via the PCI bus of gt the PC is used to communicate to the slot PLC NPLC C100 Check if netPLC CoDeSys server is running
58. glish 2014 01 Released Public O Hilscher 2009 2014 Introduction 6 93 1 1 2 Conventions in this Manual Operation instructions a result of an operation step or notes are marked as follows Operation Instructions gt lt instruction gt or 1 lt instruction gt 2 lt instruction gt Results Y lt result gt Notes a Important lt important note gt gt Note lt note gt lt note where to find further information gt Positions in Figures The Positions 1 2 O or a b c n OF A B O refer to the figure used in that section lf the numbers reference to a section outside the current section then a cross reference to that section and figure is indicated netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public O Hilscher 2009 2014 Introduction 7 93 1 2 netPLC with CoDeSys 1 2 1 Reference to Hardware Firmware Server Driver and Software gt Note The listed hardware revision firmware and driver versions or versions of the programming software CoDeSys functionally belong together netPLC Components Hardware NPLC M100 DP CDS OPC 1830 410 CDS OPC Table 2 Reference to netPLC Components Hardware Firmware Firmware File Device Type Fieldbus System Firmware Version SC111000 NXF NPLC C100 DP PROFIBUS DP Master SC116000 NXF NPLC C100 CO CANopen Master NPLC C100 DN DeviceNet Master SM21
59. gt Check if the master configuration matches the slave configuration e g with regard to bus address and Baud rate Use the status information of the individual device components in the Devices tree of the project Use the I O Mapping tab for the I O Signals of the Slave components in the Devices tree Use the information provided by the LEDs of the devices 9 1 Error Message During Boot Application Creation The following error message might appear after you have created a symbol configuration while creating a boot application CoDeSys e Object reference not set to an instance of an object Om Figure 51 Object reference not set Proceed as follows 1 Click OK button O to close pop up window Save project Exit CoDeSys application Start CoDeSys again Load the project which you have previously saved pono d m 9 otart creating boot application again netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 LEDs 76 93 10 LEDs Bedeutung und Benennung der LEDs an der netPLC Baugruppe LED Benennung CANopen DeviceNet PROFIBUS DP in der Gerate Master Master Master zeichnung SYS SYS SYS SYS C Te Systemstatus Systemstatus Systemstatus gelb gr n aus APL APL APL APL Application Application Application gelb gr n netPLC netPLC netPLC COM 0 COM Kommu Su Kommuni Kommuni nikatio
60. gt Open Project to open the project gt Set active path gt When the active path is set remember the address because you have to enter this address again in the OPC Configurator gt nthe CoDeSys menu choose Online gt Login to Device PLC Logic to load the program to the netPLC C100 or press Alt F8 on the keyboard n the CoDeSys menu choose Online gt Create boot application for App Device PLC Logic In the CoDeSys menu choose Online gt Start App Device PLC logic to start the PLC program or press F5 on the keyboard gt Use the OPC Configurator to create an OPC configuration This is described in the OPC Configurator section on page 57 Connect your OPC client to the OPC server Browse items display items Select items opc_qb0 opc qb1 opc ibO and opc_ib1 V VV WV Write values between 0 to 255 to the items opc_qb0 and opc qb1 and check read values for items opc ibO and opc_ib1 13 2 3 netPLC Real Time Clock Supplements amp Examples CoDeSys Sample Projects netPLC Real Time Clock Short description The project consists of a netPLC NPLC C100 DP PLC program The PLC program shows how the functions SetDateAndTime and GetDateAndTime are used to change the date and time of the netPLC C100 and how to read the values back Table 25 Example netPLC Heal Time Clock netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009
61. he NPLC C100 Hilscher Gesellschaft f Systemautomation mbH gt In the PLC PRG in field 2 select the programming type Structured Text ST gt Click OK G The Standard Project window closes and the device tree is displayed in the Object view area Aof the main window C100_1 project CoDeSys File Edit View Project Build Online Debug Tools Win MA M s ip Start Page Recent projects Ge Device NPLC C100 u sy PLC Logic i C100 1 App il Library Manager A E PLC PRG PRG S ET Task Configuration e MainTask Getting started Figure 4 Standard Project Device Overview 4 Switch to Devices view Check whether the objects view A is set to Devices If the objects view is set to POUS view click on the amp Devices tab located in the bottom of the objects view The Devices view is active netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 19 93 5 Save the project gt Select File gt Save Project to save the project The project is saved 4 3 1 Add Host l Os to NPLC C100 Slot PLC If you are using a NPLC C100 slot PLC you can access inputs and outputs of the PLC from the host A Windows application program on the host can access these l O The inputs are located at addresses IBO to IB511 and the outputs are located at add
62. he OPC server The CoDeSys OPC server starts automatically as background process on the target PC on which the NPLC C100 slot PLC is installed El My Computer 27 OPC Data Access nE cobesys OPC DA 3 The variables are being read in and can be browsed gt El My Computer 2 OPC Data Access PLC PRG E opc ib E opc ibl Ey opc qb EX Commotate Kj CommStateok 4 Adda group at the OPC client 5 Add the items opc ibO opc ib1 and opc qb0 to this group 6 Values are being read by the control unit 7 Values can be written to the control unit opc qbO can be written Hy Name Value Quality 13 PLC1 App PLC PRG opc ib D VT LIT Good Mon spe 13 PLC1 App PLC PRG opc ibl 255 VT LI Good Mon spe T E T al go em j EN an en as netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Host I O Interface 62 93 6 Host I O Interface The application program on the host can directly access input and output data of the PLC when using the slot PLC NPLC C100 Therefore the Host I O Interface has to be added to the CoDeSys project This procedure is described in section Add Host I Os to NPLC C100 Slot PLC on page 19 The application program uses functions of the cifX Device Driver to read input data and to write output data The following figure shows the general structure cifX Device Driver CoDeSYS Runtime system
63. he PC system where you want to store the boot application Create boot application C100 1 praject CoDeSys File Edit View Project Build Debug Tools Window Help asas i Logout CoHFS Wr pp h d Devi SEM PLC Loge O Applrun ii Library Manag PLC_PRG PRE connecte gt Check if the programming system is logged in This is indicated by the green background color of the entries O and For this it is irrelevant whether the application the PLC program is in Run or Stop mode gt Inthe menu choose Online O gt Create boot application 3 gt The boot application is created and downloaded to the PLC 4 8 3 Remove Boot Application Remove boot application gt If an existing boot application should be removed select Online gt Reset gt Origin The netPLC component is reset and the existing boot application is removed netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 54 93 4 8 4 Start PLC Program C100 1 project CoDeSys In the Devices tree right click App O to open the context menu File Edit View Project Build Online Debug Tools Win Ae doo o Bm x Au E Devices Start Page In the context menu click Start 2 Communication setti to Start the PLC program Select t
64. he networ E PLC PRG PRG Copy 3 Symbol configu 28 Task Configur e cat A G 8 PROFIBUS_Master o vw 603 ce a2 pesi SM 2 byte in gt start 2 Online Change mportant Make sure that the hardware switch of the netPLC component if the component is endowed with this switch is in RUN position If it is in STOP position switch it to RUN Y The PLC is in state RUN This is indicated by the RUN message 4 in the footer C100 1 project CoDeSys File Edit view Project Build Online Debug Tools Window Help 2 Devices Be Startpage Device jj PROFIBUS Master 2 PLC PRG Device App PLC PRG Expression Type Value Prepared value Comment d varl BYTE 178 opc ib BYTE opc ibl BYTE 127 opc qb BYTE zd Task Configuration d MainTask 5 PROFIBUS Master PROFIE varlfiva vari 1 O Gl cB_A832_DP5 CB_AB gt 0B1 55 var liv Ol 2_byte_nput_ 3 opc ibO0 9 I80 0 opc ibl z7 IB1 127 amp QBO 0 opc _qbo o Messages Y 2 X Build Q Oerror s 0 warning s Y 6 message s Description Project Object Position Build started Application Device App The application is up to date serene ska ra ds PY POUS Se Devices Precompile OK 4 R IN Pragram loaded Pragram unchanged Current user nobody Figure 39 PLC Program Started gt n the Devices tree double click PLC PRG N or choose PLC_PRG tab
65. horized to duplicate these in whole or in part using technical or mechanical methods printing photocopying or other methods to manipulate or transfer using electronic systems without prior written consent You are not permitted to make changes to copyright notices markings trademarks or ownership declarations The included diagrams do not take the patent situation into account The company names and product descriptions included in this document may be trademarks or brands of the respective owners and may be trademarked or patented Any form of further use requires the explicit consent of the respective rights owner 1 3 2 Important Notes The user manual accompanying texts and the documentation were created for the use of the products by qualified experts however errors cannot be ruled out For this reason no guarantee can be made and neither juristic responsibility for erroneous information nor any liability can be assumed Descriptions accompanying texts and documentation included in the user manual do not present a guarantee nor any information about proper use as stipulated in the contract or a warranted feature lt cannot be ruled out that the user manual the accompanying texts and the documentation do not correspond exactly to the described features standards or other data of the delivered product No warranty or guarantee regarding the correctness or accuracy of the information is assumed We reserve the right to change our prod
66. ication gt In the cifX Test Application use Device gt Open menu to connect to the netPLC component 1 cifX Test Ap cation cifXO Fie Device Mica Data Transfer Driver Information Channel Information Mailbox Skate Props System COS Ox80000000 System Status Ox40000000 System Error OxO00000000 Boot Error Denim arn System Start Time s 20226 Dd 05 37 06 System CPU Load 29 66 Hardware Features 000000500 status Block Driver was successfully opened netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Appendix 90 93 gt Inthe menu choose Information gt Channel Information 2 gt In the drop down list located at the bottom of the window select Status Block 3 YH You can see the processor load in the System CPU Load line 4 netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Appendix 13 4 List of Figures Figure 1 CoDeSys Main Window Figure 2 New Project Figure 3 Standard Project Device Selection Figure 4 Standard Project Device Overview Figure 5 NPLC C100 Add Host I O 1 Figure 6 NPLC C100 Add Host I Os 2 Figure 7 C100 Configure Host I Os 1 Figure 8 C100 Configure Host I Os 2 Figure 9 NPLC M100 Add Local I O 1 Figure 10 Figure 11 Figure 12 Figure 13 Figure 14 Figure 15 Figure 16 Figure 17 Figu
67. ilscher 2009 2014 Functions 70 93 7 3 Reset Behavior The slot PLC has no connection via the PCI bus to the PC reset signal This means that a reset of the PC for example when using the front panel reset button of the computer does not influence the slot PLC behavior The PowerOn reset will be served from both power sources internal und external 7 4 RUN STOP Switch The PLC program s operating mode in the netPLC component can be changed using the physical switch at the front of the netPLC component RUN Cyclic running of loaded PLC program STOP Cyclic running of loaded PLC program is stopped Loading a new PLC program or updating the firmware is possible Table 13 RUN STOP Switch In case the CoDeSys programming interface is logged in you can change the operating condition within CoDeSys without using the physical switch Please pay attention This may result in a condition where CoDeSys programming interface switches the PLC into STOP mode while the physical switch is still in position RUN Thus during the next boot up cycle the PLC will automatically go into the RUN mode even if this might not be intended by the user Please move the switch into position STOP to prevent an unintended restart Switch position has priority over the software control netPLC with CoDeSys Commissioning DOC120113UMO2EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Functions 71 93 7 5 Monitor net
68. ion 2 MainTask Ki PROFIBLIS Master PROFIBUS Master li ce aB32 DPS CB AB32 DPS Fl 2 byte input output 2 byte input gt Show libraries in Available variables Instance Path Display invalid variables Copy Instance Path Figure 31 Editor Symbols 3 Refresh available variables gt Inthe Available Variables area click Refresh Available variables efresh Available Items Access Rights variables gt z 3 Data Types lt The Available Variables are updated 4 Show available variables In the Available Variables area 2 the variables are displayed C100_1 project CoDeSys TER File Edit View Project Build Online Debug Tools Window Help amp it u A Te y a PO Devices LS NY Start Page g PROFIBUS Master la PLC_PRG ma Symbols vx 4 c100 1 Je Device NPLC C100 Available variables Refresh Selected variables T al o t Available Items Access Right Selected Items Access Rights e variables variables il Library Manager 8 loConfia Global ma Data T r 3 n E PLC PRG PRG H oConfig_Globals a Data Types Wu E PLC PRG Symbol configuration bo BYE 4 Task Configuration MP TS P opc ibl 8YE opc qb0 FE Y vari SYE lecvarAccessLibrary loDrvCIFXProfibusLibrary IoStandard _35C0S 2 Data Types lt gt Show libraries in Available variables Instance Path 2 MainTask 3 PROFIBUS_Master PROFIBUS Master lj
69. ion gt Append device O Select Device gt lt All vendors gt 2 Select DeviceNet Scanner 3 Click Add Device gt Click Close The dialog window closes Vv Vv V WV You have gathered all dialog windows for the configuration of the CAN network netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 35 93 The Device tree has been expanded as follows C100 1 project CoDeSys File AA Edit View Project Build Online Debug Tools Window Help Devices SE CH f mum e Device NPLC C100 Met configuration CANbus Status Information E PLC Lagic Mets settings Ch App Slot E per ves com charnel 4 nesconciameo 1 v 288 Task Configuration ES MainTask o t t DeviceNet Scanner DeviceNet Sca Figure 22 NetX CANbus NetX Configuration Under CAN Network 1 gt NetX Configuration 2 set the following parameters gt Slot 3 Always select Slot 0 gt NetX Com Channel 2 Always select NetXComChanel0 C100 1 praject CoDeSys File ass a 3 Devices 7 0 X Cu 1 Device MPLI Z100 Ul PLC Logic UU App iiti Library Manager PLC PRG PRG EE Task Configuration E MainTask PH CAM Network CAN Network t DeviceNet Scanner DeviceNet Scanner Edit wiew Project Build
70. ioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 24 93 gt n the Devices tree double click NPLC M100 Local IO O to open signal configuration options in the main area 8 gt Select Internal I O Mapping tab 3 gt Now you can double click individual fields in the table in order to configure signals for bits or words netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 25 93 4 4 Create Bus Configuration For your system only one bus configuration is required Thus sections Configure PROFIBUS Master Add CANopen Master Configuration Window and Configure DeviceNet Scanner are to be considered as alternatives EN Note The CoDeSys online help provides instructions for bus configuration in its chapter Editors Device Editors fieldbus name 4 4 1 Select Fieldbus System for the Controller 1 Select Fieldbus system for the controller gt n the Devices tree right click the device O to open the context menu C100 1 praject CoDeSys File Edit View Project Buld Online Debug Tools inc SEE 00 c X eX Oh tS Devices Bl Start Page v Recent projects E PLC Logic C3 App E P C PRG PE 28 Task Config 4 Delete A SS
71. ited to use the software in the following areas e for military purposes or in weapon systems e for the design construction maintenance or operation of nuclear facili ties e in air traffic control systems air traffic or air traffic communication sys tems e in life support systems e in systems in which failures in the software could lead to personal injury or injuries leading to death We inform you that the software was not developed for use in dangerous environments requiring fail proof control mechanisms Use of the software in such an environment occurs at your own risk No liability is assumed for damages or losses due to unauthorized use 1 3 4 Warranty Although the hardware and software was developed with utmost care and tested intensively Hilscher Gesellschaft fur Systemautomation mbH does not guarantee its suitability for any purpose not confirmed in writing It cannot be guaranteed that the hardware and software will meet your requirements that the use of the software operates without interruption and that the software is free of errors No guarantee is made regarding infringements violations of patents rights of ownership or the freedom from interference by third parties No additional guarantees or assurances are made regarding marketability freedom of defect of title integration or usability for certain purposes unless they are required in accordance with the law and cannot be limited Warranty claims are limited
72. led periodically but from time to time only The A D converter used for this operation needs a certain amount of time for the act of measuring Therefore a State Machine is required for this function See Monitor netPLC C100 M100 Battery section on page 71 Data type In Comment Output xDone BOOL Output FALSE TRUE System function ready FALSE This function will be called in the next PLC cycle again xBusy BOOL Output FALSE TRUE System function in process FALSE System function not in process xError BOOL Output FALSE TRUE Error occurred The error code will be saved in iError FALSE no error occurred iError INT Output In case xError has the value FALSE then NO ERROR No Error 0 In case xError has the value TRUE then BATTERY BAD ERROR 1001 INTERNAL ERROR 1000 NOT SUPPORTED 1010 Measuring not supported by hardware xStatusOfBattery BOOL Output FALSE TRUE Battery status Good FALSE Battery status Bad Battery voltage 2 75V Change battery BatteryVoltage HEAL Output Measured voltage level of the battery in Volts A battery voltage level above 2 75 V means that the battery voltage is sufficient Table 9 System Function StatusOfBattery netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Functions 67 93 7 2 1 1 Effects of the Function in netPLC Components not equipped with Hardware for Battery Voltage Monitoring In the
73. lot PLC 13 DPM s r b Counter for transmitted bytes DPM s send as well as for received bytes DPM r receive via the device driver to the slot PLC Table 22 netPLC CoDeSys Server Windows Items netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Appendix 85 93 13 1 3 Stopping netPLC CoDeSys Server To quit operation of the netPLC CoDeSys Servers click on the system tray icon with the right mouse button From the context menu select Stop or press the button Stop 12 in the window of the server itself Answer the confirmation prompt with Yes to quit the netPLC CoDeSys Server netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public O Hilscher 2009 2014 Appendix 86 93 13 2 Example Projects The DVD features four example projects Brief descriptions of these examples are provided in the subsequent sections To open load and start a PLC example program proceed as follows gt Inthe CoDeSys menu choose File gt Open Project to open the project gt Set active path gt nthe CoDeSys menu choose Online gt Login to Device PLC Logic to load the program to the slot PLC or press Alt F8 on the keyboard gt n the CoDeSys menu choose Online gt Create boot application for App Device PLC Logic In the CoDeSys menu choose Online gt Start App Device PLC logic
74. n or DeviceNet select CAN Network O For PROFIBUS select PROFIBUS Master 2 gt Click Add Device 3 gt C100 1 project CoDeSys File Edit View Project Build Online Debug Tools Window Help za b c cx amp Ba kK ati Es ERI A Devices _ gt Start Page Recent projects tar c100 1 El PLC Logic O App iil Library Manager Z PLC PRG PRG gt 288 Task Configuration de Main Task 3 PROFIBUS Master PROFIBUS Master Getting started e Create a new project In the Devices tree an entry for the bus system has been added For CANopen or DeviceNet two steps are needed netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 27 93 4 4 2 Configure PROFIBUS Master C100 1 project CoDeSys File Edit View Project Build Online Debug Tools Window Help asas d 57 E06 2X 74 PROFIBUS Maste IB Start Page 3 PROFIBUS Master t Devices 2 CIO Y Device MPLC C100 Nets configuration DP Parameters Profibus DP 1 0 Mapping Status Information EI PLC Logic Netx settings f App Slat itn Library Manager E PLC PRG PRG Fr Task Configuration de ain Task Oii PROFIBUS Master PROFIBUS Master Figure 13 PROFIBUS Master NetX Configuration gt Inthe Devices tree A double click PROFIBUS Ma
75. ng DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 40 93 In the Devices tree a the entry for the slave device O has been added gt Double click slave device A configuration dialog for the slave opens in the main area gt Set here all necessary parameters gt Set the Station address 2 for the slave device Note Here you only set parameters which are necessary for the master to be able to communicate with the slave The slave device itself must be configured by using the adequate slave device configuration tool Note Right click on a device in the Devices tree A to open via the context menu the Properties dialog of the device Here you can choose a different name for the device to be displayed in the Device tree 4 5 3 Identify l O Addresses of the Slave To find out the input output addresses of the slave which are to be used in the PLC program proceed as follows C100_1 project CoDeSys File Edit View Project Build Online Debug Tools Window Help cua dd amp d e JE Devices A X B StartPage H OFIBUS Master H CB AB32 DPS A _ _byte_input_output Ge Device MPLC C100 DP Parameters DP Module 1 0 Mapping Status Information El PLC Logic Channels A ci App Variable Mapping Channel Default Value Unit Description Qi Library Manager 3 0 Input IE
76. nsstatus p kationsstatus kationsstatus rot gr n COM 1 Kommu ikati ch ich icht nikationsstatus a nicht nic verwendet verwendet verwendet rot gr n Table 14 LED Benennung in der Ger tezeichnung und LED Bedeutung und Benennung nach Protokoll Feldbus Systeme 10 1 LEDSYS The following table describes the meaning of the system LED for netPLC components LED Color State Meaning SYS 9 On Operating System running Y Blinking Bootloader is waiting for firmware to green yellow Blinking Heavy system error PLC in stop ito static Bootloader is waiting for software M DS Continously SecMem not readable an blinking off Power supply for the device is missing or hardware defect Table 15 System LED netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 LEDs 77 93 10 2 LED APL E E Bedeutung APL Duo LED gr n gelb Ein SPS im Zustand RUN SPS Programm wird ausgef hrt Zyklisch Kein bootbares SPS Programm vorhanden blinkend 1 Hz r SPS im Zustand STOP cb SPS Programm wird nicht ausgef hrt Zyklisch Unerwarteter Fehler bei der Ausf hrung des SPS 2 blinkend 4 Hz Programms aufgetreten Tabelle 1 LED APL CoDeSys 10 3 LED CANopen Master The LED for CANopen master is not used 10 4 LED DeviceNet Master The subsequent table describes the meaning of the LE
77. owledge Handler Object Class Code 0x06 Baud rates 125 kBits s 250 kBit s 500 kBit s Auto baudrate detection is not supported Data transport layer CAN frames User data transfer through the gateway only via lO connections Reference to firmware stack version V4 0 x x V2 3 x x Table 20 Technical Data DeviceNet Master Protocol netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Technical Data Protocols 82 93 12 2 PROFIBUS DP Master Maximum number of total cyclic input data 3584 bytes Up to 512 bytes from them can be used for Host input data for NPLC C100 Maximum number of total cyclic output data 3584 bytes Up to 512 bytes from them can be used for Host output data for NPLC C100 Maximum number of cyclic input data 244 bytes slave Maximum number of cyclic output data 244 bytes slave Configuration data Max 244 bytes per slave Parameterization data per slave 7 bytes slave standard parameters Max 237 bytes slave application specific parameters Acyclic communication The following DPV1 class 1 services can be used with the CoDeSys library lloDrvDPV1C1 read write alarm and alarm ack Baud rate 9 6 kBits s 19 2 kBits s 31 25 kBits s 45 45 kBits s 93 75 kBits s 187 5 kBits s 500 kBits s 1 5 MBits s 3 MBits s 6 MBits s 12 MBit s Auto baudrate detection is not supported Data transport layer PROFIBUS FDL Limitations
78. ponding fieldbus system netPLC with CoDeSys Commissioning DOC120113UMO2EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Safety 12 93 2 Safety 2 1 Safety Instructions The user manual the accompanying texts and the documentation are written for the use of the products by educated personnel When using the products all Safety Messages Safety Messages Property Damage Messages and all valid legal regulations have to be obeyed Technical knowledge is presumed The user has to assure that all legal regulations are obeyed 2 2 Intended Use The netPLC components described in this user manual have PLC functionality and fieldbus communication netPLC components are e Slot PLC NPLC C100 and e Module PLC NPLC M100 Depending on the used netPLC component the fieldbus systems listed in section Reference to Hardware Firmware Server Driver and Software page 7 can be automated 2 3 Personnel Qualification The netPLC component must only be installed configured and removed by qualified personnel 2 4 Obligation to Read and Understand the Manual Important Read and understand all instructions in this manual before installation or use of your device to avoid injury netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Description and Requirements 13 93 3 Description and Requirements 3 1 Description CoDeSys is a P
79. rammed with CoDeSys e operational PROFIBUS DP slave device s which is are connected via a PROFIBUS cable to the netPLC component Installed CoDeSys OPC Server e Installed 3S OPC Server The netPLC CoDeSys server on the PC must be started and must have access to the netPLC component netPLC with CoDeSys Commissioning DOC120113UMO2EN Revision 2 English 2014 01 Released Public O Hilscher 2009 2014 Visualizing 57 93 5 1 OPC Configurator 1 Start OPC Configurator gt Start the OPC Configurator Start gt All Programs gt 3S CoDeSys gt CoDeSys OPC Server 3 gt OPC Configurator The window of the OPC Configurator appears OPCConfig C Programme 3S CoDeSys CoDeSys OPC Server 3 0PCServ 2 EX File Edit 7 Settings for OPC Server NNI REE PLC Id23 lt Connection Update Rate ms Sync Init w Writes produce data change calls Use Colon as PLC name separator Suppress callbacks on add remove Logging W Enable logging D efaultevents Log Additional E vents Add Debug Events slow Figure 40 OPC Server Configuration gt Use the context menu to delete the PLC_Id23 entry 2 Append PLC In the menu choose Edit gt Append PLC or use shortcut Strg A on the keyboard Y The Settings for PLC window appears The default name is PLC1 netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public O Hilscher 2009 2014
80. re 18 Figure 19 Figure 20 Figure 21 Figure 22 Figure 23 Figure 24 Figure 25 Figure 26 Figure 27 Figure 28 Figure 29 Figure 30 Figure 31 Figure 32 Figure 33 Figure 34 Figure 35 Figure 36 Figure 37 Figure 38 Figure 39 Figure 40 Figure 41 Figure 42 Figure 43 Figure 44 Figure 45 Figure 46 Figure 47 Figure 48 Figure 49 Figure 50 Figure 51 Figure 52 Figure 53 Figure 54 NPLC M100 Add Local I Os 2 M100 Configure Local I Os Select Fieldbus PROFIBUS Master NetX Configuration PROFIBUS Master DP Parameter Configuration CANopen 2 Open Add Device Dialog CANopen Manager NetX_CANbus gt NetX Configuration NetX_CANbus gt CANbus CANopen_Manager gt CANopen_Manager CANopen gt Add Device DeviceNet Scanner NetX_CANbus gt NetX Configuration NetX_CANbus gt CANbus Set Fieldbus Address of Device Import Device Description File Add Slave Device Select Slave Device Added Slave Device Ascertain I O Addresses of Slave Slave Device Added Editor Symbols Editor Symbols 2 Editor Symbols Access Rights Messages After Building Process Communication Settings Set Active Path Path Set Active Messages Building Process PLC Program Started OPC Server Configuration Host l O Interface Add Library Add Library Input Assistant Module Calls System Function StatusOfBattery System function StatusOfExt24VDC System Function StatusOfPCIPower Bus Diagnostic 1 PROFIBUS Exampl
81. ree according to the instructions given in section Create Bus Configuration on page 25 gt right click CAN Network Q in the Devices tree to open the context menu gt Inthe context menu select Add Device 2 Y The Add Device dialog opens netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 34 93 i Add Device Mame DeviceNet Scanner Action Append device Insert device Plug device Update device Device Vendor lt All vendors gt 2 Name Vendor dj Fieldbusses Ci CANopen Ci CANopenManager 3 CANopen Manager Hilscher Gesellschaft F Systemautomation mbH E C lNopen_Manager_FDT 35 Smart Software Solutions GmbH i Local Device lt DeviceNet DeviceNet Scanner T DeviceNet Scanner 35 Smart Software Solutions GmbH 3 3 Hilscher Gesellschaft F Systemautomation mbH mw 11939 Display outdated versions Information Name DeviceNet Scanner Vendor Hilscher Gesellschaft F Systemautomation mbH Categories DeviceNet Scanner Version 3 5 0 0 Order Sumber Sa Description netx Chip based DeviceNet Scanner Append selected device as last child of CAN_Network You can select another target node in the navigator while this window is open OM Figure 21 DeviceNet Scanner Set the following parameters Select Act
82. resses QBO to QB511 as long as slave devices are added behind the Host O Interface In order to use host I O in the control program you have to add them to the project To do so proceed as follows Add host inputs outputs FirstProject project CoDeSys File Edt View Project Build Online Debug To ub coc AA Devices 2 X 9 FestProject zi em qo p Ba Copy 2 Delete Ea Properties Figure 5 NPLC C100 Add Host I O 1 gt n the Devices tree right click on Device NPLC C100 O to open the context menu gt Select Add Device 2 in the context menu Y The Add Device window opens netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 20 93 i Add Device Mame Host I O Interface Action Append device C Insert device Plug device Update device Device Vendor lt All vendors Name Vendor 9 Miscellaneous t Host I O Interface Hilscher Gesellschaft F r Systemautomation mbH H Fieldbusses Display outdated versions Information t Name Host I O Interface Vendor Hilscher Gesellschaft F r Systemautomation mbH Categories Yersion 4 0 0 0 Order Number n a Append selected device as last child of Device You can select another target node in the navigator while this window is open Figure 6 NPLC C
83. rogramming software when the Active Path is set See position 2 in Figure 37 Path Set Active on page 50 Close address window Click OK button 3 to close the window The settings are stored temporarily OPCConfig no ini file opened File Edit Server Settings for connection to PLC Rf PLCI q Connection Expert Gateway Tcp lp Address localhost Port 1217 Device Parameter Value Comment E Address 0515 Address from CoDeSys V3 Device Scan netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Visualizing 60 93 8 Save configuration gt Inthe menu choose File gt Save As gt Enter the file name OPCServer ini and overwrite the existing file Save in E CoDeSps OPC Server 3 boPCServer ini File name OPCS ever save as type a PCContig Files ini Cancel gt Click Save button The OPC configuration file is stored 9 Exit OPC Configurator gt nthe menu choose File gt Exit to end the OPC configurator netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Visualizing 61 93 5 2 OPC Client The access from an OPC client can only be sketched out here because this very much depends on the visualization software you are using 1 Start the OPC client software 2 Establish a connection to t
84. rtPage E PLCLPR T PROFIBUS Master 1j Device fa Library Manager _2_byte_input_output X c 1 e de Device connected NPLC C100 DP Parameters DP Module 170 Mapping Status Information Au PLC Logic Channels 3 E App run variable Mapping Channel Address Type Defauk Value Current Value Prepared Value lii Library Manager 6 Input 180 aj PLC_PRG PRG EM Byte iG TED BYTE 0 _ a Symbol configuration E Bytel 1B BYTE 127 1889 Task Configuration 2 48 Output ipQB d Es MainTask i Byte 6080 BYTE 0 ti PROFIBUS Master PROFIBUS Master Bytel OB BYTE 197 19 cm aBs2 DPS CB AB32 DPS 5 2 byte input output 2 byte in Figure 50 Bus Diagnostic 3 Slave I O Data gt In the Devices tree A select slave l O Data entry O gt Inthe main area 8 select DP Module I O Mapping tab O Y In the main area 8 the inputs and outputs of the slave are shown The current values of the signals are shown in the Current Value column O netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public O Hilscher 2009 2014 Troubleshooting 75 93 9 Troubleshooting General gt Check if the requirements for the operation of the netPLC component are fulfilled For further information on this please refer to the hardware documentation of the corresponding netPLC component Cable Check the used cable for correct pinning Configuration
85. se components the function will not cause fatal error The function will be returned with the following values Data type In Comment Output BOOL Output FALSE TRUE System function ready BOOL Output FALSE FALSE System function not in process BOOL Output FALSE TRUE Error occurred The error code will be saved in iError iError Output NOT SUPPORTED 1010 Measuring not supported by hardware xStatusOfBattery BOOL Output FALSE TRUE Battery status Good Table 10 System Function StatusOfBattery Hardware without AD Converter netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Functions 68 93 7 2 2 Status External Voltage Supply StatusOfExt24VDC StatusOfExt 4 DC Done Busy xError Error x5SkakusOfExE2Z4VDC Figure 46 System function StatusOfExt24VDC Function StatusOfExt24VDC Description Checks if the PLC is supplied by an external power supply Name Datatype In Output Detault Comment xDone BOOL Output FALSE TRUE System function ready FALSE This function will be called in the next PLC cycle again xBusy BOOL Output FALSE TRUE System function in process FALSE System function not in process xError BOOL Output FALSE TRUE Error occurred The error code will be saved in iError FALSE no error occurred iError INT Output In case xError has the value FALSE then NO_ERROR No Error 0 In case
86. ster O to open the configuration dialog for PROFIBUS parameters Inthe main area B the first tab NetX configuration opens All standard parameters shown above must remain in their default settings gt Slot 0 2 gt NetXComChannelO O gt auto initialize bus must remain checked netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 28 93 In the DP Parameters tab you can set the following parameters C100 1 project CoDeSys File Edit View Project Build Online Debug Tools Window Help at u Ez Ta Pune jt cud e d 5 ARM Devices X 5 statPage j PR FIBUS Master HE ere ie Device NPLC C100 il PLC Logic Nets configuration DP Parameters Profibus DP 1 0 Mapping Status Information an Addresses Mode CA App Station address 1 Auto clear made it Library Manager Bl PLC PRG PRG Highest station address 125 Automatic startup 4 Task Configuration E MainTask s PROFIBUS_Master PROFIBUS Master DZ Baud rate kBits 1500 00 2 w Gy Use defaults Parameter Value Unit Description TAL 400 Bit Slot time min T SDR 11 Bit Minimum station delay responder time max T_SDR 150 Bit Maximum station delay responder time B T Qul O Bit Quiet time T T 1 Bit Setup time T_TR 4449 Bit Target rotation time Gap 10
87. suming Heartbeat 6 Enable Heartbeat Producing Node ID 127 Producer Time ms 200 ar Figure 19 CANopen Manager gt CANopen Manager In the Devices tree A double click CANopen_Manager O to open the configuration dialog Under CANopen_ Manager O gt CANopen Manager 2 set the following parameters Node ID 3 gt Network Management 4 gt Sync Behavior G gt Heartbeat Producing 6 After having set the parameters you can check the settings for plausibility by clicking Check and fix configuration netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 33 93 4 4 4 Configure DeviceNet Scanner The configuration of a DeviceNet Scanner is done in several steps C100 1 project CoDeSys File Edit wiew Project Build Online Debug Tools Window Help Bu 6 HERES IRE Devices MERE ER Start Page CAN Network cregi ite Device NPLC C100 Nets configuration CAMbus Status Information EI PLC Logic Netx settings App Slot Slot 0 v A Library Manager PLC_PRG PRG Mets Com Channel MetxComChannelO bul E Task Configuration de MainTask f CAN Network CAN Network A Cut Copy 7X Delete Properties Gy CET Figure 20 CANopen gt Add Device After the CAN bus has been added to the Devices t
88. tab C100 1 project CoDeSys ae File Edit View Project Build Online Debug Tools Window Help Dae X d ES Oy Devices v ax B Start Page jj Device f PROFIBUS_Master 8 PLC PRG 93 Symbols X C100 E Device t 3e Device NPLC C100 DO Communication Settings Applications Log PLC settings Task deployment Status Information PLC te o Select the network path to the controller w Library Manager Gateway 1 v a PLC_PRG PRG ma Symbol configuration Pie Gateway 1 PT Task Configuration 3 Add gateway amp MainT ask J PROFIBUS Master PROFIBUS lij ce aB32 pps CB_AB32 1 1 2 byte input output Filter Target ID v Sorting order Name v _ Don t save network path in project _ Secure online mode Figure 35 Communication Settings gt In the Devices tree double click Device NPLC C100 O to open the Communication Settings tab O which is a sub tab of the Device tab Y The Device tab with its Communication Settings sub tab is displayed If no gateway is displayed in the tab add a gateway as described in the following steps 2 and 3 If a gateway is displayed skip steps 2 and 3 and proceed to the next section 2 Add Gateway gt Click Add Gateway 3 The Gateway window appears netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 49
89. to start the PLC program or press F5 on the keyboard 13 2 1 netPLC System Function netPLC System Functions project Folder Supplements amp Examples CoDeSys Sample Projects netPLC System Functions Short description The project consists of a netPLC NPLC C100 DP PLC program The PLC program shows the usage of the system functions StatusOfBattery StatusOfExt24V and StatusOfPCIPower Table 23 Example netPLC System Function The system functions are described in Add Functions Library section on page 63 netPLC with CoDeSys Commissioning DOC120113UMO2EN Revision 2 English 2014 01 Released Public O Hilscher 2009 2014 Appendix 87 93 13 2 2 netPLC Open Process Control OPC Supplements amp Examples CoDeSys Sample Projects netPLC Open Process Control OPC Short description The project consists of a netPLC NPLC C100 DP PLC program The PLC program shows how to create variables and how use the symbol configurator to make them accessible for the OPC server From a remote OPC client it is possible to access the variables opc_qb0 value 0 255 and to write a value The PLC program copies this value of opc_qb0 variable to the Variable opc ibO and the OPC Client can read back this value from opc ibO The PLC program uses the same mechanism for the variables opc qb1 and opc_ib1 Table 24 Example netPLC Open Process Control To use this project proceed as follows gt Inthe CoDeSys menu choose File
90. ucts and their specification as well as related user manuals accompanying texts and documentation at all times and without advance notice without obligation to report the change Changes will be included in future manuals and do not constitute any obligations There is no entitlement to revisions of delivered documents The manual delivered with the product applies Hilscher Gesellschaft fur Systemautomation mbH is not liable under any circumstances for direct indirect incidental or follow on damage or loss of earnings resulting from the use of the information contained in this publication netPLC with CoDeSys Commissioning DOC120113UMO2EN Revision 2 English 2014 01 Released Public O Hilscher 2009 2014 Introduction 10 93 1 3 3 Exclusion of Liability The software was produced and tested with utmost care by Hilscher Gesellschaft fur Systemautomation mbH and is made available as is No warranty can be assumed for the performance and flawlessness of the software for all usage conditions and cases and for the results produced when utilized by the user Liability for any damages that may result from the use of the hardware or software or related documents is limited to cases of intent or grossly negligent violation of significant contractual obligations Indemnity claims for the violation of significant contractual obligations are limited to damages that are foreseeable and typical for this type of contract It is strictly prohib
91. with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 37 93 4 5 Map Bus Structure 4 5 1 Import Slave Device Files This section describes the import of slave devices based on device description files A PROFIBUS system with a slave is used for example here C100 1 project CoDeSys Edit View Project Build Online Debug Tools Window Help m File jah g d Package Manager Devices 2X Install library zu Cfo0 PIE e Device NPLC C100 EN PLC Logic License Manager B o App J Install visualization style iil Library Manager Scripti PLC_PRG PRG alii Task Configuration Customize E z gt MainTask Options t PROFIBLIS Master PROFIBUS Master Figure 25 Import Device Description File gt n the Tools menu O select Install Device 2 to open file selection dialog gt Inthe file selection dialog select the device description file gt Inthe file selection dialog click Open dv The device description file is imported Y Now it is possible to add this slave device into the network configuration netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Create first Project for netPLC Component Example NPLC C100 38 93 4 5 2 Add an
92. xample netPLC Open Process Control 87 Table 25 Example netPLC Real Time Clock 87 Table 26 Example NPLC C100 DP PROFIBUS Simple IO 88 Table 27 Example NPLC C100 DP with Host lOs 88 netPLC with CoDeSys Commissioning DOC120113UMO2EN Revision 2 English 2014 01 Released Public Hilscher 2009 2014 Appendix 13 6 Contacts Headquarters Germany Hilscher Gesellschaft fur Systemautomation mbH Rheinstrasse 15 65795 Hattersheim Phone 49 0 6190 9907 0 Fax 49 0 6190 9907 50 E Mail info hilscher com Support Phone 49 0 6190 9907 99 E Mail de support hilscher com Subsidiaries China Hilscher Systemautomation Shanghai Co Ltd 200010 Shanghai Phone 86 0 21 6355 5161 E Mail info hilscher cn Support Phone 86 0 21 6355 5161 E Mail cn support hilscher com France Hilscher France S a r l 69500 Bron Phone 33 0 4 72 37 98 40 E Mail info hilscher fr Support Phone 33 0 4 72 37 98 40 E Mail fr support hilscher com India Hilscher India Pvt Ltd New Delhi 110 065 Phone 91 11 43055431 E Mail info hilscher in Italy Hilscher Italia S r l 20090 Vimodrone MI Phone 39 02 25007068 E Mail info hilscher it Support Phone 39 02 25007068 E Mail it support hilscher com netPLC with CoDeSys Commissioning DOC120113UMO02EN Revision 2 English 2014 01 Released Public 93 93 Japan Hilscher Japan KK Tokyo 160 0022 Phone 81 0

Download Pdf Manuals

image

Related Search

Related Contents

Open Ravenscar Real-Time Kernel Design Definition File Software  Bedienungsanleitung - Alan-Albrecht Service    PeakTech 1350  PowerScan™ D8340  ロックミシン取扱説明書  

Copyright © All rights reserved.
Failed to retrieve file