Communication. For controllers that are programmed using SILworX

Size: px
Start display at page:

Download "Communication. For controllers that are programmed using SILworX"

Transcription

1 Communcaton For controllers that are programmed usng SILworX

2 All HIMA products mentoned n ths manual are protected by the HIMA trade-mark. Unless noted otherwse, ths also apples to other manufacturers and ther respectve products referred to heren. All of the nstructons and techncal specfcatons n ths manual have been wrtten wth great care and effectve qualty assurance measures have been mplemented to ensure ther valdty. For questons, please contact HIMA drectly. HIMA apprecates any suggeston on whch nformaton should be ncluded n the manual. Equpment subject to change wthout notce. HIMA also reserves the rght to modfy the wrtten materal wthout pror notce. For further nformaton, refer to the HIMA DVD and our webste and Copyrght 2011, HIMA Paul Hldebrandt GmbH + Co KG All rghts reserved Contact HIMA contact detals: HIMA Paul Hldebrandt GmbH + Co KG P.O. Box Brühl, Germany Phone: Fax: E-mal: nfo@hma.com Revson Revsons Type of Change ndex techncal edtoral 4.00 New edton of the SILworX V4 manual x x 4.01 Change: Chapter 12 x x HI E Rev (1151)

3 Communcaton 1 Introducton Table of Contents 1 Introducton Structure and Use of ths Manual Target Audence Formattng Conventons Safety Notes Operatng Tps Safety Resdual Rsk Safety Precautons Emergency Informaton Product Descrpton Safety-Related Protocol (safeethernet) Standard Protocols Redundancy Protocol Regstraton and Actvaton Ethernet Interfaces Ethernet Interfaces Propertes Confgurng the Ethernet Interfaces Network Ports Used for Ethernet Communcaton Feldbus Interfaces Installaton Regstraton and Actvaton Pn Assgnment of the D-sub Connectors safeethernet What s safeethernet? Confgurng a Redundant safeethernet Connecton Connectng Process Varables Verfyng safeethernet Communcaton safeethernet Edtor Detal Vew of the safeethernet Edtor Tab: System Varables Tab: Fragment Defntons Possble safeethernet Connectons Mono safeethernet Connecton (Channel 1) Redundant safeethernet Connecton (Channel 1 and Channel 2) Permtted Combnatons HI E Rev Page 3 of 386

4 1 Introducton Communcaton 4.6 safeethernet Parameters Maxmum Cycle Tme (Mnmum Watchdog Tme) of the HIMax Controller Maxmum Cycle Tme of the HIMatrx Controller Receve Tmeout Response Tme Sync/Async ResendTMO Acknowledge Tmeout Producton Rate Queue Worst Case Reacton Tme for safeethernet Calculatng the Worst Case Reacton Tme of Two HIMax controllers Calculatng the Worst Case Reacton Tme n Connecton wth One HIMatrx controller Calculatng the Worst Case Reacton Tme wth two HIMatrx Controllers or Remote I/Os Calculatng the Worst Case Reacton Tme wth two HIMax and one HIMatrx Controller Calculatng the Worst Case Reacton Tme of Two HIMatrx Controllers Calculatng the Worst Case Reacton Tme wth two Remote I/Os Calculatng the Worst Case Reacton Tme wth two HIMatrx and one HIMax Controller safeethernet Profle Profle I (Fast & Cleanroom) Profle II (Fast & Nosy) Profle III (Medum & Cleanroom) Profle IV (Medum & Nosy) Profle V (Slow & Cleanroom) Profle VI (Slow & Nosy) Cross-Project Communcaton Varants for Cross-Project Communcaton Cross-Project Communcaton between SILworX and ELOP II Factory Confgurng the HIMax n a SILworX Project Confgurng a HIMatrx n an ELOP II Factory Project Control Panel (safeethernet) Vew Box (safeethernet Connecton) PROFINET IO Page 4 of 386 HI E Rev. 4.01

5 Communcaton 1 Introducton 5.1 PROFINET IO Functon Blocks Controllng the Consumer/Provder Status (IOxS) Control Varables n the HIMA Controller Control Varables n the HIMA DO Devce Control Varables n the HIMA DI Devce PROFIsafe PROFIsafe Control Byte and Status Byte F_WD_Tme (PROFIsafe watchdog tme) SFRT (Safety Functon Response Tme) Requrements for Safely Operatng PROFIsafe Addressng Network Aspects HIMA PROFINET IO Controller and PROFIsafe F-Host PROFINET IO/PROFIsafe Example Creatng a HIMA PROFINET IO Controller n SILworX Menu Functons for the PROFINET IO Controller Example of Structure Tree for the PROFINET IO Controller PROFINET IO Controller PROFINET IO Devce (wthn the Controller) DAP Module (Devce Access Pont Module) Input/Output PROFINET IO Modules Input Submodule Submodule Output Submodule Inputs and Outputs Applcaton Relaton (Propertes) Alarm CR (Propertes) Input CR (Propertes) HIMA PROFINET IO Devce System Requrements PROFINET IO/PROFIsafe Example Confgurng the PROFINET IO Devce n SILworX Menu Functons for PROFINET IO Devce Menu Functon: Propertes HIMA PROFINET IO Modules HIMA PROFIsafe Modules PROFINET IO and PROFIsafe module PROFIBUS DP HIMA PROFIBUS DP Master Creatng a HIMA PROFIBUS DP Master PROFIBUS DP: Example Confgurng the PROFIBUS DP Slave Confgurng the PROFIBUS DP Master Menu Functons of the PROFIBUS DP Master Edt Menu Functon: Propertes HI E Rev Page 5 of 386

6 1 Introducton Communcaton 6.4 PROFIBUS DP Bus Access Method Master/Slave Protocol Token Protocol Target Token Rotaton Tme (Ttr) Calculatng the Target Token Rotaton Tme (Ttr) Isochronous PROFIBUS DP Cycle (DP V2 and Hgher) Isochronous Mode (DP V2 and hgher) Isochronous Sync Mode (DP V2 and hgher) Isochronous Freeze Mode (DP V2 and hgher) Menu Functons of the PROFIBUS DP Slave (n the Master) Creatng a PROFIBUS DP Slave (n the Master) Edt Propertes Importng the GSD Fle Confgurng User Parameters PROFIBUS Functon Blocks MSTAT Functon Block RALRM Functon Block RDIAG Functon Block RDREC Functon Block SLACT Functon Block WRREC Functon Block PROFIBUS Auxlary Functon Blocks Auxlary Functon Block: ACTIVE Auxlary Functon Block: ALARM Auxlary Functon Block: DEID Auxlary Functon Block: ID Auxlary Functon Block: NSLOT Auxlary Functon Block: SLOT Auxlary Functon Block: STDDIAG Error Codes of the Functon Blocks Control Panel (PROFIBUS DP Master) Context Menu (PROFIBUS DP Master) Context Menu (PROFIBUS DP Slave) Vew Box (PROFIBUS Master) PROFIBUS DP Master State Behavor of the PROFIBUS DP Master Functon of the FBx LED n the PROFIBUS Master Functon of the FAULT LED n the PROFIBUS Master (HIMax only) HIMA PROFIBUS DP Slave Creatng a HIMA PROFIBUS DP Slave Menu Functons of the PROFIBUS DP Slave Edt Propertes Control Panel (Profbus DP Slave) Vew Box (PROFIBUS DP Slave) Functon of the FBx LED n the PROFIBUS Slave Functon of the FAULT LED n the PROFIBUS Slave (HIMax only) Page 6 of 386 HI E Rev. 4.01

7 Communcaton 1 Introducton 7 Modbus RS485 Bus Topology H 7506 Termnal Assgnment Bus Cable Propertes of the RS485 Transmsson HIMA Modbus Master Modbus Example Example of Alternatve Regster/Bt Addressng Menu Functons of the HIMA Modbus Master Modbus Functon Codes of the Master Ethernet Slaves (TCP/UDP Slaves) Modbus Gateway (TCP/UDP Gateway) Seral Modbus Control Panel (Modbus Master) Control Panel (Modbus Master->Slave) FBx LED Functon n the Modbus Master Functon of the FAULT LED n the Modbus Master (HIMax only) HIMA Modbus Slave Confgurng the Modbus TCP Slave Confgurng the Redundant Modbus TCP Slave Rules for Redundant Modbus TCP Slaves Menu Functons of the HIMA Modbus Slave Set Assgnng Send/Receve Varables Modbus Slave Set System Varables Modbus Slave and Modbus Slave Redundant Modbus Functon Codes of the HIMA Modbus Slaves HIMA-Specfc Functon Codes Addressng Modbus usng Bt and Regster Offsets for Alternatve Modbus Addressng Control Panel (Modbus Slave) FBx LED Functon n the Modbus Slave Functon of the FAULT LED n the Modbus Slave (HIMax only) Error Codes of the Modbus TCP/IP Connecton Send & Receve TCP System Requrements Creatng a S&R TCP Protocol Example: S&R TCP Confguraton S&R TCP Confguraton of the Semens Controller SIMATIC S&R TCP Confguraton of the HIMax Controller TCP S&R Protocols Menu Functons Edt Propertes HI E Rev Page 7 of 386

8 1 Introducton Communcaton 8.4 Menu Functons for TCP Connecton Edt System Varables Propertes Data exchange TCP Connectons Cyclc Data Exchange Acyclc Data Exchange wth Functon Blocks Smultaneous Cyclc and Acyclc Data Exchange Flow Control Thrd-Party Systems wth Pad Bytes S&R TCP Functon Blocks TCP_Reset TCP_Send TCP_Receve TCP_ReceveLne TCP_ReceveVar Control Panel (Send/Receve over TCP) Vew box for General Parameters Vew box for TCP connectons Error Code of the TCP Connecton Addtonal Error Code Table for the Functon Blocks Connecton State Partner Connecton State SNTP Protocol SNTP Clent SNTP Clent (Server Informaton) SNTP Server X OPC Server Equpment and System Requrements X-OPC Server Propertes HIMax Controller Propertes for X-OPC Connecton Actons Requred as a Result of Changes Forcng Global Varables on I/O Modules Confgurng an OPC Server Connecton Software requred: Requrements for Operatng the X-OPC Server: Installaton on Host PC Confgurng the OPC Server n SILworX Settngs for the OPC Server n the safeethernet Edtor Confgurng the X-OPC Data Access Server n SILworX Confgurng the X-OPC Alarm&Event Server n SILworX Confgurng the Fragments and Prortes n SILworX Page 8 of 386 HI E Rev. 4.01

9 Communcaton 1 Introducton 10.7 Alarm & Event Edtor Boolean Events Scalar Events Parameters for the X-OPC Server Propertes OPC Server Set OPC Server Unnstallng the X-OPC Server Synchronous Seral Interface System Requrements Block Dagram D-SUB Connectors FB1 and FB Confgurng Data Exchange between COM Module and SSI Submodule Confguraton of the SSI Wre Lengths and Recommended Clock Rates Applcaton Notes ComUserTask System Requrements Creatng a ComUserTask Requrements Abbrevatons CUT Interface n SILworX Schedule Interval [ms] Schedulng Preprocessng Schedulng Postprocessng STOP_INVALID_CONFIG CUT Interface Varables (CPU<->CUT) Menu Functon: Propertes Menu Functon: Edt CUT Functons COM User Callback Functons COM User Lbrary Functons Header Fles Code/Data Area and Stack for CUT Start Functon CUCB_TaskLoop RS485 / RS232 IF Seral Interfaces UDP/TCP Socket IF Tmer-IF Dagnoss HI E Rev Page 9 of 386

10 1 Introducton Communcaton 12.6 Functons for HIMatrx L3 and HM ComUserIRQTask NVRam IF Semaphore IF Installng the Development Envronment Installng the Cygwn Envronment Installng the GNU Compler Creatng New CUT Projects CUT Makefles Adaptng C Source Codes Implementng the ComUserTask n the Project DCP: Error n loadng a confguraton wth CUT General Confgurng the Functon Blocks Purchasng Functon Block Lbrares Drag the requred functon blocks onto the user program. Confgure the nputs and outputs as descrbed for the ndvdual functon block Confgurng the Functon Blocks n the SILworX Structure Tree Maxmum Communcaton Tme Slce For HIMax Controllers Load Lmtaton Appendx Glossary Index of Fgures Index of Tables Index Page 10 of 386 HI E Rev. 4.01

11 Communcaton 1 Introducton 1 Introducton The communcaton manual descrbes the characterstcs and confguraton of the communcaton protocols of the safety-related HIMax and HIMatrx controller systems wth the programmng tool SILworX. Usng the provded protocols, HIMax/HIMatrx controllers can be connected to one another or to controllers from other manufacturers. Knowledge of regulatons and the proper techncal mplementaton of the nstructons detaled n ths manual performed by qualfed personnel are prerequstes for plannng, engneerng, programmng, nstallng, startng up, operatng and mantanng the HIMax/HIMatrx automaton devces. HIMA wll not be held lable for severe personal njures, damage to property or the surroundngs caused by any of the followng: unqualfed personnel workng on or wth the devces, de-actvaton or bypassng of safety functons, or falure to comply wth the nstructons detaled n ths manual (resultng n faults or mpared safety functonalty). HIMax automaton devces have been developed, manufactured and tested n complance wth the pertnent safety standards and regulatons. They may only be used for the ntended applcatons under the specfed envronmental condtons. 1.1 Structure and Use of ths Manual The content of ths manual s part of the hardware descrpton of the HIMax programmable electronc system. Ths manual s organzed n the followng man chapters: Introducton Safety Product Descrpton Start-up Operaton Mantenance Decommssonng Transport Dsposal Addtonally, the followng documents must be taken nto account: Name Content Document no. HIMax System Manual Hardware descrpton of the HIMax HI E system HIMax Safety Manual Safety functons of the HIMax system HI E HIMatrx Safety functons of the HIMatrx system HI E Safety Manual HIMatrx General descrpton of how to plan a plant HI E Engneerng Manual wth HIMatrx systems HIMatrx Hardware descrpton of the HI 800 xxx E Hardware Manuals correspondng HIMatrx controller Frst Steps Introducton to SILworX HI E Table 1: Addtonal Vald Manuals HI E Rev Page 11 of 386

12 1 Introducton Communcaton The latest manuals can be downloaded from the HIMA webste The revson ndex on the footer can be used to compare the current verson of exstng manuals wth the Internet edton. 1.2 Target Audence Ths document addresses system planners, confguraton engneers, programmers of automaton devces and personnel authorzed to mplement, operate and mantan the devces and systems. Specalzed knowledge of safety-related automaton systems s requred. 1.3 Formattng Conventons To ensure mproved readablty and comprehensblty, the followng fonts are used n ths document: Bold: Italcs: Courer RUN Chapter To hghlght mportant parts Names of buttons, menu functons and tabs that can be clcked and used n SILworX. System parameter and varables Lteral user nputs Operatng state are desgnated by captals Cross references are hyperlnks even though they are not partcularly marked. When the cursor hovers over a hyperlnk, t changes ts shape. Clck the hyperlnk to jump to the correspondng poston. Safety notes and operatng tps are partcularly marked Safety Notes The safety notes are represented as descrbed below. These notes must absolutely be observed to reduce the rsk to a mnmum. The content s structured as follows: Sgnal word: danger, warnng, cauton, notce Type and source of danger Consequences arsng from the danger Danger preventon SIGNAL WORD Type and source of danger! Consequences arsng from the danger Danger preventon The sgnal words have the followng meanngs: Danger ndcates hazardous stuaton whch, f not avoded, wll result n death or serous njury. Warnng ndcates hazardous stuaton whch, f not avoded, could result n death or serous njury. Warnng ndcates hazardous stuaton whch, f not avoded, could result n mnor or modest njury. Notce ndcates a hazardous stuaton whch, f not avoded, could result n property damage. Page 12 of 386 HI E Rev. 4.01

13 Communcaton 1 Introducton NOTICE Type and source of damage! Damage preventon Operatng Tps Addtonal nformaton s structured as presented n the followng example: The text correspondng to the addtonal nformaton s located here. Useful tps and trcks appear as follows: TIP The tp text s located here. HI E Rev Page 13 of 386

14 2 Safety Communcaton 2 Safety All safety nformaton, notes and nstructons specfed n ths manual must be strctly observed. The product may only be used f all gudelnes and safety nstructons are adhered to. Ths product s operated n accordance wth SELV or PELV. No mmnent danger results from the module tself. The use n Ex-Zone s permtted f addtonal measures are taken. Operatng Requrements The devces have been developed to meet the followng standards for EMC, clmatc and envronmental requrements: Standard Content IEC/EN Programmable controllers, Part 2 Equpment requrements and tests IEC/EN EMC Generc standards, Parts 6-2 Immunty for ndustral envronments IEC/EN Electromagnetc Compatblty (EMC) Generc emsson standard, ndustral envronments Table 2: Standards for EMC, Clmatc and Envronmental Requrements When usng the safety-related HIMax control systems, the followng general requrements must be met: Requrement type Requrement content Protecton class Protecton class II n accordance wth IEC/EN Polluton Polluton degree II n accordance wth IEC/EN Alttude < 2000 m Housng Standard: IP20/IP00 If requred by the relevant applcaton standards (e.g., EN 60204, EN 954-1), the devce must be nstalled n an enclosure of the specfed protecton class (e.g., IP 54). Table 3: General requrements Clmatc Requrements The followng table lsts the key tests and thresholds for clmatc requrements: IEC/EN Table 4: Clmatc tests Operatng temperature: C (test lmts: C) Storage temperature: C Dry heat and cold resstance tests: +70 C / -25 C, 96 h, power supply not connected Temperature change, resstance and mmunty test: -25 C / +70 C und 0 C / +55 C, power supply not connected Cyclc damp-heat wthstand tests: +25 C / +55 C, 95 % relatve humdty, power supply not connected Clmatc Requrements Page 14 of 386 HI E Rev. 4.01

15 Communcaton 2 Safety Mechancal Requrements The followng table lsts the key tests and thresholds for mechancal requrements: IEC/EN Mechancal tests Vbraton mmunty test: Hz / 3.5 mm ampltude Hz, 1 g, EUT n operaton, 10 cycles per axs Shock mmunty test: Table 5: Mechancal Tests 15 g, 11 ms, EUT n operaton, 3 shocks per axs and drecton (18 shocks) EMC Requrements Hgher nterference levels are requred for safety-related systems. HIMax systems meet these requrements n accordance wth IEC and IEC See column "Crteron FS (Functonal Safety). Test standards Interference mmunty tests Crteron FS IEC/EN ESD test: 6 kv contact, 8 kv ar dscharge 6 kv, 8 kv IEC/EN IEC/EN IEC/EN IEC/EN RFI test (10 V/m): 80 MHz...2 GHz, 80 % AM RFI test (3 V/m): 2 GHz...3 GHz, 80 % AM RFI test (20 V/m): 80 MHz...1 GHz, 80 % AM Burst test Power lnes: 2 kv and 4 kv Sgnal lnes: 2 kv Damped oscllatory wave test 2.5 kv L-,L+ / PE 1 kv L+ / L - Hgh frequency, asymmetrcal 10 V, 150 khz...80 MHz, 80 % AM 20 V, ISM frequences, 80 % AM V/m 4 kv 2 kv V - IEC/EN MHz pulses - IEC/EN Surge: Power lnes: 2 kv CM, 1 kv DM Sgnal lnes: 2 kv CM, 1 kv DM at AC I/O 2 kv / 1 kv 2 kv Table 6: IEC/EN EN Class A Table 7: Interference Immunty Tests Nose emsson tests Emsson test: radated, conducted Nose Emsson Tests HI E Rev Page 15 of 386

16 2 Safety Communcaton Power Supply The followng table lsts the key tests and thresholds for the devce's power supply: IEC/EN Table 8: Revew of the DC supply characterstcs Alternatvely, the power supply must comply wth the followng standards: IEC/EN or SELV (Safety Extra Low Voltage) or PELV (Protectve Extra Low Voltage) HIMax devces must be fuse protected as specfed n ths manual Voltage range test: 24 VDC, -20 % % (19.2 V V) Momentary external current nterrupton mmunty test: DC, PS 2: 10 ms Reversal of DC power supply polarty test: Refer to correspondng chapter of the system manual or data sheet of power supply. Backup duraton wthstand test: Test B, 1000 h Revew of the DC Supply Characterstcs ESD Protectve Measures Only personnel wth knowledge of ESD protectve measures may modfy or extend the system or replace a module. NOTE Electrostatc dscharge can damage the electronc components wthn the controllers! When performng the work, make sure that the workspace s free of statc, and wear an ESD wrst strap. If not used, ensure that the module s protected from electrostatc dscharge, e.g., by storng t n ts packagng. Only personnel wth knowledge of ESD protectve measures may modfy or extend the system wrng. Page 16 of 386 HI E Rev. 4.01

17 Communcaton 2 Safety 2.1 Resdual Rsk No mmnent danger results from a HIMax module tself. Resdual rsk may result from: Faults n the engneerng Faults n the user program Faults n the wrng 2.2 Safety Precautons Observe all local safety requrements and use the protectve equpment requred on ste. 2.3 Emergency Informaton A HIMax controller s a part of the safety equpment of a system. If the controller fals, the system adopts the safe state. In case of emergency, no acton that may prevent the HIMax systems from operatng safely s permtted. HI E Rev Page 17 of 386

18 3 Product Descrpton Communcaton 3 Product Descrpton The HIMax/HIMatrx systems can exchange process data wth one another and wth thrdparty systems va a data connecton. The protocols descrbed n ths manual are confgured n the SILworX programmng tool. To program HIMatrx systems n SILworX, the HIMatrx systems must be loaded wth operatng system versons beyond 7 for the CPU OS and beyond verson 12 for COM OS. A safeethernet connecton to HIMatrx systems wth prevous operatng system versons can be establshed va cross-project communcaton, see Chapter 4.8. HIMA s contnuously mprovng the operatng systems. The mproved versons can be loaded nto the module usng SILworX, see the System Manual (HI E). The followng two chapters (3.1 and 3.2) provde an overvew of the safety-related protocol safeethernet and the avalable standard protocols. 3.1 Safety-Related Protocol (safeethernet) All HIMax und HIMatrx systems can safely communcate n SIL 3 va Ethernet. The safeethernet protocol ensures safety-related communcaton. The safety-related safeethernet protocol s used to ensure that HIMax and HIMatrx controllers can safely exchange process data n an Ethernet network. For more on the safety-related protocol safeethernet, refer to Chapter 4. WARNING Manpulaton of safety-related data transfer! Physcal njury The operator s responsble for ensurng that the Ethernet used for safeethernet s suffcently protected aganst manpulatons (e.g., from hackers). The type and extent of the measures must be agreed upon together wth the responsble test authorty. Page 18 of 386 HI E Rev. 4.01

19 Communcaton 3 Product Descrpton 3.2 Standard Protocols Numerous proven standard protocols are avalable to ensure that feld devces and control systems are optmally ntegrated n the HIMax/HIMatrx systems. In ths scenaro, both Ethernet and feldbus protocols can be used. Many communcaton protocols only ensure a non-safety-related data transmsson. These protocols can only be used for the non-safety-related aspects of an automaton task. Element HIMax HIMatrx L3 HIMatrx L2 Descrpton Requred Module/controller Interfaces Maxmum number of standard protocols Process data volume for all standard protocols of a controller 1) Table 9: A maxmum of 20 communcaton modules per HIMax controller. Ethernet and feldbus nterfaces of the COM modules. 20 for each HIMax controller 6 1) for each COM module 128 kb send 128 kb receve Integrated communcaton module of the controller Ethernet nterfaces and feldbus nterfaces of the controller. Integrated communcaton module of the controller Ethernet nterfaces and feldbus nterfaces of the controller. Standard protocols are run on the communcaton module For further nformaton, refer to Table ) 4 1) Avalable standard protocols See Table kb send 64 kb receve 16 kb send 16 kb receve X-OPC server, SNTP clent and SNTP server are not ncluded n ths calculaton. Standard Protocols The maxmum process data volume of the controller must not be exceeded. If ths s the case, the controller confguraton s rejected durng the load process. WARNING Use of unsafe mport data Non-safe data must not be used for performng the safety functons of the user program. HI E Rev Page 19 of 386

20 3 Product Descrpton Communcaton The followng standard protocols are avalable: Protocol per HIMax module per HIMatrx Descrpton PROFINET IO Controller 1 - Chapter 5.5 PROFINET IO devce 1 - Chapter 5.8 PROFIBUS DP master 2 1, Chapter for F30, F35, F60 PROFIBUS DP slave 1 1 Chapter 6.13 Modbus master 1 1 Chapter 7.2 Modbus slave 1 1 Chapter 7.3 S&R TCP 1 1 Chapter 8 HIMA X-OPC Server 1) - - Chapter 10 ComUserTask 1 1 Chapter 12 1) The HIMA X-OPC server s nstalled on a host PC and s used as a transfer nterface for up to 255 HIMax/HIMatrx controllers and thrd-party systems that have an OPC nterface. Table 10: Avalable Standard Protocols A maxmum of 1280 TCP connectons per HIMax controller wth 20 COM modules. A maxmum of 64 TCP connectons per HIMatrx L3 controller or HIMax COM module. A maxmum of 32 TCP connectons per HIMatrx L2 controller. Maxmum number of actve protocols on one HIMatrx or one HIMax COM module A maxmum of 64 TCP sockets are avalable for each HIMatrx L3 or HIMax COM module. Example 1: Protocol Connectons 1 Modbus master TCP: 44 slave connectons 1 Modbus slave TCP: 20 master connectons Table 11: Protocols on one Communcaton Module Example 2: Protocol Connectons 1 PROFIBUS DP master 122 slave connectons 1 PROFIBUS DP slave 1 master connecton Table 12: Protocols on one Communcaton Module Page 20 of 386 HI E Rev. 4.01

21 Communcaton 3 Product Descrpton 3.3 Redundancy The HIMax system conceptual desgn s characterzed by hgh avalablty and also provdes redundancy for the purpose of communcaton. A communcaton connecton s redundant f two physcal transmsson paths exst and 2 HIMax modules are used to ths end. Redundant communcaton on HIMatrx s only ensured va safeethernet and one Ethernet nterface. Redundancy va safeethernet Redundancy s confgured n the safeethernet Edtor by selectng the Ethernet nterfaces for the two transmsson paths (see Chapter 4.2). Redundancy va standard protocols PROFIBUS DP master PROFIBUS DP slave PROFINET IO TCP S&R Modbus master Modbus slave Redundancy of the correspondng standard protocol must be confgured n the user program such that the user program montors the redundant transmsson paths and assgns the redundantly transmtted process data to the correspondng transmsson path. Redundancy for HIMax can be set n SILworX. HI E Rev Page 21 of 386

22 3 Product Descrpton Communcaton 3.4 Protocol Regstraton and Actvaton The protocols specfed below are avalable for the HIMax/HIMatrx systems and can be actvated as follows: An ndvdual software actvaton code s requred for each protocol on an X-COM. Excepton: One software actvaton code s suffcent for operatng 2 Modbus slaves on one X-COM. Protocol Interfaces Actvaton HIMA safeethernet Ethernet [1] SNTP server/clent Ethernet [1] HIMA X-OPC server (t runs on a the host PC) Ethernet [4] PROFINET IO controller 1) Ethernet [4] PROFINET IO devce 1) Ethernet [4] Modbus TCP master Ethernet [4] Modbus TCP slave Ethernet [4] TCP send/receve Ethernet [4] PROFIBUS DP master FB1 and FB2 [2] PROFIBUS DP slave FB1 or FB2 [2] Modbus master RS485 FB1 or FB2 [3] Modbus slave RS485 FB1 or FB2 [3] ComUserTask RS232, RS485, RS422, SSI FB1 or FB2 [3] 1) Not avalable for HIMatrx L2 Table 13: Protocols Avalable for the HIMax/HIMatrx Systems [1]. The functon s actvated by default n all HIMax/HIMatrx systems. [2]. The PROFIBUS master and PROFIBUS slave are actvated by nstallng one feldbus submodule. [3]. Addtonally, a software actvaton code must be purchased for the selected feldbus protocol used wth the RS485 feldbus submodule (Modbus RS485) and the submodules RS232, RS422 and SSI (ComUserTask). [4]. The software actvaton code can be generated on the HIMA webste usng the system ID (e.g., 60000) of the controller. Follow the nstructons provded on the HIMA webste at -> Products -> Regstraton -> Communcaton optons SILworX The software actvaton code s ntrnscally ted to ths system ID. One lcense can only be used one tme for a specfc system ID. For ths reason, only actvate the code when the system ID has been unquely defned. All Ethernet protocols can be tested wthout software actvaton code for 5000 operatng hours. Order the software actvaton code on tme! After these 5000 operatng hours, communcaton s contnued untl the controller s stopped. Afterwards, the user program cannot be started wthout a vald software actvaton code for the protocols used n the project (nvald confguraton). Page 22 of 386 HI E Rev. 4.01

23 Communcaton 3 Product Descrpton To enter the software actvaton code n SILworX 1. In the structure tree, select Confguraton, Resource, Lcense Management. 2. Rght-clck Lcense Management, and select New, Lcense Key from the context menu. A new lcense key s created. 3. Rght-clck Lcense Key and select Propertes from the context menu. 4. Enter the new software actvaton code n the Actvaton Code feld. 3.5 Ethernet Interfaces The Ethernet nterfaces of the HIMatrx modules and HIMatrx controllers are used to communcate wth external systems. Each ndvdual Ethernet nterface can smultaneously process multple protocols. Process data cannot be transferred over the Ethernet nterface of the HIMax X-SB 01 system bus module. The UP and DOWN Ethernet nterfaces are exclusvely ntended for nterconnectng HIMax base plates. If the system bus s operated n a network structure, the DIAG Ethernet nterface can also be used for connectng to a HIMax base plate. Refer to the System Manual (HI E)! Ethernet Interfaces Propertes Property HIMax CPU module HIMax COM module HIMatrx Ports 4 4 4, 2 for F20 and remote I/Os Transfer standard 10/100/1000 Base-T, half and full duplex 10/100 Base-T, Half and full duplex 10/100 Base-T 1000 Base-T (L3 only) Half and full duplex Auto negotaton Yes Yes Yes Auto crossover Yes Yes Yes Connecton Socket RJ45 RJ45 RJ45 IP Address Freely confgurable 1) Freely confgurable 1) Freely confgurable 1) Subnet Mask Freely confgurable 1) Freely confgurable 1) Freely confgurable 1) Supported Protocols safeethernet Programmng and debuggng tool (PADT), SNTP safeethernet Standard Protocols 1) The general rules for assgnng IP address and subnet masks must be adhered to. Table 14: Ethernet Interfaces Propertes safeethernet Standard Protocols Programmng and debuggng tool (PADT), SNTP Each HIMax COM and CPU module and each HIMatrx controller has an Ethernet swtch wth a free-confgurable 1) IP address. To transfer data, the Ethernet swtch establshes a targeted connecton between two communcaton partners. Ths prevents collsons and reduces the load on the network. For targeted data forwardng, a MAC/IP address assgnment table (ARP cache) s generated n whch the MAC addresses are assgned to specfc IP addresses. From now on, data packets are only forwarded to the IP addresses specfed n the ARP cache. HI E Rev Page 23 of 386

24 3 Product Descrpton Communcaton Replacement of one HIMax processor or communcaton module or a HIMatrx controller wth dentcal IP address. If a devce has ts ARP Agng Tme set to 5 mnutes and ts MAC Learnng set to Conservatve, ts communcaton partner does not adopt the new MAC address untl a perod of 5 to 10 mnutes after the module s replaced. Untl the new MAC address has been adopted, no communcaton s possble usng the replaced devce. In addton to the confgurable ARP Agng tme, the user must wat at least the nonconfgurable MAC Agng tme of the swtch (approx. 10 seconds) before the replaced devce s able to communcate agan. Page 24 of 386 HI E Rev. 4.01

25 Communcaton 3 Product Descrpton Confgurng the Ethernet Interfaces The Ethernet nterfaces are confgured n the Detal Vew of the CPU or COM module. For HIMax/HIMatrx controllers, the Speed Mode and Flow Control Mode parameters are set per default to Autoneg. Communcaton loss! Wth an napproprate Ethernet parameters settng, the devce mght no longer be reachable. If ths s the case, reset the module! To open the Detal Vew of the communcaton module 1. In the structure tree, open Confguraton, Resource, Hardware. 2. Rght-clck Hardware, and then clck Edt to open the Hardware Edtor. 3. Rght-clck Communcaton Module, and then clck Detal Vew. The Detal Vew opens. The parameters set n the propertes of the COM or the CPU modules are not avalable for the HIMax/HIMatrx system communcaton, untl they have been re-compled wth the user program and transferred to the controller. HI E Rev Page 25 of 386

26 3 Product Descrpton Communcaton Module Element Name Use Max CPU Load for HH Protocol Max. CPU Load for HH Protocol [%] IP Address Subnet Mask Speed Mode Flow Control Mode Standard nterface Default Gateway Actvate Extended Settngs ARP Agng Tme [s] Descrpton Name of the communcaton module. Actvated: Use CPU load lmt from the Max. CPU Load [%] feld. Deactvated: Do not use the CPU Load lmt for safeethernet. Maxmum CPU load of module that can be used for processng the safeethernet protocols. The maxmum load must be dstrbuted among all the mplemented protocols that use ths communcaton module. IP address of the Ethernet nterface. 32 bt address mask to splt up the IP address n network and host address. Only the Autoneg settng s permtted! Wth other settngs, the module adopts the STOP state. Actvated: the nterface s used as standard nterface for the system logn. IP address of the default gateway. Use the ARP Agng Tme [s], MAC Learnng and IP Forwardng parameters. A processor or COM module stores the MAC addresses of the communcaton partners n a MAC/IP address assgnment table (ARP cache). If n a perod of 1 to 2 tme ARP Agng Tme messages of the communcaton are receved, the MAC address remans stored n the ARP cache no messages of the communcaton partner are receved, the MAC address s erased from the ARP cache. The typcal value for the ARP Agng Tme n a local network ranges from s. The user cannot read the contents of the ARP cache. If routers or gateways are used, the user must adjust (ncrease) the ARP Agng Tme due to the addtonal tme requred for twoway transmsson. If the ARP Agng Tme s too low, the processor or the COM module deletes the MAC address of the communcaton partner from the ARP cache and the communcaton s ether delayed or breaks down entrely. For an effcent performance, the ARP agng tme value must be less than the receve tmeout set for the protocols n use. Range of values: s Default value: 60 s Page 26 of 386 HI E Rev. 4.01

27 Communcaton 3 Product Descrpton MAC Learnng MAC Learnng and ARP Agng Tme are used to set how quck the Ethernet swtch should learn the MAC address. The followng settngs can be confgured: Conservatve (recommended): If the ARP cache already contans MAC addresses of communcaton partners, these are locked and cannot be replaced by other MAC addresses for at least one ARP Agng Tme and a maxmum of two ARP Agng Tme perods. Ths ensures that data packets cannot be ntentonally or unntentonally forwarded to external network partcpants (ARP spoofng). Tolerant: When a message s receved, the IP address contaned n the message s compared to the data n the ARP cache and the MAC address stored n the ARP cache s mmedately overwrtten wth the MAC address from the message. Use the Tolerant settng f the avalablty of communcaton s more mportant than the authorzed access to the controller. IP Forwardng Allow a processor or COM module to operate as router and to forward data packets to other network nodes. Actvated: Forwardng s enabled. Deactvated: Forwardng s dsabled. ICMP Mode The Internet Control Message Protocol (ICMP) allows the hgher protocol layers to detect error states on the network layer and optmze the transmsson of data packets. Message types of Internet Control Message Protocol (ICMP) supported by the processor module: No ICMP Responses All the ICMP commands are deactvated. Ths ensures a hgh degree of safety aganst potental sabotage that mght occur over the network. Echo Response If Echo Response s actvated, the node responds to a png command. It s thus possble to determne f a node can be reached. Safety s stll hgh. Host Unreachable Not mportant for the user. Only used for testng at the manufacturer's faclty. All Implemented ICMP Responses All ICMP commands are actvated. Ths allows a more detaled dagnoss of network malfunctons. Table 15: Confguraton Parameters HI E Rev Page 27 of 386

28 3 Product Descrpton Communcaton Routngs Element Name IP Address Subnet Mask Gateway Descrpton Denomnaton of the routng settngs Target IP address of the communcaton partner (wth drect host routng) or network address (wth subnet routng). Range of values: Default value: Defne the target address range for a routng entry (wth drect host routng) or subnet mask of the addressed subnet. Range of values: Default value: IP address of the gateway to the addressed network. Range of values: Default value: Table 16: Routng Parameters Ethernet Swtch Element Descrpton Port Port number as prnted on the housng; per port, only one confguraton may exst. Range of values: Speed 10 Mbt/s: Data rate 10 Mbt/s [Mbt/s] 100 Mbt/s: Data rate 100 Mbt/s 1000 Mbt/s: Data rate 1000 Mbt/s (processor module) Autoneg (10/100/1000): Automatc baud rate settng Default value: Autoneg Flow Control Autoneg also wth Fxed Values Lmt Full duplex: Smultaneous communcaton n both drectons Half duplex: Communcaton n one drecton Autoneg: Automatc communcaton control Default value: Autoneg The "Advertsng" functon (forwardng the speed and flow control propertes) s also performed f the parameters Speed and Flow Control have fxed values. Ths allows other devces wth ports set to Autoneg to recognze the HIMax port settngs. Lmt the nbound multcast and/or broadcast packets.off Off: No lmtaton Broadcast: Lmt broadcast packets (128 kbt/s) Multcast and Broadcast: Lmt multcast and broadcast packets (1024 kbt/s) Default value: Broadcast Table 17: Ethernet Swtch Parameters Page 28 of 386 HI E Rev. 4.01

29 Communcaton 3 Product Descrpton VLAN (Port-Based VLAN) Functon s not avalable for HIMatrx controller. For confgurng the use of port-based VLAN. Should VLAN be supported, port-based VLAN should be off to enable each port to communcate wth the other swtch ports. For each swtch port, the user can defne whch swtch other port receved Ethernet frames may be sent to. The table n the VLAN tab contans entres through whch the connecton between two ports can be set as actve or nactve. Eth1 Eth2 Eth3 Eth4 Eth1 Eth2 Actve Eth3 Actve Actve Eth4 Actve Actve Actve COM Actve Actve Actve Actve Table 18: VLAN Tab Default settng: All connecton between ports actve LLDP Functon s not avalable for HIMatrx controller. LLDP (Lnk Layer Dscovery Protocol) allows the use of the own devce to send nformaton (such as MAC address, devce name, port number) per multcast n perodc ntervals and to receve the same nformaton from the devces closed-by. LLDP uses the followng values dependng on whether Profnet s confgured on the communcaton module. Profnet on the COM ChasssID TTL (Tme to Lve) module Used Devce name 20 s Not used MAC address 120 s Table 19: Values for LLDP The processor and communcaton modules support LLDP on the Eth1, Eth2, Eth3 and Eth4 ports The followng parameters defne how a gven port should work: Off LLDP s dsabled on ths port Send LLDP sends LLDP Ethernet frames, receved LLDP Ethernet frames are deleted wthout beng processed. Receve Send/Receve Default settng: Send/Receve LLDP sends no LLDP Ethernet frames, but receved LLDP Ethernet frames are processed. LLDP sends and processes receved LLDP Ethernet frames. HI E Rev Page 29 of 386

30 3 Product Descrpton Communcaton Mrrorng Functon s not avalable for HIMatrx controller. Mrrorng s used to confgure whether the module should duplcate Ethernet packets on a gven port such that they can be read from a devce connected to that port, e.g., for test purposes. The followng parameters defne how a gven port should work: Off Egress: Ingress: Ingress/Egress: Dest Port: Ths port does not partcpate n mrrorng. Outgong data of ths port are duplcated. Incomng data of ths port are duplcated. Incomng and outgong data of ths port are duplcated. Ths port s used to send duplcated data. Default settng: OFF Network Ports Used for Ethernet Communcaton UDP Ports / Use 123 SNTP (tme synchronzaton between PES and remote I/O, PES and external devces) 502 Modbus salve (can be modfed by the user) 6010 safeethernet and OPC 8001 PES used to confgure the remote I/Os 8000 Programmng and operaton wth SILworX Profnet endpont mapper (requred for establshng the connecton) Profnet RPC server Profnet RPC clent TCP Ports / Use 502 Modbus salve (can be modfed by the user) Xxx TCP SR assgned by the user All ports lsted above are destnaton ports. The source ports of the communcaton modules are varable and cannot be affected. The ComUserTask can use any port f t s not already used by another protocol. Page 30 of 386 HI E Rev. 4.01

31 Communcaton 3 Product Descrpton 3.6 Feldbus Interfaces The feldbus submodules allow communcaton va the feldbus nterfaces of the HIMax X-COM 01 as well as the HIMatrx controllers F20, F30, F35 and the F60 CPU 01. The feldbus submodules are optonal and must be mounted by the manufacturer. No safety-related communcaton can be ensured wth feldbus nterfaces. The followng table provdes an overvew of the avalable feldbus submodules: Desgnaton PROFIBUS master PROFIBUS slave RS485 module RS232 module RS422 module INTERBUS master 1) SSI module 1) Descrpton Feldbus submodule PROFIBUS DP master Feldbus submodule PROFIBUS DP slave RS485 feldbus submodule for Modbus (master or slave) or ComUserTask RS232 feldbus submodule for ComUserTask RS422 feldbus submodule for ComUserTask Feldbus submodule for INTERBUS master SSI feldbus submodule for ComUserTask Only for HIMatrx wth operatng systems before CPU OS V7 and COM OS V12 INTERBUS communcaton s only supported n ELOP II Factory. Table 20: Avalable Feldbus Submodules Installaton The feldbus submodules are optonal and must be mounted by the manufacturer. The defnton s made wth the order by the part number. Addtonally, the protocols used must be actvated. CAUTION Improper openng of the COM module oder HIMatrx Damage to COM module or HIMatrx Only HIMA s authorzed to retroft the feldbus submodules Part Number Structure The followng sectons present how the part number for the HIMax X-COM 01 or a HIMatrx controller changes f feldbus nterfaces are used. Numbers are allocated to the feldbus to create the part numbers, see Table 21. Optons for FB1 Descrpton and FB2 0 No feldbus submodule nserted 1 RS485 for Modbus (master or slave) or ComUserTask 2 PROFIBUS DP master 3 PROFIBUS DP slave 4 INTERBUS master (only wth HIMatrx n ELOP II Factory) 5 RS232 for ComUserTask 6 RS422 for ComUserTask 7 SSI for ComUserTask Table 21: Optons for Feldbus Interfaces FB1 and FB2 HI E Rev Page 31 of 386

32 3 Product Descrpton Communcaton HIMax COM Module Part Number The COM module forms a functonal unt wth the X-CB connector board. Note that the connector board must be separately purchased. When the module s equpped wth one or multple feldbus submodules, the part number and also the module name changes from X-COM 01 to X-COM 010 XY. The followng table specfes the avalable components: Desgnaton X-COM 01 X-COM 010 XY 1) X-CB ) Descrpton Communcaton module wthout feldbus submodules Communcaton module wth feldbus submodule Connector board X: Opton for feldbus nterface FB1 accordng to Table 21 Y: Opton for feldbus nterface FB2 accordng to Table 21 Table 22: Avalable HIMax Components The followng table shows examples for part numbers and names: Part no. Desgnaton Feldbus submodule 1 (FB1) X-COM PROFIBUS master (max. 12 Mbt) X-COM PROFIBUS master (max. 12 Mbt) X-COM RS485 RS X-COM Table 23: Examples of COM Module Part Numbers and Names Feldbus submodule 2 (FB2) RS485 PROFIBUS slave (max. 1.5 Mbt) HIMA recommends operatng the PROFIBUS DP usng the FB1 feldbus nterface (maxmum transfer rate 12 Mbt). The maxmum transfer rate permtted for the FB2 feldbus nterface s 1.5 Mbt. The desgnaton and part number (part no.) are prnted on the type label of the module. For further nformaton, refer to the SILworX Communcaton Manual (HI E) HIMatrx Controller Part Number The HIMatrx controllers can be equpped wth feldbus submodules n accordance wth the followng table: Controller FB1 FB2 FB3 F20 Free confgurable Integrated RS F30 Free confgurable Free confgurable Integrated RS485 F35 Free confgurable Free confgurable Integrated RS485 F60 Free confgurable Free confgurable --- Table 24: Equpment of HIMatrx Controller wth Feldbus Submodules Wth the selecton of the approprate feldbus submodule the part number changes: Page 32 of 386 HI E Rev. 4.01

33 Communcaton 3 Product Descrpton 98 22xy... X: Opton for feldbus nterface FB1 accordng to Table 21 Y: Opton for feldbus nterface FB2 accordng to Table 21 The followng table shows examples for part numbers: Part no. Controller FB1 FB F20 01 RS F30 01 PROFIBUS Slave PROFIBUS Master F30 01 SILworX PROFIBUS Slave PROFIBUS Master F35 01 INTERBUS Master PROFIBUS Master F35 03 SILworX PROFIBUS Slave PROFIBUS Master F60 CPU 01 RS485 PROFIBUS Master F60 CPU 01 SILworX RS485 PROFIBUS Master F60 CPU 03 SILworX RS485 PROFIBUS Master Table 25: Examples of HIMatrx Controller Part Numbers Regstraton and Actvaton Dependng on the feldbus submodule, the communcaton optons can be actvated, see Chapter Pn Assgnment of the D-sub Connectors The followng tables descrbe the pn assgnments of the feldbus nterfaces n accordance wth the nstalled feldbus submodule RS485 Feldbus Submodule for Modbus Master, Slave or ComUserTask Connecton Sgnal Functon RP 5 V decoupled wth dodes 3 RxD/TxD-A Receve/send data A 4 CNTR-A Control sgnal A 5 DGND Data reference potental 6 VP 5 V, plus pole supply voltage RxD/TxD-B Receve/send data B 9 CNTR-B Control sgnal B Table 26: Pn Assgnment of D-Sub Connectors for RS485 HI E Rev Page 33 of 386

34 3 Product Descrpton Communcaton Feldbus submodule PROFIBUS DP Master or Slave Connecton Sgnal Functon RxD/TxD-A Receve/send data A 4 RTS Control sgnal 5 DGND Data reference potental 6 VP 5 V, plus pole supply voltage RxD/TxD-B Receve/send data B Table 27: Pn Assgnment of D-sub Connectors for PROFIBUS DP Feldbus Submodule for INTERBUS INTERBUS s only for HIMatrx wth operatng systems before CPU OS V7 and COM OS V12. Is only supported n programmng tool ELOP II Factory. Connecton Sgnal Functon 1 DO Postve data output 2 DI Postve data nput 3 COM Common 0 V lne DO- Negatve data nput 7 DI- Negatve data output Table 28: Pn Assgnment of the D-Sub Connectors for INTERBUS RS232 Feldbus Submodule for ComUserTask Connecton Sgnal Functon TxD Send data 3 RxD Receve data DGND Data reference potental RTS Request to send Table 29: Pn Assgnment of D-Sub Connectors for RS232 Page 34 of 386 HI E Rev. 4.01

35 Communcaton 3 Product Descrpton RS422 Feldbus Submodule for ComUserTask Connecton Sgnal Functon RP +5 V decoupled wth dodes 3 RxA Receve data A 4 TxA Send data A 5 DGND Data reference potental 6 VP +5 V supply voltage RxB Receve data B 9 TxB Send data B Table 30: Pn Assgnment of D-Sub Connectors for RS Feldbus Submodule for SSI Connecton Sgnal Functon 1 D2+ Data nput channel 2+ 2 D1- Data nput channel 1-3 CL2+/D3+ Clock output channel 2+ or data nput channel 3 4 CL1+ Clock output channel 1+ 5 GND Ground 6 D1+ Data nput channel 1+ 7 D2- Data nput channel 2-8 CL2-/D3- Clock output channel 2- or data nput channel 3 9 CL1- Clock output channel 1- Table 31: Pn Assgnment of D-Sub Connectors for SSI HI E Rev Page 35 of 386

36 4 safeethernet Communcaton 4 safeethernet All HIMax/HIMatrx systems are safeethernet capable. They can safely communcate n SIL 3 va Ethernet (HIMax 1 Gbt/s, HIMatrx 100 Mbt/s) The correspondng Ethernet nterfaces of the HIMax/HIMatrx controllers can be also used for other protocols. Varous Ethernet network topologes can be used to ensure safeethernet communcaton between controllers. To mprove the data transfer speed and effcency, talor the safeethernet protocol parameters to the Ethernet network n use. These parameters can be set usng so-called network profles. The factory parameter settngs ensure communcaton even f the user s not thoroughly famlarzed wth the network confguraton. The safeethernet protocol s safety-related and certfed by the TÜV up to SIL 3 n accordance wth IEC Equpment and System Requrements: HIMA controller Actvaton HIMax wth processor module HIMatrx L2/ L3 Ths functon s actvated by default n all HIMax/HIMatrx systems. safeethernet (Propertes): Element HIMax HIMatrx L3 HIMatrx L2 Descrpton Requred Module/controller Ethernet nterfaces: per HIMax A maxmum of 4 processor modules Processor module 1 GBt/s COM module 100 Mbt/s Integrated processor module of the controller Integrated processor module of the controller safeethernet s run on the safety-related processor module. 100 Mbt/s 100 Mbt/s The Ethernet nterfaces n use can smultaneously be used for addtonal protocols. Connectons: per HIMax safeethernet connectons Redundant Connectons: per HIMax Remote I/O: n. a Two-channel operaton Redundant safeethernet connectons between HIMax and HIMatrx controllers can be confgured n the safeethernet Edtor. Redundant transmsson paths Process data volume per connecton n. a. non-applcable Each va 2 separated modules Restrcton due to only one devce Restrcton due to only one devce Redundant safeethernet transmsson paths 1100 bytes 1100 bytes 900 bytes For each safeethernet connecton Table 32: Safety-Related Protocol (safeethernet) Page 36 of 386 HI E Rev. 4.01

37 Communcaton 4 safeethernet Cross-project communcaton! safeethernet connectons to a resource n another project or a HIMatrx controller wth CPU operatng system verson pror to 7 and COM operatng system verson pror to 12 can be confgured n SILworX, see Chapter What s safeethernet? Requrements as determnsm, relablty, nterchangeablty, extendblty and above all safety, are central ssues wthn the process and automaton technology. safeethernet s a transfer protocol for transmttng safety-related data up to SIL 3 when Ethernet technology s used. safeethernet mplements mechansm that can detect and safely react to the followng faults: Corruptons of the transmtted data (duplcated, lost and changed bts) Wrong message addressng (transmtter, recever) Wrong data sequence (repetton, loss, exchange) Wrong tmng (delay, echo) safeethernet s based on the IEEE standard. The standard Ethernet protocol frame s used to transmt safety-related data. safeethernet uses unsafe data transfer channels (Ethernet) n accordance wth the black channel approach and montors them on the transmtter and recever sde by usng safetyrelated protocol mechansm. Ths allows the users to use normal Ethernet network components such as hubs, swtches, routers wthn a safety-related network. safeethernet uses the abltes of standard Ethernet so that securty and real tme ablty are made possble. A specal protocol mechansm ensures a determnstc behavor even f faults occur or new communcaton partcpants jon the network. The system automatcally ntegrates new components n the runnng system. All network components can be replaced durng operaton. Transmsson tmes can be clearly defned usng swtches. Ethernet s thus real-tme capable. The possble transfer speed of up to 1 Gbt/s for safety-related data s hgher than the speed normally used. Transmsson meda such as copper lnes and fber optc cables can be used. safeethernet allows both connectons to the company Intranet and to the Internet. Therefore, just one network s requred for both safety-related and non-safety-related data transmsson. The network may be shared wth other partcpants f suffcent transfer capacty s avalable. HI E Rev Page 37 of 386

38 4 safeethernet Communcaton DANGER Manpulaton of safety-related data transfer! Physcal njury possble! The operator s responsble for ensurng that the Ethernet used for safeethernet s suffcently protected aganst manpulatons (e.g., from hackers). The type and extent of the measures must be agreed upon together wth the responsble test authorty. safeethernet allows the user to create flexble system structures for decentralze automaton wth defned reacton tmes. Dependng on the requrements, the ntellgence can be dstrbuted to the network partcpants n a centralzed or decentralzed manner. Fgure 1: System Structures Page 38 of 386 HI E Rev. 4.01

39 Communcaton 4 safeethernet Unntentonal transton to the safe state possble! Ensure that no network loops result from nterconnectng the controllers. Data packets may only travel to a controller over a sngle path. HI E Rev Page 39 of 386

40 4 safeethernet Communcaton 4.2 Confgurng a Redundant safeethernet Connecton Ths example shows how to confgure a redundant HIMax/HIMax safeethernet connecton. Fgure 2: Structure for Confgurng a Redundant Connecton For redundant safeethernet connectons, HIMA recommends usng two separate communcaton modules to mplement the two transmsson paths (channel 1 and channel 2). When dong so, the bandwdth and the delay on the respectve transmsson paths must be nearly dentcal. Establshng the safeethernet Connecton In the safeethernet Edtor, create a safeethernet connecton between the locale and the target resource. Fgure 3: Resource Structure Tree To open the safeethernet Edtor of the local resource 1. In the structure tree, open Confguraton, Resource. 2. Rght-clck safeethernet and select Edt from the context menu. The target resources are located n the Object Panel. To create the safeethernet connecton to the target resource 1. In the Object Panel, drag the target resource anywhere n the workspace of the safeethernet Edtor. The recprocal communcaton path s automatcally added n the safeethernet Edtor of the target resource. Page 40 of 386 HI E Rev. 4.01

41 Communcaton 4 safeethernet To confgure the safeethernet connecton 1. Select Ethernet Interfaces Channel 1 for the local and target resource. 2. Select Ethernet Interfaces Channel 2 for the local and target resource. 3. Select the Network Profle for the safeethernet connecton (e.g., Fast&Nosy).. 4. Calculate and enter Receve Tmeout and Response Tme (see Chapter 4.6). Fgure 4: Parameter Values for a Redundant safeethernet Connecton: Connectng Process Varables To open the detal vew of a safeethernet connecton Requrement: The safeethernet Edtor of the local resource s open. 1. Rght-clck the Target Resource to open the context menu. 2. Select Detal Vew. 3. Select the Resource (target)<->resource (local) tab. Fgure 5: Detal Vew n the safeethernet Edtor Only global varables from the confguraton context may be used, and not from the resource context! To add safeethernet send varables Send varables are sent from the local to the target resource. 1. Select the Resource (local)->resource (target) area. 2. In the Object Panel, select a Global Varable and drag t onto the Resource (target)- >Resource (local) column. 3. Repeat these steps for every further safeethernet send varables. HI E Rev Page 41 of 386

42 4 safeethernet Communcaton To add safeethernet receve varables Receve varables are receved by the local resource. 1. Select the Resource (target)->resource (local) area. 2. In the Object Panel, select a Global Varable and drag t onto the Resource (target)<- Resource (local) column. 3. Repeat these steps for every further safeethernet receve varables. To verfy the safeethernet connecton 1. In the structure tree, open Confguraton, Resource, safeethernet. 2. Clck the Verfcaton button on Acton Bar, and then clck OK to confrm the acton. 3. Thoroughly verfy the messages dsplayed n the logbook and correct potental errors. The confguraton of the safeethernet connecton must be recompled wth the user program of the local and target resources and transferred to the controllers. The new confguraton can only be used for communcatng wth the HIMax system upon completon of ths step Verfyng safeethernet Communcaton In the Control Panel, reset the Wrong Messages and Resends values to zero. 1. Use the system under the maxmum load: - All communcaton protocols are operatng (safeethernet and standard protocols). - Remove and re-nsert the processor module such as descrbed n Chapter Perform a reload to load the user program (the safeethernet cannot be modfed by performng a reload). To verfy that the redundant safeethernet connecton was establshed properly, dsconnect and reconnect one redundant connecton and then repeat ths test for the other connecton. Durng ths test, no faults must occur n the safeethernet communcaton. 2. In the Control Panels of the two controllers, verfy the Wrong Messages and Resends values. If the counter for Bad Messages and Resends = 0, then the safeethernet settngs are OK. 0, the safeethernet settngs must be rechecked. - Recalculate the Receve Tmeout usng the maxmum cycle tme, see Chapters and Vary the Response Tme such as descrbed n Chapter Addtonal causes for bad messages and resends! Verfy the correct network desgn (e.g., lnes, swtches, PCs). If the Ethernet network s not exclusvely used for safeethernet, also verfy the network load (probable data collsons). Page 42 of 386 HI E Rev. 4.01

43 Communcaton 4 safeethernet 4.3 safeethernet Edtor The safeethernet Edtor s used to create and confgure the safeethernet connectons to the communcaton partners (resources). To open the safeethernet Edtor of the local resource 1. In the structure tree, open Confguraton, Resource. 2. Rght-clck safeethernet and select Edt from the context menu. The safeethernet Edtor ncludes the workspace and the Object Panel The safeethernet Edtor s used to create and confgure the safeethernet connectons to the communcaton partners (resources). To do ths, drag the resource from the Object Panel onto the workspace. Set the followng safeethernet protocol parameters to confgure the safeethernet connecton: Parameter Partner IF CH... Profle Response Tme [ms] Receve Tmeout [ms] Resend Tmeout [ms] Acknowledge Tmeout [ms] Prod. Rate Queue Descrpton Resource name of the lnk partner Ethernet nterfaces avalable on the (local) and (target) resource, see also Chapter 3.5. Combnaton of matchng safeethernet parameters, see also Chapter Tme untl the message acknowledgment s receved by the sender, see also Chapter Montorng tme of PES 1 wthn whch a correct response from PES 2 must be receved, see also Chapter Montorng tme of PES1 wthn whch PES2 must have acknowledged the recepton of a data packet, otherwse the data packet s resent, see also Chapter Tme perod wthn whch the CPU must acknowledge the recepton of a data packet, see also Chapter Producton rate: Mnmum tme nterval between two data packets, see also Chapter Number of data packets that can be sent wthout acknowledgment, see also Chapter HI E Rev Page 43 of 386

44 4 safeethernet Communcaton Freeze Values on Lost Connecton [ms] Behavor of the nput varables for ths safeethernet connecton f the connecton s nterrupted. Use ntal The ntal data are used for the nput varables. values Not lmted The nput varables are freezed to the current value and used untl a new connecton s establshed. Lmted Input: Double-clck the drop-down feld and enter the tme value. The nput varables are freezed to the current value and used untl the confgured tmeout. Afterwards. the ntal data are used for the nput varables. The tmeout can be delayed up to one CPU cycle. CAUTION The Use Intal Data settng may only be used for safety-related functons mplemented va safeethernet. Fragments per Cycle Prorty of Events Prorty of State Values Number of Ignored Warnngs Warnngs Perod [ms] Enable SOE Table 33: safeethernet Protocol Parameters Fxed settng: One fragment per controller cycle s transferred to the communcaton partner. A HIMax fragment s a fragment of 1100 bytes. A HIMatrx fragment s a fragment of 900 bytes. The functon s only actvated for the connecton to the X-OPC server. Ths s done to defne the prorty wth whch the X-OPC server requres events from the controller. Fragments wth the prorty n and fragments wth the prorty m are sent at a rato of n to m tmes. The functon s only actvated for the connecton to the X-OPC server. Ths s done to defne the prorty wth whch the X-OPC server requres state values from the controller. Fragments wth the prorty n and fragments wth the prorty m are sent at a rato of n to m tmes. The number of warnngs that must occur n sequence wthn the Warnng Perod [ms] before the warnngs are recorded n the dagnoss or communcaton fault statstc. 0 ms s the only value currently permtted. Default value: Deactvated Object Panel The Object Panel contans all the project resources wth whch the current resource can be connected va safeethernet. An export functon s avalable to establsh safeethernet connectons to resources outsde the project or to a HIMatrx controller (planned n ELOP II Factory) (see Chapter 4.8). Page 44 of 386 HI E Rev. 4.01

45 Communcaton 4 safeethernet 4.4 Detal Vew of the safeethernet Edtor The Detal Vew has always a reference to the local resource for whch the safeethernet Edtor was started. To open the Detal Vew of a safeethernet connecton 1. Rght-clck the safeethernet connecton to open the context menu. 2. Clck Detal Vew. The Detal Vew contans the tabs System Varables, Fragment Defntons and Resource (local)<->resource (target) Tab: System Varables System varables are used to control the safeethernet connecton n the user program and evaluate ts status. System varable Ack. Frame No. Number of bad messages Number of bad messages for the redundant channel Number of successful connectons Number of lost messages Number of lost messages for the redundant channel Early Queue Usage Descrpton Recepton Counter (rotaton) Number of all the bad messages per channel (nvald CRC, nvald header, other faults) Number of successful connectons snce statstcs reset. Number of messages dropped out on one of the two transmsson paths snce statstcs reset. The counter only contnues to run untl a channel completely fals. Number of messages stored n Early Queue snce statstcal reset, see also Chapter Number of rejected messages snce statstcs reset. Sent counter (revolvng). Bad messages Frame No. Channel state Current state of Channel 1. The channel state s the current state of channel 1 to the tme (Seq. no X-1) when a message wth Seq. no. X s receved. Layout Verson Last channel latency Last latency of the red. channel Max. channel latency Max. latency of the red. channel Mn. channel latency Mn. latency of the red. channel Average channel latency Status Descrpton 0 No message on the state of Channel 1. 1 Channel 1 OK. 2 The last message was wrong, the current one s OK. 3 Fault on Channel 1. Sgnature of the data layout used wthn communcaton. The channel latency specfes the delay between two redundant transmsson paths to the recepton tme of messages wth dentcal Seq. no. A statstc s kept specfyng the average, mnmum, maxmum and last latency. If the mnmum value s greater that the maxmum value, the statstc values are nvald. The last channel latency and the average channel latency are then 0. HI E Rev Page 45 of 386

46 4 safeethernet Communcaton Average latency of the red. channel Monotony New Layout Verson Qualty of Channel 1 Qualty of Channel 2 Receve Tmeout Response Tme Reset safeethernet statstcs User data send counter (revolvng). Sgnature of the new data layout. State of the man transmsson path. Bt no. Bt = 0 Bt = 1 0 Transmsson path Transmsson path not actvated actvated 1 Transmsson path Transmsson path not used actvely used 2 Transmsson path Transmsson path not connected connected 3 - Transmsson path frst provdes message 4-7 Reserved Reserved State of the redundant transmsson path, see state of Channel 1 (man transmsson path). Tme n mllseconds (ms) of PES1 wthn whch PES2 must receve a vald response. See also Chapter Tme n mllseconds (ms) untl the acknowledgment of a message s receved by the sender, see also Chapter Reset the statstcal values for the communcaton connecton n the user program (e.g., Number of Bad Messages, Channel State, Tmestamp for the Last Fault on the Red. Channel [s], Resends). Value Functon 0 No reset Reset safeethernet statstcs Transmsson Control Ch1 Transmsson control of channel 1 Bt 0 Functon FALSE Transmsson path actvated TRUE Transmsson path locked Bt 1 Functon FALSE Transmsson path actvated for tests TRUE Transmsson path locked Bts reserved. Transmsson Control Ch2 Transmsson control of channel 2, see Transmsson control of channel 1. Page 46 of 386 HI E Rev. 4.01

47 Communcaton 4 safeethernet Connecton connecton Connecton State Repeats Tmestamp for the last fault on the red. channel [ms] Tmestamp for the last fault on the red. channel [s] Tmestamp for the last fault [ms] Tmestamp for the last fault [s] Use ths system varable to control the safeethernet connecton from wthn the user program. Command Descrpton Autoconnect (0x0000) Toggle Mode 0 (0x0100) Toggle Mode 1 (0x0101) Dsabled (0x8000) Default value: After a safeethernet communcaton loss, the controller attempts to re-establsh the connecton n the followng CPU cycle. After a communcaton loss, the connecton can be reestablshed performng a program-controlled change of the toggle mode. TOGGLE MODE_0 (0x100) set: Set to TOGGLE MODE 1 (0x101) to re-establsh the connecton. TOGGLE MODE_1 (0x101) set: Set to TOGGLE MODE 0 (0x100) to reestablsh the connecton. safeethernet communcaton s dsabled. Connecton State s used to evaluate the communcaton status between two controllers from wthn the user program. Status/Value Descrpton Closed (0) The connecton s closed and no attempt s made to open t. Try_open (1) An attempt s made to open the connecton, but t s stll closed. Ths state apples for both the actve and the passve sdes. Connected (2) The connecton s establshed and functonng (actve tme montorng and data exchange) Number of reconnectons snce statstcs reset [UDINT]. Mllsecond fracton of the tmestamp (current system tme) Second fracton of the tmestamp (current system tme) Mllsecond fracton of the tmestamp (current system tme) Second fracton of the tmestamp (current system tme) HI E Rev Page 47 of 386

48 4 safeethernet Communcaton State of the red. channel Current state of Channel 2. The channel state s the current state of channel 2 to the tme (Seq. no X-1) when a message wth Seq. no. X s receved. Status Descrpton 0 No message on the state of channel 2 1 Channel 2 OK. 2 The last message was wrong, the current one s OK. 3 Fault on Channel 2. Table 34: System Varables Tab n the safeethernet Edtor Tab: Fragment Defntons See Chapter Possble safeethernet Connectons A safeethernet connecton between two HIMax controllers can be confgured as mono or redundant. The Ethernet nterfaces avalable for a safeethernet connecton are always dsplayed related to the resource (local) for whch the safeethernet Edtor was opened. All Ethernet nterfaces avalable for a controller are showed n the drop-down menu for the IF CH... parameter. Element IF CH1 (local) IF CH2 (local) IF CH1 (target) IF CH2 (target) Descrpton Ethernet nterface (channel 1) of the resource Ethernet nterface (channel 2) of the resource Ethernet nterface (channel 1) of the lnk partner Ethernet nterface (channel 2) of the lnk partner Table 35: Avalable Ethernet Interfaces Mono safeethernet Connecton (Channel 1) For a mono connecton, the Ethernet nterfaces IF Ch1 (local) and IF Ch1 (target) must be set n the local resource Redundant safeethernet Connecton (Channel 1 and Channel 2) Redundant safeethernet transmsson paths between two HIMax/HIMax controllers are possble. The redundant transmsson paths must be suffcently homogeneous to ensure that the bandwdth and the delay on the two transmsson paths are nearly dentcal. Once the offset of the receved messages becomes too large or the messages requre longer than the response tme to arrve, the transmsson path dagnoss no longer operates as ntended and consders these delays transmsson path as faults. To evaluate the transmsson path dagnoss, refer to the system varables State of the Red. Channel and Channel State. For a redundant connecton, the followng Ethernet nterfaces can be used: The Ethernet nterfaces IF Ch1 (local) and IF Ch1 (target) for channel 1. The Ethernet nterfaces IF Ch2 (local) and IF Ch2 (target) for channel 2. For a redundant connecton va channel 1 and channel 2 usng only one Ethernet nterface, select the same Ethernet nterface IF CH1 (local) Channel 1 and IF CH2 (local) Channel 2 n the safeethernet Edtor. Page 48 of 386 HI E Rev. 4.01

49 Communcaton 4 safeethernet The recprocal communcaton path s automatcally added n the safeethernet Edtor of the target resource. HI E Rev Page 49 of 386

50 4 safeethernet Communcaton Permtted Combnatons The followng table lsts the possble combnatons for redundant safeethernet connectons. Channel 1 IF Ch1 (local) / IF Ch1 (target) Channel 2 IF Ch2 (local) / IF Ch2 (target) CPU1/CPU1 CPU2/CPU2 CPU1/CPU1 CPU1/CPU1 COM1/COM1 COM2/COM2 CPU1/COM1 CPU2/COM2 CPU1/COM2 CPU2/COM1 CPU1/CPU1 COM1/COM1 Table 36: Combnatons for safeethernet Connectons Fgure 6: Redundant Connecton between Two HIMax Controllers To acheve a constant data rate despte lost data packets (e.g., due to EMC nterferences), the followng redundant connecton can be used (va a lne). Fgure 7: Redundant Connecton of Two HIMax Controllers usng a Lne Page 50 of 386 HI E Rev. 4.01

51 Communcaton 4 safeethernet 4.6 safeethernet Parameters The safety-related communcaton s confgured n the safeethernet Edtor. To do ths, the parameters descrbed n ths chapter must be set. For determnng the Receve Tmeout and Response Tme safeethernet parameters, the followng condton apples: The communcaton tme slce must be suffcently hgh to allow all the safeethernet connectons to be processed wthn one CPU cycle, see Chapter Maxmum Cycle Tme (Mnmum Watchdog Tme) of the HIMax Controller To determne the maxmum cycle tme for a HIMax controller (mnmum watchdog tme), HIMA recommends proceedng as follows when all the processor modules of the system are nserted. 1. Set the watchdog tme hgh for testng. 2. Use the system under the maxmum load. In the process, all communcaton connectons must be operatng both va safeethernet and standard protocols. Frequently read the cycle tme n the Control Panel and note the varatons of the cycle tme. 3. In successon, remove and rensert every processor module n the base plate. Pror to removng one processor module, wat that the processor module that has just been nserted s synchronzed. When a processor module s nserted n the base plate, t automatcally synchronzes tself wth the confguraton of the exstng processor modules. The tme requred for the synchronzaton process extends the controller cycle up to the maxmum cycle tme. The synchronzaton tme ncreases wth the number of processor modules that have already been synchronzed. For more nformaton on how to nsert and remove a processor module, refer to the X-CPU 01 Manual (HI E). 4. In the dagnostc hstory, read the synchronzaton tme from n to n+1 processor modules n every synchronzaton process and not t down. 5. Repeat these steps for the second communcaton partner (.e., the second HIMax controller). The longest synchronzaton tme s used to determne the watchdog tme. Note down the synchronzaton tmes of both HIMax controllers! 6. Calculate the mnmum watchdog tme from the longest synchronzaton tme + 12 ms spare + spare for the noted varatons of the cycle tme. A sutable value for the maxmum cycle tme (mnmum watchdog tme) has been thus determned for the followng calculatons. TIP Perform the calculatons specfed n step 6 for both HIMax controllers and use the correspondng synchronzaton tme value prevously noted down. The maxmum cycle tmes (mnmum watchdog tme) calculated as descrbed above can be used as watchdog tme n the correspondng resource, see Safety Manual (HI ). HI E Rev Page 51 of 386

52 4 safeethernet Communcaton Maxmum Cycle Tme of the HIMatrx Controller To determne the maxmum cycle tme for a HIMatrx controller, HIMA recommends proceedng as follows: To determne the maxmum cycle tme for the HIMatrx controller 1. Use the system under the maxmum load. In the process, all communcaton connectons must be operatng both va safeethernet and standard protocols. Frequently read the cycle tme n the Control Panel and note the maxmum cycle tme. 2. Repeat step 1 for the next communcaton partner (.e., the second HIMatrx controller). 3. The requred maxmum cycle tme s the greater of the two tme values ascertaned. The maxmum cycle tme was determned and s used n the followng calculatons Receve Tmeout ReceveTMO s the montorng tme n mllseconds (ms) wthn whch a correct response from the communcaton partner must be receved. If a correct response s not receved from the communcaton partner wthn ReceveTMO, safety-related communcaton s termnated. The nput varables of ths safeethernet connecton react n accordance wth the preset parameter Freeze Data on Lost Connecton [ms]. For safety-related functons mplemented va safeethernet, only the Use Intal Data settng may be used. Snce ReceveTMO s a safety-relevant component of the Worst Case Reacton Tme T R (see Chapter et seqq.), ts value must be determned as descrbed below and entered n the safeethernet Edtor. ReceveTMO 4*delay + 5*max. cycle tme Condton: The Communcaton Tme Slce must be suffcently hgh to allow all the safeethernet connectons to be processed wthn one CPU cycle. Delay: Max. Cycle Tme Delay on the transmsson path, e.g., due to swtch or satellte. Maxmum cycle tme of both controllers. A wanted fault tolerance of communcaton can be acheved by ncreasng ReceveTMO, provded that ths s permssble n terms of tme for the applcaton process Response Tme ResponseTme s the tme n mllseconds (ms) that elapses untl the sender of the message receves acknowledgement from the recpent. When confgurng usng a safeethernet profle, a Response Tme parameter must be set based on the physcal condtons of the transmsson path. The preset ResponseTme affects the confguraton of all the safeethernet connecton parameters and s calculated as follows: ResponseTme ReceveTMO / n n = 2, 3, 4, 5, 6, 7, 8... The rato between ReceveTMO and ResponseTme nfluences the capablty to tolerate faults, e.g., when packets are lost (resendng lost data packets) or delays occur on the transmsson path. Page 52 of 386 HI E Rev. 4.01

53 Communcaton 4 safeethernet In networks where packets can be lost, the followng condton must be gven: mn. Response Tme ReceveTMO / 2 2*Delay + 2.5*max. Cycle Tme If ths condton s met, the loss of at least one data packet can be ntercepted wthout nterruptng the safeethernet connecton. If ths condton s not met, the avalablty of a safeethernet connecton can only be ensured n a collson and fault-free network. However, ths s not a safety problem for the processor module! Make sure that the communcaton system comples wth the confgured response tme! If ths condtons cannot always be ensured, a correspondng connecton system varable for montorng the response tme s avalable. If the measured response tme s not seldom exceeded for over the half P2P ReceveTMO, the confgured response tme must be ncreased. The receve tmeout must be adjusted accordng to the new value confgured for response tme Sync/Async Sync Currently not supported. Async It s the default settng. Wth the Async settng, the safeethernet protocol nstance receves durng the CPU nput phase and sends n accordance wth ts send rules durng the CPU output phase ResendTMO ResendTMO cannot be set manually, but t s calculated based on the profle and Response Tme. Montorng tme n mllseconds (ms) of PES1 wthn whch PES2 must have acknowledged the recepton of a data packet; otherwse the data packet s resent. Rule: ResendTMO Receve-Tmeout If the ResendTMO set for the communcaton partners dffer from one another, the actve protocol partner (the lowest SRS) determnes the value for the ResendTMO of the protocol connecton Acknowledge Tmeout AckTMO cannot be set manually, but t s calculated based on the profle and Response Tme. AckTMO s the tme perod wthn whch the CPU must acknowledge the recepton of a data packet. In a rapd network, AckTMO s zero,.e., the recepton of a data packet s mmedately acknowledged. In a slow network (e.g., a telephone modem lne), AckTMO s greater than HI E Rev Page 53 of 386

54 4 safeethernet Communcaton zero. In ths case, the system attempts to transmt the acknowledgment message together wth the process data to reduce the network load by avodng addressng and securty blocks. Rules: AckTMO must be Receve Tmeout AckTMO must be ResendTMO f ProdRate s > ResendTMO Producton Rate ProdRate cannot be set manually, but t s calculated based on the profle and Response Tme. Mnmum tme nterval n mllseconds (ms) between two data packets. The ProdRate s used to lmt the amount of data packets such that a (slow) communcaton channel wll not be overloaded. Ths ensures a unform load of the transmsson medum and prevents the recever from recevng obsolete data. Rules: ProdRate Receve Tmeout ProdRate Resend Tmeout, f Acknowledge Tmeout > Resend Tmeout A zero producton rate means that data packets can be transmtted n each user program cycle Queue Queue cannot be set manually, but t s calculated based on the profle and Response Tme. Queue s the number of data packets that can be sent wthout watng for ther acknowledgement. The value depends on the network transfer capacty and potental network delays. All safeethernet connectons share the message queue avalable n the CPU. Page 54 of 386 HI E Rev. 4.01

55 Communcaton 4 safeethernet 4.7 Worst Case Reacton Tme for safeethernet In the followng examples, the formulas for calculatng the worst case reacton tme only apply for a connecton wth HIMatrx controllers f the parameter Safety Tme = 2 * Watchdog Tme s set. These formulas always apply to HIMax controllers. The allowed worst case reacton tme depends on the process and must be agreed upon together wth the test authorty responsble for the fnal nspecton. Terms ReceveTMO: Montorng tme of PES 1 wthn whch a correct response from PES 2 must be receved. Otherwse, safety-related communcaton s termnated after the tme has expred. Producton Rate: Watchdog Tme: Worst Case Reacton Tme Delay: Mnmum nterval between two data transmssons. Maxmum duraton permtted for a controller's RUN cycle. The duraton of the RUN cycle depends on the complexty of the user program and the number of safeethernet connectons. The watchdog tme (WDT) must be entered n the resource propertes. The worst case reacton tme s the tme between a change n a physcal nput sgnal (n) of PES 1 and a reacton on the correspondng output (out) of PES 2. Delay of a transmsson path e.g., wth a modem or satellte connecton. For drect connectons, an ntal delay of 2 ms can be assumed. The responsble network admnstrator can measure the actual delay on a transmsson path. To the calculatons of the maxmum reacton tmes specfed below, the followng condtons apply: The sgnals transmtted over safeethernet must be processed n the correspondng controllers wthn one CPU cycle. Further, the reacton tme of the sensors and actuators must be added. The calculatons also apply to sgnals n the opposte drecton. HI E Rev Page 55 of 386

56 4 safeethernet Communcaton Calculatng the Worst Case Reacton Tme of Two HIMax controllers The worst case reacton tme T R s the tme between a change on the sensor nput sgnal (n) of controller 1 and a reacton on the correspondng output (out) of controller 2. It s calculated as follows: Input HIMax Controller 1 Safety-Related Protocol HIMax Controller 2 Output Fgure 8: Reacton Tme wth Interconnecton of Two HIMax Controllers T R = t 1 + t 2 + t 3 T R Worst case reacton tme t 1 Safety tme of HIMax controller 1. t 2 ReceveTMO t 3 Safety tme of HIMax controller Calculatng the Worst Case Reacton Tme n Connecton wth One HIMatrx controller The worst case reacton tme T R s the tme between a change on the sensor nput sgnal (n) of HIMax controller and a reacton on the correspondng output (out) of HIMatrx controller. It s calculated as follows: Input HIMax Controller Safety-Related Protocol HIMatrx Controller Output Fgure 9: Reacton Tme for Connecton between One HIMax and One HIMatrx Controller T R = t 1 + t 2 + t 3 T R t 1 t 2 t 3 Worst case reacton tme Safety tme of HIMax controller ReceveTMO 2 * Watchdog tme of the HIMatrx controller Page 56 of 386 HI E Rev. 4.01

57 Communcaton 4 safeethernet Calculatng the Worst Case Reacton Tme wth two HIMatrx Controllers or Remote I/Os The worst case reacton tme T R s the tme between a change on the sensor nput sgnal (n) of the frst HIMatrx controller or remote I/O (e.g., F3 DIO 20/8 01) and a reacton on the correspondng output (out) of the second HIMatrx controller or remote I/O (out). It s calculated as follows: Input Remote I/O 1 HIMax Controller Remote I/O 2 Output Fgure 10: Reacton Tme wth Two Remote I/Os and One HIMax controller T R = t 1 + t 2 + t 3 + t 4 + t 5 T R t 1 t 2 t 3 t 4 t 5 Worst case reacton tme 2 * watchdog tme of remote I/O 1 ReceveTMO1 2 * watchdog tme of the HIMax controller. ReceveTMO2 2 * watchdog tme of remote I/O 2 Remote I/O 1 and Remote I/O 2 can also be dentcal. The tme values stll apply f a HIMatrx controller s used nstead of a remote I/O Calculatng the Worst Case Reacton Tme wth two HIMax and one HIMatrx Controller The worst case reacton tme T R s the tme between a change on the sensor nput sgnal (n) of the frst HIMax controller and a reacton on the correspondng output (out) of the second HIMax controller. It s calculated as follows: Input HIMax Controller 1 HIMatrx Controller HIMax Controller 2 Output Fgure 11: Reacton Tme wth Two HIMax Controllers and One HIMatrx controller HI E Rev Page 57 of 386

58 4 safeethernet Communcaton T R = t 1 + t 2 + t 3 + t 4 + t 5 T R t 1 t 2 t 3 t 4 t 5 Worst case reacton tme Safety tme of HIMax controller 1. ReceveTMO1 2 * watchdog tme of the HIMatrx controller ReceveTMO2 Safety tme of HIMax controller 2. HIMax controller 1 and HIMax controller 2 can also be dentcal. The HIMatrx controller can also be a HIMax controller Calculatng the Worst Case Reacton Tme of Two HIMatrx Controllers The worst case reacton tme T R s the tme between a change on the sensor nput sgnal of controller 1 and a reacton on the correspondng output of controller 2. It s calculated as follows: Input HIMatrx Controller 1 Safety-Related Protocol HIMatrx Controller 2 Output Fgure 12: Reacton Tme wth Interconnecton of Two HIMatrx Controllers T R = t 1 + t 2 + t 3 T R Worst case reacton tme t 1 2 * watchdog tme of the HIMatrx controller 1. t 2 ReceveTMO t 3 2 * watchdog tme of the HIMatrx controller 2. Page 58 of 386 HI E Rev. 4.01

59 Communcaton 4 safeethernet Calculatng the Worst Case Reacton Tme wth two Remote I/Os The worst case reacton tme TR s the tme between a change on the sensor nput sgnal (n) of the frst HIMatrx controller or remote I/O (e.g., F3 DIO 20/8 01) and a reacton on the correspondng output of the second HIMatrx controller or remote I/O (out). It s calculated as follows: Input Remote I/O 1 HIMatrx Controller Remote I/O 2 Output Fgure 13: Reacton Tme wth Remote I/Os T R = t 1 + t 2 + t 3 + t 4 + t 5 T R Worst case reacton tme t 1 2 * watchdog tme of remote I/O 1 t 2 ReceveTMO 1 t 3 2 * watchdog tme of the HIMatrx controller. t 4 ReceveTMO 2 t 5 2 * watchdog tme of remote I/O 2 Note: Remote I/O 1 and remote I/O 2 can also be dentcal. The tme values stll apply f a HIMatrx controller s used nstead of a remote I/O Calculatng the Worst Case Reacton Tme wth two HIMatrx and one HIMax Controller The worst case reacton tme TR s the tme between a change on the sensor nput sgnal (n) of the frst HIMatrx controller and a reacton on the correspondng output (out) of the second HIMatrx controller. It s calculated as follows: Input HIMatrx Controller 1 HIMax Controller HIMatrx Controller 2 Output Fgure 14: Reacton Tme wth Two HIMatrx Controllers and One HIMax Controller T R = t 1 + t 2 + t 3 + t 4 + t 5 T R Worst case reacton tme t 1 2 * watchdog tme of the HIMatrx controller 1. t 2 ReceveTMO 1 t 3 2 * watchdog tme of the HIMax controller. t 4 ReceveTMO 2 t 5 2 * watchdog tme of the HIMatrx controller 2. HI E Rev Page 59 of 386

60 4 safeethernet Communcaton safeethernet Profle safeethernet profles are combnatons of parameters compatble wth one another that are automatcally set when one of the safeethernet profles s selected. When confgurng, only the receve tmeout and the expected response tme parameters must be set ndvdually. A safeethernet profle s used to optmze the data throughput wthn a network takng the physcal condtons nto account. To ensure that the optmzaton s effectve the followng condtons must be met: The communcaton tme slce value must be suffcently hgh to allow all the safeethernet connectons to be processed wthn one CPU cycle. f average CPU cycle tme < response tme. f average CPU cycle tme < ProdRate or ProdRate = 0. NOTE Dsturbance of the safeethernet communcaton up to communcaton loss! Unsutable combnatons of CPU cycle, communcaton tme slce, response tme and ProdRate are not rejected durng code generaton and download/reload, but can cause communcaton dsturbances. In the Control Panels of the two controllers, verfy the bad messages and resends values. Sx safeethernet profles are avalable. Select the safeethernet profle the most sutable for the transmsson path. For safety-related process data communcaton, only the profles Fast&Nosy, Medum&Nosy and Slow&Nosy may be used. Fast & Cleanroom Not sutable foor safety-related process data communcaton! Fast & Nosy Medum & Cleanroom Not sutable foor safety-related process data communcaton! Medum & Nosy Slow & Cleanroom Not sutable foor safety-related process data communcaton! Slow & Nosy Page 60 of 386 HI E Rev. 4.01

61 Communcaton 4 safeethernet Profle I (Fast & Cleanroom) NOTE Not sutable foor safety-related process data communcaton! For safety-related process data communcaton, only the profles Fast&Nosy, Medum&Nosy and Slow&Nosy may be used. It s provded to ensure compatblty wth prevous SILworX and ELOP II Factory versons. Use The Fast & Cleanroom profle s sutable applcatons n deal envronments such as laboratores! For the fastest data throughput For applcatons requrng fast data transmsson For applcaton requrng a worst case reacton tme as low as possble Network requrements: Fast: 100 Gbt/100 Mbt technology, 1 Gbt technology Clean: trouble-free network. Avod data loss due to network overload, external nfluences or network manpulaton. LAN swtches are necessary! Communcaton path characterstcs: Mnmum delays Expected ResponseTme ReceveTMO (otherwse ERROR durng confguraton) Profle II (Fast & Nosy) Use The Fast & Nosy profle s the SILworX default profle for communcatng va safeethernet. For fast data throughput For applcatons requrng fast data transmsson For applcaton requrng a worst case reacton tme as low as possble Network requrements: Fast: 100 Gbt/100 Mbt technology, 1 Gbt technology Nosy: Non-trouble-free network. Low probablty of data packet loss tme for 1 resends LAN swtches are necessary! Communcaton path characterstcs: Mnmum delays Expected ResponseTme ReceveTMO / 2 (otherwse ERROR durng confguraton) HI E Rev Page 61 of 386

62 4 safeethernet Communcaton Profle III (Medum & Cleanroom) NOTE Not sutable foor safety-related process data communcaton! For safety-related process data communcaton, only the profles Fast&Nosy, Medum&Nosy and Slow&Nosy may be used. It s provded to ensure compatblty wth prevous SILworX and ELOP II Factory versons. Use The Medum & Cleanroom profle s only sutable n a trouble-free network for applcatons that requre a moderate fast data transmsson. For medum data throughput Sutable for Vrtual Prvate Networks (VPN) n whch data s slow but fault-free as t s exchanged va ntermedate safety devces (frewalls, encrypton). Sutable for applcatons n whch the worst case reacton tme s not a crtcal factor Network requrements: Medum: 10 Mbt (10 Base T), 100 Mbt (100 Base TX), 1 Gbt technology LAN swtches are necessary! Clean: trouble-free network. Avod data loss due to network overload, external nfluences or network manpulaton. Tme for 0 resends Communcaton path characterstcs: Moderate delays Expected ResponseTme ReceveTMO (otherwse ERROR durng confguraton) Profle IV (Medum & Nosy) Use The Medum & Nosy profle s sutable for applcatons that requre moderate fast data transmsson. For medum data throughput For applcatons requrng moderate fast data transmsson Sutable for applcatons n whch the worst case reacton tme s not a crtcal factor Network requrements: Medum: 10 Mbt (10 Base T), 100 Mbt (100 Base TX), 1 Gbt technology LAN swtches are necessary! Nosy: Non-trouble-free network. Low probablty of data packet loss tme for 1 resends Communcaton path characterstcs: Moderate delays Expected ResponseTme ReceveTMO / 2 (otherwse ERROR durng confguraton) Page 62 of 386 HI E Rev. 4.01

63 Communcaton 4 safeethernet Profle V (Slow & Cleanroom) NOTE Not sutable foor safety-related process data communcaton! For safety-related process data communcaton, only the profles Fast&Nosy, Medum&Nosy and Slow&Nosy may be used. It s provded to ensure compatblty wth prevous SILworX and ELOP II Factory versons. Use The Slow & Cleanroom profle s sutable for applcatons n a trouble-free network that requre a slow data transmsson. For slow data throughput For applcatons that only requre a slow data transmsson to controllers (potentally located far away) or f the communcaton path condtons cannot be antcpated. Network requrements: Slow: Data transfer va ISDN, dedcated lne or rado relay. Clean: Trouble-free network. Avod data loss due to network overload, external nfluences or network manpulaton. Tme for 0 resends Communcaton path characterstcs: Moderate delays Expected ResponseTme = ReceveTMO (otherwse ERROR durng confguraton) Profle VI (Slow & Nosy) Use The Slow & Nosy profle s sutable for applcatons that only requre a slow data transmsson to controllers (potentally located far away). For slow data throughput For applcatons; generally for data transfer va bad telephone lnes or dsturbed rado relays. Network requrements: Slow: Data transfer va telephone, satellte, rado etc. Nosy: Non-trouble-free network. Low probablty of data packet loss tme for 1 resends Communcaton path characterstcs: Moderate to mportant delays Expected ResponseTme ReceveTMO / 2 (otherwse ERROR durng confguraton) HI E Rev Page 63 of 386

64 4 safeethernet Communcaton 4.8 Cross-Project Communcaton Cross-project communcaton s used: To connect resources from dfferent projects. To nterconnect controllers wth SILworX operatng system and controllers wth ELOP II Factory operatng system va safeethernet, see Chapter 4.9. The communcaton between two projects occurs va safeethernet and s confgured n the safeethernet Edtor. Fgure 15: safeethernet Connecton between A1 n Project A and B1 n Project B The project n whch the safeethernet connecton s confgured and the confguraton fle s created, s referred to as 'local project'. The project to whch the confguraton fle s mported s referred to as 'target project'. The local and the target projects are equal communcaton partners when they exchange data. A proxy resource serves as placeholder for the correspondng resource from an external project and s used for mportng and exportng the safeethernet connectons. Proxy resource B1 n Project A s the placeholder for Resource B1 from Project B. Proxy Resource A1 n Project B s the placeholder for Resource A1 from Project A. In the local project (n the example: Project A), the proxy resource (n the example: Proxy Resource B1) must be created and confgured manually. Once the confguraton s completed, the confguraton fle (n the example: Fle_A1.prs) must be mported to the target project (n the example: Resource B1). The Fle_A1.prs confguraton fle contans the entre descrpton of Resource A1 for the safeethernet connecton wth Resource B1. Proxy Resource A1 s automatcally created n Project B after mportng the Fle_A1.prs confguraton fle to Resource B1. Page 64 of 386 HI E Rev. 4.01

65 Communcaton 4 safeethernet Varants for Cross-Project Communcaton In both of the followng varants, Project A and Project B communcate wth one another va safeethernet. The local project s Project A n the frst varant and Project B n the second varant. The user may decde n whch project the confguraton should be created. Both optons requre the same amount of work and result n the same confguraton. Local Project A In the local Project A, the user confgures communcaton wth target Project B and creates the confguraton fles. Ths has the advantage that the user must only manually create Proxy Resource B1 n the local project. Local project -> target project Fgure 16: Project A as Local Project Local Project B In the local Project B, the user confgures communcaton wth target Project A and creates the confguraton fles. Ths has the dsadvantage that the user must manually create both Proxy Resource A1 and Proxy Resource A2 n the local project B. Local project -> target project Fgure 17: Project B as Local Project HI E Rev Page 65 of 386

66 4 safeethernet Communcaton 4.9 Cross-Project Communcaton between SILworX and ELOP II Factory Ths example shows how to confgure a safeethernet connecton between HIMax (SILworX) and HIMatrx (ELOP II Factory). Fgure 18: Confgurng Communcaton between SILworX and ELOP II Factory Open the resource n the target project (HIMatrx) that should serve as proxy resource n the local project (HIMax). For ths target resource, determne the followng parameters: System ID Safety tme [ms] Watchdog tme [ms] IP address The resource propertes are safety-relevant and are subjected to restrctons. For more nformaton, refer to the Safety Manual (HI E) Confgurng the HIMax n a SILworX Project Creatng the Proxy Resource A proxy resource serves as placeholder for a resource n an external project and s used for mportng and exportng the safeethernet connectons. To create a proxy resource n the local project 1. Open the local project n whch the proxy resource should be created. 2. In the structure tree, open Confguraton. 3. Rght-clck Confguraton, and select New, Proxy Resource ELOP II Factory from the context menu. A new proxy resource s created. Page 66 of 386 HI E Rev. 4.01

67 Communcaton 4 safeethernet To confgure a proxy resource n the local project 1. Rght-clck the proxy resource, and then clck Propertes. 2. Enter a unque name n the Name feld. Use the name of the resource n the target project for the proxy resource n the local project. 3. Enter the System ID, Safety Tme [ms] and Watchdog Tme [ms] prevously calculated for ths proxy resource. 4. Clck OK. The remanng parameters can retan the default values. To open the structure tree for the proxy resource 1. Rght-clck Hardware, and then clck Edt, HIMatrx Proxy. 2. Clck OK to confrm. The Hardware Edtor for the proxy resource appears. Fgure 19: HIMatrx Proxy Resource 3. Double-clck the COM Module and enter the IP address calculated for the proxy resource. 4. Clck the Save button or Save on the Wndow menu, then clck Close. 5. Repeat these steps for every further proxy resource contaned n the local project Connectng the Local Resource to the Proxy Resource In the safeethernet Edtor, create a safeethernet connecton between the locale and the proxy resource. To open the safeethernet Edtor of the local resource 1. In the structure tree, open Confguraton, Resource. 2. Rght-clck safeethernet, then select Edt. The new proxy resource s created n the Object Panel. To create the safeethernet connecton to the proxy resource 1. In the Object Panel, drag the proxy resource anywhere onto the workspace of the safeethernet Edtor. 2. Select Ethernet nterfaces on the local and proxy resource. The followng parameters determne the data throughput and the fault and collson tolerance of the safeethernet connecton. 4. Select the Network Profle for the safeethernet connecton (e.g., Fast&Nosy).. 5. Calculate and enter Receve Tmeout and Response Tme. HI E Rev Page 67 of 386

68 4 safeethernet Communcaton Example of parameter values for a safeethernet connecton to a proxy resource: Fgure 20: Parameter for a safeethernet Connecton to a Proxy Resource Connectng Process Varables Connect the process varables n the detal vew of the safeethernet connecton. To open the detal vew of a safeethernet connecton Requrement: The safeethernet Edtor of the local resource must be opened. 1. Rght-clck the Proxy Resource lne and open Proxy Resource. 2. Select Detal Vew from the context menu to open the detal vew of the safeethernet connecton. 3. Select the Resource<->Proxy Resource tab. To add safeethernet send varables Send varables are sent from the local to the proxy resource. 1. Select the Resource->Proxy Resource area. 2. In the Object Panel, select a Global Varable and drag t onto the Resource (target)- >Resource (local) column. 3. Repeat these steps for every further safeethernet send varables. To add safeethernet receve varables Receve varables are receved by the local resource. 1. Select the Resource<-Proxy Resource area. 2. In the Object Panel, select a Global Varable and drag t onto the Resource (target)<- Resource (local) column. 3. Repeat these steps for every further safeethernet receve varables. Page 68 of 386 HI E Rev. 4.01

69 Communcaton 4 safeethernet Exportng the Confguraton Fle from SILworX The safeethernet connecton confgured n SILworX must be exported as confguraton fle wth the extenson *.prs. Ths confguraton fle can be mported to ELOP II Factory to establsh the safeethernet connecton for the HIMatrx controller. To export a safeethernet connecton 1. Clck Proxy Resource n the safeethernet Edtor and open the context menu. 2. Clck Export Connecton wth Proxy Resource: A standard dalog box for savng a fle appears. 3. Enter a fle name for the confguraton fle and save t wth the extenson *.prs. 4. Close the local project. Fgure 21: safeethernet Connecton Export To verfy the safeethernet connecton 1. In the structure tree, open Confguraton, Resource, safeethernet. 2. Clck the Verfcaton button on the Acton Bar, and then clck OK to confrm the acton. 3. Thoroughly verfy the messages dsplayed n the logbook and correct potental errors. Recomple the confguraton of the safeethernet connecton and the user program of the HIMax resource, and transfer them to the controllers. Only after ths step, the new confguratons can be used for communcatng wth HIMax system HI E Rev Page 69 of 386

70 4 safeethernet Communcaton Confgurng a HIMatrx n an ELOP II Factory Project To mport the confguraton fle to the (HIMatrx) target project 1. Start ELOP II Factory. 2. Open the HIMatrx target project to whch the confguraton fle should be mported. 3. In the structure tree, select the target resource and open the context menu. 4. Select Import Connectons from the context menu. A dalog box for mportng a fle wth the extenson *.prs appears. 5. Select the confguraton fle created n the local HIMax project, and clck OK. Once the confguraton fle has been mported, the local HIMax resource s automatcally created as proxy resource n the HIMatrx target project. Fgure 22: Importng Connectons n ELOP II Factory Assgnng ELOP II Factory Process Sgnals Connect process sgnals n the (HIMatrx) target resource. Select Sgnals, Edtor on the menu bar to open the Sgnal Edtor. To open the P2P Edtor for the target resource n ELOP II Factory 1. In the structure tree, open Confguraton, Resource, P2P Edtor. 2. Enter the HH Network for ths connecton n the P2P Edtor. 3. In the P2P Edtor, clck Connect Process Sgnals. Fgure 23: P2P Edtor n ELOP II Factory Note that both communcaton partners must use the same profle and the same settngs (automatcally adopted whle mportng the confguraton fle). Page 70 of 386 HI E Rev. 4.01

71 Communcaton 4 safeethernet To assgn the P2P send sgnals P2P send sgnals are sent from the HIMatrx resource to the HIMax resource. 1. Select the HIMatrx Resource-> HIMax Proxy Resource tab. The tab contans the mported P2P send sgnals.. 2. In the Sgnal Edtor, drag a process sgnal onto the send sgnal to be connected and located n the P2P Process Sgnals dalog box. 3. Repeat these steps for every further P2P send sgnal. Fgure 24: Assgnng Send Sgnals n ELOP II Factory To assgn the P2P receve sgnals P2P receve sgnals are receved by the HIMatrx resource. 1. Select the Resource<-Proxy Resource tab. The tab contans the mported P2P receve sgnals. 2. In the Sgnal Edtor, drag a process sgnal onto the receve sgnal to be connected and located n the P2P Process Sgnals dalog box. 3. Repeat these steps for every further P2P receve sgnal. Fgure 25: Assgnng Receve Sgnals n ELOP II Factory For more nformaton on how to connect process sgnals n ELOP II Factory, refer to the ELOP II Factory onlne help. Recomple the confguraton of the P2P connecton and the user program of the HIMatrx resource, and transfer them to the controllers. Only after ths step, the P2P connecton s actve for the HIMatrx system. HI E Rev Page 71 of 386

72 4 safeethernet Communcaton 4.10 Control Panel (safeethernet) The Control Panel can be used to verfy and control the safeethernet connecton settngs. Detals about the current status of the safeethernet connecton (e.g., cycle tme, bus state, etc.) are also dsplayed. To open Control Panel for montorng the safeethernet connecton 1. In the structure tree, clck Resource. 2. Rght clck the resource and select Onlne from the context menu. 3. In the System Log-n wndow, enter the access data to open the Control Panel for the resource. 4. In the structure tree assocated wth the Control Panel, select safeethernet. Fgure 26: Control Panel for Connecton Control Reset statstcal data Ths functon s used to reset the statstcal data (cycle [mn], cycle [max], etc.) to zero. To reset the statstcal data of the safeethernet connecton 1. In the structure tree, select the safeethernet connecton. 2. Rght-clck the safeethernet connecton and select Reset safeethernet Statstcs from the context menu. Page 72 of 386 HI E Rev. 4.01

73 Communcaton 4 safeethernet Vew Box (safeethernet Connecton) The vew box dsplays the followng values of the selected safeethernet connecton: Element Name SRS Connecton State Descrpton Resource name of the communcaton partner System.Rack.Slot State of the safeethernet connecton (See also Chapter 4.4) Receve Tmeout [ms] (See also Chapter 4.6.3) Resend tmeout [ms] (See also Chapter 4.6.6) Acknowledge Tmeout [ms] (See also Chapter 4.6.7) Mn. RspT [ms] Max. RspT [ms] Last RspT [ms] Av. RspT [ms] Bad Messages Reconnectons Number of Successful Connectons Early Queue Usage Actual response tme as mnmum, maxmum, last and average value. See also Chapter Number of rejected messages snce statstcs reset. Number of reconnectons snce statstcs reset [UDINT]. Number of successful connectons snce statstcs reset. Number of messages stored n Early Queue snce statstcs reset. See also Chapter Frame No. Current sent counter. Ack.Frame No. Current recepton counter. Monotony Current count for user data sendng. Layout Verson Sgnature of the current communcaton send pont. New Layout Verson Sgnature of the new communcaton send pont. Connecton Control Statuse of the connecton control. See also Chapter 4.4. Transmsson Control Ch1 Enable of transmsson path Ch1. See also Chapter 4.4. Transmsson Control Ch2 Enable of transmsson path Ch2. See also Chapter 4.4. Qualty of Channel 1 State of transmsson path Ch1. See also Chapter 4.4. Qualty of Channel 2 State of transmsson path Ch2. See also Chapter 4.4. Late Receved Redundant Messages Wth redundant transmsson paths. Number of late receved messages snce statstcs reset. Lost Redundant Messages Wth redundant transmsson paths. Number of messages receved on one of the two transmsson paths snce statstcs reset. Protocol Verson 0-1 Prevous protocol verson for HIMatrx wth CPU operatng system pror to V7 2 New protocol verson for HIMax and HIMatrx wth CPU operatng system beyond V7 Table 37: Vew Box of the safeethernet Connecton HI E Rev Page 73 of 386

74 5 PROFINET IO Communcaton 5 PROFINET IO PROFINET IO s the transfer protocol provded by PNO Germany and s based on Ethernet technology. Wth PROFINET IO, such as wth PROFIBUS DP, the remote feld devces are ntegrated n SILworX va a devce descrpton (GSDML fle). The HIMA PROFINET IO controller comples wth Conformance Class A and supports nonreal tme (NRT) and real tme (RT) communcaton wth the PROFINET IO devces. In partcular, real tme communcaton s used for tme crtcal data exchange and non-real tme communcaton for non tme crtcal processes, such as acyclc read/wrte operatons. A redundant PROFINET IO connecton can only be mplemented by confgurng a second PROFINET IO controller/devce and adjustng t n the user program. 5.1 PROFINET IO Functon Blocks To acyclcally exchange data, functon blocks wth the same functonalty as wth PROFIBUS DP are avalable n SILworX. The followng PROFINET IO functon blocks are avalable: Functon block Functon descrpton MSTAT Controllng the controller state usng the user program RALRM Readng the alarm messages of the devces RDREC Readng the data records of the devces SLACT Controllng the devce states usng the user program WRREC Wrtng the data records of the devces Table 38: Overvew of PROFINET IO Functon Blocks The PROFINET IO functon blocks are confgured such as the PROFIBUS DP functon blocks, see Chapter 6.9. Page 74 of 386 HI E Rev. 4.01

75 Communcaton 5 PROFINET IO 5.2 Controllng the Consumer/Provder Status (IOxS) The system varables descrbed n ths chapter, the consumer/provder status (IOxS) can be controlled va the user program. If the consumer/provder status should not be controlled va the user program, the output varables must be assgned a constant set to TRUE. The statuses are then set to GOOD as soon as the communcaton module obtaned vald process values from the processor module. The followng pcture shows how system varables are exchanged between the HIMA controller and a DO devce or a DI devce, respectvely. Vald Output Data Output Data Accepted by Devce Vald Input Data Input data Accepted by Controller Output Data Accepted by Devce Vald Output Data Input Data Accepted by Devce Vald Input Data Fgure 27: Controllng the Consumer/Provder Status (IOxS) Control Varables n the HIMA Controller The Vald Output Data and Input Data Accepted by Controller nput varables can be used to control the consumer/provder status (IOxS) va the user program. The Output Data Accepted by Devce and Vald Input Data nput varables can be used to read the consumer/provder status (IOxS) va the user program Control Varables n the HIMA DO Devce The Vald Output Data output varable can be used to control the consumer/provder status (IOxS) va the user program. The Output Data Accepted by Controller nput varable can be used to read the consumer/provder status (IOxS) va the user program Control Varables n the HIMA DI Devce The Input Data Accepted by Devce output varable can be used to control the consumer/provder status (IOxS) va the user program. The Vald Input Data nput varable can be used to read the consumer/provder status (IOxS) va the user program. HI E Rev Page 75 of 386

76 5 PROFINET IO Communcaton 5.3 PROFIsafe Users are expected to be famlar wth the PROFIsafe specfcaton of the PNO! PROFIsafe uses the PROFINET protocol to transfer safety-related data up to SIL 3, based on Ethernet technology. The PROFIsafe protocol s superposed the PROFINET protocol and contans safe user data as well as data backup nformaton. The safe PROFIsafe data s transferred together wth the non-safety-related PROFINET data va the subsdary PROFINET protocol. To transfer safe data, PROFIsafe uses unsafe data transfer channels (Ethernet) n smlar to the black-channel prncple. Ths allows the F-Host and F-Devce to exchange safe PROFIsafe data. PROFIsafe n connecton wth HIMA controllers Accordng to the PROFIsafe specfcaton, the F-Host repeatedly sends a message packet untl the F-Devce acknowledges recept to the F-Host. Only then does the F-Host send a new message packet to the F-Devce. The current process value s sent n each repeated PROFIsafe message packet. It can thus happen that the same process sgnal has dfferent values n the repeated message packets. In HIMA devces, PROFIsafe s mplemented on the recever sde such that process values can only be adopted when the message packet s receved for the frst tme. The process values of the resent message packets (wth dentcal progressve number of the message packet) are dscarded. If the connecton s lost and F_WD_Tme has expred, the PROFIsafe process values adopts ther ntal values. A gven process value s only receved on the opposte sde (F-Host/F-Devce) f the process value remans unchanged for at least the followng tme: 2 * F_WD_Tme + F_WD_Tme2 The PROFIsafe system must be confgured to ensure the SFRT (Safety Functon Response Tme) s sutable for performng the correspondng safety functon. Calculaton formula, see Chapter The followng condtons must be met to ensure a behavor consstent wth PROFIsafe: The ntal values of the process value varables must be set to 0. The AutoAwatFParamsOnConnLoss parameter must be deactvated, see Chapter The SILworX default settngs are confgured to ensure a behavor sonsstent wth PROFIsafe! Page 76 of 386 HI E Rev. 4.01

77 Communcaton 5 PROFINET IO PROFIsafe Control Byte and Status Byte Both system varables Control Byte and Status Byte are contaned n each PROFIsafe submodule and are exchanged durng communcaton between F-Host and F-Devce, see Chapter and Chapter The PROFIsafe control byte s wrtten n the F-Host and read n the F-Devce. The PROFIsafe status byte s wrtten n the F-Devce and read n the F-Host. Wrtng Control Byte Readng the Control Byte Wrtng the Status Byte Readng the Status Byte Fgure 28: PROFIsafe Control Byte and Status Byte In the HIMA's systems, the system varables Control Byte and Status Byte have addtonal features devatng from the PROFIsafe specfcaton, see Table 48 and Table F_WD_Tme (PROFIsafe watchdog tme) The followng nequaton apples to functonal PROFIsafe connecton between a HIMA F- Host and a F-Devce: F_WD_Tme > 3 CPU cycle tme number of communcaton tme slces + 2 PROFINet controller producton nterval 1) + 1 DAT (F-Devce acknowledgement tme) + 2 nternal F-Devce bus tme + 2 PROFINet devce producton nterval 1) + 2 Ethernet delay 1) PROFINet controller and PROFINet devce producton ntervals are generally dentcal and are calculated as follows: reducton factor send clock factor µs Refer to the devce descrpton provded by the F-Devce manufacturer for the values of DAT (F-devce acknowledgement tme) and the nternal devce bus tme! For HIMax and HIMatrx L3 F-Devces, DAT = DATout = DATn = 2 * WDT CPU HI E Rev Page 77 of 386

78 5 PROFINET IO Communcaton Remarks about F_WD_Tme (PROFIsafe watchdog tme) 1. DAT (F-Devce Acknowledgement Tme) s the tme requred by an F-Devce to respond to a receved PROFIsafe message. F-Devces are the safe unts (n HIMA systems the CPU module) processng the F-Devce stacks. In partcular f modular systems/devces are used, they do not nclude the tme values for the non safety-related functons/components. Ths DAT defnton dffers n the followng ponts from that provded n the PROFIsafe specfcaton V2.5c, Chapter 9.3.3: - DAT does not nclude the tme values for the nternal F-Devce bus. - DAT does not nclude the porton of PROFINet devce producton ntervals. - DAT does not nclude any delays, e.g., due to nput or output value flters or the physcal propertes of the nputs and outputs. - DAT refers to DATn (nput) or DATout (output), dependng on the connecton. - The correspondng maxmum value must be used for all tme parameters. 2. In HIMatrx L3 and n HIMax, the nternal F-Devce bus tme s: (max. Number of Communcaton Tme Slces - 1) WDT CPU. 3. Requrement: The F-Devce runs cyclcally and ts DAT s: DAT = 2 max. cycle - F-Devce does not operate wth communcaton tme slces. If HIMA CPU cycle tme number of communcaton tme slces s less than the F-Devce cycle tme, Delta = F-Devce cycle tme - HIMA CPU cycle tme * number of communcaton tme slces must be added to the HIMA CPU cycle tme specfed n the F_WD_Tme equaton. - F-Devce operates wth communcaton tme slces. If (HIMA CPU cycle tme * number of communcaton tme slces) s less than the F-Devce cycle tme * number of F-Devce communcaton tme slces, for the HIMA CPU cycle tme Delta = (F-Devce cycle tme * number of F-Devce communcaton tme slces) - (HIMA CPU cycle tme * number of communcaton tme slces) must be added to the calculaton of the F_WD_Tme. Page 78 of 386 HI E Rev. 4.01

79 Communcaton 5 PROFINET IO SFRT (Safety Functon Response Tme) Calculaton of the SFRT between an F-Devce and a HIMA F-Host The maxmum SFRT allowed for a PROFIsafe connecton between an F-Devce and a HIMA F-Host wth local output s calculated as follows: F-Devce PROFIsafe Protocol HIMA F-Host Output Fgure 29: Reacton Tme between an F-Devce and a HIMA F-Host SFRT <= MaxDataAgeIn + 2 F_WD_TIME + MaxDataAgeOut + Tu Remarks: Wth HIMax/HIMatrx L3 and f data s used locally,.e., f t s not output to a HIMax I/O, the fault tolerance tme of the CPU module can be replaced by 2 WDT CPU. See also the Remark to the SFRT calculatons n Chapter Calculaton of the SFRT usng an F-Devce and a HIMA F-Host The maxmum SFRT allowed for a PROFIsafe connecton between an F-Host and a HIMA F-Devce wth local output s calculated as follows: F-Devce PROFIsafe Protocol HIMA F-Host F-Devce Output Fgure 30: Reacton Tme usng a HIMA F-Host and two F-Devces SFRT <= MaxDataAgeIn + 2 F_WD_TIME(nput) + 2 WDT CPU + 2 F_WD_TIME(output) + MaxDataAgeOut + Tu Remark to the SFRT Calculatons 1. Defnton of SFRT n accordance wth IEC , Ed.2 2. All addtonal delays n the user program must be added, e.g., due to TOF or TON functon blocks, or n the modules, due to output flters, nput flters, relay, etc. 3. MaxDataAgeIn s the maxmum age of a process value that s read on a physcal nput and s added to a PROFIsafe message by a F-Devce, but only the porton that s not already contaned n DATn. HI E Rev Page 79 of 386

80 5 PROFINET IO Communcaton In HIMatrx L3, MaxDataAgeIn must be set to 0 ms. In a HIMax system, the MaxDataAgeIn value does not exceed FTT CPU 1) - 2 WDT CPU - DATn (for physcal nputs). must be set to 0 (for data created by the user program). 4. MaxDataAgeOut s the worst case reacton tme of an output F-Devce or F-Host for a) outputtng the receved process values to a physcal output, b) controllng the physcal outputs after F_WD_Tme has expred and c) deactvatng the physcal outputs f the devces fal. - In HIMatrx L3, MaxDataAgeOut = 3 WDT CPU (for physcal outputs) - In HIMax, MaxDataAgeOut = WDT CPU + FTT CPU 1) (for physcal outputs) - After F_WD_TIME has expred, the HIMax and HIMatrx L3 respond wthout faults at the latest after 2 WDT CPU. - If the F-Host/F-Devce (HIMA CPU module) fals mmedately pror to ths reacton, the outputs of HIMatrx L3 are de-energzed once WDT CPU has expred. In the HIMax system, ths occurs at the latest after FTT CPU 1) - WDT CPU snce the output module has not receved any message for the duraton of a WDT CPU. - Assumng that only one fault occurs n HIMatrx L3 or HIMax, 1 WDT CPU can be subtracted from MaxDataAgeOut. 5. Tu s the mnmum value of DATn, DATout, WDT CPU. Theoretcally, t s possble to use half of the value of DATn and half of the value of DATout, but the manufacturer must specfy to whch naccuracy degree F_WD_Tme s montored by the devce. If the devce runs cyclcally, DAT = 2 max. devce cycle. For HIMA HIMatrx L3 and HIMax F-Devces, DATout = DATn = 2 * WDT CPU 6. F_WD_TIME, see chapter ) Fault tolerance tme of the CPU module Page 80 of 386 HI E Rev. 4.01

81 Communcaton 5 PROFINET IO 5.4 Requrements for Safely Operatng PROFIsafe Addressng The HIMA PROFIsafe network corresponds to the PROFINET Ethernet network that can be used to transfer the PROFIsafe messages. In ths context, network refers to a logcal network that can nclude multple physcal sub-networks. A separaton s sutable for a PROFIsafe network f PROFIsafe messages cannot overrde the network separaton. Ths would be the case, f an IP-based router s used and the networks are connected to dfferent Ethernet nterfaces of the router. The PROFIsafe networks are not separated f, for nstance, the networks are connected va one port router, swtches, hubs or Ethernet brdges. Even f manageable swtches are used and the PROFIsafe networks are separated, e.g., va port-based VLANs, one-to-one addressng should be strven for. Ths ensures that no connectons between PROFIsafe networks are accdentally establshed durng upgrade or mantenance. The followng condtons must be met for addressng the PROFIsafe devces: A one-to-one correspondence between the F addresses of the PROFIsafe devce/modules n a PROFIsafe network must be ensured. Addtonally, HIMA recommends to selectng the F addresses bjectve, even n separated PROFIsafe networks, to ensure addressng safety. When startng up and modfyng safety functons, ensure that the safety functons use the proper nputs and outputs of the correspondng PROFIsafe devces throughout the entre PROFIsafe network. The PROFIsafe F modules must be confgured such that F modules wth dentcal nput and output data lengths that operate n a gven PROFIsafe network have dfferent CRC1 sgnatures, e.g., by assgnng sutable F addresses or F_WD_Tme. The CRC1 can be read n SILworX. Remark: Ths s defntely ensured for F modules operatng n a gven PROFIsafe network f only one F-Host s used and ther F parameters only dffer n the F address. To avod accdental generaton of the same CRC1 sgnature, make sure that, e.g., the parameters F_WD_Tme, F_Prm_Flag1/2 are dentcal for all F modules and the F modules do not use an Par CRC. Rsk Assocated wth PROFIsafe Devces wth Identcal Input and Output Data Length PROFIsafe devce may only be operated f the F INPUT data length does not equal the F OUTPUT data length of the same PROFIsafe connecton. Otherwse, potental addressng faults n standard components and/or standard transmsson technologes mght not be detected and could cause safety-related malfunctons. In HIMA F modules confgured for the HIMA controller, the F nput data length must dffer from the F output data length. To preclude the rsk of safety-related malfunctons, use only F nput modules or only F output modules, and do not use F nput/output modules Network Aspects The network used for transferrng PROFIsafe messages must ensure suffcent avalablty and transmsson qualty. HI E Rev Page 81 of 386

82 5 PROFINET IO Communcaton A safety reacton s trggered f reduced transmsson qualty s detected by PROFIsafe, but s not recognzed by the standard transmsson facltes (Ethernet). After a safety reacton due to reduced transmsson qualty, the problems must be resolved to once agan ensure suffcent transmsson qualty. Only after the requred measures were taken, a PROFIsafe restart may be acknowledged. To do so, the Operator Acknowledge or Reset sgnal must be used. WARNING Operator Acknowledge and Reset may only be used f dangerous states no longer exst. A PROFIsafe network must be protected aganst unauthorzed access and actons (e.g., DoS, hacker, etc.). The measures must be agreed upon together wth the supervsng authorty. Ths s partcularly mportant f wreless transmsson technologes are used. For further detals, refer to the PROFIsafe Specfcaton V2.5c, Table 23 and Table 24. Avalablty wth respect to added messages Message packets can be stored, e.g., usng network components such as swtches, and can be added (sent) to e later pont n tme 1). These message packets cause a shutdown f they are older that the last message packet receved by the PROFIsafe devce (see Consecutve Number Table 48 and Table 65). 1) Fault assumpton for safety-related communcaton Page 82 of 386 HI E Rev. 4.01

83 Communcaton 5 PROFINET IO 5.5 HIMA PROFINET IO Controller and PROFIsafe F-Host Ths chapter descrbes the features of the HIMA PROFINET IO controller and PROFIsafe F-Host, and the menu functons and dalog boxes requred to confgure the HIMA PROFINET IO controller and PROFIsafe n SILworX. System Requrements PROFINET IO Controller Equpment and system requrements Element Descrpton Controller HIMax wth COM module HIMatrx L3 Processor module The Ethernet nterfaces on the processor module may not be used for PROFINET IO. COM module Ethernet 10/100BaseT. Actvaton Software actvaton code requred, see Chapter 3.4. Table 39: Equpment and System Requrements for the PROFINET IO Controller. PROFINET IO Controller and PROFIsafe Host Propertes Propertes Descrpton Safety-related No Transfer rate 100 Mbt/s full duplex Transmsson path Ethernet nterfaces on the COM module Ethernet nterfaces n use can smultaneously be used for addtonal protocols. Conformty class The PROFINET IO controller meets the requrements for Conformance Class A. Real Tme Class RT Class 1 Max. number of One PROFINET IO controller can be confgured PROFINET IO controller for each COM module. Max. number of A PROFINET IO controller can establsh an PROFINET IO devces applcaton applcaton relaton (AR) wth a maxmum of 64 relatons (ARs) PROFINET IO devces. Number of communcaton relatons Standard: 1 nput CR, 1 output CR, 1 alarm CR (CRs for each AR) Max. process data length of a CR Output: max bytes Input: max bytes Transmt clockng Possble at devce level usng the Reducton Rate settng. The followng features apply to PROFIsafe Max. number of F-Hosts (HIMax) 1024 Max. number of F-Hosts (HIMatrx L3) 512 Max. process data length of a CR Output: max. 123 bytes user data + 5 bytes 1) Input: max. 123 bytes user data + 5 bytes 1) Max. user data sze HIMax: 1024 x 123 bytes = bytes HIMatrx L3: 512 x 123 bytes = bytes 1) 5 bytes management data (status/control bytes and CRC) Table 40: PROFINET IO Controller Propertes HI E Rev Page 83 of 386

84 5 PROFINET IO Communcaton 5.6 PROFINET IO/PROFIsafe Example Ths example shows how to confgure a HIMA PROFINET IO controller wth a connecton to the PROFINET IO devce, on a HIMax controller. The PROFINET IO devce s equpped wth a PROFINET IO module and a PROFIsafe module. In the HIMA PROFINET IO controller, the PROFINET IO devce must be confgured as t s actually structured Creatng a HIMA PROFINET IO Controller n SILworX To create a new HIMA PROFINET IO controller 1. In the structure tree, select Confguraton, Resource, Protocols. 2. Rght-clck Protocols and select New, PROFINET IO Controller from the context menu to add a new PROFINET IO controller. 3. Select Propertes from the context menu for PROFINET IO controller. 4. Enter the controller's devce name n the Name feld. 5. Clck COM Module. Fgure 31: Structure Tree for the PROFINET IO Controller Confgurng the Devce n the HIMA PROFINET IO Controller To create a HIMax PROFINET IO Devce wthn the PROFINET IO controller 1. Select New, PROFINET IO Devce from the context menu for the PROFINET IO controller. To read the GSDML lbrary fle from an external data source (e.g., CD, USB stck, Internet): 1. On the structure tree, select Confguraton, Resource, Protocols, PROFINET IO Controller, GSDML Lbrary. 2. Rght-clck the GSDML lbrary and select New from the context menu to add the GSDML fle for to the PROFINET IO devce. To load the GSDML fle for a new PROFINET IO devce 1. On the structure tree, select Confguraton, Resource, Protocols, PROFINET IO Controller, PROFINET IO Devce. 2. Select Propertes from the context menu and open the Parameter tab. 3. Enter the devce name n the Name feld. 4. Enter the IP address of the PROFINET IO devce n the IP Address feld. Page 84 of 386 HI E Rev. 4.01

85 Communcaton 5 PROFINET IO 5. On the drop-down menu for GSDML Fle, select the GSDML lbrary fle specfc to PROFINET IO devce and close Propertes. To select the devce access pont (DAP) for the PROFINET IO devce 1. In the structure tree, select Protocols, PROFINET IO Controller, PROFINET IO Devce, DAP Module. 2. Select Edt from the context menu and choose the sutable DAP data record for the PROFINET IO devce (DAP = Devce Access Pont). The GSDML lbrary fle often contans multple DAPs from one manufacturers. Fgure 32: Devce Access Pont (DAP) for the PROFINET-IO Devce To confgure the module slots: 1. In the structure tree, open Protocols, PROFINET IO Devce. 2. Rght-clck PROFINET IO Devce and select New from the context menu to open the module lst. 3. From the module lst, select sutable modules for the PROFINET IO devce and clck Add Module(s) to confrm the acton. To number the PROFINET IO devce modules The Devce Access Pont (DAP) module s assocated by default wth slot 0. All other PROFINET IO devce modules must be numbered. 1. Rght-clck PROFINET IO Devce and select Propertes from the context menu. 2. In the Slot feld, enter the devce module slots n the same order as arranged on the actual PROFINET IO devce. 3. Repeat these steps for every further PROFINET IO devce modules. The Model and Features tabs dsplay addtonal detals of the GSDML fle. To confgure the applcaton relaton 1. In the structure tree, open PROFIsafe IO Devce, Applcaton Relaton. 2. Rght-clck Default Input CR and select Propertes from the context menu. 3. Adjust the reducton factor parameter, e.g., set t to Rght-clck Default Output CR and select Propertes from the context menu. 5. Adjust the reducton factor parameter, e.g., set t to 4. HI E Rev Page 85 of 386

86 5 PROFINET IO Communcaton Confgurng the Devce Access Pont (DAP) Module To confgure the DAP module (Devce Access Pont) 1. Select [000] DAP Module, [xxxxx] DAP Submodule. 2. Rght-clck [xxxxx] DAP Submodule and select Edt from the context menu. 3. If the consumer/provder status should not be controlled wth a specal user program logc, select the System Varables tab located n the Edt dalog box and assgn the Input Data Accepted by Controller output varable a global varable wth the TRUE ntal value. These system varables can be used to control the Consumer/Provder Status, see Chapter 5.2. Settng the header parameters, e.g., for a DAP wth alarm settngs. To set the header parameters for the devce access pont (DAP) for the PROFINET IO devce 1. In the structure tree, select Protocols, PROFINET IO Controller, PROFINET IO Devce, DAP Module, [xxxxx] DAP Submodule, Alarm Settngs (Header): Parameters. 2. Select Propertes from the context menu. 3. Enter the header parameter name n the Name feld. 4. Clck the Edt button to open a dalog box for settng or changng the parameters for the nterfaces, dagnoss or alarms Confgurng the PROFINET IO Devce Modules The sum of the varables (n bytes), must dentcal wth the sze of the module (n bytes). To confgure the PROFINET IO devce module 1. Select [001] PROFINET IO Devce Module, [xxxxx] PROFINET IO Devce Submodule. 2. Rght-clck [xxxxx] Submodule and select Edt from the context menu. 3. In the Edt dalog box, select the Process Varables tab. 4. Drag the sutable varable from the Object Panel onto the Input Sgnals area. 5. Rght-clck anywhere n the Inputs Sgnals area and clck New Offsets from the context menu to re-generate the varable offsets. 6. If the consumer/provder status should not be controlled, select the System Varables tab located n the Edt dalog box and assgn the Vald Output Data and Input Data Accepted by Controller output varables a global varable wth the TRUE ntal value. These system varables can be used to control the Consumer/Provder Status, see Chapter 5.2. Page 86 of 386 HI E Rev. 4.01

87 Communcaton 5 PROFINET IO Confgurng the PROFIsafe IO Devce Modules The sum of the varables (n bytes), must dentcal wth the sze of the module (n bytes). To confgure the PROFIsafe IO devce modules 1. Select [001] PROFIsafe IO Devce Module, [xxxxx] PROFIsafe IO Devce Submodule. 2. Rght-clck [xxxxx] Submodule and select Edt from the context menu. 3. In the Edt dalog box, select the Process Varables tab. 4. Drag the sutable varable from the Object Panel onto the Input Sgnals area. 5. Rght-clck anywhere n the Inputs Sgnals area and clck New Offsets from the context menu to re-generate the varable offsets. 6. If the consumer/provder status should not be controlled, select the System Varables tab located n the Edt dalog box and assgn the Vald Output Data and Input Data Accepted by Controller output varables a global varable wth the TRUE ntal value. These system varables can be used to control the Consumer/Provder Status, see Chapter 5.2. To confgure the F parameters 1. Select [001] PROFIsafe IO Devce Module, [xxxxx] PROFIsafe IO Devce Submodule, F Parameters. 2. Rght-clck F Parameters and select Propertes from the context menu. 3. Set the followng parameters: - F_Dest_Add: Destnaton address of the devce module - F_WD_Tme: Watchdog tme for the connecton to ths devce module To verfy the PROFINET IO confguraton 1. In the structure tree, open Confguraton, Resource, Protocols, PROFINET IO Controller. 2. Rght-clck PROFINET IO Controller and select Verfcaton from the context menu. 3. Thoroughly verfy the messages dsplayed n the logbook and correct potental errors. Recomple the resource and load t nto the controller to ensure that the new confguraton can be used for communcaton wth the PROFINET IO. HI E Rev Page 87 of 386

88 5 PROFINET IO Communcaton Identfyng the PROFINET IO Devces wthn the Network To fnd the PROFINET IO devce wthn the Ethernet network 1. Log-n to the communcaton module contanng the PROFINET IO controller. 2. In the structure tree for to the onlne vew, select PROFINET IO Controller, PROFINET IO Staton. 3. Select Get PROFINET IO Network Statons. A lst appears specfyng all the PROFINET devces n the network of the current PROFINET IO controller. To confgure the PROFINET IO devce n the onlne vew 1. In the lst, rght-clck the PROFINET IO devce to be confgured, to change the settngs. 2. Name the devce usng the Name the PROFINET IO Devce context menu functon. Make sure that the PROFINET IO devce name match the project. (Only lower case letters may be used!) 3. Use the Network Settngs context menu functon to set the IP address, subnet mask and gateway. The PROFINET IO devce name and network settngs must be confgured n the PROFINET IO controller, or no communcaton s possble. Page 88 of 386 HI E Rev. 4.01

89 Communcaton 5 PROFINET IO 5.7 Menu Functons for the PROFINET IO Controller Example of Structure Tree for the PROFINET IO Controller Profnet-IO Controller Funktonsbaustene GSDML-Bblothek GSDML Date (XML-Format) Profnet-IO Devce [000] DAP Modul [0001]: Submodul [001] Input Modul [0001]: Submodul Inputs [002] Output Modul [0001]: Submodul Outputs [003] Input/Output Modul [0001]: Submodul Input/Output [004] Falsafe Modul [0001]: Submodul Input/Output F-Parameter Record Item Applcaton Relaton Alarm CR Default Input CR Default Output CR Fgure 33: Structure Tree for the PROFINET IO Controller PROFINET IO Controller The Propertes functon of the context menu for the PROFINET IO controller s used to open the Propertes dalog box. The dalog box contans the followng tabs: Tab: PROFINET IO Devce (Propertes) Element Descrpton Type PROFINET IO controller Name Name of the PROFINET IO controller Process Data Refresh Rate [ms] Force Process Data Consstency Refresh rate n mllseconds at whch the COM and CPU exchange protocol data. If the Refresh Rate s zero or lower than the cycle tme for the controller, data s exchanged as fast as possble. Range of values: 4...(2 31-1). Default value: 0 Actvated: Transfer of all protocol data from the CPU to the COM wthn a CPU cycle. Deactvated: Transfer of all protocol data from the CPU to the COM, dstrbuted over multple CPU cycles, each wth 1100 byte per data drecton. Ths can also allow lowerng the cycle tme of the controller. Default value: actvated HI E Rev Page 89 of 386

90 5 PROFINET IO Communcaton Module Actvate Max. µp Budget Max. µp budget n [%] RPC Port Server RPC Port Clent F_Source_ Add Selecton of the COM module wthn whch the protocol s processed. Actvated: Adopt the µp budget lmt from the Max. µp Budget n [%] feld. Deactvated: Do not use the µp budget lmt for ths protocol. Maxmum µp budget for the module that can be used for processng the protocols. Range of values: % Default value: 30% Remote Procedure Call Port Range of values: Default value: RPC port server and RPC port clent must not be dentcal! Remote Procedure Call Port Range of values: Default value: RPC port server and RPC port clent must not be dentcal! Address of the controller (F-Host). Unque PROFIsafe controller/devce addresses must be used n a PROFIsafe network. Also refer to the IEC V2.5c Chapter 9.7 for further detals. Table 41: The PROFINET IO Devce (Propertes) Tab Page 90 of 386 HI E Rev. 4.01

91 Communcaton 5 PROFINET IO PROFINET IO Devce (wthn the Controller) The Propertes functon of the context menu for the PROFINET IO devce s used to open the Propertes dalog box, whch contans the followng tabs: Tab: Parameters (Propertes) Element Name IP Address Subnet Mask Gsdml Fle Descrpton Name of the PROFINET IO devce IP address of the communcaton partner. Range of values: Default value: Do not use IP addresses already n use, see Chapter Subnet mask for the addressed subnet contanng the devce. Range of values: Default value: GSDML stands for Generc Staton Descrpton Markup Language and refers to an XML-based descrpton language. The GSDML fle contans the PROFINET devce master data Table 42: Parameters (Propertes) Tab The Model and Features tabs dsplay addtonal detals of the GSDML fle such as Manufacturer Name, Devce Descrpton or Supported Factors. Ths addtonal nformaton s ntended to support the users durng the devce confguraton and may not be changed DAP Module (Devce Access Pont Module) Wthn a PROFINET devce, a DAP module s always used for connectng the bus (DAP: Devce Access Pont). The DAP module s a default and cannot be deleted. The Propertes functon located on the context menu for the DAP module s used to open the Propertes dalog box, whch contans the followng parameters: Tab: Parameters (Propertes) Element Descrpton Name Name for the DAP module Slot Not changeable Default value: 0 Table 43: Parameters (Propertes) Tab The Model and Features tabs dsplay addtonal detals of the GSDML fle such as Module ID, Hardware/Software Verson. Ths addtonal nformaton s ntended to support the users durng the devce confguraton and may not be changed. HI E Rev Page 91 of 386

92 5 PROFINET IO Communcaton DAP Submodule (Propertes) The Propertes functon located on the context menu for the DAP submodule s used to open the Propertes dalog box, whch contans the followng parameters: Tab: Parameters Element Name Sub-Slot IO Data CR, Inputs Input Data Accepted by Controller Table 44: Parameters Tab Descrpton Name of the nput submodule Default value: 1 Selecton of the communcaton relaton (CR) to whch the submodule nputs should be transferred. - None - Default Input CR Selecton of the communcaton relaton (CR) to whch the submodule IO consumer status (CS) should be transferred. - None - Default Output CR The Model and Features tabs dsplay addtonal detals of the GSDML fle such as Submodule ID, Data Length. Ths addtonal nformaton s ntended to support the users durng the devce confguraton and may not be changed DAP Submodule (Edt) The Edt functon of the context menu for nput submodules s used to open the Edt dalog box, whch contans the followng tabs: Tab: System Varables The System Varables tab contans the followng system varables that are requred to evaluate or control the state of the PROFINET IO submodule from wthn the user program. Element Descrpton Vald nput data True Vald Input Data GOOD False Invald Input Data BAD Input Data Accepted by Controller True Vald Input Data GOOD False Invald Input Data BAD Table 45: System Varables Tab These system varables can be used to control the Consumer/Provder Status, see Chapter Header Parameter Some devces contan so-called header parameters used to actvate/deactvate parameters such as Dagnoss, Alarm and Interfaces. Page 92 of 386 HI E Rev. 4.01

93 Communcaton 5 PROFINET IO Input/Output PROFINET IO Modules An nput/output PROFINET IO module can have multple submodules. HIMax PROFINET IO controllers have one submodule n each nput/output PROFINET IO module. The PROFINET IO nput modules are used to enter the HIMax PROFINET IO controller nput varables that are sent by the PROFINET IO devce. The PROFINET IO output modules are used to enter the HIMax PROFINET IO controller output varables that are sent to the PROFINET IO devce. To create the requred PROFINET IO modules 1. In the structure tree, open Confguraton, Resource, Protocols, PROFINET IO Devce. 2. Rght-clck PROFINET IO Devce and select New from the context menu. 3. Select the modules requred. The Propertes functon of the context menu for the nput/output PROFINET IO modules s used to open the Propertes dalog box, whch contans the followng tabs: Tab: Parameters Element Descrpton Name Name of the nput/output PROFINET IO module Slot 0 to Default value: 1 Table 46: Parameter Tab of the I/O PROFINET IO Module The Model and Features tabs dsplay addtonal detals of the GSDML fle such as Module ID, Hardware/Software Verson. Ths addtonal nformaton s ntended to support the users durng the devce confguraton and may not be changed. HI E Rev Page 93 of 386

94 5 PROFINET IO Communcaton Input Submodule The submodule parameters are used to defne the communcaton relaton of the module and ts behavor after connecton s nterrupted Submodule Input (Propertes) The Propertes functon located on the context menu for the Input Submodules s used to open the Propertes dalog box, whch contans the followng parameters: Tab: Parameters Element Descrpton Name Name of the nput submodule Sub-Slot Not changeable for HIMax PROFINET IO controller. Default value: 1 IO Data CR, Inputs Selecton of the communcaton relaton (CR) to whch the submodule nputs should be transferred. - None - Default Input CR Input data accepted by Controller Selecton of the communcaton relaton (CR) to whch the submodule IO consumer status (CS) should be transferred. - None - Default Output CR Shared Input Actvated Multple PROFINET IO controllers can access the nputs. Deactvated Only one PROFINET IO controller can access the nputs. Input Values f IO CR s Dsconnected Behavor of the nput varables for ths PROFINET IO submodule after the connecton s nterrupted. Retan Last Value The nput varables are freezed to the current value and used untl a new connecton s establshed. Table 47: Parameters Tab Adopt Intal Values The ntal data are used for the nput varables. The Model and Features tabs dsplay addtonal detals of the GSDML fle such as Submodule ID, Hardware/Software Verson or Data Length. Ths addtonal nformaton s ntended to support the users durng the devce confguraton and may not be changed. Page 94 of 386 HI E Rev. 4.01

95 Communcaton 5 PROFINET IO Input Submodule (Edt) The Edt functon of the context menu for the nput submodule s used to open the Edt dalog box. The dalog box contans the followng tabs: Tab: System Varables The System Varables tab contans the followng system varables that are requred to evaluate the state of the PROFINET IO submodule from wthn the user program. Element Descrpton Vald Input Data True Vald Input Data GOOD False Invald Input Data BAD Input Data Accepted by Controller True Vald Input Data GOOD False Invald Input Data BAD The followng parameters are only avalable for PROFIsafe modules Vald Output Data True Vald Output Data GOOD False Invald Output Data BAD Output Data Accepted by Devce True Vald Output Data GOOD False Invald Output Data BAD These system varables can be used to control the Consumer/Provder Status, see Chapter 5.2. HI E Rev Page 95 of 386

96 5 PROFINET IO Communcaton PROFIsafe Control PROFIsafe RoundTrp Tme last Wth each message, PROFIsafe sends the PROFIsafe control byte from the controller to the devce that can be set n the user program. See also Chapter Bt 0 Par_EN_C: To load new Parameters nto the F-Devce, the Par_EN_C must be set to TRUE to allow the F-Devce to be unlocked. As long as Par_EN_C s TRUE, falsafe values 0 are exchanged between F-Host and F-Devce. Bt 1 OA_C: Operator Acknowledge. After a PROFIsafe error (e.g., CRC error or tmeout), bt must be set to TRUE for at least a PROFIsafe cycle. If a PROFIsafe connecton should be (re- )started, the operator acknowledgment can only be sent f no dangerous states exst. Bt 2 Reserved Bt 3 Reserved Bt 4 Actvate_FV_C: FALSE: Process values are exchanged between F-Host and F-Devce. TRUE: Falsafe values 0 are exchanged between F-Host and F-Devce. Bt 5 Reserved Bt 6 Bt 7 Reset_Comm: PROFIsafe communcaton reset; the protocol stack s set to the ntal state. The bt must be set to TRUE untl the PROFIsafe status Bt 2 Reset_Comm has read back the TRUE value. For a F-Host, t s the tme between a data message transmsson (wth consecutve number N) and the recepton of the correspondng acknowledgment (wth consecutve number N), measured n mllseconds. Page 96 of 386 HI E Rev. 4.01

97 Communcaton 5 PROFINET IO PROFIsafe Status Table 48: System Varables Tab Each message receved by the PROFIsafe on the host contans the PROFIsafe status byte, whch can be evaluated n the user program. Bt 0 Par_OK_S TRUE: New Parameters receved FALSE: No change Bt 1 OA_Req_S Operator Acknowledge Requested. Bt 2 Reset_Comm s the Reset_Comm value read back from the host control byte. Ths bt ndcates whether Reset_Comm has arrved. Bt 3 FV_actvated_S Bt 4 Toggle_h Bt 5 Devce_Fault TRUE: The F-Devce reported a devce fault. FALSE: The F-Devce dd not reported any devce fault. Bt 6 WD_tmeout TRUE: Ether the F-Devce reported a watchdog tmeout or the host tmeout occurred on the F-Host. FALSE: No tmeout occurred on the F-Devce or on the F-Host. Bt 7 CRC TRUE: Ether the F-Devce reported a CRC error or a CRC error occurred on the F-Host. FALSE: No CRC fault occurred on the F-Devce or on the F-Host. The Process Varables tab s used to enter the nput varables. HI E Rev Page 97 of 386

98 5 PROFINET IO Communcaton F Parameters of Submodule Input (for PROFIsafe Modules only) To exchange process data safely, the PROFIsafe F-Devces need normalzed F parameters. The F-Devce only establshes communcaton f vald F parameters were confgured. Grayed-out parameters are dsabled and, to some extent, preset by the GSDML fle or automatcally calculated. Element Name Index F_Par_Verson F_Source_Add F_Dest_Add F_WD_Tme F_Par_CRC Descrpton Module name Module ndex Only V2-mode s supported. V1-mode s rejected. It s determned through the GSDML fle. The F source address of the F-Host must be unque wthn the PROFIsafe network! Range of values: 1 to The F destnaton address of the F-Devce must be unque wthn the PROFIsafe network! Range of values: 1 to Watchdog tme Range of values: 1 ms to ms The F_Par_CRC of the F-Devce s entered n ths feld. F_SIL F_Check_Par F_Block_ID F_CRC_Length F_Par_CRC Table 49: F Parameters for Submodule Input (Propertes) The SIL s dsplayed n ths feld 0 - SIL1 1 - SIL2 2 - SIL3 3 - NoSIL It s determned through the GSDML fle. The CRC Parameter s dsplayed n ths feld It s determned through the GSDML fle. Structure of the F parameters It s determned through the GSDML fle. It ndcates f the 3-byte CRC or 4-byte CRC s used. It s determned through the GSDML fle. The CRC F parameter (CRC1) s dsplayed n ths feld. It s calculated based on the current F parameters Page 98 of 386 HI E Rev. 4.01

99 Communcaton 5 PROFINET IO Submodule Output The submodule parameters are used to defne the communcaton relaton of the module and ts behavor after connecton s nterrupted Submodule Output (Propertes) The Propertes functon located on the context menu for the Output Submodules s used to open the Propertes dalog box, whch contans the followng parameters: Tab: Parameters Element Name Sub-Slot IO Data CR, Outputs Output Data Accepted by Devce Table 50: Parameters Tab Descrpton Name of the output submodule Not changeable for HIMax PROFINET IO controller. Default value: 1 Selecton of the communcaton relaton (CR) to whch the submodule outputs should be transferred. - None - Default Input CR Selecton of the communcaton relaton (CR) to whch the submodule IO consumer status (CS) should be transferred. - None - Default Output CR The Model and Features tabs dsplay addtonal detals of the GSDML fle such as Submodule ID, Hardware/Software Verson or Data Length. Ths addtonal nformaton s ntended to support the users durng the devce confguraton and may not be changed. HI E Rev Page 99 of 386

100 5 PROFINET IO Communcaton Submodule Output (Edt) The Edt functon of the context menu for Output Submodule s used to open the Edt dalog box, whch contans the followng tabs: Tab: System Varables The System Varables tab contans the followng system varables that are requred to evaluate the state of the PROFINET IO submodule from wthn the user program. Element Descrpton Vald Output Data True Vald Output Data GOOD False Invald Output Data BAD Output Data Accepted by Devce True Vald Output Data GOOD False Invald Output Data BAD The followng parameters are only avalable for PROFIsafe modules Vald Input Data True Vald Input Data GOOD False Invald Input Data BAD Input Data Accepted by Controller True Vald Input Data GOOD False Invald Input Data BAD For more detals on addtonal PROFIsafe module parameters, see Table 48. Table 51: System Varables Tab These system varables can be used to control the Consumer/Provder Status, see Chapter 5.2. The Process Varables tab s used to enter the output varables F Parameters of Submodule Output (for PROFIsafe Modules only) For a descrpton of the F parameters, see Chapter Page 100 of 386 HI E Rev. 4.01

101 Communcaton 5 PROFINET IO Submodule Inputs and Outputs The submodule parameters are used to defne the communcaton relaton of the module and ts behavor after connecton s nterrupted Submodule Inputs and Outputs (Propertes) The Propertes functon located on the context menu for the Input and Output Submodules s used to open the Propertes dalog box, whch contans the followng parameters: Tab: Parameters Element Name Sub-Slot IO Data CR, Inputs IO Data CR, Outputs Input Data Accepted by Controller Output Data Accepted by Devce Input Values When IO CR s Dsconnected Table 52: Parameters Tab Descrpton Name of the nput/output submodule Not changeable for HIMax PROFINET IO controller. Default value: 1 Selecton of the communcaton relaton (CR) to whch the submodule nputs should be transferred. - None - Default Input CR Selecton of the communcaton relaton (CR) to whch the submodule outputs should be transferred. - None - Default Output CR Selecton of the communcaton relaton (CR) to whch the submodule IO consumer status (CS) should be transferred. - None - Default Output CR Selecton of the communcaton relaton (CR) to whch the submodule IO consumer status (CS) should be transferred. - None - Default Input CR - Retan Last Value - Adopt Intal Values The Model and Features tabs dsplay addtonal detals of the GSDML fle such as Submodule ID, Hardware/Software Verson or Data Length. Ths addtonal nformaton s ntended to support the users durng the devce confguraton and may not be changed. HI E Rev Page 101 of 386

102 5 PROFINET IO Communcaton Submodule Inputs and Outputs (Edt) The Edt functon of the context menu for Input/Output Submodules s used to open the Edt dalog box, whch contans the followng tabs: Tab: System Varables The System Varables tab contans the followng system varables that are requred to evaluate the state of the PROFINET IO submodule from wthn the user program. Element Descrpton Vald Output Data True Vald Output Data GOOD False Invald Output Data BAD Output Data Accepted by Devce True Vald Output Data GOOD False Invald Output Data BAD Vald Input Data True Vald Input Data GOOD False Invald Input Data BAD Input Data Accepted by Controller True Vald Input Data GOOD False Invald Input Data BAD For PROFIsafe module parameters, see Table 48. Table 53: System Varables Tab The Process Varables tab s used to enter the nput and output varables n ther correspondng area. These system varables can be used to control the Consumer/Provder Status, see Chapter Submodule Input/Output F Parameters (for PROFIsafe Modules only) For a descrpton of the F parameters, see Chapter Page 102 of 386 HI E Rev. 4.01

103 Communcaton 5 PROFINET IO Applcaton Relaton (Propertes) An applcaton relaton (AR) s a logc construct for enablng data exchange between controller and devce. In ths example (see Fgure 34), data s transferred wthn the applcaton relaton va the standard communcaton relatons (alarm CR, default nput CR and default output CR). Ths communcaton relatons are already confgured per default n the nput and output modules. Fgure 34: Communcaton va PROFINET IO/PROFIsafe The Propertes functon of the context menu for applcaton relaton s used to open the Propertes dalog box. Element Name AR UUID Connecton Establshment Tmeout Factor Supervsor may adopt the AR Table 54: Applcaton Relaton (Propertes) Descrpton Not changeable Code for unambguously dentfyng the applcaton relaton (AR). Not changeable From the perspectve of the PROFINET IO devce, ths parameter s used durng the creaton of a connecton to calculate the maxmum tme allowed between sendng the response on the connect request and recevng a new request from the a PROFINET IO controller. Range of values: (x 100 ms) Default value: 600 Defnton whether a PROFINET IO supervsor may adopt the applcaton relaton (AR). 0 Not Allowed 1 Allowed Default value: 0 HI E Rev Page 103 of 386

104 5 PROFINET IO Communcaton Alarm CR (Propertes) Multple communcaton relatons (CR) can be establshed wthn an applcaton relaton. The alarm CR s used by a PROFINET IO devce to transmt alarms to the PROFINET IO controller. The Propertes functon of the context menu for applcaton relaton opens the Propertes dalog box, whch contans the followng tabs: Element Descrpton Name Not changeable VLAN ID, Hgh Prorty Each vrtual LAN (VLAN) s assgned a unque number to ensure separaton. A devce n the VLAN wth ID=1 can communcate wth any other devce n the same VLAN, but not wth a devce n another VLAN (e.g., ID=2, 3,...). Range of values: see also IEC x000 No VLAN 0x001 Standard VLAN 0x002 See IEEE Q Up to 0xFFF Default value: 0 VLAN ID, Low Prorty Descrpton, see VLAN ID, Hgh Prorty Default value: 0 Alarm Prorty Use User Prorty The prorty assgned by the user s used. Ignore User Prorty The prorty assgned by the user s gnored. The generated alarm has low prorty. Alarm Resends Maxmum number of F-Devce resends f the controller does not respond. Rang of values 3 to 15 Default value: 10 Alarm Tmeout Factor The RTA tmeout factor s used to calculate the maxmum devce tme that may elapse after sendng a RTA data (alarm) frame and recevng the RTA ack frame. RTA tmeout = RTA tmeout factor x 100 ms Table 55: Alarm CR (Propertes) Rang of values 1 to Default value: 5 Page 104 of 386 HI E Rev. 4.01

105 Communcaton 5 PROFINET IO Input CR (Propertes) The nput CR s used by a PROFINET IO devce to transmt varables to the PROFINET IO controller. The Propertes functon of the context menu for the nput CR opens the Propertes dalog box. The dalog box contans the followng parameters: Element Name Type Send Clock Factor Reducton Factor Descrpton Any unque name for an nput CR The default nput CR cannot be changed 1 (not changeable) The send clock factor defnes the send clock for the cyclc IO CR data transfer. Send clock = send clock factor x µs Range of values: 1 to 128 Default value: 32 The reducton factor allows one to reduce the actual cycle tme needed for sendng the data of an IO CR to send clock. The actual data cycle tme s calculated as follows: Sendng cycle = reducton factor x send clock Watchdog Factor VLAN ID Table 56: Input CR (Propertes) Range of values: 1 to Default value: 32 (dependng on the devce) From the perspectve of an IO CR consumer, the watchdog factor s used to calculate the maxmum tme allowed between the recepton of two frames: Watchdog tme = watchdog factor x send clock factor Range of values: 1 to 7680 Default value: 3 Each vrtual LAN (VLAN) s assgned a unque number to ensure separaton. A devce n the VLAN wth ID=1 can communcate wth any other devce n the same VLAN, but not wth a devce n another VLAN (e.g., ID=2, 3,...). Range of values: see also IEC x000 No VLAN 0x001 Standard VLAN 0x002 See IEEE Q Up to 0xFFF Default value: 0 HI E Rev Page 105 of 386

106 5 PROFINET IO Communcaton Input CR (Edt) The Edt functon of the context menu for the default nput CR s used to open the System Varables dalog box, and contans the followng system varables: Element Descrpton Data Status Input CR 0 State Wth redundant connectons, prmary wrtes to the leadng channel 1 = Prmary 0 = Backup Wth mono connecton: 1 = Connected 0 = Not connected 1 Not used 2 Data Vald Invald s used durng the start-up phase or f the applcaton s not able to report faults va IOPS. 1 = Vald 0 = Invald 3 Not used 4 Process State It has only an nformatve character, the actual data valdty s reported va IOPS. 1 = Run 0 = Stop 5 Problem Indcator 'Problem detected' provdes detals on the dagnostc data of the alarm CR. 1 = Regular operaton 0 = Problem detected 6 Not used 7 Not used Table 57: Input CR (Edt) Page 106 of 386 HI E Rev. 4.01

107 Communcaton 5 PROFINET IO Output CR (Propertes) Multple communcaton relatons (CR) can be establshed wthn an applcaton relaton. The output CR s used by the PROFINET IO devce to transmt varables to the PROFINET IO controller. The Propertes functon of the context menu for the output CR s used to open the Propertes dalog box, whch contans the followng parameters: Element Name Type Send Clock Factor Reducton Factor Descrpton Any unque name for an output CR The default output CR cannot be changed 2 (not changeable) The send clock factor defnes the send clock for the cyclc IO CR data transfer. Send clock = send clock factor x µs Range of values: 1 to 128 Default value: 32 For settng the transmsson frequency. The redundant factor allows the reducton of the actual cycle tme needed for sendng the data of an IO CR. The actual data cycle tme s calculated as follows: Sendng cycle = reducton factor x send clock Watchdog Factor VLAN ID Table 58: Output CR (Propertes) Range of values: 1 to Default value: 32 From the perspectve of an IO CR consumer, the watchdog factor s used to calculate the maxmum tme allowed between the recepton of two frames: Watchdog tme = watchdog factor x send clock factor Range of values: 1 to 7680 Default value: 3 Each vrtual LAN (VLAN) s assgned a unque number to ensure separaton. A devce n the VLAN wth ID=1 can communcate wth any other devce n the same VLAN, but not wth a devce n another VLAN (e.g., ID=2, 3,...). Range of values: see also IEC x000 No VLAN 0x001 Standard VLAN 0x002 See IEEE Q Up to 0xFFF Default value: 0 HI E Rev Page 107 of 386

108 5 PROFINET IO Communcaton 5.8 HIMA PROFINET IO Devce Ths chapter descrbes the characterstcs of the HIMA PROFINET IO devce and the menu functons and dalog boxes requred to confgure the HIMA PROFINET IO controller n SILworX. 5.9 System Requrements Equpment and system requrements Element Descrpton Controller HIMax wth COM module HIMatrx L3 Processor module The Ethernet nterfaces on the processor module may not be used for PROFINET IO. COM module Ethernet 10/100BaseT Actvaton Software actvaton code requred, see Chapter 3.4. Table 59: Equpment and System Requrements for the PROFINET IO Controller. PROFINET IO Devce Propertes Element Descrpton Safety-related No Transfer rate 100 Mbt/s full duplex Transmsson path Ethernet nterfaces on the COM module Ethernet nterfaces n use can smultaneously be used for addtonal protocols. Conformty class The PROFINET IO devce meets the requrements for Conformance Class A. Real Tme Class RT Class 1 Max. number of One PROFINET IO devce can be confgured for PROFINET IO devces each COM module. Max. number of A PROFINET IO devce can establsh a maxmum applcaton relatons (ARs) to the of 5 applcaton relatons (ARs) to a PROFINET IO PROFINET IO controller controller. Max. number of communcaton Standard: 1 nput, 1 output, 1 alarm relatons (CRs for each AR) Max. process data length of all confgured PROFINET IO modules Data Prorzaton Output: max bytes Input: max bytes Possble at devce level usng the Reducton Rate settng. The followng features apply to PROFIsafe Max. number of F-Devces on each 63 COM module (HIMax and HIMatrx L3) Max. process data length of a CR Output: max. 123 bytes user data + 5 bytes 1) Input: max. 123 bytes user data + 5 bytes 1) Max. user data sze HIMax: 1024 x 123 bytes = bytes HIMatrx L3 512 x 123 bytes = bytes 1) 5 bytes management data (status/control bytes and CRC) Table 60: PROFINET IO Controller Propertes Page 108 of 386 HI E Rev. 4.01

109 Communcaton 5 PROFINET IO 5.10 PROFINET IO/PROFIsafe Example Ths secton descrbes how to confgure the HIMA PROFINET IO/ PROFIsafe devce Confgurng the PROFINET IO Devce n SILworX To create a new HIMA PROFINET IO devce 1. In the structure tree, open Confguraton, Resource, Protocols. 2. Select New, PROFINET IO Devce from the context menu for protocols to add a new PROFINET IO devce. 3. Rght-clck PROFINET IO Devce and select Propertes from the context menu. 4. Enter the PROFINET IO devce name n the Name feld. 5. Clck COM Module. Fgure 35: Structure Tree for the PROFINET IO Devce To create the requred PROFINET IO modules 1. In the structure tree, open Confguraton, Resource, Protocols, PROFINET IO Devce. 2. Select New from the context menu for the PROFINET IO devce. 3. For ths example, select the followng modules. PROFINET IO/ PROFIsafe module Slot In 1 byte 1 Safe Out 1 Byte 2 To number the PROFINET IO devce modules 1. Rght-clck the frst PROFINET IO devce module, and then clck Propertes. 2. Enter 1 nto the Slot feld. 3. Repeat these steps for every further PROFINET IO devce modules and number the modules consecutvely. Number the modules such as actually postoned n the PROFINET IO devce. The followng step s only requred for PROFIsafe module! 4. Enter the PROFIsafe module address n the PROFIsafe F_Destnaton_Address feld. HI E Rev Page 109 of 386

110 5 PROFINET IO Communcaton Confgurng the PROFINET IO Devce Input Module The sum of the varables (n bytes), must be dentcal wth the sze of the module (n bytes). To confgure the nput module [01] In 1 Byte 1. In the PROFINET IO devce, select the nput module [01] In 1 Byte. 2. Rght-clck [01] In 1 Bytes and select Edt from the context menu. 3. In the Edt dalog box, select the Process Varables tab. 4. Drag the sutable varable from the Object Panel onto the Input Sgnals area.. 5. Rght-clck anywhere n the Input Sgnals area to open the context menu. 6. Clck New Offsets to re-generate the varable offsets. 7. If the consumer/provder status should not be controlled, select the System Varables tab located n the Edt dalog box and assgn the Input Data Accepted by Devce output varable a global varable wth the TRUE ntal value. These system varables can be used to control the Consumer/Provder Status, see Chapter Confgurng the PROFIsafe Devce Output Module To confgure the output module [02] Out 1 Bytes 1. In the PROFINET IO devce, select the output module [02] Safe Out 1 Byte. 2. Rght-clck [02] Out 1 Bytes and select Edt from the context menu. 3. In the Edt dalog box, select the Process Varables tab. 4. Drag the sutable varable from the Object Panel onto the Output Sgnals area. 5. Rght-clck anywhere n the Output Sgnals area to open the context menu. 6. Clck New Offsets to re-generate the varable offsets. 7. If the consumer/provder status should not be controlled, select the System Varables tab located n the Edt dalog box and assgn the Vald Output Varable and Input Data Accepted by Devce output varables a global varable wth the TRUE ntal value. These system varables can be used to control the Consumer/Provder Status, see Chapter 5.2. Page 110 of 386 HI E Rev. 4.01

111 Communcaton 5 PROFINET IO Verfyng the PROFINET IO Devce Confguraton To verfy the PROFINET IO devce confguraton 1. In the structure tree, open Confguraton, Resource, Protocols, PROFINET IO Devce. 2. Clck the Verfcaton button on the Acton Bar, and then clck OK to confrm the acton. 3. Thoroughly verfy the messages dsplayed n the logbook and correct potental errors. Use the user program of the PROFINET IO devce resource to recomple the confguraton of the PROFINET IO devce and transfer t to the controllers. Only after ths step, the new confguraton can be used for communcaton wth the PROFINET IO HI E Rev Page 111 of 386

112 5 PROFINET IO Communcaton 5.11 Menu Functons for PROFINET IO Devce Menu Functon: Propertes The Propertes functon of the context menu for the PROFINET IO devce s used to open the Propertes dalog box. Element Type Name Process Data Refresh Rate [ms] Force Process Data Consstency Module Actvate Max. µp Budget Max. µp budget n [%] RPC Port Server RPC Port Clent AutoAwatF ParamsOn ConnLoss Descrpton PROFINET IO devce Any unque name for a PROFINET IO devce Refresh rate n mllseconds at whch the COM and CPU exchange protocol data. If the refresh rate s zero or lower than the cycle tme for the controller, data s exchanged as fast as possble. Range of values: 4...(2 31-1) Default value: 0 Actvated: Transfer of all protocol data from the CPU to the COM wthn a CPU cycle. Deactvated: Transfer of all protocol data from the CPU to the COM, dstrbuted over multple CPU cycles, each wth 1100 byte per data drecton. Ths can also allow lowerng the cycle tme of the controller. Default value: actvated Selecton of the COM module wthn whch the protocol s processed. Actvated: Adopt the µp budget lmt from the Max. µp Budget n [%] feld. Deactvated: Do not use the µp budget lmt for ths protocol. Maxmum µp budget for the module that can be used for processng the protocols. Range of values: % Default value: 30% Remote Procedure Call Port Range of values: Default value: RPC port server and RPC port clent must not be dentcal! Remote Procedure Call Port Range of values: Default value: RPC port server and RPC port clent must not be dentcal! Ths parameter s only used for PROFIsafe modules. Whenever the connecton to the F-Host s lost, the F parameters must be reloaded nto the F-Devce. Ths parameter can be actvated to smplfy the PROFIsafe start-up. Afterwards, the F-Devce automatcally sets the requred F parameters at restart or after a connecton loss. After start-up, ths parameter must absolutely be deactvated to ensure a PROFIsafe-complant behavor. Actvated: The F-Devce automatcally enters the Wat for F Parameters state. Deactvated: The users must send the onlne command to allow the F-Devce to enter the Wat for F Parameters state. Default value: Deactvated Table 61: PROFINET IO Devce General Propertes Page 112 of 386 HI E Rev. 4.01

113 Communcaton 5 PROFINET IO HIMA PROFINET IO Modules The followng PROFINET IO modules are avalable n the HIMA PROFINET IO devce. PROFINET IO module Max. sze for the nput varables Max. sze for the output varables In 1 byte 1 byte In 2 bytes 2 bytes In 4 bytes 4 bytes In 8 bytes 8 bytes In 16 bytes 16 bytes In 32 bytes 32 bytes In 64 bytes 64 bytes In 128 bytes 128 bytes In 256 bytes 256 bytes In 512 bytes 512 bytes In 1024 bytes 1024 bytes In-Out 1 byte 1 byte 1 byte In-Out 2 bytes 2 bytes 2 bytes In-Out 4 bytes 4 bytes 4 bytes In-Out 8 bytes 8 bytes 8 bytes In-Out 16 bytes 16 bytes 16 bytes In-Out 32 bytes 32 bytes 32 bytes In-Out 64 bytes 64 bytes 64 bytes In-Out 128 bytes 128 bytes 128 bytes In-Out 256 bytes 256 bytes 256 bytes In-Out 512 bytes 512 bytes 512 bytes Out 1 byte 1 byte Out 2 bytes 2 bytes Out 4 bytes 4 bytes Out 8 bytes 8 bytes Out 16 bytes 16 bytes Out 32 bytes 32 bytes Out 64 bytes 64 bytes Out 128 bytes 128 bytes Out 256 bytes 256 bytes Out 512 bytes 512 bytes Out 1024 bytes 1024 bytes Table 62: PROFINET IO Modules HI E Rev Page 113 of 386

114 5 PROFINET IO Communcaton HIMA PROFIsafe Modules The followng PROFIsafe modules are avalable n the HIMA PROFINET IO devce: PROFIsafe module Safe In 1 Byte Safe In 2 bytes Safe In 4 bytes Safe In 8 bytes Safe In 16 bytes Safe In 32 bytes Safe In 64 bytes Safe In 123 bytes Max. sze for the nput varables 1 byte 2 bytes 4 bytes 8 bytes 16 bytes 32 bytes 64 bytes 123 bytes Max. sze for the output varables Safe In-Out 1 Byte 1 byte 1 byte Safe In-Out 2 bytes 2 bytes 2 bytes Safe In-Out 4 bytes 4 bytes 4 bytes Safe In-Out 8 bytes 8 bytes 8 bytes Safe In-Out 16 bytes 16 bytes 16 bytes Safe In-Out 32 bytes 32 bytes 32 bytes Safe In-Out 64 bytes 64 bytes 64 bytes Safe In-Out 123 bytes 123 bytes 123 bytes Safe Out 1 Byte 1 byte Safe Out 2 bytes 2 bytes Safe Out 4 bytes 4 bytes Safe Out 8 bytes 8 bytes Safe Out 16 bytes 16 bytes Safe Out 32 bytes 32 bytes Safe Out 64 bytes 64 bytes Safe Out 123 bytes 123 bytes Table 63: PROFIsafe Modules To create a PROFINET or PROFIsafe module 1. In the structure tree, open Confguraton, Resource, Protocols, PROFINET IO Devce. 2. Rght-clck PROFINET IO Devce and select Insert Modules from the context menu. 3. Select a sutable module to transport the requred process data. 4. Rght-clck the module selected and select Edt. - Enter the nput and/or output varables n the Process Varables tab. - If the consumer/provder status should not be controlled, assgn the Vald Output Varable and Input Data Accepted by Devce output varables a global varable wth the TRUE ntal value n the System Varables tab. These system varables can be used to control the Consumer/Provder Status, see Chapter 5.2. The followng settng s only requred for PROFIsafe module! - Enter the Slot and F_Destnaton_Address Regster n the Propertes tab. Page 114 of 386 HI E Rev. 4.01

115 Communcaton 5 PROFINET IO PROFINET IO and PROFIsafe module The module parameters are used to defne the communcaton relatons of the module and ts behavor after connecton s nterrupted. Propertes The Propertes functon of the context menu for the modules opens the Propertes dalog box. The dalog box contans the followng tabs: Element Descrpton Name Name od the devce module Slot 0 to Module ID Unque number Sub-Slot Number of sub-slots Process data behavor Process data value after the connecton s nterrupted - Retan last vald process data - Adopt ntal data Length of IO Input Data Length of IO Output Data PROFIsafe F_Destnaton_Address Table 64: Devce Module General Propertes The F destnaton address of the F-Devce must be unque wthn the PROFIsafe network! Range of values: 1 to Edt The Edt functon of the context menu for the submodule s used to open the Edt dalog box. The System Varables tab contans the followng system varables that are requred to evaluate the state of the submodule from wthn the user program. These system varables can be used to control the Consumer/Provder Status, see Chapter 5.2. HI E Rev Page 115 of 386

116 5 PROFINET IO Communcaton Element Descrpton Vald Output Data True Vald Output Data GOOD False Invald Output Data BAD Output Data Accepted by Devce True Vald Output Data GOOD False Invald Output Data BAD Vald Input Data True Vald Input Data GOOD False Invald Input Data BAD Input Data Accepted by Devce True Vald Input Data GOOD False Invald Input Data BAD The followng varables are only used for PROFIsafe modules PROFIsafe Control The PROFIsafe control byte sent by the controller read wthn the devce, see also Chapter Bt 0 Par_EN_DC Enablng the controller releases the devce to load new Parameters nto the devce. Bt 1 OA_Req_DC Operator Acknowledge from host control byte. Bt 2 Reset_Comm s the Reset_Comm value read back from the host control byte. Bt 3 actvate_fv_dc FALSE: Process values are exchanged between F-Host and F-Devce. TRUE: Falsafe values 0 are exchanged between F-Host and F-Devce. Bt 4 Toggle_d Toggle bt of the F-Devce Bt 5 Cons_nr_R The consecutve number s adopted whenever there s a change between two consecutve control bytes of the Toggle_d bt, e.g., t does not depend on the fault occurrence. Bt 6 F_ParamVald TRUE: F parameters were set FALSE: Otherwse Bt 7 F_Param_ConfguredTwce TRUE: The F-Devce was confgured more than one tme wth dfferent F parameters. FALSE: Otherwse Page 116 of 386 HI E Rev. 4.01

117 Communcaton 5 PROFINET IO PROFIsafe F_Par_CRC Parameters are ndependent or technology-specfc F- Devce parameters. The Par_CRC results from the confguraton of the F-Devce. The users are responsble for settng the vald Par_CRC after confgurng the Parameters and movng to hot operaton. PROFIsafe F_SIL 0 SIL1 1 SIL2 2 SIL3 3 No SIL PROFIsafe RoundTrp Tme last PROFIsafe must determne the RoundTrpTmeLast on a F-Host. For a F-Host, t s the tme between a data message transmsson (wth consecutve number N) and the recepton of the correspondng acknowledgment (wth consecutve number N), measured n mllseconds. PROFIsafe Status Wth each message, PROFIsafe sends the PROFIsafe status byte that can be set n the devce user program from the devce to the controller. See also Chapter Bt 0 Par_OK_DS New Parameters receved. Bt 1 Devce_Fault_DS TRUE: Devce fault FALSE: No devce fault It s only taken nto account from the 21 Awat Message PROFIsafe state. Bt 2 Reserved Bt 3 Reserved Bt 4 FV_actvated_DS Actvate the falsafe value Bt 5 Reserved Bt 6 Bt 7 Reset_Comm Protocol stack s reset to ts ntal state. Table 65: Edt Dalog Box for the Input Submodule The Process Varables tab s used to enter the nput varables. HI E Rev Page 117 of 386

118 6 PROFIBUS DP Communcaton 6 PROFIBUS DP PROFIBUS DP s an nternatonal, open feldbus standard that s used when a fast reacton tme s requred for small amounts of data. The HIMA PROFIBUS DP master and the HIMA PROFIBUS DP slave meet the crtera specfed n the European EN standard [7] and the nternatonally bndng IEC standard for PROFIBUS DP. The HIMA PROFIBUS DP master can exchange data wth the PROFIBUS DP slaves cyclcally and acyclcally. Dfferent functon blocks are avalable n SILworX to acyclcally exchange data. These functon blocks are used to talor the HIMA PROFIBUS DP master and the PROFIBUS DP slaves to best meet the project requrements. A redundant PROFIBUS DP connecton can only be mplemented by confgurng a second PROFIBUS DP master/slave and adjustng t n the user program. PROFIBUS DP master (see Chapter 6.1) PROFIBUS DP slave (see Chapter 6.13) Page 118 of 386 HI E Rev. 4.01

119 Communcaton 6 PROFIBUS DP 6.1 HIMA PROFIBUS DP Master Ths chapter descrbes the characterstcs of the HIMA PROFIBUS DP master and the menu functons and dalog boxes requred to confgure the HIMA PROFIBUS DP master n SILworX. Equpment and System Requrements: Element Descrpton HIMA controller HIMax wth COM module HIMatrx: CPU OS versons beyond 7 and COM OS versons beyond 12 COM Module The seral feldbus nterface (FB1 or FB2) used on the COM module must be equpped wth an optonal HIMA PROFIBUS DP master submodule, see Chapter 3.6. Actvaton Actvaton va Feldbus Submodule, see Chapter 3.4. Table 66: Equpment and System Requrements For the HIMax system, HIMA recommends operatng the PROFIBUS DP usng the FB1 feldbus nterface (maxmum transfer rate 12 Mbt). The maxmum transfer rate permtted for the FB2 feldbus nterface s 1.5 Mbt. PROFIBUS DP Master Propertes: Element Descrpton Type of HIMA PROFIBUS DP-V1 Class 1 Master DP master wth addtonal DP-V2 functons Transfer rate 9.6 kbt/s...12 Mbt/s Bus address Max. number of Two PROFIBUS DP masters can be confgured for each PROFIBUS DP master HIMax COM module or HIMatrx F20, F30, F35, F60. Only one PROFIBUS DP master can be confgured for the HIMatrx F20. Max. number of PROFIBUS DP slaves Maxmum process data length to a slave Table 67: PROFIBUS DP Master Propertes Up to 122 slaves can be confgured for each resource (n all master protocol nstances). However, a maxmum of 31 slaves can be connected to a bus segment wthout repeaters. DP output=: max. 244 bytes DP nput=: max. 244 bytes Accordng to the standard, a total of three repeaters may be used such that a maxmum of 122 statons are possble per seral nterface on a master Creatng a HIMA PROFIBUS DP Master To create a new HIMA PROFIBUS DP master 1. In the structure tree, open Confguraton, Resource, Protocols. 2. Select New, PROFIBUS DP Master from the context menu for protocols to add a new PROFIBUS DP master. 3. Select Propertes, General from the context menu for the PROFIBUS DP master. 4. Select Module and Interfaces. HI E Rev Page 119 of 386

120 6 PROFIBUS DP Communcaton 6.2 PROFIBUS DP: Example In ths example, a HIMA PROFIBUS DP master exchanges varables wth a HIMA PROFIBUS DP slave. The example shows how to create and confgure the HIMA PROFIBUS DP master and the HIMA PROFIBUS DP slave. Fgure 36: Communcaton va PROFINET IO Feldbus nterface 1 on the COM modules of both HIMax controllers must be equpped wth the correspondng PROFIBUS DP submodule, see Chapter 3.6. For ths example, the followng global varables must be created n SILworX: Global Varable PB_Slave_Master1 PB_Slave_Master2 PB_Slave_Master3 PB_Slave_Master4 PB_Master_Slave1 PB_Master_Slave2 Type UINT DWORD DWORD BYTE DWORD BYTE Confgurng the PROFIBUS DP Slave Confguraton of the PROFIBUS DP slave. To create a new HIMA PROFIBUS DP Slave 1. In the structure tree, open Confguraton, Resource, Protocols. 2. Select New, PROFIBUS DP Slave from the context menu for protocols to add a new PROFIBUS DP slave. 3. Select Edt from the context menu for the PROFIBUS DP slave. 4. In the Propertes tab, select COM Module and Interfaces (e.g., FB1). Page 120 of 386 HI E Rev. 4.01

121 Communcaton 6 PROFIBUS DP To assgn varables n the HIMA PROFIBUS DP slave 1. Select Edt from the context menu for the PROFIBUS DP slave. 2. In the Edt dalog box, select the Process Varables tab. The start address of the nput and output varables n the HIMA PROFIBUS DP slave always begn wth 0. If the PROFIBUS DP master (from another manufacturer) expects a hgher start address, dummy varables must be added to the reference varables. Outputs n the HIMA PROFIBUS DP Slave Name Type Offset Global Varable PB_Slave_Master1 UINT 0 PB_Slave_Master1 PB_Slave_Master2 DWORD 2 PB_Slave_Master2 PB_Slave_Master3 DWORD 6 PB_Slave_Master3 PB_Slave_Master4 BYTE 10 PB_Slave_Master4 Table 68: Outputs n the HIMA PROFIBUS DP Slave 1. Drag the global varable to be sent from the Object Panel onto the Output Varables area. In ths example, the output varables of the HIMA PROFIBUS DP slave are composed of four varables wth a total of 11 bytes. The start address of the output varable wth the lowest offset s Rght-clck anywhere n the Output Varables area to open the context menu. 3. Clck New Offsets to re-generate the varable offsets. Inputs n the HIMA PROFIBUS DP Slave Name Type Offset Global Varable PB_Master_Slave1 DWORD 14 PB_Master_Slave1 PB_Master_Slave2 BYTE 18 PB_Master_Slave2 Table 69: Inputs n the HIMA PROFIBUS DP Slave 1. Drag the global varables to be receved from the Object Panel onto the Input Varables area. In ths example, the nput varables of the HIMA PROFIBUS DP slave are composed of two varables wth a total of 5 bytes. The start address of the nput varable wth the lowest offset s Rght-clck anywhere n the the Input Varables area to open the context menu. 3. Clck New Offsets to re-generate the varable offsets. To verfy the confguraton of the PROFIBUS DP slave 1. In the structure tree, open Confguraton, Resource, Protocols, PROFIBUS DP Slave. HI E Rev Page 121 of 386

122 6 PROFIBUS DP Communcaton 2. Clck the Verfcaton button on Acton Bar, and then clck OK to confrm the acton. 3. Thoroughly verfy the messages dsplayed n the logbook and correct potental errors. Use the user program of the PROFIBUS DP slave resource to recomple the confguraton of the PROFIBUS DP slave and transfer t to the controllers. Only after ths step, the new confguraton can be used for communcaton wth the PROFIBUS DP Confgurng the PROFIBUS DP Master To create a new HIMA PROFIBUS DP master 1. In the structure tree, open Confguraton, Resource, Protocols. 2. Select New, PROFIBUS DP Master from the context menu for protocols to add a new PROFIBUS DP master. 3. Select Propertes, General from the context menu for the PROFIBUS DP master. 4. In the General tab, select COM Module and Interfaces (e.g., FB1). Perform these steps to confgure the HIMax PROFIBUS DP slave from wthn the HIMax PROFIBUS DP master. To create a new HIMax PROFIBUS DP Slave n the PROFIBUS DP master 1. Select New, PROFIBUS DP Slave from the context menu for the PROFIBUS DP master. To read the GSD fle for the new PROFIBUS DP slave 1. In the structure tree, open Confguraton, Resource, Protocols, PROFIBUS DP Master, PROFIBUS Slave. 2. Select Read GSD Fle from the context menu for the PROFIBUS DP master and choose the GSD fle for the PROFIBUS slave (e.g., hax100ea.gsd). The GSD fles for HIMax controllers are avalable on HIMA webste at Page 122 of 386 HI E Rev. 4.01

123 Communcaton 6 PROFIBUS DP Creatng the HIMax PROFIBUS DP Modules The number of bytes that must actually be transferred, must also be confgured n the PROFIBUS DP master. To do ths, add Modules untl the physcal confguraton of the slave s acheved. The number of modules used to acheve the necessary number of bytes s not mportant as long as the maxmum of 32 modules s not exceeded. To avod unnecessarly complcatng the PROFIBUS DP master confguraton, HIMA recommends keepng the number of selected modules to a mnmum. To create the requred PROFIBUS DP modules 1. In the structure tree, open Confguraton, Resource, Protocols, PROFIBUS DP Master, PROFIBUS Slave. 2. On the menu bar, select PROFIBUS DP Master, Add modules. 3. For ths example, select the followng modules to receve 11 bytes from the PROFIBUS DP slave and to send 3 bytes. To number the PROFIBUS DP modules 1. Rght-clck the frst PROFIBUS DP Module, and then clck Propertes. 2. Enter 0 nto the Slot feld. 3. Repeat these steps for every further PROFIBUS DP Module and number the modules consecutvely. Fgure 37: HIMax PROFIBUS DP Slave wth Modules Number the HIMax PROFIBUS DP modules wthout gaps and n ascendng order, startng wth 0. The order n whch the PROFIBUS DP modules are arranged s not mportant for operaton. However, HIMA recommends organzng the DP nput and output modules n an orderly manner to ensure than an overvew s mantaned. HI E Rev Page 123 of 386

124 6 PROFIBUS DP Communcaton Confgurng the Input and Output Modules The sum of the varables (n bytes), must dentcal wth the sze of the module (n bytes). To confgure the nput module [000] DP Input/ELOP Export: 2 bytes 1. In the PROFIBUS DP slave, select the nput module [000] DP Input/ELOP Export: 2 Bytes 2. Rght-clck the nput module, then clck Edt. 3. In the Edt dalog box, select the Process Varables tab. 4. Drag the sutable varable from the Object Panel onto the Input Sgnals area of the nput module [000] DP-Input/ELOP-Export: 2 Bytes. Name Type Offset Global Varable PB_Slave_Master1 UINT 0 PB_Slave_Master1 Table 70: Varables of the Input Module [000] DP Input/ELOP Export: 2 Bytes 5. Rght-clck anywhere n the Input Sgnals area to open the context menu. 6. Clck New Offsets to re-generate the varable offsets. To confgure the nput module [001] DP Input/ELOP Export: 8 bytes 1. In the PROFIBUS DP slave, select the nput module [001] DP Input/ELOP Export: 8 Bytes 2. Rght-clck the nput module, then clck Edt. 3. In the Edt dalog box, select the Process Varables tab. 4. Drag the sutable varable from the Object Panel onto the Input Sgnals area of the nput module [001] DP-Input/ELOP-Export: 8 Bytes. Name Type Offset Global Varable PB_Slave_Master2 DWORD 0 PB_Slave_Master2 PB_Slave_Master3 DWORD 4 PB_Slave_Master3 Table 71: Varables of the Input Module [001] DP Input/ELOP Export: 8 Bytes 5. Rght-clck anywhere n the Input Sgnals area to open the context menu. 6. Clck New Offsets to re-generate the varable offsets. To confgure the nput module [002] DP Input/ELOP Export: 1 byte 1. In the PROFIBUS DP slave, select the nput module [002] DP Input/ELOP Export: 1 Byte 2. Rght-clck the nput module, then clck Edt. 3. In the Edt dalog box, select the Process Varables tab. 4. Drag the sutable varable from the Object Panel onto the Input Sgnals area of the nput module [002] DP-Input/ELOP-Export: 1 Byte. Name Type Offset Global Varable PB_Slave_Master4 BYTE 0 PB_Slave_Master4 Table 72: Varables of the Input Module [002] DP Input/ELOP Export: 1 Byte 5. Rght-clck anywhere n the Input Sgnals area to open the context menu. Page 124 of 386 HI E Rev. 4.01

125 Communcaton 6 PROFIBUS DP 6. Clck New Offsets to re-generate the varable offsets. To confgure the output module [003] DP Output/ELOP Import: 2 Bytes 1. In the PROFIBUS DP slave, select the output module [003] DP Output/ELOP Import: 2 Bytes 2. Rght-clck the output module, then clck Edt. 3. In the Edt dalog box, select the Process Varables tab. 4. Drag the sutable varable from the Object Panel onto the Output Sgnals area of the output module [003] DP-Output/ELOP-Import: 2 Bytes. Name Type Offset Global Varable PB_Master_Slave1 UINT 0 PB_Master_Slave1 Table 73: Varables of the Output Module [003] DP Output/ELOP Import: 2 Bytes 5. Rght-clck anywhere n the Output Sgnals area to open the context menu. 6. Clck New Offsets to re-generate the varable offsets. To confgure the output module [004] DP Output/ELOP Import: 1 Byte 1. In the PROFIBUS DP slave, select the output module [004] DP Output/ELOP Import: 1 Byte 2. Rght-clck the output module, then clck Edt. 3. In the Edt dalog box, select the Process Varables tab. 4. Drag the sutable varable from the Object Panel onto the Output Sgnals area of the output module [004] DP-Output/ELOP-Import: 1 Byte. Name Type Offset Global Varable PB_Master_Slave2 BYTE 0 PB_Master_Slave2 Table 74: Varables of the Output Module [004] DP Output/ELOP Import: 1 Byte 5. Rght-clck anywhere n the Output Sgnals area to open the context menu. 6. Clck New Offsets to re-generate the varable offsets Creatng the User Data wthn the PROFIBUS DP Master To create the user data n the PROFIBUS DP master 1. In the structure tree, open Confguraton, Resource, Protocols, PROFIBUS DP Master, PROFIBUS DP Slave. 2. Rght-clck PROFIBUS Slave, and then clck Propertes. 3. Select the Data tab and clck the Edt button next to the user data. The group's start address and number of varables are defned n the 32 bytes long user data feld (see also Chapter 6.8). 4. For ths example, create the followng user data: 4, to ensure that four varables are receved by the PROFIBUS DP master. 2, to ensure that two varables that are sent by the PROFIBUS DP master. The start address of the nput and output groups begns wth 0. HI E Rev Page 125 of 386

126 6 PROFIBUS DP Communcaton Fgure 38: User Data Feld To verfy the confguraton of the PROFIBUS DP slave 1. In the structure tree, open Confguraton, Resource, Protocols, PROFIBUS DP Master. 2. Clck the Verfcaton button located on Acton Bar, and then clck OK to confrm the acton. 3. Thoroughly verfy the messages dsplayed n the logbook and correct potental errors. Fgure 39: Verfcaton Dalog Box Use the user program of the PROFIBUS DP master resource to recomple the confguraton of the PROFIBUS DP master and transfer t to the controllers. Only after ths step, the new confguraton can be used for communcaton wth the PROFIBUS DP Optmzng the PROFIBUS DP parameters Usng the default values for the PROFIBUS parameters, smooth PROFIBUS communcaton s generally not a problem. However, the settngs should be further optmzed to acheve faster data exchange rates and mprove fault detecton. Page 126 of 386 HI E Rev. 4.01

127 Communcaton 6 PROFIBUS DP To determne the actual target rotaton tme TTR [ms] 1. Open the Control Panel assocated wth the HIMax PROFIBUS DP master controller. 2. In the structure tree assocated wth the Control Panel, clck PROFIBUS DP Master and read the actual Target Rotaton Tme TTR [ms]. Note down ths value. To determne the parameters requred for the PROFIBUS DP slave 1. In the structure tree, open Confguraton, Resource, Protocols, PROFIBUS DP Master, PROFIBUS DP Slave. 2. Rght-clck HIMax PROFIBUS Slave, and then clck Propertes. 3. Select the Features tab and read Mn. Slave Interval MSI [ms] for ths PROFIBUS DP slave. Note down ths value. 4. Select the Transfer Rate tab and read Max. Tsdr for the transfer rate used. Note down ths value. To enter the parameters prevously determned 1. Rght-clck PROFIBUS Master, and then clck Propertes. 2. Select the Tmngs tab. Fgure 40: PROFIBUS DP Master Propertes 3. Convert the Max. Tsdr that was prevously noted down n bt Tme 4. Convert the Target Rotaton Tme TTR [ms] that was prevously noted down n bt Tme, add 1/3 safety margn and enter the resultng value n the Target Rotaton Tme TTR [ms] feld. 5. Enter the Mn. Slave Interval MSI [ms] that was prevously noted down. If varous slaves are confgured, the hghest values of the parameters MaxTsdr [bt tme] and Mn. Slave Interval [ms] must be used. 6. The data control tme [ms] must be set to 6*Ttr ms To enter the watchdog tme for the PROFIBUS DP slave 1. In the structure tree, open Confguraton, Resource, Protocols, PROFIBUS DP Master, PROFIBUS DP Slave.. 2. Rght-clck HIMax PROFIBUS Slave, and then clck Propertes. HI E Rev Page 127 of 386

128 6 PROFIBUS DP Communcaton Fgure 41: PROFIBUS DP Slave Propertes 3. Select the Parameter tab and mark the Watchdog Actve checkbox. 4. Enter the watchdog tme [ms] 6*Ttr [ms] n the Watchdog Tme [ms] feld. Use the user program of the PROFIBUS DP master and slave resources to recomple the confguratons of the PROFIBUS DP master and slave and transfer them to the controllers. Only after ths step, the new confguratons can be used for communcaton wth the PROFIBUS DP. Page 128 of 386 HI E Rev. 4.01

129 Communcaton 6 PROFIBUS DP 6.3 Menu Functons of the PROFIBUS DP Master Edt The Edt functon of the context menu for the PROFIBUS DP master s used to open the Edt dalog box. The System Varables tab contans the followng system varables that are requred to evaluate the state of the PROFIBUS DP master from wthn the user program. Element Number of IO Errors Baud Rate Bus Error Average cycle tme Last cycle tme Master State Maxmum Cycle Tme Mn. Slave Interval Mnmum Cycle Tme Target Rotaton Tme Descrpton Number of errors snce statstcs reset. Baud rate (bt/s) used for the bus. If a bus error occurs, an error code s set n the Bus Error system varable. An error code retans ts value untl the bus error has been elmnated. Code Descrpton 0 OK, no bus error 1 Address error: The master address s already avalable on the bus 2 Bus malfuncton Malfuncton detected on the bus, (e.g., bus not properly termnated, multple statons are sendng data smultaneously). 3 Protocol error An ncorrectly coded packet was receved. 4 Hardware fault The hardware reported a fault, e.g., too short tme perods. 5 Unknown error The master changed the status for an unknown reason. 6 Controller reset The controller chp s reset f a serous bus error occurs. To evaluate the Bus Error status varable from wthn the user program, t must be connected to a varable. Measured average bus cycle tme n mllseconds. Measured bus cycle tme n mllseconds. Indcate the current protocol state. 0: OFFLINE 1: STOP 2: CLEAR 3: OPERATE Connect the status varable Master State to a varable to evaluate t n the user program. Measured maxmum bus cycle tme n mllseconds. Mnmum slave nterval measured for one of the slaves assgned to ths master. Measured mnmum bus cycle tme n mllseconds. Target token rotaton tme Table 75: System Varables n the PROFIBUS DP Master HI E Rev Page 129 of 386

130 6 PROFIBUS DP Communcaton Menu Functon: Propertes The Propertes functon of the context menu for the PROFIBUS DP master s used to open the Propertes dalog box. The dalog box contans the followng tabs: Tab: General Element Type Name Module Max. µp Budget Max. µp budget n [%] Behavor on CPU/COM Connecton Loss Address Interface Baud Rate Descrpton PROFIBUS DP master Any unque name for a PROFIBUS DP master Selecton of the COM module wthn whch the protocol s processed. Actvated: Adopt the µp budget lmt from the Max. µp Budget n [%] feld. Deactvated: Do not use the µp budget lmt for ths protocol. Maxmum µp budget for the module that can be used for processng the protocols. Range of values: % Default value: 30% If the connecton of the processor module to the communcaton module s lost, the nput varables are ntalzed or contnue to be used unchanged n the process module, dependng on ths parameter. For nstance, f the communcaton module s removed when communcaton s runnng. Adopt ntal data Input varables are reset to ther ntal values. Retan Last Value The nput varables retans the last value. Master staton address. Only one master staton address may be avalable on the bus. Range of values: Default value: 0 COM nterface that should be used for the master. Range of values: FB1, FB2 Baud rate (bt/s) used for the bus. Possble values: Value Baud Rate FB1 FB kbt/s X X kbt/s X X kbt/s X X kbt/s X X kbt/s X X kbt/s X X Mbt/s X X Mbt/s X Mbt/s X Mbt/s X - Table 76: General Propertes for PROFIBUS DP Master Page 130 of 386 HI E Rev. 4.01

131 Communcaton Tab: Tmngs Element MnTsdr [bt tme] MaxTsdr [bt tme] Tsl [bt tme] Tqu [bt tme] Tset [bt tme] Ttr [bt tme] Ttr [ms] Mn. Slave Interval [ms] 6 PROFIBUS DP Descrpton Mn. Staton Delay Tme: Mnmum tme perod that a PROFIBUS DP slave must wat before t may respond. Range of values: Default value: 11 Max. Staton Delay Tme: Maxmum tme perod that a PROFIBUS DP slave may need to respond. Max Tsdr Tsdr (of the connected slave wth the hghest Tsdr) The MaxTsdr values of the slaves are read from the GSD fles and are dsplayed n the Baud Rates tab located n the slave's Propertes dalog box Range of values: Default value: 100 Slot Tme Maxmum tme span that the master wats for a slave s acknowledgment. Tsl > MaxTsdr + 2*Tset +Tqu + 13 Range of values: Default value: 200 Quet Tme for Modulator Tme that a staton may need to swtch from sendng to recevng. Range of values: Default value: 0 Setup Tme Tme for reactng to an event. Range of values: Default value: 1 Tme confgured for a token cycle. Maxmum tme avalable for a token rotaton. A lower estmate of the Ttr can be obtaned wth a specfc calculaton, see Chapter Range of values: Default value: 9999 Actual token rotaton tme n ms Mnmum tme between two cyclcal requests of a slave. The master observes the Mn. Slave Interval and does not fall below t. However, the PROFIBUS DP cycle can be extended f Isochronous Mode s nactve and the porton of acyclc telegrams ncreases wthn a cycle. The value for the Mn. Slave Interval s read from the GSD fle and appears n the Features tab located n the Propertes dalog box. In Isochronous Mode, the value for Mn. Slave Interval defnes the tme perod for an sochronous cycle. Isochronous Mode s actvated f the optons Isochronous Sync Mode or Isochronous Freeze Mode are actvated. See also Refresh Rate between CPU and COM (CPU/COM tab). Range of values: (step sze 100 μs) Default value: 10 (= 1 ms) HI E Rev Page 131 of 386

132 6 PROFIBUS DP Communcaton Element User Data Montorng Tme [ms] Descrpton Tme span wthn whch the master must report ts current state on the bus Standard value: User Data Montorng Tme = WDT of the slave Range of values: (step sze 10 ms) Default value: 200 (= 2000 ms) Table 77: Tmngs Tab n the Propertes Dalog Box for the PROFIBUS DP Master Tab: CPU/COM The default values of the parameters provde the fastest possble data exchange of PROFIBUS DP data between the COM module (COM) and the processor module (CPU) wthn the HIMax controller. These parameters should only be changed f t s necessary to reduce the COM or CPU load for an applcaton, and the process allows ths change. Only experenced programmers should modfy the parameters. Increasng the COM and CPU refresh rate means that the effectve refresh rate of the PROFIBUS DP data s also ncreased. The system tme requrements must be verfed. Take also the parameter Mn. Slave Interval [ms] nto account whch defnes the refresh rate of the PROFIBUS DP data from/to the PROFIBUS DP slave. The refresh rate of the PROFIBUS DP data can be ncreased accordng to the CPU/COM refresh rate. Element Process Data Refresh Rate [ms] Force Process Data Consstency Descrpton Refresh rate n mllseconds at whch the COM and CPU exchange protocol data. If the Refresh Rate s zero or lower than the cycle tme for the controller, data s exchanged as fast as possble. Range of values: 0...(2 31-1) Default value: 0 Actvated: Transfer of all protocol data from the CPU to the COM wthn a CPU cycle. Deactvated: Transfer of all protocol data from the CPU to the COM, dstrbuted over multple CPU cycles, each wth 1100 byte per data drecton. Ths can also allow lowerng the cycle tme of the controller. Default value: actvated Table 78: CPU/COM Tab n the Propertes Dalog Box for the PROFIBUS DP Master Page 132 of 386 HI E Rev. 4.01

133 Communcaton Tab: Other Element Max. Number of Resends Hghest Actve Address Isochronous Sync Mode Isochronous Freeze Mode Auto Clear on Error 6 PROFIBUS DP Descrpton Maxmum number of resends attempted by a master f a slave does not respond. Range of values: Default value: 1 Hghest Staton Address (HSA) Hghest staton address to be expected for one master. Masters havng a staton address beyond the HSA are not ncluded nto the token rng. Range of values: Default value: 125 Isochronous Sync Mode allows both a clock-controlled synchronzaton of the master and the slaves and a smultaneous actvaton of the physcal outputs of multple slaves. If Isochronous Sync Mode s actve, the master sends the Sync control command as a broadcast telegram to all slaves. As soon as the slaves supportng Isochronous Sync Mode receve the "Sync" control command, they synchronously swtch the data from the user program to the physcal outputs. The physcal outputs values reman frozen up to the next Sync control command. The cycle tme s determned by the Mn. Slave Interval. Condton: Ttr < Mn. Slave Interval Default value: Deactvated Isochronous Freeze Mode allows the user to smultaneously accept the nput data of multple slaves. If Isochronous Freeze Mode s actve, the master sends the "Freeze" control command as a broadcast telegram to all slaves. As soon as the slaves supportng Isochronous Freeze Mode receve the "Freeze" control command, the physcal nputs varables are frozen to the current value. The master can thus read the values. The nput data s only updated when the next Freeze control command s sent. The cycle tme s determned by the "Mn. Slave Interval". Condton: Ttr < Mn. Slave Interval Default value: Deactvated If Auto Clear on Error s set n a slave that fals, the master adopts the CLEAR state. Tme Master Clock Sync Interval [ms] Default value: Deactvated The master s also tme master and perodcally sends the system tme va the bus. Default value: Deactvated Clock synchronzaton nterval. Tme nterval wthn whch the tme master sends the system tme over the bus. Range of values: (step sze 10 ms) Default value: 0 = tme master Table 79: Other Propertes for the PROFIBUS DP Master HI E Rev Page 133 of 386

134 6 PROFIBUS DP Communcaton 6.4 PROFIBUS DP Bus Access Method The bus access method provdes a defned tme wndow to every staton wthn whch the staton can perform ts communcaton tasks Master/Slave Protocol The bus assgnment between a PROFIBUS DP master and a PROFIBUS DP slave s ensured by the master/slave method. An actve PROFIBUS DP master communcates wth passve PROFIBUS DP slaves. The PROFIBUS DP master wth the token s authorzed to send and may communcate wth the PROFIBUS DP slaves assgned to t. The master assgns the bus to a slave for a certan tme and the slave must respond wthn ths tme perod Token Protocol The bus assgnment between automaton devces (class 1 masters) and/or programmng devces (class 2 masters) s ensured va token passng. All PROFIBUS DP masters connected to a common bus form a token rng. As long as the actve PROFIBUS DP master has the token, t assumes the master functon on the bus. In a token rng, the PROFIBUS DP masters are organzed n ascendng order accordng to ther staton addresses. The token s passed on n ths order untl t s receved by the PROFIBUS DP master wth the hghest staton address Ths master passes the token on to the master wth the lowest staton address to close the token rng. The token rotaton tme corresponds to one token cycle through all the PROFIBUS DP masters. The target rotaton tme (Ttr) s the maxmum tme permtted for a token cycle Target Token Rotaton Tme (Ttr) Default Values for dfferent transfer rates Whle confgurng the PROFIBUS DP master, take nto account that some parameters set n the Tmngs tab depend on the baud rate set n the General tab. For the frst (ntal) confguraton, use the default values specfed n the followng table. The values are optmzed n a later step. 9.6k 19.2k 45.45k 93.75k 187.5k 500k 1.5M 3M 6M 12M MnTsdr MaxTsdr Tsl bt tme Tqu bt tme Tset bt tme Table 80: Default Values for Token Rotaton Tme Used wth Dfferent Transfer Rates All tme values specfed are expressed n Tbt (1Tbt = 1/[bt/s]). MnTsdr s at least 11 Tbts long as a character has 11 bts (1 start bt, 1 stop bt, 1 party bt, 8 data bts). Page 134 of 386 HI E Rev. 4.01

135 Communcaton 6 PROFIBUS DP Transmsson Tme for a Character Baud Rate Tbt bt = 1/baud rate Tme 9600 bt/s 1 / 9600 = µs 11* µs = of ms 6 Mbt/s 1/ 6*1066 = ns 11* ns = µs Table 81: Transmsson Tme for a Character Used wth dfferent Transfer Rates Calculatng the Target Token Rotaton Tme (Ttr) Calculate the mnmum target token rotaton tme Ttr as follows: Ttr mn = n * (198 + T1 + T2) + b * T1 + T2 + Tsl Element n b T0 T1 T2 Tsl Descrpton Number of actve slaves Number of I/O data bytes of the actve slaves (nput plus output) * Tset + Tqu If T0 < MnTsdr: T1 = MnTsdr If T0 > MnTsdr: T1 = T0 If T0 < MaxTsdr: T2 = MaxTsdr If T0 > MaxTsdr: T2 = T0 Slot Tme: Maxmum tme perod that the master wats for a slave to respond 198 Twce a telegram header wth varable length (for request and response) 242 Global_Control, FDL_Status_Req and token passng Table 82: Elements Requred for Calculatng the Target Token Rotaton Tme The estmate of the token rotaton tme Ttr s only vald f the followng condtons are met: only one master s operatng on the bus, no transmssons are repeated and no acyclc data s transmtted. Never set Ttr to a value less than that calculated wth the above formula. Otherwse faultfree operaton can no longer be ensured. HIMA recommends usng a value two or three tmes greater than the result. Example of Calculatng the Token Rotaton Tme Ttr The followng confguraton s avalable: 5 actve slaves (n = 5) 20 I/O data bytes per slave (b = 100) The followng tme constants for a transmsson rate of 6 Mbt/s are taken from Table 82: - MnTsdr = 11 T bt - MaxTsdr = 450 T bt - Tsl bt tme = 600 T bt - Tqu bt tme = 6 T bt - Tset bt tme = 8 T bt HI E Rev Page 135 of 386

136 6 PROFIBUS DP Communcaton T0 = * Tset + Tqu T0 = * T0 = 57 T bt As T0>MnTsdr: T1 = T0 = 57 T bt As T0<MaxTsdr: T2 = MaxTsdr = 450 T bt Use the computed values n the formula for the mnmum target token rotaton tme: Ttr mn = n * (198 + T1 + T2) + b * T1 + T2 + Tsl Ttr mn = 5 ( )+100* Ttr mn [T bt ] = 5974 T bt Result: Ttr mn [µs ] = 5974 T bt * ns = µs Ttr s verfed when t s entered nto the dalog box. If the value set for Ttr s lower than the value calculated by SILworX, an error message appears n the Status Vewer. A mnmum value for Ttr s also suggested. If Isochronous Sync Mode or Isochronous Freeze Mode s actvated, the cycle tme s defned by the parameter MnSlaveInterval. Ttr must be lower than Mnmum Slave Interval. If ths condton s not met n the sochronous mode, an error message appears. Page 136 of 386 HI E Rev. 4.01

137 Communcaton 6 PROFIBUS DP 6.5 Isochronous PROFIBUS DP Cycle (DP V2 and Hgher) The PROFIBUS DP cycle conssts of two telegram phases: a fxed and cyclcal phase and an event-drven and acyclc phase. The acyclc phase can extend the correspondng PROFIBUS DP cycle. Ths effect s not wanted n specfc applcatons and areas, such as drve technology. To acheve a constant cycle tme (t const ), Isochronous Mode s actvated n the master such that Mn. Slave Interval [ms] defnes the constant cycle tme (t const ). Confgured n ths way, the sochronous PROFIBUS DP cycle offers clock accuracy wth a dfference of < 10 ms. Fgure 42: Isochronous PROFIBUS DP Cycle To determne the cyclcal phase, the mnmum target token rotaton tme must be calculated. Further, a suffcently large tme nterval (typcally two to three tmes the mnmum target token rotaton tme Ttr) must be reserved for the acyclc phase. If the reserved tme s not needed, a break s taken pror to startng the next cycle to ensure the cycle tme remans constant. See also Chapter 6.4.3, Target Token Rotaton Tme (Ttr). The master s confgured enterng the DP cycle tme determned by the user nto Mn. Slave Interval [ms]. To operate n the Isochronous Mode, one of the two parameters Isochronous Sync Mode or Isochronous Freeze Mode must be actvated n the master. On the bus, only one master may smultaneously operate n the Isochronous Mode. Addtonal masters are not permtted. HI E Rev Page 137 of 386

138 6 PROFIBUS DP Communcaton Isochronous Mode (DP V2 and hgher) Ths functon allows a clock-controlled synchronzaton n the master and the slaves, rrespectve of congeston on the bus. The bus cycle s synchronzed wth a clock dfference of <10 ms. Hghly precse postonng processes can be thus mplemented. To a certan degree, slaves (DP V0 slaves) that do not support Isochronous Mode can also beneft from ts advantages. To do so, the slaves must be assgned to Group 8 and the parameters Sync and/or Freeze must be actvated. The Sync Mode and Freeze Mode are normally used smultaneously Isochronous Sync Mode (DP V2 and hgher) Isochronous Sync Mode allows both a clock-controlled synchronzaton of the master and the slave and a smultaneous actvaton of the outputs of multple slaves Isochronous Freeze Mode (DP V2 and hgher) Isochronous Freeze Mode allows the user to smultaneously accept the nput data of multple slaves. Page 138 of 386 HI E Rev. 4.01

139 Communcaton 6 PROFIBUS DP 6.6 Menu Functons of the PROFIBUS DP Slave (n the Master) Creatng a PROFIBUS DP Slave (n the Master) Edt To create a PROFIBUS DP slave n the HIMA PROFIBUS DP Master 1. In the structure tree, open Confguraton, Resource, Protocols, PROFIBUS DP Master. 2. On the context menu for PROFIBUS DP master, clck New, PROFIBUS Slave to add a new PROFIBUS slave. The Edt functon of the context menu for the PROFIBUS DP master s used to open the System Varables dalog box. The System Varables tab contans the followng system varables that are requred to evaluate the state of the PROFIBUS DP slave from wthn the user program. Element Actvaton Control PNO Ident Number Standard Dagnoss Connecton Count Connecton State Counter Slave Alarm Standard Dagnoss Count Descrpton A change from 0 to 1 deactvates the slave. A change from 1 to 0 actvates the slave prevously deactvated. Actvated = 0 Deactvated = 1 16 bt unque number assgned by the PNO Germany to a product (feld devce) and dentfyng t. Wth Standard Dagnoss, the slave nforms the master about ts current state. Ths varable always contans the last receved standard dagnoss. The parameters comply wth the dagnostc telegram n accordance wth IEC It ncreases wth each new connecton. It counts from count reset. Valu Descrpton e 0 Deactvated: The parameter sets are loaded for these slaves, but the slaves are completely gnored. The nput data s reset to ther ntal values, no actvty related to these slaves s noted on the bus. 1 Inactve (not connected): If a slave can no longer be reached, the nput data s reset to ther ntal values. The followng optons can be selected for each slave: The master contnues to send output data or the master attempts to re-confgure the slave. 2 Actve (connected): The slaves are exchangng I/O data wth the CPU. Number of alarms provded so far. It counts from the counter reset. Number of dagnostc messages provded so far. It counts from the counter reset. Table 83: System Varables n the PROFIBUS DP Slave HI E Rev Page 139 of 386

140 6 PROFIBUS DP Communcaton Propertes The Propertes functon of the context menu for the PROFIBUS DP slave s used to open the Propertes dalog box. The dalog box contans the followng tabs: Tab: Parameters Element Name Address Actve DP V0 Sync actve DP V0 Freeze actve Watchdog Actve Watchdog Tme [ms] On falure send last data Auto Clear on Falure Descrpton Name of the slave Address of the slave Range of values: Default value: 0 Slave State Only an actve slave can communcate wth a PROFIBUS DP master. Default value: actvated Sync Mode allows the user to smultaneously actvate the outputs of varous DP V0 slaves. Important Ths feld must be deactvated n DP V2 slaves operatng n Isochronous Sync Mode. Default value: Deactvated Freeze Mode allows the user to smultaneously accept the nput data of multple DP V0 slaves. Important Ths feld must be deactvated n DP V2 slaves operatng n Isochronous Freeze Mode. Default value: Deactvated If the Watchdog Actve checkbox s tcked, the slave detects a master's falure and enters the safe state. Default value: Deactvated The Watchdog Actve checkbox must be tcked. If master and slave do not exchange any data wthn ths tme nterval, the slave dsconnects tself and resets all DP output data to ther ntal values. 0 = Deactvated Standard value: Slave s watchdog tme > 6 * Ttr Range of values: Default value: 0 FALSE: If a fault occurs, the connecton s termnated and reestablshed. TRUE: If a fault occurs, the data contnues to be sent, even wthout the slave s acknowledgement. Default value: Deactvated If Auto Clear on Falure s set to TRUE n the master and n the current slave, and f the current slave fals, the master swtches the entre PROFIBUS DP to the safe state. Default value: actvated Table 84: Parameters Tab n the PROFIBUS DP Slave Page 140 of 386 HI E Rev. 4.01

141 Communcaton 6 PROFIBUS DP Tab: Groups In ths tab, the slaves can be organzed nto varous groups. The global control commands, Sync and Freeze, can systematcally address one or multple groups. Element Descrpton Member of Group 1 Member of Group 1 Member of Group 2 Member of Group 2 Member of Group 3 Member of Group 3 Member of Group 4 Member of Group 4 Member of Group 5 Member of Group 5 Member of Group 6 Member of Group 6 Member of Group 7 Member of Group 7 Member of Group 8 Member of Group 8 Default value: Deactvated Table 85: Groups Tab n the Propertes Dalog Box for the PROFIBUS DP Slave Tab: DP V1 Ths tab contans the parameters set wth DP V1 and hgher. In DP V0 slaves, no parameters can be selected n ths tab. The Supp column shows whch parameters are supported by the slave. Element DP V1 Falsafe Isochronous Mode Publsher Actve Prm Block Struct. Supp. Check Cfg Mode Descrpton If the DP V1 mode s not actvated, no DP V1 features can be used. In ths case, the slave acts lke a DP V0 slave. The confguraton data may have to be changed (refer to the slave manual). Default value: Deactvated If ths mode s actvated, a master n the CLEAR state does not send zeros as output data; rather, t sends an empty data packet (falsafe data packet) to the slave. The slave recognzes that t must place the safe output data on the outputs (the value of the safe output data s not necessarly zero). Default value: Deactvated Ths functon allows a clock-controlled synchronzaton n the master and the slaves, rrespectve of congeston on the bus. The bus cycle s synchronzed wth a clock dfference of < 1 ms. Hghly precse postonng processes can be thus mplemented. Default value: Deactvated Ths functon s requred for the slave ntercommuncaton. Ths allows the slaves to communcate wth one another n a drect and tme savng manner va broadcast wthout detourng through the master. Default value: Deactvated The slave supports structured confguraton data (read only). Default value: Deactvated Reduced confguraton control: If Check Cfg Mode s actvated, the slave can operate wth an ncomplete confguraton. Ths feld should be deactvated durng start-up. Default value: Deactvated Table 86: DP V1 Tab n the Propertes Dalog Box for the PROFIBUS DP Slave HI E Rev Page 141 of 386

142 6 PROFIBUS DP Communcaton Tab: Alarms Ths tab s used to actvate alarms. Ths, however, s only possble wth DP V1 slaves, f DP V1 s actvated and the slave supports alarms. The checkmarks n the Supp column desgnate whch alarms are supported by the slave. Mandatory alarms are noted n the Requred column. Element Update Alarm Status Alarm Vendor Alarm Dagnostc Alarm Process Alarm Pull & Plug Alarm Descrpton Alarm, f the module parameters changed. Alarm, f the module state changed. Vendor specfc alarm. Alarm, f specfc events occur n a module, e.g., short crcuts, over temperature, etc. Alarm, f mportant events occur n the process. Alarm, f a module s removed or nserted. Table 87: Alarms Tab n the Propertes Dalog Box for the PROFIBUS DP Slave Default value: Deactvated Tab: Data Ths tab specfes detals about the supported data lengths and about the user data (extended confguraton data). Element Max. Input Len Max. Output Len Max. Data Len User Data Len User Data Max. Dag. Data Len Descrpton Maxmum length of the nput data Maxmum length of the output data Maxmum total length of the nput and output data Length of the user data. Confguraton data. HIMA does not recommend edtng at ths level. Use the User Parameters dalog box nstead, see Chapter 6.8. Maxmum length of the dagnostc data sent by the slave. Table 88: Data Tab n the Propertes Dalog Box for the PROFIBUS DP Slave Page 142 of 386 HI E Rev. 4.01

143 Communcaton 6 PROFIBUS DP Tab: Model Ths tab dsplays self-explanatory detals. Element Model Manufacturer Ident Number Revson Hardware release Software release GSD fle name Info Text Descrpton Manufacturer dentfcaton of the PROFIBUS DP slave Manufacturer of the feld devce Slave dentfcaton provded by PNO Germany Issue status of the PROFIBUS DP slave Hardware ssue status of the PROFIBUS DP slave Software ssue status of the PROFIBUS DP slave Fle name of the GSD fle Addtonal detals about the PROFIBUS DP slave. Table 89: Model Tab n the Propertes Dalog Box for the PROFIBUS DP Slave Tab: Features Element Modular Staton Frst slot number Max Modules Support for 'Set Slave Add' Mn. Slave Interval [ms] Dag. Update Support for WDBase1ms Support for DP V0 Sync Support for DP V0 Freeze DP V1 Data Types Extra Alarm SAP Alarm Seq. Mode Count Descrpton TRUE: Modular staton FALSE: Compact staton The modules (slots) must be numbered wthout gaps, startng wth ths value. Maxmum number of modules that can be nstalled n a modular staton. The slave supports dynamc address allocaton. The mnmum tme perod that must elapse between two cyclc calls of the slave. Number of pollng cycles untl the slave s dagnoss mrrors the current state. The slave supports 1 ms as tme base for the watchdogs The slave supports DP V0 Sync The slave supports DP V0 Freeze The slave supports the DP V1 data types. The slave supports SAP 50 for acknowledgng the alarm. Indcate the number of actve alarms that the slave can smultaneously process. Zero means one alarm of each model. Table 90: Features Tab n the Propertes Dalog Box for the PROFIBUS DP Slave HI E Rev Page 143 of 386

144 6 PROFIBUS DP Communcaton Tab: Baud Rates Ths tab specfes the baud rates that the slave supports and the correspondng MaxTsdr. MaxTsdr s the tme wthn whch the slave must acknowledge a request from the master. The range of values depends on the slave and the transfer rate, and ranges between 15 and 800 Tbt. Element Descrpton 9.6k MaxTsdr = k MaxTsdr = k Not supported 45.45k MaxTsdr = k MaxTsdr = k MaxTsdr = k MaxTsdr = M MaxTsdr = 75 3M MaxTsdr = 90 6M MaxTsdr = M MaxTsdr = 120 Table 91: Baud Rates Tab n the Propertes Dalog Box for the PROFIBUS DP Slave Tab: Acyclc Ths tab contans some parameters for the acyclc data transfer. Element Descrpton Support for C1 Read/Wrte The slave supports the acyclc data transfer. C1 Read/Wrte requred The slave requres the acyclc data transfer. C1 Max Data Len[Byte] Maxmum length of an acyclc data packet. C1 Response Tmeout [ms] Tme out for the acyclc data transfer. Table 92: Acyclc Tab n the Propertes Dalog Box for the PROFIBUS DP Slave Page 144 of 386 HI E Rev. 4.01

145 Communcaton 6 PROFIBUS DP 6.7 Importng the GSD Fle The GSD fle contans data for confgurng the PROFIBUS DP slave. To read the GSD fle for the new PROFIBUS DP slave 1. In the structure tree, open Confguraton, Resource, Protocols, PROFIBUS DP Master, PROFIBUS Slave. 2. Select Read GSD Fle from the context menu for the PROFIBUS DP master and choose the GSD fle for the PROFIBUS slave (e.g., hax100ea.gsd). The GSD fles for HIMax/HIMatrx controllers are avalable on HIMA webste at The manufacturer of the feld devce s responsble for the correctness of the GSD fle. The GSD fles for HIMax (hax100ea.gsd) and HIMatrx (hx100ea.gsd) nclude the followng modules: PROFIBUS DP Master Input Modules Type Number DP Input/ELOP Export Byte 1 DP Input/ELOP Export Bytes 2 DP Input/ELOP Export Bytes 4 DP Input/ELOP Export Bytes 8 DP Input/ELOP Export Bytes 16 DP Input/ELOP Export Word 1 DP Input/ELOP Export Words 2 DP Input/ELOP Export Words 4 DP Input/ELOP Export Words 8 DP Input/ELOP Export Words 16 PROFIBUS DP Master Output Modules Type Number DP Output/ELOP Import Byte 1 DP Output/ELOP Import Bytes 2 DP Output/ELOP Import Bytes 4 DP Output/ELOP Import Bytes 8 DP Output/ELOP Import Bytes 16 DP Output/ELOP Import Word 1 DP Output/ELOP Import Words 2 DP Output/ELOP Import Words 4 DP Output/ELOP Import Words 8 DP Output/ELOP Import Words 16 Table 93: GSD Fle of the HIMax/HIMatrx PROFIBUS DP Slave HI E Rev Page 145 of 386

146 6 PROFIBUS DP Communcaton 6.8 Confgurng User Parameters The group s start address and the number of varables are defned n the user data feld. The number of bytes that must actually be transferred, must also be confgured n the PROFIBUS DP master. Ths s done by choosng the PROFIBUS DP modules defned n the GDS fle of the PROFIBUS DP slave (see also Chapter 6.2.2). To open the Edt User Parameters dalog box 1. In the structure tree, open Confguraton, Resource, Protocols, PROFIBUS DP Master. 2. Rght-clck PROFIBUS Slave, and then clck Propertes. 3. Select the Data tab and clck the... button next to the user data. The structure of the Edt User Parameters dalog box depends on the GSD fle of the slave. Structure of the 32-byte user data feld: The 32-byte user data feld s structured as follows: The 32 bytes are allocated n eght groups, wth four bytes per group. Groups defne whch and how many varables the PROFIBUS DP master receves from the PROFIBUS DP slave. Groups defne whch and how many varables the PROFIBUS DP master sends to the PROFIBUS DP slave. The frst two bytes of each group specfy the start address for the frst varables to be read or to be wrtten. The last two bytes n each group specfy the number of varables that should be receved or sent. Confgurng the user data n dfferent groups: Usually, t s not necessary to allocate varables (user data) nto varous groups. It s enough to defne only the frst sgnal group of the nput and output varables, and to read or wrte the data en bloc. In applcatons requrng that only selected varables are read and wrtten, up to four varable groups for both the nput and the nput varables can be defned. Example The PROFIBUS DP master sends and receves the followng varables from the PROFIBUS DP slave: 1st group: 4 nput varables from start address 0 and up. 2nd group: 6 nput varables from start address 50 and up. 4th group: 9 nput varables from start address 100 and up. 5th group: 2 output varables from start address 10 and up. User data confguraton n the PROFIBUS DP master: Page 146 of 386 HI E Rev. 4.01

147 Communcaton 6 PROFIBUS DP Master Import/Slave Export Start Address Number Varable 1st group (byte 0...3) nd group (byte 4...7) rd group (byte ) th group (byte ) Table 94: Example: Group of the User Data Feld Master Export/Slave Import Start Address Number of varables 5th group (byte ) th group (byte ) th group (byte ) th group (byte ) Table 95: Example: Group of the User Data Feld Edt User Parameters dalog box of one HIMatrx or HIMax PROFIBUS DP slave. Fgure 43: Edt User Parameters Dalog Box HI E Rev Page 147 of 386

148 6 PROFIBUS DP Communcaton 6.9 PROFIBUS Functon Blocks The PROFIBUS functon blocks are used to talor the HIMA PROFIBUS DP master and the correspondng PROFIBUS DP slaves to best meet the project requrements. The functon blocks are confgured n the user program such that the master and slave functons (alarms, dagnostc data, and states) can be set and read n the user program. Functon blocks are requred for specal applcatons. They are not needed for the normal cyclc data traffc between master and slave! For more nformaton on the conceptual confguraton of the PROFIBUS DP functon blocks, refer to Chapter The followng functon blocks are avalable: Functon block Functon descrpton Sutable begnnng wth stage of extenson DP MSTAT Controllng the master state usng the user DP V0 program RALRM Readng the alarm messages of the slaves DP V1 RDIAG Readng the dagnostc messages of the slaves DP V0 RDREC Readng the acyclc data records of the slaves DP V1 SLACT Controllng the slave states usng the user DP V0 program WRREC Wrtng the acyclc data records of the slaves DP V1 Table 96: Overvew of the PROFIBUS DP Functon Blocks HIMA PROFIBUS DP masters operate wth the stage of extenson DP V1. HIMA PROFIBUS DP slaves operate wth stage of extenson DP V0. Note that for ths reason, not all functon blocks of the HIMA PROFIBUS DP master can be used to control a HIMA PROFIBUS DP slaves. Page 148 of 386 HI E Rev. 4.01

149 Communcaton 6 PROFIBUS DP MSTAT Functon Block Fgure 44: MSTAT Functon Block The user program uses the MSTAT functon block (DP V0 and hgher) to control the PROFIBUS DP master. The master can thus be set to one of the followng states usng a tmer or a mechancal swtch connected to a physcal nput. - 0: OFFLINE - 1: STOP - 2: CLEAR - 3: OPERATE To confgure the functon block, drag t from the functon block lbrary onto the user program (see also Chapter 13.1). Inputs and Outputs of the Functon Block wth Prefx A: These nputs and outputs can be used to control and evaluate the functon blocks usng the user program. The prefx A means Applcaton. A_Inputs Descrpton Type A_Req Rsng edge starts the functon block BOOL A_ID Master ID (not used) DWORD A_Mode The PROFIBUS DP master can be set to the followng states: 0: OFFLINE 1: STOP 2: CLEAR 3: OPERATE INT Table 97: A-Inputs for the MSTAT Functon Block A_Outputs Descrpton Type DONE TRUE: The PROFIBUS DP master has been set to the state BOOL defned on the A_Mode nput. A_Busy TRUE: The PROFIBUS DP master s stll beng set. BOOL A_Status Status or error code (see Chapter 6.11) DWORD Table 98: A-Outputs for the MSTAT Functon Block HI E Rev Page 149 of 386

150 6 PROFIBUS DP Communcaton Inputs and Outputs of the Functon Block wth Prefx F: These nputs and outputs of the functon block establsh the connecton to the MSTAT functon block n structure tree. The prefx F means Feld. Common varables are used to connect the MSTAT functon block (n the Functon Blocks drectory) to the MSTAT functon block (n the user program). These must be created beforehand n the Varable Edtor. Connect the F-Inputs of the MSTAT functon block n the user program to the same varables that wll be connected to the outputs of the MSTAT functon block n the structure tree. F-Inputs Type F_ACK BOOL F_DONE BOOL F_BUSY BOOL F_STATUS DWORD Table 99: F-Inputs for the MSTAT Functon Block Connect the F-Outputs of the MSTAT functon block n the user program to the same varables that wll be connected to the nputs of the MSTAT functon block n the structure tree. F-Outputs Type F_REQ BOOL F_ID DWORD F_MODE INT Table 100: F-Outputs for the MSTAT Functon Block To create the MSTAT functon block n the structure tree 1. In the structure tree, open Confguraton, Resource, Protocols, PROFIBUS DP Master, Functon Blocks, New. 2. Select the MSTAT functon block and clck OK. 3. Rght-clck the MSTAT functon bloc, and then clck Edt. The wndow for assgnng varables to the functon blocks appears. Connect the nputs of the MSTAT functon block n the structure tree to the same varables that have been prevously connected to the F-Outputs of the MSTAT functon block n the user program. Inputs Type M_ID DWORD MODE INT REQ BOOL Table 101: Input System Varables Page 150 of 386 HI E Rev. 4.01

151 Communcaton 6 PROFIBUS DP Connect the followng outputs of the MSTAT functon block n the structure tree to the same varables that have been prevously connected to the F-Inputs of the MSTAT functon block n the user program. Outputs ACK BUSY DONE STATUS Type BOOL BOOL BOOL DWORD Table 102: Output System Varables To use the MSTAT functon block 1. In the user program, set the A_Mode nput to the desred state. If A_Mode s not set, an error code s output after step 2 on the A_Status output and the PROFIBUS DP master state s not set. 2. In the user program, set the A_Req nput to TRUE. The functon block reacts to a rsng edge on A_Req. The A_Busy output s TRUE untl the MSTAT command has been processed. Afterwards, A_Busy s set to FALSE and A_Done s set to TRUE. If the preset mode could not be set successfully, an error code s output to A_Status. The mode of the current master can be derved from the Master State varable (see Chapter 6.10). HI E Rev Page 151 of 386

152 6 PROFIBUS DP Communcaton RALRM Functon Block Fgure 45: RALRM Functon Block The RALRM functon block (DP V1 and hgher) s used to evaluate the alarms. Alarms are a specal type of dagnostc messages that are handled wth a hgh prorty. Alarms report mportant events to whch the applcaton must react (e.g., a WRREC). How the applcaton react, however, depends on the manufacturer. Refer to the manual of the PROFIBUS DP slave for more nformaton. As long as the RALRM functon block s actve, t wats for alarm messages from the slaves. If an alarm s receved, the A_NEW output s set to TRUE for at least one cycle and the alarm data can be read from an alarm telegram. Before the next alarm s receved, A_NEW s set to FALSE for at least one cycle. All alarms are acknowledged mplctly. No alarms are lost. If multple RALRM functon blocks are used, the user program must be confgured such that only one RALRM functon block s actve at any gven tme. To confgure the functon block, drag t from the functon block lbrary onto the user program (see also Chapter 13.1). Inputs and Outputs of the Functon Block wth Prefx A: These nputs and outputs can be used to control and evaluate the functon blocks usng the user program. The prefx A means Applcaton. A_Inputs Descrpton Type A_Ena TRUE enables the functon block. BOOL A_Mode Not used INT A_FID Not used DWORD A_MLen Maxmum expected length of the receved alarm data expressed n bytes INT Table 103: A-Inputs for the RDIAG Functon Block Page 152 of 386 HI E Rev. 4.01

153 Communcaton 6 PROFIBUS DP A_Outputs Descrpton Type A_Eno TRUE: The functon block s actve BOOL FALSE: The functon block s not actve A_New TRUE: New alarm was receved BOOL FALSE: No new alarm A_Status Status or error code DWORD (see Chapter 6.11) A_ID Identfcaton number of the slave trggerng the alarm DWORD A_Len Length of the receved alarm data n bytes INT Table 104: A-Outputs for the RDIAG Functon Block Inputs and Outputs of the Functon Block wth Prefx F: These nputs and outputs of the functon block establsh the connecton to the RALRM functon block n structure tree. The prefx F means Feld. Common varables are used to connect the RALRM functon block (n the Functon Blocks drectory) to the RALRM functon block (n the user program). These must be created beforehand n the Varable Edtor. Connect the F-Inputs of the RALRM functon block n the user program to the same varables that wll be connected to the outputs of the RALRM functon block n the structure tree. F-Inputs Type F_ACK BOOL F_ENO BOOL F_NEW BOOL F_STATUS DWORD F_ID DWORD F_LEN INT Table 105: F-Inputs for the RALRM Functon Block Connect the F-Outputs of the RALRM functon block n the user program to the same varables that wll be connected to the nputs of the RALRM functon block n the structure tree. F-Outputs Type F_Ena BOOL F_MODE INT F_FID DWORD F_MLEN INT Table 106: F-Outputs for the RALRM Functon Block To create the RALRM functon block n the structure tree 1. In the structure tree, open Confguraton, Resource, Protocols, PROFIBUS DP Master, Functon Blocks, New. 2. Select the RALRM functon block and clck OK. 3. Rght-clck the RALRM functon bloc, and then clck Edt. The wndow for assgnng varables to the functon blocks appears. HI E Rev Page 153 of 386

154 6 PROFIBUS DP Communcaton Connect the nputs of the RALRM functon block n the structure tree to the same varables that have been prevously connected to the F-Outputs of the RALRM functon block n the user program. Inputs EN F_ID MLEN MODE Type BOOL DWORD INT INT Table 107: Input System Varables Connect the followng outputs of the RALRM functon block n the structure tree to the same varables that have been prevously connected to the F-Inputs of the RALRM functon block n the user program. Outputs Type ACK BOOL ENO BOOL ID DWORD LEN INT NEW BOOL STATUS DWORD Table 108: Output System Varables The Process Varables tab of the RALRM functon block located n the structure tree contans varables that must be defned and whose structure must match the alarm data. If no varables are defned, alarm data can be requested but not read. An alarm message contans at least four bytes. The frst four bytes of the alarm message contan the standard alarm data. To smplfy the evaluaton of standard alarms, HIMA provdes the auxlary functon block ALARM (see Chapter 6.10). To use t, combne the frst four bytes nto a varable of type DWORD and set ths varable on the IN nput of the ALARM auxlary functon block. If an alarm telegram contans more bytes than defned n the Data tab, only the preset number of bytes s accepted. The rest s cut off. Page 154 of 386 HI E Rev. 4.01

155 Communcaton 6 PROFIBUS DP Alarm Data Descrpton Byte 0 Length of the alarm message expressed n bytes ( ) Byte 1 Identfcaton for the alarm type 1: Dagnostc alarm 2: Process alarm 3: Pull alarm 4: Plug alarm 5: Status alarm 6: Update alarm 31: Falure of a master's or a slave's extenson : Manufacturer specfc Consult the devce manual provded by the manufacturer for more nformaton on the specfc meanng. Byte 2 Slot number of the component trggerng the alarm Byte 3 0: No further nformaton 1: Inbound alarm, slot malfuncton 2: Outbound alarm, slot no longer malfunctonng 3: Outbound alarm, contnued slot malfuncton Byte 4 to 126 Consult the devce manual provded by the manufacturer for more nformaton on the specfc meanng. Table 109: Alarm Data The structure of the standard alarms (bytes 0 3) s standardzed and dentcal for all manufacturers. Consult the manual of the PROFIBUS DP slave for more nformaton on bytes 4 126, snce ther use s manufacturer specfc. Note that devces bult n accordance wth the DP V0 standard do not support alarm telegrams. To use the RALRM functon block 1. On the A_Mlen nput of the user program, defne the maxmum amount of alarm data n bytes that must be expected. A_Mlen cannot be changed durng operaton. 2. In the user program, set the A_Ena nput to TRUE. In contrast to other functon blocks, the RALRM functon block s only actve as long as the A_Ena nput s set to TRUE. If the functon block was started successfully, the A_Eno output s set to TRUE. If the functon block could not be started, an error code s output to A_Status. If a new alarm s receved, the A_New output s set to TRUE for at least one cycle. Durng ths tme perod, the alarm data of the slave trggerng the alarm are contaned n the outputs and can be evaluated. Afterwards, the A_New output returns to FALSE for at least one cycle. The A_Id and A_Len outputs are reset to zero before the next alarm message can be receved and evaluated. HI E Rev Page 155 of 386

156 6 PROFIBUS DP Communcaton RDIAG Functon Block Fgure 46: RDIAG Functon Block The RDIAG functon block (DP V0 and hgher) s used for readng the current dagnostc message of a slave ( bytes). As many RDIAG functon blocks as desred may be smultaneously actve wthn the HIMA PROFIBUS DP master. To confgure the functon block, drag t from the functon block lbrary onto the user program (see also Chapter 13.1). Inputs and Outputs of the Functon Block wth Prefx A: These nputs and outputs can be used to control and evaluate the functon blocks usng the user program. The prefx A means Applcaton. A_Inputs Descrpton Type A_Req The rsng edge starts the readng request of a BOOL dagnostc message A_ID Slave s dentfcaton number DWORD (see Chapter 6.10) A_MLen Maxmum length (n bytes) of the dagnostc message expected to be read INT Table 110: A-Inputs for the RDIAG Functon Block A_Outputs Descrpton Type A_Vald A new dagnostc message has been receved and s vald BOOL A_Busy TRUE: Data s stll beng read BOOL ERROR TRUE: An error occurred durng the readng process BOOL A_Status Status or error code DWORD (see Chapter 6.11) A_Len Length of the read dagnostc data n bytes INT Table 111: A-Outputs for the RDIAG Functon Block Page 156 of 386 HI E Rev. 4.01

157 Communcaton 6 PROFIBUS DP Inputs and Outputs of the Functon Block wth Prefx F: These nputs and outputs of the functon block establsh the connecton to the RDIAG functon block n structure tree. The prefx F means Feld. Common varables are used to connect the RDIAG functon block (n the Functon Blocks drectory) to the RDIAG functon block (n the user program). These must be created beforehand n the Varable Edtor. Connect the F-Inputs of the RDIAG functon block n the user program to the same varables that wll be connected to the outputs of the RDIAG functon block n the structure tree. F-Inputs Type F_ACK BOOL F_VALID BOOL F_BUSY BOOL F_ERROR BOOL F_Status DWORD F_LEN INT Table 112: F-Inputs for the RDIAG Functon Block Connect the F-Outputs of the RDIAG functon block n the user program to the same varables that wll be connected to the nputs of the RDIAG functon block n the structure tree. F-Outputs Type F_Req BOOL F_Id DWORD F_Mlen INT Table 113: F-Outputs for the RDIAG Functon Block To create the RDIAG functon block n the structure tree 1. In the structure tree, open Confguraton, Resource, Protocols, PROFIBUS DP Master, Functon Blocks, New. 2. Select the RDIAG functon block and clck OK. 3. Rght-clck the RDIAG functon bloc, and then clck Edt. The wndow for assgnng varables to the functon blocks appears. Connect the nputs of the RDIAG functon block n the structure tree to the same varables that have been prevously connected to the F-Outputs of the RDIAG functon block n the user program. Inputs Type ID DWORD MLEN INT REQ BOOL Table 114: Input System Varables HI E Rev Page 157 of 386

158 6 PROFIBUS DP Communcaton Connect the followng outputs of the RDIAG functon block n the structure tree to the same varables that have been prevously connected to the F-Inputs of the RDIAG functon block n the user program. Outputs ACK BUSY ERROR LEN Status VALID Type BOOL BOOL BOOL INT DWORD BOOL Table 115: Output System Varables Dagnostc Data The Data tab contans varables that must be defned and whose structure must match the alarm data. A dagnostc message contans at least sx bytes and a maxmum of 240 bytes. The frst four bytes of the dagnostc message contan the standard dagnoss. To smplfy the evaluaton of the standard alarms, HIMA provdes the auxlary functon block STDDIAG (see Chapter 6.10). To use t, combne the frst four bytes nto a varable of type DWORD and set ths varable on the IN nput of the STDDIAG auxlary functon block. If a dagnostc telegram contans more bytes than defned n the Data tab, only the preset number of bytes s accepted. The rest s cut off. Dagnostc Data Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte Table 116: Dagnostc Data Descrpton Byte contans the standard dagnoss. Use the STDDIAG auxlary functon block to decode the standard dagnoss as a varable of the type DWORD. Bus address of the master to whch a slave s assgned. Hgh byte (manufacturer ID) Low byte (manufacturer ID) Consult the devce manual provded by the manufacturer for more nformaton on the specfc meanng. The HIMA slaves send a dagnostc telegram of sx bytes n length. The meanng of these bytes s standardzed. The frst sx bytes of slaves from other manufacturers are only functonally dentcal. For more nformaton on the dagnostc telegram, refer to the descrpton of the slave provded by the manufacturer. To use the RDIAG functon block 1. In the user program, set the slave address on the A_ID nput. 2. On the user program s A_Mlen, defne the maxmum amount of alarm data n bytes that must be expected. 3. In the user program, set the A_Req nput to TRUE. Page 158 of 386 HI E Rev. 4.01

159 Communcaton 6 PROFIBUS DP The functon block reacts to a rsng edge on A_Req. The A_Busy output s set to TRUE untl the dagnostc request has been processed. Afterwards, A_Busy s set to FALSE and A_Vald or A_Error to TRUE. If the dagnostc telegram s vald, the A_Vald output s set to TRUE. The dagnostc data can be evaluated usng the varables defned n the Data tab. The A_Len output contans the amount of dagnostc data n bytes that was actually read. If the dagnostc telegram could not be read successfully, the A_Error output s set to TRUE and an error code s output to A_Status. HI E Rev Page 159 of 386

160 6 PROFIBUS DP Communcaton RDREC Functon Block Fgure 47: RDREC Functon Block The RDREC functon block s used for acyclcally readng a data record from a slave addressed on the A_Index nput. Consult the slave s manual to fnd out whch data can be read. Ths functonalty s optonal and s only defned wth DP V1 and hgher! Up to 32 RDREC and/or WRREC functon blocks can smultaneously be actve n the HIMA PROFIBUS DP master. To confgure the functon block, drag t from the functon block lbrary onto the user program (see also Chapter 13.1). Inputs and Outputs of the Functon Block wth Prefx A: These nputs and outputs can be used to control and evaluate the functon blocks usng the user program. The prefx A means Applcaton. A_Inputs Descrpton Type A_Req The rsng edge starts the readng request. BOOL A_Id Slave dentfcaton number, (see Chapter 6.10) DWORD A_Index Number of the data record to be read. INT Consult the devce manual provded by the manufacturer for more nformaton on the specfc meanng. A_MLen Maxmum length of the data to be read n bytes. INT Table 117: A-Inputs for the RDREC Functon Block A_Outputs Descrpton Type A_Vald A new data record was receved and s vald. BOOL A_Busy TRUE: Data s stll beng read. BOOL ERROR TRUE: An error occurred BOOL FALSE: No error A_Status Status or error code, see Chapter DWORD A_Len Length of the read data record nformaton n bytes. INT Table 118: A-Outputs for the RDREC Functon Block Page 160 of 386 HI E Rev. 4.01

161 Communcaton 6 PROFIBUS DP Inputs and Outputs of the Functon Block wth Prefx F These nputs and outputs of the functon block establsh the connecton to the RDREC functon block n structure tree. The prefx F means Feld. Common varables are used to connect the RDREC functon block (n the Functon Blocks drectory) to the RDREC functon block (n the user program). These must be created beforehand n the Varable Edtor. Connect the F-Inputs of the RDREC functon block n the user program to the same varables that wll be connected to the outputs of the RDREC functon block n the structure tree. F-Inputs Type F_Ack BOOL F_Vald BOOL F_Busy BOOL F_Error BOOL F_Status DWORD F_Len INT Table 119: F-Inputs for the RDREC Functon Block Connect the F-Outputs of the RDREC functon block n the user program to the same varables that wll be connected to the nputs of the RDREC functon block n the structure tree. F-Outputs Type F_Req BOOL F_Id DWORD F_Index INT F_Mlen INT Table 120: F-Outputs for the RDREC Functon Block To create the RDREC functon block n the structure tree 1. In the structure tree, open Confguraton, Resource, Protocols, PROFIBUS DP Master, Functon Blocks, New. 2. Select the RDREC functon block and clck OK.. 3. Rght-clck the RDREC functon bloc, and then clck Edt. The wndow for assgnng varables to the functon blocks appears. Connect the nputs of the RDREC functon block n the structure tree to the same varables that have been prevously connected to the F-Outputs of the RDREC functon block n the user program. Inputs Type ID DWORD INDEX INT MLEN INT REQ BOOL Table 121: Input System Varables HI E Rev Page 161 of 386

162 6 PROFIBUS DP Communcaton Connect the followng outputs of the RDREC functon block n the structure tree to the same varables that have been prevously connected to the F-Inputs of the RDREC functon block n the user program. Outputs ACK BUSY ERROR LEN STATUS VALID Type BOOL BOOL BOOL INT DWORD BOOL Table 122: Output System Varables Data No predefned varables Table 123: Data Descrpton A user-specfc data structure can be defned n the Process Varables tab; however, the structure must match the data record structure. For more nformaton on the record structure, refer to the operatng nstructons provded by the manufacturer of the slave. To use the RDREC functon block 1. In the user program, set the slave address on the A_ID nput. 2. In the user program, set the slave-specfc ndex for the data record on the A_Index nput (see the manual provded by the manufacturer). 3. In the user program, set the length of the data record to be read on the A_Len nput. 4. In the user program, set the A_Req nput to TRUE. The functon block reacts to a rsng edge on A_Req. The A_Busy output s set to TRUE untl the data record request has been processed. Afterwards, A_Busy s set to FALSE and A_Vald or A_Error to TRUE. If the data record s vald, the A_Vald output s set to TRUE. The data set can be evaluated usng the varables defned n the Data tab. The A_Len output contans the actual length of the data record that has been read. If the data record could not be read successfully, the A_Error output s set to TRUE and an error code s output to A_Status. Page 162 of 386 HI E Rev. 4.01

163 Communcaton 6 PROFIBUS DP SLACT Functon Block Fgure 48: SLACT Functon Block The SLACT functon block (DP V0 and hgher) s used for actvatng and deactvatng a slave from wthn the user program of the PROFIBUS DP master. The slave can thus be set to one of the followng states usng a tmer or a mechancal swtch connected to a physcal nput of the PROFIBUS DP master. 0: Actve = 0: Inactve If varous SLACT functon blocks are used, the user program must be confgured such that only one SLACT functon block s actve at a tme. To confgure the functon block, drag t from the functon block lbrary onto the user program (see also Chapter 13.1). Inputs and Outputs of the Functon Block wth Prefx A: These nputs and outputs can be used to control and evaluate the functon blocks usng the user program. The prefx A means Applcaton. A_Inputs Descrpton Type A_Req Rsng edge starts the functon block BOOL A_Id Slave s dentfcaton number DWORD (see Chapter 6.10) A_Mode Target state for the slave PROFIBUS DP slave INT 0: Actve (Connected) = 0: Not actve (Deactvated) Table 124: A-Inputs for the SLACT Functon Block HI E Rev Page 163 of 386

164 6 PROFIBUS DP Communcaton A_Outputs Descrpton Type DONE TRUE: The PROFIBUS DP slave has been set to the state BOOL defned on the A_Mode nput. A_Busy TRUE: The PROFIBUS DP slave s stll beng set. BOOL A_Status Status or error code (see Chapter 6.11) DWORD Table 125: A-Outputs for the SLACT Functon Block Inputs and Outputs of the Functon Block wth Prefx F: These nputs and outputs of the functon block establsh the connecton to the SLACT functon block n structure tree. The prefx F means Feld. Common varables are used to connect the SLACT functon block (n the Functon Blocks drectory) to the SLACT functon block (n the user program). These must be created beforehand usng the Varable Edtor. Connect the F-Inputs of the SLACT functon block n the user program to the same varables that wll be connected to the outputs of the SLACT functon block n the structure tree. F-Inputs Type F_Ack BOOL F_Done BOOL F_Busy BOOL F_Status DWORD Table 126: F-Inputs for the SLACT Functon Block Connect the F-Outputs of the SLACT functon block n the user program to the same varables that wll be connected to the nputs of the SLACT functon block n the structure tree. F-Outputs Type F_Req BOOL F_Id DWORD F_Mode INT Table 127: F-Outputs for the SLACT Functon Block To create the SLACT functon block n the structure tree 1. In the structure tree, open Confguraton, Resource, Protocols, PROFIBUS DP Master, Functon Blocks, New. 2. Select the SLACT functon block and clck OK. 3. Rght-clck the SLACT functon bloc, and then clck Edt. The wndow for assgnng varables to the functon blocks appears. Connect the nputs of the SLACT functon block n the structure tree to the same varables that have been prevously connected to the F-Outputs of the SLACT functon block n the user program. Page 164 of 386 HI E Rev. 4.01

165 Communcaton 6 PROFIBUS DP Inputs Type ID DWORD MODE INT REQ BOOL Table 128: Input System Varables Connect the followng outputs of the SLACT functon block n the structure tree to the same varables that have been prevously connected to the F-Inputs of the SLACT functon block n the user program. Outputs Type ACK BOOL BUSY BOOL DONE BOOL STATUS DWORD Table 129: Output System Varables To use the SLACT functon block 1. In the user program, set the A_Mode nput to the desred state. 2. In the user program, set the slave address dentfer on the A_ID nput. 3. In the user program, set the A_Req nput to TRUE. The functon block reacts to a rsng edge on A_Req. A_Busy output s set to TRUE untl the SLACT command has been processed. Afterwards, A_Busy s set to FALSE and A_Done s set to TRUE. If the slave mode could be set successfully, t s output to A_Status. If the slave mode could not be set successfully, an error code s output to A_Status. HI E Rev Page 165 of 386

166 6 PROFIBUS DP Communcaton WRREC Functon Block Fgure 49: WRREC Functon Block The WRREC functon block (DP V1 and hgher) s used for acyclcally wrtng a data record to a slave addressed wth A_Index. Consult the slave s manual to fnd out whch data can be wrtten. Up to 32 RDREC and/or WRREC functon blocks can smultaneously be actve n the HIMA PROFIBUS DP master. To confgure the functon block, drag t from the functon block lbrary onto the user program (see also Chapter 13.1). Inputs and Outputs of the Functon Block wth Prefx A: These nputs and outputs can be used to control and evaluate the functon blocks usng the user program. The prefx A means Applcaton. A_Inputs Descrpton Type A_Req The rsng edge starts the request for wrtng a data record. BOOL A_ID Identfcaton number of the slave DWORD (see Chapter 6.10) A_Index Number of the data record to be wrtten. INT Consult the devce manual provded by the manufacturer for more nformaton on the specfc meanng. A_Len Length of the data record to be wrtten n bytes INT Table 130: A-Inputs for the WRREC Functon Block A_Outputs Descrpton Type DONE TRUE: The functon block completed the wrtng process. BOOL A_Busy TRUE: The functon block has not yet completed the wrtng BOOL process ERROR TRUE: An error occurred BOOL A_STATUS Status or error code (see Chapter 6.11) DWORD Table 131: A-Outputs for the WRREC Functon Block Page 166 of 386 HI E Rev. 4.01

167 Communcaton 6 PROFIBUS DP Inputs and Outputs of the Functon Block wth Prefx F: These nputs and outputs of the functon block establsh the connecton to the WRREC functon block n structure tree. The prefx F means Feld. Common varables are used to connect the WRREC functon block (n the Functon Blocks drectory) to the WRREC functon block (n the user program). These must be created beforehand usng the Varable Edtor. Connect the F-Inputs of the WRREC functon block n the user program to the same varables that wll be connected to the outputs of the WRREC functon block n the structure tree. F-Inputs Type F_Ack BOOL F_Done BOOL F_Busy BOOL F_Error BOOL F_Status DWORD Table 132: F-Inputs for the WRREC Functon Block Connect the F-Outputs of the WRREC functon block n the user program to the same varables that wll be connected to the nputs of the WRREC functon block n the structure tree. F-Outputs Type F_Req BOOL F_Id DWORD F_Index INT F_Len INT Table 133: F-Outputs for the WRREC Functon Block To create the WRREC functon block n the structure tree 1. In the structure tree, open Confguraton, Resource, Protocols, PROFIBUS DP Master, Functon Blocks, New. 2. Select the WRREC functon block and clck OK. 3. Rght-clck the WRREC functon block, and then clck Edt. The wndow for assgnng varables to the functon blocks appears. Connect the nputs of the WRREC functon block n the structure tree to the same varables that have been prevously connected to the F-Outputs of the WRREC functon block n the user program. Inputs Type ID DWORD INDEX INT LEN INT REQ BOOL Table 134: Input System Varables HI E Rev Page 167 of 386

168 6 PROFIBUS DP Communcaton Connect the followng outputs of the WRREC functon block n the structure tree to the same varables that have been prevously connected to the F-Inputs of the WRREC functon block n the user program. Outputs ACK BUSY DONE ERROR STATUS Type BOOL BOOL BOOL BOOL DWORD Table 135: Output System Varables Data No predefned varables Table 136: Data Descrpton A user-specfc data structure can be defned n the Process Varables tab; however, the structure must match the data record structure. For more nformaton on the record structure, refer to the operatng nstructons provded by the manufacturer of the slave. To operate the WRREC functon block, the followng steps are essental: 1. In the user program, set the slave address on the A_ID nput. 2. In the user program, set the slave-specfc ndex for the data record on the A_Index nput (see the manual provded by the manufacturer). 3. In the user program, set the length of the data record to be wrtten on the A_Len nput. 4. In the user program, set the data record as defned n the Data tab. 5. In the user program, set the A_Req nput to TRUE. The functon block reacts to a rsng edge on A_Req. The A_Busy output s TRUE untl to the data record s wrtten. Afterwards, A_Busy s set to FALSE and A_Done s set to TRUE. If the data record could not be wrtten successfully, the A_Error output s set to TRUE and an error code s output to A_Status. Page 168 of 386 HI E Rev. 4.01

169 Communcaton 6 PROFIBUS DP 6.10 PROFIBUS Auxlary Functon Blocks The auxlary functon blocks are used to confgure and evaluate the nputs and outputs of the functon blocks. The followng auxlary functon blocks are avalable: Auxlary functon blocks ACTIVE (see Chapter ) ALARM (see Chapter ) DEID (see Chapter ) ID (see Chapter ) NSLOT (see Chapter ) SLOT (see Chapter ) STDDIAG (see Chapter ) LATCH PIG PIGII Functon descrpton Determne f the slave s actve or nactve Decode the alarm data Decode the dentfcaton number Generate a four byte dentfer Create a contnuous dentfcaton number for the slots Create a SLOT dentfcaton number usng a slot number Decode the standard dagnoss of a slave Only used wthn other functon blocks Only used wthn other functon blocks Only used wthn other functon blocks Table 137: Overvew of the Auxlary Functon Blocks Auxlary Functon Block: ACTIVE Fgure 50: The ACTIVE Auxlary Functon Block The ACTIVE auxlary functon block uses the standard dagnoss of a PROFIBUS DP slave to determne f the slave s actve or nactve. To confgure the functon block, drag t from the functon block lbrary onto the user program (see also Chapter 13.1). Inputs Descrpton Type IN Slave standard dagnoss DWORD Table 138: Inputs for the ACTIVE Auxlary Functon Block Outputs Descrpton Type OUT TRUE: The slave s actve FALSE: The slave s nactve BOOL Table 139: Outputs for the ACTIVE Auxlary Functon Block HI E Rev Page 169 of 386

170 6 PROFIBUS DP Communcaton Auxlary Functon Block: ALARM (Decode the Alarm Data) Fgure 51: The ALARM Auxlary Functon Block The ALARM auxlary functon block decodes the standard alarm data of a PROFIBUS DP slave. To confgure the functon block, drag t from the functon block lbrary onto the user program (see also Chapter 13.1). Inputs Descrpton Type IN Standard alarm DWORD Table 140: Inputs for the ALARM Auxlary Functon Block Output Descrpton Type Len Total length of the alarm message. SINT Type 1: Dagnostc alarm SINT 2: Process alarm 3: Pull alarm 4: Plug alarm 5: Status alarm 6: Update alarm The other numbers are ether reserved or manufacturer specfc. Consult the devce manual provded by the manufacturer for more nformaton on the specfc meanng. Dagnostc True = Dagnostcs alarm BOOL Process True = Process alarm BOOL Pull True = The module was pulled BOOL Plug True = The module was plugged BOOL Status True = Status alarm BOOL Update True = Update alarm BOOL Slot Alarm Trggerng Module BYTE SeqNr Alarm Sequence Number SINT Page 170 of 386 HI E Rev. 4.01

171 Communcaton 6 PROFIBUS DP Output Descrpton Type AddAck TRUE means that the slave that trggered ths alarm requres an addtonal acknowledgement from the applcaton. For more nformaton on ths, consult the slave manual provded by the manufacturer. BOOL Appears Output Value Descrpton BOOL Dsappears Appears TRUE If both are FALSE, no error has Dsappears FALSE occurred yet. Appears TRUE An error occurred and s stll Dsappears FALSE present. Appears TRUE An error occurred and s Dsappears FALSE dsappearng. Appears TRUE If both are TRUE, the fault Dsappears FALSE dsappears but the slave s stll n a faulty state. Table 141: Outputs for the ALARM Auxlary Functon Block Auxlary Functon Block: DEID (Decode the dentfcaton number) Fgure 52: The DEID Auxlary Functon Block The DEID auxlary functon block decodes the dentfcaton number and dsjonts t nto ts four component parts. To confgure the functon block, drag t from the functon block lbrary onto the user program (see also Chapter 13.1). Inputs Descrpton Type ID Identfcaton number of the slave DWORD Table 142: Inputs for the DEID Auxlary Functon Block Outputs Descrpton Type Master Master bus address BYTE Segment Segment BYTE Stop Slave bus address BYTE Slot Slot or module number BYTE Table 143: Outputs for the DEID Auxlary Functon Block HI E Rev Page 171 of 386

172 6 PROFIBUS DP Communcaton Auxlary Functon Block: ID (Generate the dentfcaton number) Fgure 53: The ID Auxlary Functon Block The ID auxlary functon block uses four bytes to generate an dentfer (dentfcaton number) used by other auxlary functon blocks. To confgure the functon block, drag t from the functon block lbrary onto the user program (see also Chapter 13.1). Inputs Descrpton Type Ena Not used BOOL Master Bus address BYTE Segment Segment BYTE Stop Slave bus address BYTE Slot Slot or module number BYTE Table 144: Inputs for the ID Auxlary Functon Block Outputs Descrpton Type Enao Not used BOOL ID Identfcaton number of the slave DWORD Table 145: Outputs for the ID Auxlary Functon Block Page 172 of 386 HI E Rev. 4.01

173 Communcaton 6 PROFIBUS DP Auxlary Functon Block: NSLOT Fgure 54: The NSLOT Auxlary Functon Block The NSLOT auxlary functon block uses an dentfer to generate a new dentfer that addresses the next slot wthn the same slave. Ena must be set to TRUE to allow the auxlary functon block to run. Enao s set to TRUE f the result on the Ido output s vald. To confgure the functon block, drag t from the functon block lbrary onto the user program (see also Chapter 13.1). Inputs Descrpton Type Ena The auxlary functon block runs as long as Ena s set to BOOL TRUE. ID Identfcaton number of the slave DWORD Table 146: Inputs for the NSLOT Auxlary Functon Block Outputs Descrpton Type Enao TRUE = The result s vald BOOL FALSE = No further slot number Ido Identfcaton number of the slave DWORD Table 147: Outputs for the NSLOT Auxlary Functon Block Auxlary Functon Block: SLOT Fgure 55: The SLOT Auxlary Functon Block The SLOT auxlary functon block uses an dentfer and a slot number to generate a new dentfer that addresses the same slave as the frst dentfer but wth the new slot number. To confgure the functon block, drag t from the functon block lbrary onto the user program (see also Chapter 13.1). HI E Rev Page 173 of 386

174 6 PROFIBUS DP Communcaton Inputs Descrpton Type Ena Not used BOOL ID Logcal address of the slave component (slave ID and slot DWORD number) Slot New slot or module number BYTE Table 148: Inputs for the SLOT Auxlary Functon Block Outputs Descrpton Type Enao Not used BOOL Ido Identfcaton number of the slave DWORD Table 149: Outputs for the SLOT Auxlary Functon Block Auxlary Functon Block: STDDIAG Fgure 56: The STDDIAG Auxlary Functon Block The STDDIAG auxlary functon block decodes the standard dagnoss of a PROFIBUS DP slave. The outputs of type BOOL n the STDDIAG auxlary functon block are set to TRUE f the correspondng bt has been set n the standard dagnoss. To confgure the functon block, drag t from the functon block lbrary onto the user program (see also Chapter 13.1). Page 174 of 386 HI E Rev. 4.01

175 Communcaton 6 PROFIBUS DP Inputs Descrpton Type IN Slave standard dagnoss DWORD Table 150: Inputs for the STDDIAG Auxlary Functon Block Outputs Descrpton Type StatonNonExst The slave does not exst BOOL StatonNotReady Slave not ready BOOL ConfgError Confguraton error BOOL ExtendedDag Extended dagnoss follows BOOL FuncNotSupported The functon s not supported BOOL InvaldAnswer Invald reply from slave BOOL ParamError Parameter error BOOL StatonLocked Slave locked by another master BOOL NewParamRequred New confguraton data requred BOOL StatcDag Statc dagnoss BOOL WatchdogOn Watchdog actve BOOL FreezeReceved Freeze command receved BOOL SyncReceved Sync command receved BOOL StatonDeactvated The slave was deactvated BOOL DagOverflow Dagnostc overflow BOOL MasterAddr Master bus address BYTE Table 151: Outputs for the STDDIAG Auxlary Functon Block To read the standard dagnoss of the PROFIBUS DP slave: 1. In the structure tree, open Confguraton, Resource, Protocols, PROFIBUS DP Master. 2. Rght-clck PROFIBUS Slave, and then clck Edt. 3. Drag the global varable of type DWORD onto the Standard Dagnoss feld. 4. Connect ths global varable wth the nput of the STDDIAG functon block. HI E Rev Page 175 of 386

176 6 PROFIBUS DP Communcaton 6.11 Error Codes of the Functon Blocks If a functon block s unable to correctly execute a command, an error code s output to A_Status. The meanng of the error codes s descrbed n the followng table. Error code Symbol Descrpton 16# TEMP_NOT_AVAIL Servce temporary not avalable 16# INVALID_PARA Invald parameter 16# WRONG_STATE The slave does not support DP V1 16# FATAL_ERR Fatal program error 16# BAD_CONFIG Confguraton error n the data area 16# PLC_STOPPED The controller was stopped 16#4080A000 READ_ERR Error whle readng a record 16#4080A100 WRITE_ERR Error whle wrtng a record 16#4080A200 MODULE_FAILURE The error cannot be specfed n greater detal 16#4080B000 INVALID_INDEX Index s nvald 16#4080B100 WRITE_LENGTH Wrong length whle wrtng 16#4080B200 INVALID_SLOT Slot number nvald 16#4080B300 TYPE_CONFLICT Wrong type 16#4080B400 INVALID_AREA Wrong read/wrte range 16#4080B500 STATE_CONFLICT Master n nvald state 16#4080B600 ACCESS_DENIED Slave not actve (or smlar) 16#4080B700 INVALID_RANGE Invald read/wrte range 16#4080B800 INVALID_PARAMETER Invald parameter value 16#4080B900 INVALID_TYPE Invald parameter type 16#4080C300 NO_RESOURCE Slave not avalable 16#4080BA00 BAD_VALUE Invald Value 16#4080BB00 BUS_ERROR Bus error 16#4080BC00 INVALID_SLAVE Invald slave ID 16#4080BD00 TIMEOUT Tmeout occurred 16#4080C000 READ_CONSTRAIN Read constrant 16#4080C100 WRITE_CONSTRAIN Wrte constrant 16#4080C200 BUSY A functon block of ths type s already actve 16#4080C300 NO_RESOURCE Slave nactve Table 152: Error Codes of the Functon Blocks Page 176 of 386 HI E Rev. 4.01

177 Communcaton 6 PROFIBUS DP 6.12 Control Panel (PROFIBUS DP Master) The Control Panel can be used to verfy and control the settngs for the PROFIBUS DP master. Detals about the current status of the master or slave assocated wth t (e.g., cycle tme, bus state, etc.) are dsplayed. To open Control Panel for montorng the PROFIBUS DP master 1. Rght-clck the Hardware structure tree node and select Onlne from the context menu. 2. In the System Logn wndow, enter the access data to open the onlne vew for the hardware. 3. Double-clck COM Module and select the PROFIBUS DP Master structure tree node Context Menu (PROFIBUS DP Master) The followng commands can be chosen from the context menu for the selected PROFIBUS DP master: Offlne: Swtch off the selected PROFIBUS DP master. If the master s swtched off, t s completely dsabled. Stop: Stop the selected PROFIBUS DP master. The master partcpates n the token protocol but does not send any data to the slaves. Clear: By clckng the CLEAR button, the selected PROFIBUS DP master adopts a safe state and exchanges safe data wth the slaves. The output data sent to the slaves only contans zeros. Falsafe slaves receve falsafe telegrams contanng no data. The PROFIBUS DP master gnores the nput data from the slaves, and uses the ntal values n the user program nstead. Operate: Start the selected PROFIBUS DP master. The PROFIBUS DP master cyclcally exchanges I/O data wth the slaves. Reset Statstcs The Reset Statstcs button s used to reset the statstcal data such as mn. or max. cycle tme to zero Context Menu (PROFIBUS DP Slave) The followng commands can be chosen from the context menu for the selected PROFIBUS DP slave: Actvate: Actvate the selected slave whch can now exchange data wth the PROFIBUS DP master. Deactvate: Deactvate the selected slave. The communcaton s termnated. HI E Rev Page 177 of 386

178 6 PROFIBUS DP Communcaton Vew Box (PROFIBUS Master) The vew box dsplays the followng values of the selected PROFIBUS DP master. Element Descrpton Name Name of the PROFIBUS DP master Master State Indcate the current protocol state (see Chapter ). 0 = OFFLINE 1 = STOP 2 = CLEAR 3 = OPERATE 100 = UNDEFINED Bus state Bus error code 0...6: 0 = OK 1 = Address error: The master address s already avalable on the bus 2 = Bus malfuncton: A malfuncton was detected on the bus, e.g., bus was not properly termnated, and multple statons are sendng data smultaneously. 3 = Protocol error: An ncorrectly coded packet was receved. 4 = Hardware fault: The hardware reported a fault, e.g., too short tme perods. 5 = Unknown error: The master changed the state for an unknown reason. 6 = Controller Reset: Wth severe bus malfunctons, the controller chp could adopt an undefned state and s reset. The error code retans ts value untl the bus error has been elmnated. Feldbus Interface FB1, FB2 µp load Load of the COM module planned for ths protocol. (planned) [%] µp load (actual) [%] Actual load of the COM module for ths protocol. Baud rate [bps] Baud rate of the master The master can communcate usng all baud rates specfed n the standard. Cycle tmes can be set up to a lower lmt of 2 ms. Feldbus address Master bus address ( ) PNO-IdentNo 16 bt unque number assgned by the PNO Germany to a product (feld devce) and dentfyng t. Bus Error Count Number of the bus error, so far. MSI [ms] Mn. Slave Interval n ms, resoluton 0.1 ms TTR [ms] Target Token Rotaton Tme n ms, resoluton 0.1 ms Page 178 of 386 HI E Rev. 4.01

179 Communcaton 6 PROFIBUS DP Element Last Cycle Tme [ms] Mnmum Cycle Tme [ms] Average Cycle Tme [ms] Maxmum Cycle Tme [ms] Descrpton Last PROFIBUS DP cycle tme [ms] Mnmum PROFIBUS DP cycle tme [ms] Average PROFIBUS DP cycle tme [ms] Maxmum PROFIBUS DP cycle tme [ms] Table 153: Vew Box of the PROFIBUS Master PROFIBUS DP Master State The master status s dsplayed n the vew box of the Control Panel and can be evaluated n the user program usng the Master Connecton State status varable. Master State OFFLINE STOP CLEAR OPERATE UNDEFINED State of the master The master s swtched off; no bus actvty. The master partcpates n the token protocol but does not send any data to the slaves. The master s n the safe state and exchanges data wth the slaves. The output data sent to the slaves only contans zeros. Falsafe slaves receve falsafe telegrams contanng no data. The nput data of the slaves are gnored and nstead ntal values are used. The master s operatng and cyclcally exchanges I/O data wth the slaves. The frmware for the PROFIBUS DP master module s beng updated. Table 154: PROFIBUS DP Master State Behavor of the PROFIBUS DP Master Behavor of the PROFIBUS DP master accordng to the controller operatng state. State of the controller STOP *) RUN STOP Behavor of the HIMA PROFIBUS DP Master If the controller s n STOP, the master s n the OFFLINE state. If the controller s n RUN, the master tres to enter the OPERATE state. If the controller enters the STOP state, the master adopts the CLEAR state. If the master s already n the STOP or OFFLINE state, t remans n ths state. *) After powerng up the controller or loadng the confguraton Table 155: Behavor of the PROFIBUS DP Master HI E Rev Page 179 of 386

180 6 PROFIBUS DP Communcaton Functon of the FBx LED n the PROFIBUS Master The FBx LED of the correspondng feldbus nterface ndcates the state of the PROFIBUS DP protocol. The states of the FBx LED are specfed n the followng table: FBx LED OFF Blnkng Every 2 seconds ON Blnkng, every second Table 156: The FBx LED Descrpton No confguraton or nvald confguraton of the PROFIBUS DP master. Vald confguraton. The PROFIBUS DP master s n the OFFLINE or STOP state. The PROFIBUS DP master s n the OPERATE or CLEAR state, f all actvated slaves are connected. At least one slave faled Functon of the FAULT LED n the PROFIBUS Master (HIMax only) The FAULT LED of the correspondng feldbus nterface ndcates that the PROFIBUS DP protocol has faled. The states of the FAULT LED are specfed n the followng table: FAULT LED Color Descrpton OFF Red The PROFIBUS DP protocols s not dsturbed. Blnkng Red The protocol s dsturbed. At least one slave has faled. Bus error detected. Calculatng tme budget exceeded. If no faults occur for a perod longer than 5 seconds, the state changes to Protocol not dsturbed. Table 157: The FAULT FBx Page 180 of 386 HI E Rev. 4.01

181 Communcaton 6 PROFIBUS DP 6.13 HIMA PROFIBUS DP Slave Ths chapter descrbes the characterstcs of the HIMA PROFIBUS DP slave and the menu functons and dalog boxes n SILworX requred for confgurng the HIMA PROFIBUS DP slave. Equpment and System Requrements Element Descrpton HIMA controller HIMax wth COM module HIMatrx: CPU OS versons beyond 7 and COM OS versons beyond 12 COM module The seral feldbus nterface (FB1 or FB2) used on the COM module must be equpped wth an optonal HIMA PROFIBUS DP slave submodule. For more nformaton on the nterface assgnment, see Chapter 3.6. Actvaton Actvaton through the plug-n module, see Chapter 3.4. Table 158: Equpment and System Requrements for the HIMA PROFIBUS DP Slave For the HIMax system, HIMA recommends operatng the PROFIBUS DP usng the FB1 feldbus nterface (maxmum transfer rate 12 Mbt). The maxmum transfer rate permtted for the FB2 feldbus nterface s 1.5 Mbt. PROFIBUS DP Slave Propertes Element Descrpton Type of HIMA DP V0 PROFIBUS DP slave Transfer rate 9.6 kbt/s...12 Mbt/s Bus address Max. number of slaves One HIMA PROFIBUS DP slave can be confgured for each COM module. Process data volume of DP-Output: max. 192 bytes a HIMA PROFIBUS DP DP-Input: max. 240 bytes slave Total: max. 256 bytes Protocol watchdog If the COM s n RUN and the connecton to the PROFIBUS DP master s lost, the DP slave detects ths once the watchdog tmeout has expred (the watchdog tmeout must be set n the master). In ths case, the DP output data (or nput data from the perspectve of the resource) are reset to ther ntal value and the Data Vald flag (status varable of the DP slave protocol) s set to FALSE. Table 159: Propertes of the HIMA PROFIBUS DP Slave Creatng a HIMA PROFIBUS DP Slave To create a new HIMA PROFIBUS DP Slave 1. In the structure tree, open Confguraton, Resource, Protocols. 2. Select New, PROFIBUS DP Slave from the context menu for protocols to add a new PROFIBUS DP slave. 3 Select Edt from the context menu for the PROFIBUS DP slave. 4. In the Propertes tab, clck Module and Interface. HI E Rev Page 181 of 386

182 6 PROFIBUS DP Communcaton 6.14 Menu Functons of the PROFIBUS DP Slave Edt The Edt dalog box for the PROFIBUS DP master contans the followng tabs: Process Varables The send and receve varables are created n the Process Varables tab. Input Varables The varables that the current controller should receve are entered n the Input Sgnals area. Any varables can be created n the Input Sgnals area. Offsets and types of the receved varables must be dentcal wth offsets and types of the send varables of the communcaton partner. Output Varables The varables for cyclc data exchange sent by ths controller are entered n the Output Sgnals area. Any varables can be created n the Output Sgnals area. Offsets and types of the receved varables must be dentcal wth offsets and types of the receve varables of the communcaton partner. System Varables The varables that should be read n the controller are defned n the System Varables tab. The System Varables tab contans the followng system varables that are requred to evaluate the state of the PROFIBUS DP slave from wthn the user program. Page 182 of 386 HI E Rev. 4.01

183 Communcaton 6 PROFIBUS DP Element Current baud rate Data vald Error Code Master Address Protocol State Slave Address Watchdog Tme Descrpton Baud rate currently used by the PROFIBUS DP slave protocol. If the status varable Data Vald s set to TRUE, the slave receved vald mport data from the master. The status varable s set to FALSE f the watchdog tme wthn the slave has expred. Default value: FALSE Note: If the master dd not actvate the slave s watchdog and the connecton s lost, the Data Vald status varable retans the value TRUE snce the PROFIBUS DP slave has no means to recognze that the connecton was lost. Ths fact must be taken nto account when usng ths varable! If an error occurred n the PROFIBUS DP slave protocol, the error s transferred to ths varable. The last occurred error s dsplayed. Possble (hexadecmal) value: 0x00: No error 0xE1: Faulty parameter settng by the PROFIBUS Master 0xD2: Invald confguraton by the PROFIBUS DP Master Default value: 0x00 Ths s the address of the PROFIBUS master that confgured ts own PROFIBUS DP slave. Possble (decmal) values: 0-125: Master Address 255: The slave s not assgned to any master Default value: 255 Descrbe the state of the PROFIBUS DP slave protocol Possble (hexadecmal) value: 0xE1: The controller s dsconnected from the bus or not actve. 0xD2: The controller wats for a confguraton from the master. 0xC3: The controller cyclcally exchanges data wth the master. Default value: 0xE1 Address of the controller's PROFIBUS DP slave. Ths address was prevously confgured by the user usng the PADT. Possble (decmal) values: 0-125: Slave Address Watchdog tme n mllseconds confgured n the master. See Chapter Table 160: System Varables n the PROFIBUS DP Slave HI E Rev Page 183 of 386

184 6 PROFIBUS DP Communcaton Propertes The Propertes tab for the HIMA PROFIBUS DP slave contans the followng parameters for confgurng the PROFIBUS DP slave. The default values for Wthn one cycle and Process Data Refresh Rate [ms] provde a fast means of exchangng PROFIBUS DP data between the COM module (COM) and the PROFIBUS DP slave hardware of the HIMax/HIMatrx controller. These parameters should only be changed f t s necessary to reduce the COM load for an applcaton, and the process allows ths change. Only experenced programmers should modfy the parameters. Increasng the refresh rate for the COM and PROFIBUS DP hardware means that the effectve refresh rate of the PROFIBUS DP data s also ncreased. The system tme requrements must be verfed. Also take the parameter Mn. Slave Interval [ms] nto account (see Tmngs Tab, Chapter 6.3.2) whch defnes the mnmum refresh rate of the PROFIBUS DP data between PROFIBUS DP master and PROFIBUS DP slave. Element Type Name Module Actvate Max. µp Budget Max. µp budget n [%] Behavor on CPU/COM Connecton Loss Staton address Descrpton PROFIBUS DP slave Name of the PROFIBUS DP Slave Selecton of the COM module wthn whch the protocol s processed. Actvated: Adopt the µp budget lmt from the Max. µp Budget n [%] feld. Deactvated: Do not use the µp budget lmt for ths protocol. Maxmum µp budget for the module that can be used for processng the protocols. Range of values: % Default value: 30% If the connecton of the processor module to the communcaton module s lost, the nput varables are ntalzed or contnue to be used unchanged n the process module, dependng on ths parameter. For nstance, f the communcaton module s removed when communcaton s runnng. Adopt Intal Data Input varables are reset to ther ntal values. Retan Last Value The nput varables retans the last value. Slave staton address. Only one slave staton address may be avalable on the bus. Range of values: Default value: 0 Page 184 of 386 HI E Rev. 4.01

185 Communcaton 6 PROFIBUS DP Interface Baud rate [bps] Process Data Refresh Rate [ms] Force Process Data Consstency Feldbus nterface that should be used for the PROFIBUS DP slave. Range of values: fb1, fb2 Default value: None Baud rate used for the bus. Possble values: Value Baud Rate FB1 FB kbt/s X X kbt/s X X kbt/s X X kbt/s X X kbt/s X X kbt/s X X Mbt/s X X Mbt/s X Mbt/s X Mbt/s X - Refresh rate n mllseconds at whch the COM and the PROFIBUS DP slave hardware exchange protocol data. Range of values: Default value: 10 Actvated: Transfer of all protocol data from the CPU to the COM wthn a CPU cycle. Deactvated: Transfer of all protocol data from the CPU to the COM, dstrbuted over multple CPU cycles, each wth 1100 byte per data drecton. Ths can also allow lowerng the cycle tme of the controller. Default value: actvated Table 161: Slave Propertes: General Tab HI E Rev Page 185 of 386

186 6 PROFIBUS DP Communcaton 6.15 Control Panel (Profbus DP Slave) The Control Panel can be used to verfy and control the settngs for the PROFIBUS DP slave. Detals about the slave's current status (e.g., cycle tme, bus state, etc.) are dsplayed. To open Control Panel for montorng the PROFIBUS DP Slave 1. Rght-clck the Hardware structure tree node and select Onlne from the context menu. 2. In the System Logn wndow, enter the access data to open the onlne vew for the hardware. 3. Double-clck COM Module and select the PROFIBUS DP Slave structure tree node Vew Box (PROFIBUS DP Slave) The vew box dsplays the followng values of the selected PROFIBUS DP slave. Element Descrpton Name Name of the PROFIBUS DP s Feldbus Interface Subordnated slave's feldbus nterface Protocol State Connecton State 0 = Deactvated, 1 = Inactve (connecton attempt) 2 = Connected Error State See Chapter Tmeout Watchdog tme n mllseconds confgured n the master. See Chapter Watchdog Tme It s set n the master. See Chapter [ms] Feldbus address See Chapter Master Address Address of the PROFIBUS DP master. Baud rate [bps] Current baud rate. See Chapter µp budget (planned) Load of the COM module planned for ths protocol. [%] µp budget (actual) Actual load of the COM module for ths protocol. [%] Table 162: Vew Box of the PROFIBUS DP Slave Page 186 of 386 HI E Rev. 4.01

187 Communcaton 6 PROFIBUS DP 6.16 Functon of the FBx LED n the PROFIBUS Slave The FBx LED of the correspondng feldbus nterface ndcates the state of the PROFIBUS DP protocol. The states of the FBx LED are specfed n the followng table: FBx LED Color Descrpton OFF Yellow The PROFIBUS DP protocol s not actve! Ths means that the controller s n the STOP state or no PROFIBUS DP slave s confgured. Blnkng every 2 seconds Yellow No data traffc! The PROFIBUS DP slave s confgured and ready. ON Yellow The PROFIBUS DP protocol s actve and s exchangng data wth the PROFIBUS DP master. Table 163: The FBx LED 6.17 Functon of the FAULT LED n the PROFIBUS Slave (HIMax only) The FAULT LED of the correspondng feldbus nterface ndcates that the PROFIBUS DP protocol has faled. The states of the FAULT LED are specfed n the followng table: FAULT LED Color Descrpton OFF Red The PROFIBUS DP protocols s not dsturbed. Blnkng Red The protocol s dsturbed. The confguratons of the PROFIBUS DP master and slave are faulty. Calculatng tme budget exceeded. If no faults occur for a perod longer than 5 seconds, the state changes to Protocol not dsturbed. Table 164: The FAULT FBx HI E Rev Page 187 of 386

188 7 Modbus Communcaton 7 Modbus The Modbus couplng of HIMax/HIMatrx systems to almost any process control and vsual dsplay system can be acheved ether drectly, usng the RS485 nterfaces, or ndrectly, usng the Ethernet nterfaces of the controllers. HIMax/HIMatrx systems can operate both as master and slave. The Modbus functonalty makes t partcularly easy to connect to Control Panels or other controllers. Gven ts ntensve use n projects worldwde, Modbus has been proven through countless applcatons. Modbus master (see Chapter 7.1) Redundancy of the Modbus master must be confgured n the user program such that the user program montors the redundant transmsson paths and assgns the redundantly transmtted process data to the correspondng transmsson path. Modbus slave (see Chapter 7.3) The Modbus slave can be confgured redundantly. HIMax/HIMatrx controllers and the communcaton partner must be located n the same subnet, f the Ethernet nterfaces are used as transmsson channel, or they must have the correspondng routng settngs f a router s used. 7.1 RS485 Bus Topology The followng pcture shows the structure of an RS485 bus topology usng HIMA components. H 7506 are used as bus termnals. The permssble maxmum total bus length s 1200 m. Repeaters such as H ) must be used for dstances greater than 1200 m. A total of 3 repeaters may be used. The bus may be extended up to 4800 m. Addtonal Controllers Ground modular termnal block, USLKG4 YE/GN H 7506 Swtch Poston (Bus Termnaton) Fgure 57: RS485 Bus Topology 1) If fbre optc cable/rs485 converters are used n the bus, H 7505 must not be used (no automatc swtchng of data drecton). Page 188 of 386 HI E Rev. 4.01

189 Communcaton 7 Modbus Potental boundng should be used f the bus extends over larger dstances H 7506 Termnal Assgnment The followng table shows the termnal assgnment of the H 7506 bus termnal. The HIMA BV 7040 cable connects the H 7506 to the FBx feldbus nterface of the controller. X1/X2 Color Descrpton WH RxD/TxD-A, data lne 3 GN CNTR-A, controller lne for repeater 4 GY DGND 5 BN RxD/TxD-B, data lne 6 YE CNTR-B, controller lne for repeater Table 165: Termnal Assgnment for H 7506 Refer to the HIMA's webste for more nformaton on ths topc and on addtonal HIMA RS485 components Bus Cable For bus cablng, HIMA recommends usng shelded twsted par wres wth the followng characterstcs: Element Descrpton Cable type LYCY 3 x 2 x 0.25 mm 2 Wre cross-secton > 0.25 mm 2 Impendance Ω Table 166: Bus Cable HI E Rev Page 189 of 386

190 7 Modbus Communcaton Propertes of the RS485 Transmsson Element Network Topology Medum Connector Statons for each segment Total of statons for each bus Max. length of a bus segment Max. length of the bus Descrpton Lnear bus, actve bus termnaton on both ends Shelded, twsted par wres 9 pn SUB-D connector. Refer to Chapter 3.6 for detals on the pn assgnment. 32 statons n every segment, wthout repeaters 1) 1 Modbus master, 3 repeaters 1) 121 Modbus slaves 1200 m for each segment 4800 m, 4 segments wth 3 repeaters 1) Max. baud rate HIMax: bt/s HIMatrx: bt/s 1) For each repeater used, the maxmum number of statons n ths segment decreases by 1. Ths means that a maxmum of 31 statons may be operated on ths segment. Accordng to the standard, a total of three repeaters may be used such that a maxmum of 121 Modbus slaves may be connected for each seral Modbus master nterface. Table 167: Propertes of the RS485 Transmsson Page 190 of 386 HI E Rev. 4.01

191 Communcaton 7 Modbus 7.2 HIMA Modbus Master The data transfer between HIMA Modbus master and the Modbus slaves can be confgured va the seral nterface (RS485) as well as va the TCP/UDP (Ethernet). Addtonally, the HIMA Modbus master can be used as a gateway (Modbus: TCP/UDP -> RS485). Equpment and System Requrements Element HIMA controller Processor module COM module Actvaton Descrpton HIMax wth COM module HIMatrx: CPU OS versons beyond 7 and COM OS versons beyond 12 The Ethernet nterfaces on the processor module may not be used for Modbus TCP. Ethernet 10/100BaseT Pn assgnment of the D-sub connectors FB1 and FB2 If Modbus RTU s used, each of the seral feldbus nterfaces (FB1 and FB2) used on the COM module must be equpped wth an optonal HIMA RS485 submodule. For more nformaton on the nterface assgnment, see Chapter 3.6. Each of the two Modbus master functons must be enabled ndvdually, see Chapter 3.4. Modbus master RTU (RS485) and Modbus master TCP The Modbus master RTU lcense s requred for the Modbus gateway. Table 168: Equpment and System Requrements for the Modbus Master Modbus Master Propertes Property Modbus master Max. number of Modbus slaves HIMax/HIMatrx Max. number of request telegrams Max. process data length for each request telegram Max. Sze of Send Data Max. Sze of Receve Data Descrpton One Modbus master can be confgured for each COM module or each HIMatrx controller. The Modbus master can smultaneously: - Exchange data wth TCP/UDP slaves - Exchange data wth seral slaves - Be used as gateway from Modbus TCP to Modbus RTU. One Modbus master can operate up to 247 slaves Modbus slaves per seral nterface (FB1, FB2) - 64 TCP slaves through the TCP/IP connecton UDP slaves through the UDP/IP connecton The maxmum number of UDP slaves s lmted snce the slaves must be managed on the master sde. Up to 988 request telegrams can be confgured per Modbus master. The process data length for HIMA-specfc request telegrams s 1100 bytes, see Chapter See Table 9 Standard Protocols The status bytes of the master and the status bytes of each slave assgned to t must be subtracted from the max. sze of send data. HI E Rev Page 191 of 386

192 7 Modbus Communcaton Dsplay format of the Modbus data Table 169: Propertes of the Modbus Master The HIMax/HIMatrx controllers use the bg endan format. Example: 32-bt data (e.g., DWORD, DINT): 32-bt data (hex) 0x Memory offset Bg endan (HIMax/HIMatrx) Mddle endan (H51q) Lttle endan Accordng to the standard, a total of three repeaters may be used such that a maxmum of 121 slaves are possble per seral master nterface Modbus Example In ths example, the HIMA Modbus master exchanges data wth a HIMA Modbus slave through Modbus TCP. Both controllers are connected va the Ethernet nterface of the communcaton modules. If the Modbus slave and the Modbus master are located n dfferent subnets, the routng table must contan the correspondng user-defned routes. Fgure 58: Communcaton va Modbus TCP/IP For ths example, the followng global varables must be created n SILworX: Global Varables Master->Slave_BOOL_00 Master->Slave_BOOL_01 Master->Slave_BOOL_02 Master->Slave_WORD_00 Master->Slave_WORD_01 Slave->Master_WORD_00 Slave->Master_WORD_01 Type BOOL BOOL BOOL WORD WORD WORD WORD Page 192 of 386 HI E Rev. 4.01

193 Communcaton 7 Modbus Confgurng the Modbus TCP Slave To create a new HIMA Modbus slave 1. In the structure tree, open Confguraton, Resource, Protocols. 2. On the context menu for protocols, select New, Modbus Slave Set to add a new Modbus slave set. 3. Select Edt from the context menu for the Modbus slave set, open the Modbus Slave Set Propertes, and retan the default values. 4. Select the Modbus slave tab and perform the followng actons: - Select COM Module - Actvate Enable TCP - The remanng parameters retan the default values. To confgure the bt nput varables of the Modbus slave The Boolean varables that the master addresses bt by bt are entered n the Bt Varables tab (functon code 1, 2, 5, 15). 1. From the context menu for the Modbus slave, clck Edt and then select the Bt Varables tab. 2. Drag the followng global varables from the Object Panel onto the Bt Inputs area. Bt address Bt varable Type 0 Master->Slave_BOOL_00 BOOL 1 Master->Slave_BOOL_01 BOOL 2 Master->Slave_BOOL_02 BOOL 3. Rght-clck anywhere n the Regster Inputs area, and then clck New Offsets to renumber the varable offsets. To confgure the regster nput varables of the Modbus slave The varables that the master addresses 16 regster by regster are entered n the Regster Varables tab (functon code 3, 4, 6, 16, 23). 1. From the context menu for the Modbus slave, clck Edt and then select the Regster Varables tab. 2. Drag the followng varables from the Object Panel onto the Regster Inputs area. Regster address Regster varables Type 0 Master->Slave_WORD_00 WORD 1 Master->Slave_WORD_01 WORD 3. Rght-clck anywhere n the Regster Inputs area, and then clck New Offsets to renumber the varable offsets. To confgure the regster output varables of the Modbus slave 1. From the context menu for the Modbus slave, clck Edt and then select the Regster Varables tab. 2. Drag the followng varables from the Object Panel onto the Regster Outputs area. HI E Rev Page 193 of 386

194 7 Modbus Communcaton Regster address Regster varables Type 0 Slave->Master_WORD_00 WORD 1 Slave->Master_WORD_01 WORD 3. Rght-clck anywhere n the Regster Outputs area, and then clck New Offsets to renumber the varable offsets. To check the Modbus TCP slave confguraton 1. Open the context menu for the Modbus TCP master and clck Verfcaton. 2. Thoroughly verfy the messages dsplayed n the logbook and correct potental errors Confgurng the Modbus TCP Master To create the HIMA Modbus master 1. In the structure tree, open Confguraton, Resource, Protocols. 2. On the context menu for protocols, clck New, Modbus Master to add a new Modbus master. 3. From the context menu for the Modbus master, Propertes, General. 4. Clck COM Module. The remanng parameters retan the default values. To create the connecton to the Modbus TCP slave n the Modbus master 1. In the structure tree, open Resource, Protocols, Modbus Master, Ethernet Slaves. 2. Rght-clck Ethernet Slaves, then clck New. 3. Select TCP/UDP Slaves from the lst and clck OK to confrm. 4. To confgure the TCP/UDP slave n the Modbus master: - Clck Edt to assgn the system varables, see Chapter Clck Propertes to confgure the propertes, see Chapter Enter the IP address of the TCP/UDP slave n the slave's propertes. The remanng parameters retan the default values. To confgure the wrte request telegram for the bt output varable: 1. Rght-clck TCP/UDP slaves, then clck New. 2. From the lst, select Wrte Multple Cols (15). 3. Rght-clck Wrte Multple Cols (15), then clck Propertes. - Enter 0 n the start address of the wrte area 4. Rght-clck Read Multple Cols (15), then clck Edt. 5. Drag the followng varables from the Object Panel onto the Output Varables tab.. Offset Bt varables Type 0 Master->Slave_BOOL_00 BOOL 1 Master->Slave_BOOL_01 BOOL 2 Master->Slave_BOOL_02 BOOL 6. Rght-clck anywhere n the Output Varables area to open the context menu and clck New Offsets to renumber the varable offsets. Page 194 of 386 HI E Rev. 4.01

195 Communcaton 7 Modbus To confgure the wrte request telegram for the regster output varable: 1. Rght-clck TCP/UDP slaves, then clck New. 2. From the lst, select Wrte Multple Regsters (16). 3. Rght-clck Wrte Multple Regster (16), then clck Propertes. - Enter 0 n the start address of the wrte area 4. Rght-clck Wrte Multple Regsters (16), then clck Edt. 5. Drag the followng varables from the Object Panel onto the Output Varables tab.. Offset Regster varables Type 0 Master->Slave_WORD_00 WORD 1 Master->Slave_WORD_01 WORD 6. Rght-clck anywhere n the Output Varables area to open the context menu and clck New Offsets to renumber the varable offsets. To defne the request telegram for readng the nput varables n the Modbus master 1. Rght-clck TCP/UDP slaves, then clck New. 2. From the lst, select Read Holdng Regsters (03). 3. Rght-clck Read Holdng Regsters (03), then clck Propertes. - Enter 0 n the start address of the read area. 4. Rght-clck Read Holdng Regsters (03), then clck Edt. 5. Drag the followng varables from the Object Panel onto the Input Varables tab. Offset Regster varables Type 0 Slave->Master_WORD_00 WORD 1 Slave->Master_WORD_01 WORD 6. Rght-clck anywhere n the Input Varables area to open the context menu and clck New Offsets to renumber the varable offsets. To check the Modbus TCP master confguraton 1. Open the context menu for the Modbus TCP master and clck Verfcaton. To check the Modbus TCP master confguraton 1. Open the context menu for the Modbus TCP master and clck Verfcaton. 2. Thoroughly verfy the messages contaned n the Status Vewer and correct potental errors. To create the code for the controllers 1. Start the code generator for the master and slave resource. 2. Make sure that the code was generated wthout error. 3. Load the codes nto the master and slave controllers respectvely. HI E Rev Page 195 of 386

196 7 Modbus Communcaton Example of Alternatve Regster/Bt Addressng In ths example, the confguraton defned n Chapter s extended by 16 Boolean varables n the Regster Area. The 16 Boolean varables are read wth the request telegram Wrte Multple Cols (15), see also Chapter To confgure the nput varables n the Modbus slave 1. From the context menu for the Modbus slave, clck Edt and then select the Regster Varables tab. 2. Drag the 16 new Boolean varables from the Object Panel onto the Regster Inputs area. Regster address Regster varables Type 0 Master->Slave_WORD_00 WORD 1 Master->Slave_WORD_01 WORD 2 Master->Slave_BOOL_03..._18 BOOL Add one agan 3. Rght-clck anywhere n the Regster Inputs area, and then clck New Offsets to renumber the varable offsets. To confgure the alternatve regster/bt addressng n the Modbus slave 1. Rght-clck the Modbus slave and select Edt, and Offsets, then actvate Use Alternatve Regster/Bt Addressng. 2. In ths example, use the followng offsets for the alternatve areas: Regster Area Offset Bts Input 1000 Regster Area Offset Bts Output 1000 Bt Area Offset Regster Input 8000 Bt Area Offset Regster Output 8000 To use the Modbus request telegram Wrte Multple Cols (15) to access the Boolean varables n the Regster Varables area, the varables must be mrrored n the Bt Varables area. To confgure the wrte request telegram for the output varable (BOOL) n the Modbus master 1. Rght-clck TCP/UDP slaves, then clck New. 2. From the lst, select Wrte Multple Cols (15). 3. Rght-clck Wrte Multple Cols (15), then clck Propertes. - Enter 8032 n the start address of the wrte area 4. Rght-clck Read Multple Cols (15), then clck Edt. 5. Drag the followng varables from the Object Panel onto the Output Varables tab.. Offset Mrrored Regster Varable Type 0 to 15 Master->Slave_BOOL_03..._18 BOOL 6. Rght-clck anywhere n the Output Varables area to open the context menu and clck New Offsets to renumber the varable offsets. Page 196 of 386 HI E Rev. 4.01

197 Communcaton 7 Modbus Menu Functons of the HIMA Modbus Master Edt The Edt dalog box for the Modbus master contans the followng tab: System Varables The System Varables tab contans system varables that are requred to control the Modbus master and evaluate ts state from wthn the user program. Element Slave Connecton Error Count Modbus Master Actvaton Control Modbus Master Bus Error Modbus Master State Reset All Slave Errors Descrpton Number of faulty connectons wth Modbus slaves that are n the Actvated state. Deactvated Modbus slaves are not taken nto account. Stop or start the Modbus master from wthn the user program. 0: Actvate 1: Deactvate (Edge trggered! The Modbus master can be actvated usng the PADT even f the Modbus master actvaton control s 1). Bus error on RS485, e.g., telegram error (code unknown etc), length error. It ndcates the current protocol state: 1: OPERATE 0: OFFLINE A change from FALSE to TRUE resets all slave and bus errors. Table 170: System Varables for the Modbus Master HI E Rev Page 197 of 386

198 7 Modbus Communcaton Propertes The Propertes functon of the context menu for the Modbus master s used to open the Propertes dalog box. The dalog box contans the followng tabs: General The General tab contans the name and a descrpton for the Modbus master. Ths tab s also used to set the parameters for specfyng whether the Modbus master should also operate as a TCP and/or a UDP gateway. Element Type Name Descrpton Module Actvate Max. µp Budget Max. µp budget n [%] Descrpton Modbus master Name for the Modbus master A descrpton for the Modbus master. Selecton of the COM module wthn whch the protocol s processed. Actvated: Adopt the µp budget lmt from the Max. µp Budget n [%] feld. Deactvated: Do not use the µp budget lmt for ths protocol. Maxmum µp budget for the module that can be used for processng the protocols. Behavor on CPU/COM Connecton Loss Range of values: % Default value: 30% If the connecton of the processor module to the communcaton module s lost, the nput varables are ntalzed or contnue to be used unchanged n the process module, dependng on ths parameter. For nstance, f the communcaton module s removed when communcaton s runnng. Adopt Intal Data Input varables are reset to ther ntal values. Retan Last Value The nput varables retans the last value. If the TCP Modbus gateway s enabled, at least one Modbus RS485 nterface must be confgured. Enable TCP Gateway TCP Server Port Standard: 502 Addtonal TCP ports may also be confgured. Observe the port assgnment provded by the ICANN (Internet Corporaton for Assgned Names and Numbers). Maxmum Number of TCP Connectons Operatng as Server. Maxmum number of TCP connectons opened smultaneously and operatng as server. Range of values: Default value: 5 Page 198 of 386 HI E Rev. 4.01

199 Communcaton 7 Modbus Enable UDP If the UDP Modbus gateway s enabled, at least one Modbus RS485 Gateway nterface must be confgured. UDP Port Standard: 502 Addtonal UDP ports may also be confgured. Observe the port assgnment provded by the ICANN (Internet Corporaton for Assgned Names and Numbers). Maxmum length of the queue Length of the gateway queue for other masters request telegrams that have not been answered yet. Ths opton s only taken nto account f a gateway has been actvated. Range of values: Default value: 3 Table 171: General Propertes of the Modbus Master CPU/COM The default values of the parameters provde the fastest possble data exchange of Modbus data between the COM module (COM) and the processor module (CPU) wthn the HIMax/HIMatrx controller. These parameters should only be changed f t s necessary to reduce the COM or CPU load for an applcaton, and the process allows ths change. Only experenced programmers should modfy the parameters. Increasng the COM and CPU refresh rate means that the effectve refresh rate of the Modbus data s also ncreased. The system tme requrements must be verfed. Element Process Data Refresh Rate [ms] Force Process Data Consstency Descrpton Refresh rate n mllseconds at whch the COM and CPU exchange protocol data. If the Process Data Refresh Rate [ms] s zero or lower than the cycle tme for the controller, data s exchanged as fast as possble. Range of values: 0...(2 31-1) Default value: 0 Actvated: Transfer of all protocol data from the CPU to the COM wthn a CPU cycle. Deactvated: Transfer of all protocol data from the CPU to the COM, dstrbuted over multple CPU cycles, each wth 1100 byte per data drecton. Ths can also allow lowerng the cycle tme of the controller. Default value: actvated Table 172: Parameters of COM/CPU HI E Rev Page 199 of 386

200 7 Modbus Communcaton Modbus Functon Codes of the Master The Modbus functon codes (request telegrams) allow the user to wrte and read varables n both drectons. Indvdual varables or multple consecutve varables can be wrtten or read. To create a new request telegram for a TCP/UDP slave 1. In the structure tree, open Resource, Protocols, Modbus Master, Ethernet Slaves, and then select a TCP/UDP Slave. 2. Rght-clck TCP/UDP slaves, then clck New. 3. In the New Object dalog box, clck a Request Telegram. To create a new request telegram for a gateway slave 1. In the structure tree, open Resource, Protocols, Modbus Master, Modbus Gateway,, and then clck a gateway slave. 2. Rght-clck Gateway Slave, then clck New. 3. In the New Object dalog box, clck a Request Telegram. To create a new request telegram for a RS485 Modbus slave 1. In the structure tree, open Resource, Protocols, Modbus Master, Seral Modbus,, and then clck a Modbus slave. 2. Rght-clck Modbus Slave, then clck New. 3. In the New Object dalog box, clck a Request Telegram Modbus Standard Functon Codes The HIMA Modbus master supports the followng Modbus standard functon codes: Element Code Type Descrpton READ COILS 01 BOOL Read multple varables (BOOL) from the slave. READ DISCRETE INPUTS 02 BOOL Read multple varables (BOOL) from the slave. READ HOLDING REGISTERS 03 WORD Read multple varables of any type from the slave. READ INPUT REGISTERS 04 WORD Read multple varables of any type from the slave. WRITE SINGLE COIL 05 BOOL Wrte one sngle sgnal (BOOL) n the slave. WRITE SINGLE REGISTER 06 WORD Wrte one sngle sgnal (WORD) n the slave. WRITE MULTIPLE COILS 15 BOOL Wrte multple varables (BOOL) n the slave. WRITE MULTIPLE REGISTERS 16 WORD Wrte multple varables of any type n the slave. READ WRITE HOLDING REGISTERS Table 173: Modbus Functon Codes 23 WORD Wrte and read multple varables of any type n and from the slave. (For more nformaton on Modbus, refer to the Modbus Applcaton Protocol Specfcaton Page 200 of 386 HI E Rev. 4.01

201 Communcaton 7 Modbus HIMA-Specfc Functon Codes HIMA-specfc functon codes correspond to the standard Modbus functon codes. The two dfferences are the maxmum permssble process data length of 1100 bytes and the format of the request and response headers. Element Code Type Descrpton Read Cols Extended Read Dscrete Inputs Extended Read Holdng Regsters Extended Read Input Regsters Extended Wrte Multple Cols Extended Wrte Multple Regsters Extended Read/Wrte Multple Regsters Extended 100 (0x64) 101 (0x65) 102 (0x66) 103 (0x67) 104 (0x68) 105 (0x69) 106 (0x6A) BOOL Correspond to functon code 01. Read multple varables (BOOL) from the slave s mport or export 1) area. Maxmum length of the process data: 1100 bytes. BOOL Correspond to functon code 02. Read multple varables (BOOL) from the slave s export area. Maxmum length of the process data: 1100 bytes. WORD Correspond to functon code 03. Read multple varables of any type from the slave s mport or export 1) area. Maxmum length of the process data: 1100 bytes. WORD Correspond to functon code 04. Read multple varables of any type from the slave s export area. Maxmum length of the process data: 1100 bytes. BOOL Correspond to functon code 15. Wrte multple varables (BOOL) n the slave s mport area. Maxmum length of the process data: 1100 bytes. WORD Correspond to functon code 16. Wrte multple varables of any type n the slave s mport area. Maxmum length of the process data: 1100 bytes. WORD Correspond to functon code 23. Wrte and read multple varables of any type n and from the slave s mport or export area. Maxmum length of the process data: 1100 bytes (request telegram from the master Modbus master) bytes (response to the master). HI E Rev Page 201 of 386

202 7 Modbus Communcaton Format of Request and Response Header The request and response header of the HIMA-specfc Modbus functon codes are structured as follows: Code Request Response 100 (0x64) 101 (0x65) 102 (0x66) 103 (0x67) 104 (0x68) 105 (0x69) 106 (0x6A) 1 byte functon code 0x64 2 bytes start address 2 bytes number of cols (0x2260) 1 byte functon code 0x65 2 bytes start address 2 bytes number of dscrete nputs (0x2260) 1 byte functon code 0x66 2 bytes start address 2 bytes number of regsters (0x226) 1 byte functon code 0x67 2 bytes start address 2 bytes number of regsters (0x226) 1 byte functon code 0x68 2 bytes start address 2 bytes number of cols (0x2260) 2 bytes number of bytes = N N bytes col data 1 byte functon code 0x69 2 bytes start address 2 bytes number of regsters (0x226) 2 bytes number of bytes = N N bytes regster data 1 byte functon code 0x6a 2 bytes read start address 2 bytes number of read regsters (0x226) 2 bytes wrte start address 2 bytes number of wrte regsters (0x226) 2 bytes number of wrte bytes = N N bytes regster data 1 byte functon code 0x64 2 bytes number of bytes = N N bytes col data (8 cols are packed n one byte) 1 byte functon code 0x65 2 bytes number of bytes = N N bytes dscrete nputs data (8 dscrete nputs are packed n one byte) 1 byte functon code 0x66 2 bytes number of bytes = N N bytes regster data 1 byte functon code 0x67 2 bytes number of bytes = N N bytes regster data 1 byte functon code 0x68 2 bytes start address 2 bytes number of cols (0x2260) 1 byte functon code 0x69 2 bytes start address 2 bytes number of regsters (0x226) 1 byte functon code 0x6a 2 bytes number of bytes = N N bytes regster data Page 202 of 386 HI E Rev. 4.01

203 Communcaton 7 Modbus Read Request Telegrams The read functon codes are used to read varables from the slave. In addton to the Modbus functon, a Modbus master's request telegram also contans the start address for the read/wrte area. To read varables, the Modbus master sends a Read Request Telegram to the Modbus slave. The Modbus slave responds to the Modbus master sendng back a response telegram wth the varables requred. To confgure a read request telegram 1. In the structure tree, clck the Request Telegram to be confgured. 2. Rght-clck the request telegram, then clck Edt. 3. Select the global varable that should be used as Modbus receve varable and drag t from the Object Panel onto anywhere n the Input Sgnals area. 4. Repeat these steps for every further Modbus receve varable. 5. Rght-clck anywhere n the Inputs Sgnals area, and then clck New Offsets to renumber the varable offsets. The followng Read Request Telegrams are avalable: Read Cols (01) and Extended (100) Read multple varables (BOOL) from the slave. Element Descrpton Type Modbus Functon Read Cols Name Any unque name for the Modbus functon Descrpton Descrpton for the Modbus functon Start address of the read area Table 174: Request Telegram Read Cols Read Dscrete Inputs (02) and Extended (101) Read multple varables (BOOL) from the slave. Element Descrpton Type Modbus Functon Read Dscrete Inputs Name Any unque name for the Modbus functon Descrpton Descrpton for the Modbus functon Start address of the read area Table 175: Request Telegram Read Dscrete Inputs Read Holdng Regsters (03) and Extended (102) Read multple varables of any type from the slave. Element Descrpton Type Modbus Functon Read Holdng Regsters Name Any unque name for the Modbus functon Descrpton Descrpton for the Modbus functon Start address of the read area Table 176: Request Telegram Read Holdng Regsters HI E Rev Page 203 of 386

204 7 Modbus Communcaton Read Input Regsters (04) and Extended (103) Read multple varables of any type from the slave. Element Descrpton Type Modbus Functon Read Input Regsters Name Any unque name for the Modbus functon Descrpton Descrpton for the Modbus functon Start address of the read area Table 177: Request Telegram Read Input Regsters Read/Wrte Request Telegram For readng and wrtng varables, the Modbus master sends a Read/Wrte Request Telegram to the Modbus slave. Frst, the Modbus master wrtes the wrte varables nto the defned mport area of the Modbus slave. Afterwards, the Modbus master reads the read sgnals from the defned export area of the Modbus slave. In the Read/Wrte Request Telegram, the Wrte and Read functons are ndependent of one another. However, the Read/Wrte Request Telegram s often used such that the varables wrtten by the Modbus master are read back. Ths ensures that the transferred varables were wrtten correctly. To confgure a read/wrte request telegram 1. In the structure tree, clck the Request Telegram to be confgured. 2. Rght-clck the request telegram, then clck Edt. To confgure the read varables 1. In the Object Panel, select the global varable that should be connected to one new Modbus receve varable and drag t onto the Global Varable column of the Modbus receve varable. 2. Repeat these steps for every further Modbus receve varable. 3. Rght-clck anywhere n the Inputs Sgnals area, and then clck New Offsets to renumber the varable offsets. To confgure the wrte varables 1. In the Object Panel, select the global varable that should be connected to one new Modbus send varable and drag t onto the Global Varable column of the Modbus send varable. 2. Repeat these steps for every further Modbus send varable. 3. Rght-clck anywhere n the Outputs Sgnals area, and then clck New Offsets to renumber the varable offsets.. Page 204 of 386 HI E Rev. 4.01

205 Communcaton 7 Modbus Read Wrte Holdng Regster (23) and Extended (106) Wrte and read multple varables of any type n and from the slave s mport area. Element Descrpton Type Modbus functon Read Wrte Holdng Regsters Name Any unque name for the Modbus functon Descrpton Descrpton for the Modbus functon Start address of the read area Start address of the wrte area Table 178: Read Wrte Holdng Regster Wrte Request Telegram Usng the wrte functon codes, varables may only be wrtten n a slave s mport area. In addton to the Modbus functon, a Modbus master's request telegram also contans the start address for the read/wrte area. To wrte varables, the Modbus master sends a Wrte Request Telegram to the Modbus slave. The Modbus slave wrtes the receved varables nto ts mport area. The varables that a Modbus master wrtes to a Modbus slave must be entered n the Varable Connectons dalog box for a wrte request telegram. To confgure a wrte request telegram 1. In the structure tree, clck the Request Telegram to be confgured. 2. Rght-clck the request telegram, then clck Edt. 3. Select the global varable that should be used as Modbus send varable and drag t from the Object Panel onto anywhere n the Send Sgnals area. 4. Repeat these steps for every further Modbus send varable. 5. Rght-clck anywhere n the Send Sgnals area, and then clck New Offsets to renumber the varable offsets. The followng Wrte Request telegrams are avalable: Wrte Multple Cols (15) and Extended (104) Wrte multple varables (BOOL) n the slave s mport area. Element Type Name Descrpton Start address of the wrte area Descrpton Modbus functon Wrte Multple Cols Any unque name for the Modbus functon Descrpton for the Modbus functon Table 179: Request Telegram Wrte Multple Cols HI E Rev Page 205 of 386

206 7 Modbus Communcaton Wrte Multple Regsters (16) and Extended (105) Wrte multple varables of any type n the slave s mport area. Element Type Name Descrpton Start address of the wrte area Descrpton Modbus functon Wrte Multple Regsters Any unque name for the Modbus functon Descrpton for the Modbus functon Table 180: Request Telegram Wrte Multple Regsters Wrte Sngle Col (05) Wrte one sngle varable (BOOL) n the slave s mport area. Element Type Name Descrpton Start address of the wrte area Descrpton Modbus functon Wrte Sngle Col Any unque name for the Modbus functon Descrpton for the Modbus functon Table 181: Request Telegram Wrte Sngle Col (05) Wrte Sngle Regster (06) Wrte one sngle varable (WORD) n the slave s mport area. Element Type Name Descrpton Start address of the wrte area Descrpton Modbus functon Wrte Sngle Regster Any unque name for the Modbus functon Descrpton for the Modbus functon Table 182: Request Telegram Wrte Sngle Regster Page 206 of 386 HI E Rev. 4.01

207 Communcaton 7 Modbus Ethernet Slaves (TCP/UDP Slaves) The Modbus masters can communcate wth up to 64 TCP/IP and 247 UDP/IP slaves. Fgure 59: Modbus Network To create a new connecton to a TCP/UDP slave wthn the Modbus master 1. In the structure tree, open Resource, Protocols, Modbus Master, Ethernet Slaves. 2. Rght-clck Ethernet Slaves, then clck New. 3. Select TCP/UDP Slaves from the lst and clck OK to confrm. 4. To confgure the TCP/UDP slave n the Modbus master: Clck Edt to assgn the system varables, see Chapter Clck Propertes to confgure the propertes, see Chapter If the TCP/UDP slaves and the Modbus master are located n dfferent subnets, the routng table must contan the correspondng user-defned routes. The telegrams that the HIMax/HIMatrx Modbus TCP master sends to the Modbus TCP slave always nclude the IP address as well as a Modbus slave address (Unt Identfer) whch s always FF (255). HI E Rev Page 207 of 386

208 7 Modbus Communcaton System Varables for TCP/UDP Slaves The System Varables tab contans system varables that are requred to control the TCP/UDP slave and evaluate ts state from wthn the user program. The followng status varables can be used to evaluate the TCP/UDP slave status from wthn the user program: Element Modbus Slave Actvaton Control Modbus Slave Error Modbus Slave State Descrpton The user program actvates or deactvates the TCP/UDP slave usng ths functon. 0: Actvate 1: Deactvate (Edge trggered! The Modbus slave can be actvated usng the PADT even f the Modbus Slave Actvaton Control s 1). Error Code The error codes 0x01...0x0b correspond to the Excepton Codes of the Modbus protocol specfcaton. 0x00: No error Excepton Codes: 0x01: Invald functon code 0x02: Invald addressng 0x03: Invald data 0x04: (not used) 0x05: (not used) 0x06: Devce busy (only gateway) 0x08: (not used) 0x0a: (not used) 0x0b: No Response from Slave (only gateway) HIMA-specfc codes: 0x10: Defectve frame receved 0x11: Frame wth wrong transacton ID receved 0x12: Unexpected response receved 0x13: Response about wrong connecton receved 0x14: Wrong response to a wrte request 0xff: Slave Tmeout Connecton status of the TCP/UDP slave: 0: Dsabled 1: Not connected 2: Connected Table 183: System Varables for TCP/UDP Slaves Page 208 of 386 HI E Rev. 4.01

209 Communcaton 7 Modbus TCP/UDP Slave Propertes To confgure the connecton to the TCP/UDP slave, the followng parameters must be set n the Modbus master. Element Descrpton Type TCP/UDP slave Name Any unque name for the TCP/UDP slave Descrpton Any unque descrpton for the TCP/UDP slave Master-Slave Data Tme nterval for exchangng data wth ths slave 1 to (2 31-1). Exchange [ms] If the Maxmal Number of Retres was exceeded and the slave could not be reached, the value for Master-Slave Data Exchange s set four tmes hgher. TCP connecton only on If the type of transmsson protocol s TCP, ths parameter can demand be used to defne f the connecton to the slave should be automatcally closed whenever data s exchanged: TRUE: Close the connecton. FALSE: Do not close connecton Default value: FALSE Receve Tmeout [ms] Receve tmeout [ms] for ths slave. Once ths tme perod has expred, a resend s attempted. IP Address IP address of the TCP/UDP slave Port Standard: 502 Addtonal TCP/UDP ports may also be confgured. Observe the port assgnment provded by the ICANN (Internet Corporaton for Assgned Names and Numbers). Type of communcaton TCP or UDP IP protocol Default value: TCP Maxmum Number of Resends Table 184: Confguraton Parameters Maxmal number of send retres f the slave does not respond. The number of resends can be freely set ( ). Wth TCP/IP, the value s always set to 0 and cannot be changed. HIMA recommends settng a value between 0 and 8. HI E Rev Page 209 of 386

210 7 Modbus Communcaton Modbus Gateway (TCP/UDP Gateway) The Modbus master RTU lcense s requred to enable the Modbus master to operate as Modbus gateway. In ths mode, master requests that the gateway receves va Ethernet are forwarded to the RS485 und Ethernet slaves connected to the gateway. Accordngly, the slave's responses are forwarded to the Modbus master through the gateway. Up to 121 seral Modbus slaves can be addressed per seral nterface. The slave s address ranges from 1 to 247. Even f only the Modbus gateway s used, a Modbus master lcense s requred for Modbus master 2 (Modbus gateway). Fgure 60: Modbus Gateway If the Modbus gateway and the Modbus master are located n dfferent subnets, the routng table must contan the correspondng user-defned routes. Modbus Master 1 To create the connecton to the Modbus slave wthn Modbus master 1 1. In the structure tree, open Resource, Protocols, Modbus Master 2. Rght-clck Modbus Master, then clck New. 3. Select Modbus Gateway from the lst and clck OK to confrm. 4. To confgure the Modbus gateway n Modbus Master 1: clck Propertes to confgure the propertes, see Chapter In the propertes, enter the IP Address for Modbus master 2 (Modbus gateway). To create the connecton to the gateway slave wthn Modbus master 1 In Modbus master 1, the seral slave must be created as gateway slave. 1. In the structure tree, open Resource, Protocols, Modbus Master, Modbus Gateway. 2. Rght-clck Modbus Gateway, then clck New. 3. Select Gateway Slave from the lst and clck OK to confrm. 4. To confgure the gateway slave n Modbus master 1: Clck Edt to assgn the system varables, see Chapter Clck Propertes to confgure the propertes, see Chapter In the slave's propertes, enter the seral address for the gateway slave. Page 210 of 386 HI E Rev. 4.01

211 Communcaton 7 Modbus To defne nput and output varables to the seral slave n Modbus master 1 1. Rght-clck Gateway Slave, then clck New. 2. Select the requred request telegrams from the lst. 3. Rght-clck the correspondng request telegram, then clck Edt. Enter the nput or output varables n the Process Varables tab. Modbus Master 2 (Modbus Gateway): The gateway functon must be enabled n the propertes of Modbus master 02. The gateway slaves confgured n master 01 s connected to the seral slaves. To actvate the gateway functon n Modbus master 2 1. In the structure tree, open Resource, Protocols, Modbus Master 2. Rght-clck Modbus Master, then clck Propertes. 3. Actvate the Enable TCP Gateway parameter to allow the Modbus master to addtonally operate as TCP gateway. 4. Actvate the Enable UDP Gateway parameter to allow the Modbus master to addtonally operate as UDP gateway. To confgure the seral Modbus n Modbus master 2 1. In the structure tree, open Resource, Protocols, Modbus Master 2. Rght-clck Modbus Master, then clck New. 3. Select Seral Modbus from the lst and clck OK to confrm. 4. Select Propertes to confgure the seral Modbus, then enter the nterface, the baud rate, etc. To confgure the connecton to the seral slave n Modbus master 2 1. In the structure tree, open Resource, Protocols, Modbus Master, Seral Modbus. 2. Rght-clck Seral Modbus, then clck New. 3. Select Modbus Slave from the lst and clck OK to confrm. 4. Select Propertes to confgure the Modbus Slave, then enter the Slave Address for the seral slave. Seral Slave To confgure the seral Modbus slave 1. In the structure tree, open Resource, Protocols, Modbus Slave 2. Rght-clck Modbus Slave, then clck Edt. 3. Select Propertes to confgure the Modbus Slave, then enter the Slave Address for the seral slave. HI E Rev Page 211 of 386

212 7 Modbus Communcaton Gateway Propertes The Modbus gateway allows the Modbus master to communcate wth ts Modbus slave. To confgure the connecton to the Modbus gateway, the followng parameters must be set n the Modbus master. Element Descrpton Type Modbus Gateway Name Any unque name for the gateway Descrpton Any unque descrpton for the TCP/UDP slave Communcaton IP Protocol TCP or UDP Default value: TCP IP address Gateway s IP address that the Modbus master should use to communcate wth ts Modbus slave. Default value: ( ) Port Default value: 502 Table 185: Connecton Parameters for the Modbus Gateway System Varables for the Gateway Slave The edtor contans three status varables: Element Modbus Slave Actvaton Control Modbus Slave Error Modbus Slave State Table 186: Status Varables for the Gateway Slave Descrpton Usng ths functon, the user program can enable or dsable the gateway slave. 0: Actvate 1: Deactvate (Edge trggered! The Modbus slave can be actvated usng the PADT even f the Modbus Slave Actvaton Control s 1). Parameters: the same as for TCP/UDP slave, see Chapter Connecton status of the gateway slave: 0: Dsabled 1: Not connected 2: Connected Gateway Slave Propertes To confgure the connecton to the gateway slave, the followng parameters must be set n the Modbus master. Element Descrpton Type Gateway Slave Name Any unque name for the gateway slave Descrpton Any unque descrpton for the gateway slave Slave Address The remanng parameters are the same as for TCP/UDP slave, see Chapter Table 187: Connecton Parameters for the Gateway Slave Page 212 of 386 HI E Rev. 4.01

213 Communcaton 7 Modbus Seral Modbus The Modbus master can communcate wth up to 247 seral slaves. Accordng to the standard, a total of three repeaters may be used such that a maxmum of 121 statons are possble per seral nterface on a master. For more nformaton on the pn assgnment of the COM module's D-sub connectors (fb1, fb2), refer to Chapter 3.6. Fgure 61: Seral Modbus The HIMA Modbus master supports data transfer n RTU format (Remote Termnal Unt). The RTU telegram frame starts and ends wth the dle characters set by the user (default value: 5 dle characters). Start of Frame 5 char Adress 8 Bt Functon 8 Bt Data N * 8 Bt CRC Check 16 Bt Ende of Frame 5 char Modbus message Fgure 62: Modbus Telegram To create a seral Modbus wthn the Modbus master 1. In the structure tree, open Resource, Protocols, Modbus Master, Seral Modbus. 2. Rght-clck Seral Modbus, then clck New. 3. Select Modbus Slave from the lst and clck OK to confrm. 4. To confgure the Modbus slave n the Modbus master: Clck Edt to assgn the system varables, see Chapter Clck Propertes to confgure the propertes, see Chapter HI E Rev Page 213 of 386

214 7 Modbus Communcaton Seral Modbus Propertes To confgure the seral Modbus master, the followng parameters must be set. Element Type Name Descrpton Interface Baud rate [bps] Party Stop Bts Number of Idle Chars Descrpton Seral Modbus The seral Modbus name may be selected by the user Any unque descrpton for the seral Modbus Feldbus nterface that should be used for the Modbus master (fb1, fb2). Possble value for transfer rate for RS485: 300 bt/s 600 bt/s 1200 bt/s 2400 bt/s 4800 bt/s 9600 bt/s bt/s bt/s bt/s (maxmum baud rate for HIMax V4 and beyond) bt/s (HIMatrx only) bt/s (HIMatrx only) bt/s (HIMatrx only) None Odd Even Default value: Even Standard (adapts the number of stop bts to the party: wth party = 1 stop bt, no party = 2 stop bts) One stop bt Two stop bts Default value: Default Number of dle characters at the start and the end of a RTU telegram frame. Range of values: Default value: 5 characters Table 188: Parameters for the Seral Modbus Master System Varables for the Modbus Slave The edtor contans three status varables (system varables). Element Modbus Slave Actvaton Control Modbus Slave Error Modbus Slave State Table 189: System Varables n the Modbus Slave Descrpton Actvate or deactvate the Modbus slave n the user program. 0: Actvate 1: Deactvate (Edge trggered! The Modbus slave can be actvated usng the PADT even f the Modbus Slave Actvaton Control s 1). Parameters: the same as for TCP/UDP slave, see Chapter Connecton status of the Modbus slave: 0: Dsabled 1: Not connected 2: Connected Page 214 of 386 HI E Rev. 4.01

215 Communcaton 7 Modbus Modbus Slave Propertes To confgure the connecton to the seral slave, the followng parameters must be set n the Modbus master. Element Descrpton Type Modbus slave Name The Modbus slave name may be selected by the user Descrpton Any unque descrpton for the Modbus slave Slave Address The remanng parameters are the same as for TCP/UDP slave, see Chapter Table 190: Connecton Parameters for the Modbus Master In the seral Modbus slave, the Receve Tmeout depends on the transfer rate whch has been set. If the baud rate s [bt/s] or hgher, the default value for Receve Tmeout may be used. If the baud rate s lower than [bt/s], the value for Receve Tmeout must be ncreased Control Panel (Modbus Master) The Control Panel can be used to verfy and control the settngs for the Modbus master. Detals about the master's current state (e.g., master state, etc.) are dsplayed. To open the Control Panel for montorng the Modbus master 1. Rght-clck the Hardware structure tree node and select Onlne from the context menu. 2. In the System Logn wndow, enter the access data to open the onlne vew for the hardware. 3. Double-clck COM Module and select the Modbus Master structure tree node. HI E Rev Page 215 of 386

216 7 Modbus Communcaton Context Menu (Modbus Master) The followng commands can be chosen from the context menu for the selected Modbus master: Offlne Ths command s used to stop the Modbus master. Operate Ths command s used to start the Modbus master. Reset statstcal data Reset the statstcal data (e.g., number of bus errors, mn./max. cycle tme etc.) to Vew Box (Modbus Master) The vew box dsplays the followng values of the selected Modbus master. Element Name Master State Bus Error Count Dsturbed Connectons µp load (planned) µp load (actual) Table 191: Vew Box of the Modbus Master Descrpton Modbus master name It ndcates the current protocol state: OPERATE OFFLINE Counter for bus errors Counter for dsturbed connectons See Chapter Control Panel (Modbus Master->Slave) The Control Panel s used to verfy and actvate/deactvate the settngs for the communcaton partner. Detals about the current status of the communcaton partner (e.g., slave state, etc.) are dsplayed. To open Control Panel for montorng the Modbus connecton 1. Rght-clck the Hardware structure tree node and select Onlne from the context menu. 2. In the System Logn wndow, enter the access data to open the onlne vew for the hardware. 3. Double-clck COM Module and select the Modbus Master, Slave n the structure tree. Page 216 of 386 HI E Rev. 4.01

217 Communcaton 7 Modbus FBx LED Functon n the Modbus Master The FBx LED of the correspondng feldbus nterface ndcates the state of the Modbus protocol. The states of the FBx LED are specfed n the followng table: FBx LED Color Descrpton OFF Yellow The Modbus master protocol s not actve! Ths means that the controller s n STOP or no Modbus master s confgured. Blnkng Yellow The Modbus master protocol s actve and s exchangng data wth the Modbus slave. Table 192: The FBx LED Functon of the FAULT LED n the Modbus Master (HIMax only) The FAULT LED of the correspondng feldbus nterface ndcates a falure of the Modbus protocol. The states of the FAULT LED are specfed n the followng table: FAULT LED Color Descrpton OFF Red The Modbus master protocol s not dsturbed. Blnkng Red The followng events result n a malfuncton. Incorrect response or error message from the slave receved Tmeout for one or more slaves Calculatng tme budget exceeded Table 193: The FAULT FBx If no faults occur for a perod longer than 5 seconds, the state changes to "Protocol not dsturbed". HI E Rev Page 217 of 386

218 7 Modbus Communcaton 7.3 HIMA Modbus Slave The HIMA Modbus slave can smultaneously use the seral nterface (RS485) and the TCP/UDP (Ethernet) to operate varous Modbus masters. Equpment and System Requrements Element HIMA controller Processor module COM module Actvaton Descrpton HIMax wth COM module HIMatrx: CPU OS versons beyond 7 and COM OS versons beyond 12 The Ethernet nterfaces on the processor module may not be used for Modbus TCP. Ethernet 10/100BaseT Pn assgnment of the D-sub connectors FB1 and FB2 If Modbus RTU s used, each of the seral feldbus nterfaces (FB1 and FB2) used on the COM module must be equpped wth a HIMA RS485 submodule. For more nformaton on the nterface assgnment, see Chapter 3.6. Each of the two Modbus slave functons must be enabled ndvdually, see Chapter 3.4. Modbus Slave RTU (RS485) Modbus Slave TCP Two lcenses are requred for the redundant Modbus slave, one for each X-COM module. Table 194: Equpment and System Requrements for the HIMA Modbus Slave Modbus Slave (Propertes) Element Modbus slave Redundancy Number of Master Accesses Max. Sze of Send Data Max. Sze of Receve Data Dsplay format of the Modbus data Table 195: Propertes of the Modbus Slave Descrpton One Modbus slave can be confgured for each COM module. For HIMax only! A maxmum of 10 redundant Modbus slave communcaton module pars can be operated n a HIMax system. As long as the Modbus slave communcaton module par operates redundantly, the same nput and output data s exchanged wth the Modbus master va both communcaton modules, see Chapter RTU: Only one Modbus master can access the slave due to the RS485 transfer mode system. TCP: A maxmum of 20 Modbus masters can access the slave. TCP: Unlmted number of Modbus masters can access the slave. See Table 9 Standard Protocols The HIMax/HIMatrx controllers use the bg endan format. Example: 32-bt data (e.g., DWORD, DINT): 32-bt data (hex) 0x Memory offset Bg endan (HIMax/HIMatrx) Mddle endan (H51q) Lttle endan Page 218 of 386 HI E Rev. 4.01

219 Communcaton 7 Modbus Confgurng the Modbus TCP Slave To create a new HIMA Modbus Slave 1. In the structure tree, open Confguraton, Resource, Protocols. 2. Rght-clck Protocols and select New, Modbus Slave Set from the context menu to add a new Modbus slave set. 3. Select Edt from the context menu for the Modbus slave set, open the Modbus Slave Set Propertes, and retan the default values. 4. Select the Modbus slave tab and perform the followng actons: - Select COM Module - Actvate Enable TCP - The remanng parameters retan the default values. Chapter provdes an example of how to confgure the connecton between an HIMA Modbus TCP slave and an HIMA Modbus TCP master Confgurng the Redundant Modbus TCP Slave To create a redundant HIMA Modbus slave 1. In the structure tree, open Confguraton, Resource, Protocols, Modbus Slave Set. 2. Select Edt from the context menu for the Modbus slave set, open the Modbus Slave Set Propertes, and perform the followng actons: - Actvate Set Redundant Operaton. The Modbus Slave Redundant tab s automatcally added. 3. Select the Modbus Slave Redundant tab and perform the followng actons: - Select COM Module - Actvate Enable TCP The remanng parameters retan the default values. The send and receve varables assgned n the Modbus slave set are vald for both Modbus slaves. HI E Rev Page 219 of 386

220 7 Modbus Communcaton Rules for Redundant Modbus TCP Slaves The redundant confguraton of the HIMax system s recommended for operatng the HIMax Modbus slave communcaton modules redundantly, see the System Manual (HI E) for more detals. Otherwse, the consstent behavor of the Modbus slave communcaton module pars towards ther external partner (Modbus master) can no longer be ensured once the frst fault has occurred wthn the HIMax system Slots Allowed for the Redundant Modbus Slave COM Modules To mnmze the rsk of potental collsons on the HIMax system bus, the system bus segments (1 to 3) on the base plate must be taken nto account. For ths reason, the redundant Modbus slave communcaton modules should be nserted n the same segment of a base plate n the followng slots: Segment Slot (as long as no processor module has been planned) Table 196: Slots Allowed for the Redundant Modbus Slave COM Modules Redundant Modbus Slave COM Modules n Dfferent Base Plates A maxmum of two redundant Modbus slave communcaton module pars may be operated f ther redundant Modbus slave communcaton modules are located n dfferent base plates (0...15). In ths case, these redundant Modbus slave communcaton modules may only be located n adjacent base plates. Furthermore, 8 addtonal Modbus slave communcaton module pars may be operated on the same HIMax system n accordance wth the rules specfed n Chapter NOTE System malfuncton possble! Only use slots for redundant Modbus slave communcaton modules f the specfed rules are observed! Between an X-COM module and the X-CPU modules, a maxmum addtonal delay of 50 μs s allowed (due to cable length, swtches, etc). Recommendaton: Operate the X-COM modules as close as possble to the X-CPU modules (e.g., rack 0, rack 1) Page 220 of 386 HI E Rev. 4.01

221 Communcaton 7 Modbus Menu Functons of the HIMA Modbus Slave Set The Edt functon of the context menu for the Modbus Slave Set s used to open the Modbus Slave Set Propertes dalog box. The dalog box contans the followng tabs: Modbus Slave Set Propertes The followng parameters for the Modbus slave can be set n the Modbus Slave Set Propertes tab. Element Name Actvate Max. µp Budget Max. µp budget n [%] Set Redundant Operaton Max. Response Tme [ms] Area for readng functon codes 1, 3, 100, 102 Area for Readng Functon Code 23, 106 COM: Values at Connecton Loss to Master Descrpton Name of the Modbus slave set Actvated: Adopt the µp budget lmt from the Max. µp Budget n [%] feld. Deactvated: Do not use the µp budget lmt for ths protocol. Maxmum µp load of the COM module that can be used for processng the protocols. Range of values: % Default value: 30% Actvated: Redundant Operaton Deactvated: Mono Operaton Default value: Deactvated Tme perod after the recepton of a request wthn whch the Modbus slave may respond. Ths value must be set to 0 n HIMatrx controllers. Range of values: 0...-(2³¹-1) ms Default value: 5000 ms (0 = No lmtaton) Ths parameter defnes from whch data feld the data should be read for functon code 1, 3, 100, 102. Range of values: Import area Export area (compatble wth 51q) The user can specfy the Modbus slave's area from whch the functon code 23 should be read. Import area: The Master has read/wrte access to the slave's mport area. Export area: The master reads from the slave's export area and wrtes to the slave's mport area. Note: wrtng and readng take place wthn a sngle CPU cycle. Ths means that the read data was provded durng the last CPU cycle. If the connecton of the communcaton module to the Modbus master s lost, the nput varables are forwarded to the process module ntalzed or unchanged, dependng on ths parameter. Adopt Intal Data Input varables are reset to ther ntal values. Retan Last Value The nput varables retans the last value. HI E Rev Page 221 of 386

222 7 Modbus Communcaton CPU: Values at Connecton Loss to Master Alternatve regster / bt addressng Regster Area Offset Bts Input Regster Area Offset Bts Output Bt Area Offset Regster Input Bt Area Offset Regster Output Refresh nterval for process data [ms] Force Process Data Consstency If the connecton of the processor module to the communcaton module s lost, the nput varables are ntalzed or contnue to be used unchanged n the process module, dependng on ths parameter. For nstance, f the communcaton module s removed when communcaton s runnng. If a project created wth a SILworX verson pror to V3 should be converted, ths value must be set to Retan Last Value to ensure that the CRC does not change. For HIMatrx controllers wth CPU OS verson pror to V8, ths value must always be set to Retan Last Value. The same behavor as the COM to the master Retan Last Value Table 197: Modbus Slave Propertes Set Tab See the settng of the COM: Values at Connecton Loss to Master parameter The nput varables retans the last value. Default value: The same behavor as the COM to the master Actvated Use the alternatve addressng Deactvate Do not use the alternatve addressng d Default value: Deactvated, see Chapter Range of values: Default value: 0 Range of values: Default value: 0 Range of values: Default value: 0 Range of values: Default value: 0 Refresh rate n mllseconds at whch the COM and CPU exchange protocol data. If the Refresh Rate s zero or lower than the cycle tme for the controller, data s exchanged as fast as possble. Range of values: 0...(2 31-1) Default value: 0 Actvated: Transfer of all protocol data from the CPU to the COM wthn a CPU cycle. Deactvate Transfer of all protocol data from the CPU to the d: COM, dstrbuted over multple CPU cycles, each wth 1100 byte per data drecton. Ths can also allow lowerng the cycle tme of the controller. Default value: actvated Regster Varable (Tab: Access) The varables that the master addresses 16 bt by bt are entered n the Regster Varables tab (functon code 3, 4, 6, 16, 23, 102, 103, 105, 106) Bt Varables (Bt and/or col access) The varables that the master addresses bt by bt are entered n the Bt Varables tab (functon code 1, 2, 5, 15, 100, 101, 104). Page 222 of 386 HI E Rev. 4.01

223 Communcaton 7 Modbus Assgnng Send/Receve Varables All the varables that the Modbus slave receves from the Modbus master are entered n the Inputs tab. To confgure the send varables of the Modbus slave 1. In the structure tree, select the Modbus Slave that should be confgured. 2. Rght-clck Modbus Slave, and then clck Edt. 3. Select the Regster Varables or Bt Varables tab. 4. Drag one varable from the Object Panel onto the Regster Outputs area. 5. Repeat these steps for every further varable that should be defned as send varable for the Modbus slave. 6. Rght-clck the Regster Outputs area, and then clck New Offsets. To confgure the receve varables of the Modbus slave 1. In the structure tree, select the Modbus Slave that should be confgured. 2. Rght-clck Modbus Slave, and then clck Edt. 3. Select the Regster Varables or Bt Varables tab. 4. Drag one varable from the Object Panel onto the Regster Inputs area. 5. Repeat these steps for every further varable that should be defned as receve varable for the Modbus slave. 6. Rght-clck the Regster Inputs area, and then clck New Offsets Modbus Slave Set System Varables The Modbus Slave Set System Varables ncludes the followng system varables. Element Descrpton Redundant State Ths parameter descrbes the redundancy state of the redundant Modbus slave communcaton module par. 0: Redundant Modbus Slave COM Modules actve 1: Frst Modbus Slave COM Module not actve 2: Redundant Modbus slave COM module not actve 3: Both Modbus Slave COM Modules not actve Table 198: Modbus Slave Set Tab Modbus Slave and Modbus Slave Redundant The Modbus Slave tab contans the two tabs Propertes and System Varables. The pn assgnment of the D-sub connectors (fb1, fb2) s descrbed n the manuals of the correspondng HIMax module. HI E Rev Page 223 of 386

224 7 Modbus Communcaton Propertes Element Descrpton Module Selecton of the COM module wthn whch the protocol s processed. Master Montorng Tme [ms] Tme perod after the recepton of a request wthn whch the Modbus slave must respond. If the connecton of the connecton module to the Modbus master s lost, the nput varables are forwarded ntalzed or unchanged to the process module, dependng on the parameter X-COM: Values at Connecton Loss to Master. See Chapter Range of values 1...(2 31-1) [ms] Default value: 0 ms (no lmtaton) Parameters for the Ethernet nterface Enable the TCP/IP connecton Actvated The TCP/IP connecton s enabled Deactvated TCP/IP connecton dsabled Default value: Deactvated TCP Port Default value: 502 Maxmum number of TCP Connectons Maxmum number of TCP connectons opened smultaneously and operatng as server. Range of values: Default value: 3 UDP Enable Actvated UDP/IP connecton s enabled Deactvate UDP/IP connecton dsabled d Default value: Deactvated UDP Port Default value: 502 Parameters for the seral nterface Name Name of the seral nterface Interface Selecton of the feldbus nterfaces that are avalable and can be used for the Modbus slave (none, fb1, fb2). Slave Address Slave bus address Range of values: Baud rate [bps] Possble value for transfer rate for RS485: 300 bt/s 600 bt/s 1200 bt/s 2400 bt/s 4800 bt/s 9600 bt/s bt/s bt/s bt/s (maxmum baud rate for HIMax V4 and beyond) bt/s (HIMatrx only) bt/s (HIMatrx only) bt/s (HIMatrx only) Party Range of values: none Odd Even Default value: Even Page 224 of 386 HI E Rev. 4.01

225 Communcaton 7 Modbus Stop Bts Number of Idle Chars Range of values: Standard (adapts the number of stop bts to the party: wth party = 1 stop bt, no party = 2 stop bts) One stop bt Two stop bts Default value: Default Number of dle characters at the start and the end of a RTU telegram frame. Range of values: Default value: 5 characters Table 199: TCP and UDP Ports Tab for HIMA Modbus Slave The System Varables tab contans system varables that are requred to control the Modbus Slave and evaluate ts state from wthn the user program. Element Average Buffer Fll Level for Requests Vald Master Requests Master Requests Master Montorng Tme [ms] Descrpton Average number of concurrent master requests Number of vald master requests snce the last reset of all counters or last HIMax controller's start-up. Total number of master requests snce the last reset of all counters or last HIMax controller's start-up. Tme perod after the recepton of a request wthn whch the Modbus slave must respond, see Chapter Master Connecton State FALSE: Not Connected TRUE: Connected Maxmum Buffer Fll Level Maxmum number of concurrent master requests for Requests Reset All Counters Ths system varable s used to reset all counters n the user program. A change from 0 to 1 trggers the reset functon. Values greater than 1 are treated as 1. Invald Master Requests Number of nvald master requests snce the last reset of all counters or last HIMax controller's start-up. An nvald request s a request upon whch the Modbus slave sends an error code to the Modbus master. Incorrect transmssons that were already detected and fltered out at the drver level (framng errors, CRC errors, length errors) are not ncluded here, but they are reported through the dagnoss. Rejected Requests Number of rejected master requests snce the last reset of all counters or last HIMax controller's start-up. Response Tmeout Number of response tmeouts snce the last reset of all counters or last HIMax controller's start-up. The response tmeout s the maxmum tme wthn whch the sendng staton must receve the message acknowledgment. Table 200: System Varables Tab for the HIMA Modbus Slave HI E Rev Page 225 of 386

226 7 Modbus Communcaton Modbus Functon Codes of the HIMA Modbus Slaves Modbus Functon Codes The HIMA Modbus slave supports the followng Modbus functon codes: Element Code Type Descrpton READ COILS 01 BOOL Read multple varables (BOOL) from the slave s mport or export 1) area. Maxmum length of the process data: 251 bytes. READ DISCRETE INPUT READ HOLDING REGISTER READ INPUT REGISTER WRITE SINGLE COIL WRITE SINGLE REGISTER 02 BOOL Read multple varables (BOOL) from the slave s export area. Maxmum length of the process data: 251 bytes. 03 WORD Read multple varables of any type from the slave s mport or export 1) area. Maxmum length of the process data: 250 bytes. 04 WORD Read multple varables of any type from the slave s export area. Maxmum length of the process data: 250 bytes. 05 BOOL Wrte one sngle sgnal (BOOL) n the slave s mport area. Maxmum length of the process data: 1 byte 06 WORD Wrte one sngle sgnal (WORD) n the slave s mport area. Maxmum length of the process data: 2 bytes. Dagnoss 08 x Only sub-code 0: Loop-back functon of the slave. WRITE MULTIPLE COILS 15 BOOL Wrte multple varables (BOOL) n the slave s mport area. Maxmum length of the process data: 247 bytes. WRITE MULTIPLE REGISTER READ WRITE MULTIPLE REGISTER 16 WORD Wrte multple varables of any type n the slave s mport area. Maxmum length of the process data: 246 bytes. 23 WORD Wrte and read multple varables of any type n and from the slave s mport or export area. Maxmum length of the process data: 242 bytes (request telegram from the master Modbus Master). 250 bytes (response to the Master). 43 x Transmt the slave dentfcaton data to the master. Read Devce Identfcaton 1) The export area can only be selected n HIMA slaves Table 201: Modbus Functon Codes of the HIMA Modbus Slave In addton to the WORD data type (2 bytes), the functon codes 03, 04, 16 and 23 support all other data types. The start address of the frst varable to be transferred and the number of regsters/bts of the varables to be transferred must be entered for each request. Page 226 of 386 HI E Rev. 4.01

227 Communcaton 7 Modbus Error Codes: If the master sends a telegram wth unknown functon codes, the controller responds wth error code 1 (nvald code). If the telegram does not match the Modbus slave confguraton (.e., the request telegram does not ends even at one varable lmt), the slave responds wth error code 2 (nvald data). If the master sends a telegram wth ncorrect values (e.g., length felds), the slave responds wth error code 3 (nvald value). Communcaton only takes place f the COM module s n the RUN state. If the COM module s n any other operatng state, the master does not respond to any requests. Note for Modbus Functon: Read Devce Identfcaton (43) The HIMax Modbus slave provdes the dentfcaton data to the master and supports the followng object IDs: Basc: 0x00 VendorName HIMA Paul Hldebrandt GmbH + Co KG 0x01 ProductCode <Module seral number> 0x02 MajorMnorRevson <COM Vx.y CRC> Regular: 0x03 VendorUrl 0x04 ProductName HIMax 0x05 ModelName HIMax 0x06 UserApplcatonName [S.R.S] Extended: 0x80 blank x81 blank x82 blank x83 blank x84 blank x85 blank x86 CRC of the fle modbus.confg <0x234adcef> (confguraton fle for the Modbus slave protocol n the CPU fle system. To compare wth the nformaton specfed n SILworX, Onlne/Verson comparson). The followng ReadDevce ID Codes are supported: (1) Read Basc devce dentfcaton (stream access) (2) Read regular devce dentfcaton (stream access) (3) Read extended devce dentfcaton (stream access) (4) Read one specfc dentfcaton object (ndvdual access) (For more nformaton on Modbus, refer to the Modbus "Applcaton Protocol Specfcaton" HI E Rev Page 227 of 386

228 7 Modbus Communcaton HIMA-Specfc Functon Codes HIMA-specfc functon codes correspond to the standard Modbus functon codes. The only dfferences are the maxmum permssble process data length of 1100 bytes and the format of the request and response headers. Element Code Type Descrpton Read Cols Extended Read Dscrete Inputs Extended Read Holdng Regsters Extended Read Input Regsters Extended Wrte Multple Cols Extended Wrte Multple Regsters Extended Read/Wrte Multple Regsters Extended 100 (0x64) 101 (0x65) 102 (0x66) 103 (0x67) 104 (0x68) 105 (0x69) 106 (0x6A) BOOL Correspond to functon code 01. Read multple varables (BOOL) from the slave s mport or export 1) area. Maxmum length of the process data: 1100 bytes. BOOL Correspond to functon code 02. Read multple varables (BOOL) from the slave s export area. Maxmum length of the process data: 1100 bytes. WORD Correspond to functon code 03. Read multple varables of any type from the slave s mport or export 1) area. Maxmum length of the process data: 1100 bytes. WORD Correspond to functon code 04. Read multple varables of any type from the slave s export area. Maxmum length of the process data: 1100 bytes. BOOL Correspond to functon code 15. Wrte multple varables (BOOL) n the slave s mport area. Maxmum length of the process data: 1100 bytes. WORD Correspond to functon code 16. Wrte multple varables of any type n the slave s mport area. Maxmum length of the process data: 1100 bytes. WORD Correspond to functon code 23. Wrte and read multple varables of any type n and from the slave s mport or export area. Maxmum length of the process data: 1100 bytes (request telegram from the master Modbus master) bytes (response to the master). Page 228 of 386 HI E Rev. 4.01

229 Communcaton 7 Modbus Format of Request and Response Header The request and response header of the HIMA-specfc Modbus functon codes are structured as follows: Code Request Response 100 (0x64) 101 (0x65) 102 (0x66) 103 (0x67) 104 (0x68) 105 (0x69) 106 (0x6A) 1 byte functon code 0x64 2 bytes start address 2 bytes number of cols (0x2260) 1 byte functon code 0x65 2 bytes start address 2 bytes number of cols (0x226) 1 byte functon code 0x66 2 bytes start address 2 bytes number of regsters (0x226) 1 byte functon code 0x67 2 bytes start address 2 bytes number of regsters (0x226) 1 byte functon code 0x68 2 bytes start address 2 bytes number of cols (0x2260) 2 bytes number of bytes = N N bytes col data 1 byte functon code 0x69 2 bytes start address 2 bytes number of regsters (0x226) 2 bytes number of bytes = N N bytes regster data 1 byte functon code 0x6a 2 bytes read start address 2 bytes number of read regsters (0x226) 2 bytes wrte start address 2 bytes number of wrte regsters (0x226) 2 bytes number of wrte bytes = N N bytes regster data 1 byte functon code 0x64 2 bytes number of bytes = N N bytes col data (8 cols are packed n one byte) 1 byte functon code 0x65 2 bytes number of bytes = N N bytes col data (8 cols are packed n one byte) 1 byte functon code 0x66 2 bytes number of bytes = N N bytes regster data 1 byte functon code 0x67 2 bytes number of bytes = N N bytes regster data 1 byte functon code 0x66 2 bytes start address 2 bytes number of cols (0x2260) 1 byte functon code 0x69 2 bytes start address 2 bytes number of regsters (0x226) 1 byte functon code 0x6a 2 bytes number of bytes = N N bytes regster data HI E Rev Page 229 of 386

230 7 Modbus Communcaton Addressng Modbus usng Bt and Regster The addressng mode adheres to the Modbus addressng standard and only knows the two data lengths bt (1 bt) and regster (16 bts) that are used to transfer all the data types allowed. There are two areas wthn the Modbus slave: a Regster Area (nputs and outputs) and a Bt Area (nputs and outputs). Both areas are separated from one another and can accept all permtted data types. The dfference between these areas resdes n the Modbus functon codes permtted for accessng them. The Modbus addressng usng bt and regster does not guarantee the varable ntegrty, meanng that any arbtrary porton of a varable can be read or wrtten wth ths access mode. Varables of type BOOL are stored n a packed format,.e., each varable of type BOOL s stored as a bt wthn a byte Regster Area The varables n the Regster Area are created n the Regster Varables tab. For more nformaton on how to assgn send/receve varables, refer to Chapter To access varables n the Regster Area wth the Modbus functon codes 1, 2, 5, 15, the varables must be mrrored n the Bt Area, see Chapter The varables n the Regster Area can only be accessed usng the Modbus functon codes 3, 4, 6, 16, 23. To do ths, enter the start address of the frst varable n the propertes of the functon code. Example: Accessng the Varables n the Regster Area of the Modbus Slave Regster varables Regster.Bt Bt 00_Regster_Area_WORD _Regster_Area_SINT _Regster_Area_SINT _Regster_Area_REAL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL Table 202: Regster Varables n the Regster Area of the Modbus Slave Page 230 of 386 HI E Rev. 4.01

231 Communcaton 7 Modbus HIMA Modbus Master Confguraton of the Request Telegram To read the varables 01_Regster_Area_SINT to 03_Regster_Area_REAL n the Modbus master 1. Rght-clck TCP/UDP slaves and select New from the context menu. 2. Select Read Holdng Regsters (3) from the lst. 3. Rght-clck Read Holdng Regsters (3) and select Propertes. - Enter 1 n the start address of the read area. 4. Rght-clck Read Holdng Regsters (3) and select Edt. 5. Drag the followng varables from the Object Panel onto the Input Varables tab.. Regster varables Offset 01_Regster_Area_SINT 0 02_Regster_Area_SINT 1 03_Regster_Area_REAL 2 6. Rght-clck anywhere n the Output Varables area to open the context menu and clck New Offsets to renumber the varable offsets Bt Area The varables n the Bt Area are created n the Bt Varables tab. For more nformaton on how to assgn send/receve varables, refer to Chapter To access varables n the Regster Area wth the Modbus functon codes 3, 4, 6, 16 and 23, the varables must be mrrored n the Bt Area, see Chapter The varables n the Bt Area can only be accessed usng the Modbus functon codes 1, 2, 5, 15. To do ths, enter the start address of the frst varable n the propertes of the functon code. Example: Accessng the Varables n the Bt Area of the Modbus Slave Bt Varables Bt Regster.Bt 00_BIT_Area_WORD _BIT_Area_SINT _BIT_Area_SINT _BIT_Area_REAL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL Table 203: Bt Varables n the Bt Area of the Modbus Slave HI E Rev Page 231 of 386

232 7 Modbus Communcaton HIMA Modbus Master Confguraton of the Request Telegram To read the varables 04_BIT_Area_BOOL to 06_Area_BOOL n the Modbus master 1. Rght-clck TCP/UDP slaves, then clck New. 2. Select Read Cols (1) from the lst. 3. Rght-clck Read Cols (1) and select Propertes from the context menu. - Enter 64 n the start address of the read area. 4. Rght-clck Read Cols (1) and select Edt from the context menu. 5. Drag the followng varables from the Object Panel onto the Input Varables tab. Bt Varables Offset 04_BIT_Area_BOOL 0 05_BIT_Area_BOOL 1 06_BIT_Area_BOOL 2 6. Rght-clck anywhere n the Output Varables area to open the context menu and clck New Offsets to renumber the varable offsets Offsets for Alternatve Modbus Addressng To access the varables n the Bt Area usng the Modbus functon codes (of type Regster), the varables must be mrrored n the Regster Area, and to access the varables n the Regster Area usng the Modbus functon codes (of type Bt), the varables must be mrrored n the Bt Area. The offsets for the mrrored varables are entered n the Propertes/Offsets tab. To mrror the varables n the Bt Area and Regster Area 1. Rght-clck the Modbus slave and select Edt, and Offsets, then actvate Use Alternatve Regster/Bt Addressng. Ths acton mrrors the varables n the correspondng area. 2. Enter the offset for the mrrored varables n the Bt Area and Regster Area. The exstng varables and the correspondng varables mrrored n the Bt/Regster Area must not overlap wth respect to the Modbus addresses. Element Descrpton / Range of values Alternatve regster / bt addressng Actvated Use the alternatve addressng Deactvate d Do not use the alternatve addressng Default value: Deactvated Regster area offset / bt nputs Regster area offset / bt outputs Bt area offset / regster nputs Bt area offset / regster outputs Table 204: Offsets Tab for HIMA Modbus Slave Page 232 of 386 HI E Rev. 4.01

233 Communcaton 7 Modbus Access to the Regster Varables n the Bt Area of the Modbus Slave To access the Regster Area wth the Modbus functon codes (of type Bt) 1, 2, 5, 15, the regster varables must be mrrored n the Bt Area. The offsets for the mrrored regster varables must be entered n the Propertes/Offsets tab. Example: Bt area offset / regster nputs 8000 Bt area offset / regster outputs 8000 The varables mrrored from the Regster Area to the Bt Area are located here startng wth Bt Address Mrrored Regster Varables Bt 00_Regster_Area_WORD _Regster_Area_SINT _Regster_Area_SINT _Regster_Area_REAL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL _Regster_Area_BOOL 8079 Table 205: Varables Mrrored from the Regster Area to the Bt Area HIMA Modbus Master Confguraton of the Request Telegram To read the varables 04_Regster_Area_BOOL to 06_Regster_Area_BOOL n the Modbus master 1. Rght-clck TCP/UDP slaves, then clck New. 2. Select Read Cols (1) from the lst. 3. Rght-clck Read Cols (1) and select Propertes from the context menu. - Enter 8064 n the start address of the read area. 4. Rght-clck Read Cols (1) and select Edt from the context menu. 5. Drag the followng varables from the Object Panel onto the Input Varables tab.. Mrrored Regster Varables Offset 04_Regster_Area_BOOL 0 05_Regster_Area_BOOL 1 06_Regster_Area_BOOL 2 6. Rght-clck anywhere n the Output Varables area to open the context menu and clck New Offsets to renumber the varable offsets. HI E Rev Page 233 of 386

234 7 Modbus Communcaton Access to the Bt Varables n the Regster Area of the Modbus Slave To access the bt varables wth the Modbus functon codes (of type Regster) 3, 4, 6, 16, 23, the bt varables must be mrrored n the Regster Area. The offsets for the mrrored bt varables must be entered n the Propertes/Offsets tab. Example: Regster area offset / bt nputs: 1000 Regster area offset / bt outputs: 1000 The varables mrrored from the Bt Area to the Regster Area are located here startng wth Regster Address Mrrored Bt Varables Regster.Bt 00_BIT_Area_WORD _BIT_Area_SINT _BIT_Area_SINT _BIT_Area_REAL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL _BIT_Area_BOOL Table 206: Varables Mrrored from the Bt Area to the Regster Area HIMA Modbus Master Confguraton of the Request Telegram To read the varables 01_BIT_Area_SINT to 03_BIT_Area_REAL n the Modbus master 1. Rght-clck TCP/UDP slaves, then clck New. 2. Select Read Holdng Regsters (3) from the lst. 3. Rght-clck Read Holdng Regsters (3) and select Propertes. - Enter 1001 n the start address of the read area. 4. Rght-clck Read Holdng Regsters (3) and select Edt. 5. Drag the followng varables from the Object Panel onto the Input Varables tab.. Mrrored Bt Varables Offset 01_BIT_Area_SINT 0 02_BIT_Area_SINT 1 03_BIT_Area_REAL 2 6. Rght-clck anywhere n the Output Varables area to open the context menu and clck New Offsets to renumber the varable offsets. Page 234 of 386 HI E Rev. 4.01

235 Communcaton 7 Modbus Control Panel (Modbus Slave) The Control Panel can be used to verfy and control the settngs for the Modbus slave. Detals about the slave's current state (e.g., master state, etc.) are dsplayed. To open the Control Panel for montorng the Modbus slave 1. Rght-clck the Hardware structure tree node and select Onlne from the context menu. 2. In the System Logn wndow, enter the access data to open the onlne vew for the hardware. 3. Double-clck COM Module and select the Modbus Slave structure tree node Context Menu (Modbus Slave) The followng command s avalable from the context menu for the selected Modbus slave: Reset Statstcs Reset statstcal data (mn./max. cycle tme etc.) to 0. HI E Rev Page 235 of 386

236 7 Modbus Communcaton Vew Box (Modbus Slave) The vew box dsplays the followng values of the selected Modbus slave. Element Name Planned µp Budget [%] Current µp Budget [%] SRS of Redundant Module Response Tme [ms] Table 207: Vew Box of the Modbus Slave Descrpton Modbus slave name See Chapter SRS of the redundant COM module Tme perod after the recepton of a request wthn whch the Modbus slave may respond Vew Box (Master Data) The Master Data vew box dsplays the followng values. Element Name Requests Vald Requests Invald Requests Master Tmeout [ms] Connecton State Response Tmeout Rejected Requests Maxmum Buffer Fll Level for Requests Average Buffer Fll Level for Requests Table 208: Master Data Vew Box Descrpton Name of master data Total number of master requests snce the last counter reset. Number of vald master requests snce the last counter reset. Number of nvald master requests snce the last counter reset. Only requests that are acknowledged by the master are consdered as nvald. Requests wth CRC error that were mproperly receved are automatcally rejected. Tmeout wthn whch the slave must receve at least one request from the master. If the slave receves no request wthn the tmeout, the Master Connecton Status s set to not connected. 0 = Not montored Master Request Tmeout s zero 1 = Not connected 2 = Connected Number of response tmeouts snce the last reset of all counters or last HIMax controller's start-up. The response tmeout s the maxmum tme wthn whch the sendng staton must receve the message acknowledgment. Number of rejected master requests snce the last reset of all counters or last HIMax controller's start-up. Maxmum number of concurrent master requests Average number of concurrent master requests Page 236 of 386 HI E Rev. 4.01

237 Communcaton 7 Modbus FBx LED Functon n the Modbus Slave The FBx LED of the correspondng feldbus nterface ndcates the state of the Modbus protocol. The states of the FBx LED are specfed n the followng table: FBx LED Color Descrpton OFF Yellow The Modbus slave protocol s not actve! Ths means that the controller s n STOP or no Modbus master s confgured. Blnkng Yellow The Modbus slave protocol s actve and s exchangng data wth the Modbus master. Table 209: The FBx LED Functon of the FAULT LED n the Modbus Slave (HIMax only) The FAULT LED of the correspondng feldbus nterface ndcates a falure of the Modbus protocol. The states of the FAULT LED are specfed n the followng table: FAULT LED Color Descrpton OFF Red PROFIBUS DP slave protocol s not dsturbed. Blnkng Red The Modbus slave protocol s dsturbed. The followng events result n a malfuncton. Unknown functon code receved Request wth ncorrect addressng receved Calculatng tme budget exceeded Table 210: The FAULT FBx If no faults occur for a perod longer than 5 seconds, the state changes to Protocol not dsturbed Error Codes of the Modbus TCP/IP Connecton The error codes of the Modbus TCP/IP connecton are output n the Dagnoss dalog box. Error Code Descrpton 35 Operaton s blocked 48 Port already n use 50 Network s down 53 Software caused connecton abort 54 Peer caused connecton abort 55 No buffer space avalable 60 Operaton tmed out, connecton termnated 61 Connecton refused (from peer) 65 No route to peer host Table 211: Error Codes of Modbus TCP/IP HI E Rev Page 237 of 386

238 8 Send & Receve TCP Communcaton 8 Send & Receve TCP S&R TCP s a manufacturer-ndependent, standard protocol for cyclc and acyclc data exchange and does not use any specfc protocols other than TCP/IP. Wth the S&R TCP protocol, the HIMax/HIMatrx controller supports almost every thrd-party system as well as PCs wth mplemented socket nterface to TCP/IP (for example Wnsock.dll). S&R TCP s compatble wth the Semens SEND/RECEIVE nterface and ensures communcaton wth Semens controllers va TCP/IP. Data s exchanged usng the S7 functon blocks AG_SEND (FC5) and AG_RECV (FC6). 8.1 System Requrements Equpment and system requrements Element Descrpton Controller HIMax wth COM module HIMatrx: CPU OS versons beyond 7 and COM OS versons beyond 12 Processor module The Ethernet nterfaces on the processor module may not be used for S&R TCP. COM module Ethernet 10/100BaseT One S&R TCP protocol can be confgured for each COM module. Actvaton Software actvaton code requred, see Chapter 3.4. Table 212: Equpment and System Requrements for the S&R TCP Propertes of the S&R TCP protocol Element Safety-related Data exchange Functon Blocks TCP Connectons Max. Sze of Send Data Max. Sze of Receve Data Descrpton No Cyclc and acyclc data exchange over TCP/IP. The S&R TCP functon blocks must be used for acyclcally exchangng data. Up to 32 TCP connectons can be confgured n one controller, provded that the maxmum sze of send or receved data s not exceeded. See Table 9 Standard Protocols To determne the maxmum amount of reference data, the value for all status varables of the confgured TCP connectons and TCP/SR functon blocks must be subtracted from the value for the maxmum amount of send data. The data can be freely allocated among multple TCP connectons. Table 213: S&R TCP Propertes Creatng a S&R TCP Protocol To create a new S&R TCP protocol 1. In the structure tree, open Confguraton, Resource, Protocols. 2. Rght-clck Protocols and select New, Send/Receve over TCP from the context menu to add a new S&R TCP protocol. 3. Rght-clck Send/Receve over TCP and select Propertes. In the General tab, select COM Module. Page 238 of 386 HI E Rev. 4.01

239 Communcaton 8 Send & Receve TCP 8.2 Example: S&R TCP Confguraton Fgure 63: Connectng a HIMax to a Semens Controller In ths example, the protocol Send/Receve over TCP s nstalled n a HIMax controller. The HIMax s supposed to cyclcally communcate va S&R TCP wth a Semens controller (e.g., SIMATIC 300). In ths example, HIMax (clent) s the actve staton that establshes the TCP connecton to the passve Semens SIMATIC 300 (server). Once the connecton has been establshed, both statons are equal and can send and receve data at any pont n tme. When connectng the HIMax to the Semens SIMATIC 300, the followng ponts must be taken nto account: The requrements descrbed n Chapter 8.1 System Requrements apply for the HIMax. HIMax and Semens SIMATIC 300 are connected to one another va Ethernet nterfaces. HIMax and Semens SIMATIC 300 must be located n the same subnet or must have the correspondng routng settngs f a router s used. In ths example, the HIMA controller s supposed to send two BYTES and one WORD to the Semens SIMATIC 300. The varables are receved n the Semens SIMATIC 300 by the functon block AG_RECV (FC 6) and are nternally transmtted to the functon block AG_SEND (FC 5). Semens SIMATIC 300 sends the varables (unchanged) back to the HIMax controller usng the functon block AG_SEND (FC 5). Once the confguraton s completed, the user can verfy the varable transmsson usng the HIMA Force Edtor. HI E Rev Page 239 of 386

240 8 Send & Receve TCP Communcaton Fgure 64: Data Transfer between a HIMax and a Semens Controller Descrpton of the HIMax controller confguraton Element TCP connecton [001] Send Data Receve Data Descrpton Ths dalog box contans all parameters requred for communcatng wth the communcaton partner (Semens SIMATIC 300). The varable offsets and types n the controller must be dentcal wth the varable addresses and types wth data type UDT_1 n the SIMATIC 300. The varable offsets and types n the HIMax controller must be dentcal wth the varable addresses and types wth data type UDT_1 n the SIMATIC 300. Table 214: HIMax Controller Confguraton Descrpton of the Semens SIMATIC 300 Confguraton Element Organzaton block OB1 AG_RECV (FC 6) AG_SEND (FC 5) Data block DB1 Data type UDT_1 Descrpton The functon blocks AG_RECV (FC6) and AG_SEND (FC 5) must be created and confgured n the OB1 organzaton block. The functon block AG_RECV (FC 6) accepts the data receved from the communcaton partner wth data type DB1.UDT_1. The nputs ID and LADDR must be approprately confgured for communcaton wth the communcaton partner. The functon block AG_SEND (FC 5) transfers the data from data type DB1.UDT_1 to the communcaton partner. The nputs ID and LADDR must be approprately confgured for communcaton wth the communcaton partner. The data type UDT_1 s defned n the data block DB1. The addresses and types of the varables n SIMATIC 300 must be dentcal wth the offsets and types of the controller. The data type UDT_1 accepts the receved user data and stores them untl they are transmtted to the communcaton partner. Table 215: Semens SIMATIC 300 Confguraton Page 240 of 386 HI E Rev. 4.01

241 Communcaton 8 Send & Receve TCP S&R TCP Confguraton of the Semens Controller SIMATIC 300 The followng step by step nstructons for confgurng the Semens controller are not to be consdered exhaustve. Ths nformaton s provded wthout guarantee (errors and omssons excepted); refer to the Semens documentaton when developng projects wth Semens controllers. To create the S&R TCP server n the SIMATIC 300 project 1. Start the SIMATIC manager. 2. In the SIMATIC manager, open the project assocated wth the SIMATIC 300 controller. 3. In ths project, create and confgure the Industral Ethernet and the MPI connectons. To create the UDT1 data type usng the followng varables 1. Open the Functon Blocks drectory n the Semens SIMATIC manager. 2. Select Add, S7 Block, Data Type from the man menu and create a data type. 3. Name the data type UDT1 4. Gve the symbolc name UDT_1 to the data type. 5. In data type UDT_1, create the three InOut_x varables as descrbed n the fgure below. I Fgure 65: Lst of Varables n the Semens UDT1 Block Durng cyclc and acyclc data exchange, note that some controllers (e.g., SIMATIC 300) add so-called pad bytes. Pad bytes ensure that all data types greater than one byte always begn at an even offset and that also the total sze of the defned varables s even. In such a case, dummy bytes must be used on the correct place of the HIMax controller (see Chapter 8.6 Thrd-Party Systems wth Pad Bytes). HI E Rev Page 241 of 386

242 8 Send & Receve TCP Communcaton To create the DB1 data block for the FC 5 and FC 6 functon blocks 1. Select Add, S7 Functon Block, Data Block on the man menu and create a data block. 2. Enter the name DB1 for the data block. 3. Enter the symbolc name DB1 for the data block. 4. Assgn the UDT_1 data type to the DB1 data block. 5. In the DB1 data block, confgure the data types such as descrbed n the fgure below. Fgure 66: Lst of Varables n the Semens DB1 Functon Block To create the followng symbols n the Symbol Edtor 1. Double-clck the OB1 organzaton block to open the KOP/AWL/FUP dalog box. 2. Select Extras, Symbol Table from the man menu to open the Symbol Edtor. 3. Add the varables M MW 5 n the Symbol Edtor such as specfed n the fgure below. Fgure 67: SIMATIC Symbol Edtor To create the AG_RECV (FC 6) functon block 1. Open the KOP/AWL/FUP dalog box. 2. From the structure tree located on the left sde of the Symatc Manager, select the followng functon blocks n the gven order: one OR gate one S_VIMP one AG_RECV (FC 6) 3. Drag these functon blocks onto the OB1 organzaton block. Page 242 of 386 HI E Rev. 4.01

243 Communcaton 8 Send & Receve TCP 4. Connect and confgure the functon blocks as descrbed n the fgure below. 5. Rght-clck the AG_RECV (FC 6) functon block, and then clck Propertes. 6. Deactvate Actve Connecton Setup and confgure the ports. 7. Note down the LADDR functon block parameter and enter t n the functon chart on the AG_RECV (FC 6) functon block. Fgure 68: Receve Functon Chart HI E Rev Page 243 of 386

244 8 Send & Receve TCP Communcaton To create the AG_SEND (FC 5) functon block 1. Open the KOP/AWL/FUP dalog box. 2. From the structure tree located on the left sde of the Symatc Manager, select the followng functon blocks n the gven order: one OR gate one S_VIMP one AG_SEND (FC 5) 3. Drag these functon blocks onto the OB1 organzaton block. 4. Connect and confgure the functon blocks as descrbed n the fgure below. 5. Rght-clck the AG_SEND (FC 5) functon block, and then clck Propertes. 6. Deactvate Actve Connecton Setup and confgure the ports. 7. Note down the LADDR functon block parameter and enter t n the functon chart on the AG_SEND (FC 5) functon block. Fgure 69: Send Functon Chart To load the code nto the SIMATIC 300 controller 1. Start the Code Generator for the program. 2. Make sure that the code was generated wthout error. 3. Load the code nto the SIMATIC 300 controller. Page 244 of 386 HI E Rev. 4.01

245 Communcaton 8 Send & Receve TCP S&R TCP Confguraton of the HIMax Controller For more nformaton on how to confgure the HIMax controllers and use the SILworX programmng tool, refer to the SILworX Frst Steps manual. To create the followng global varables n the Varable Edtor 1. In the structure tree, open Confguraton, Global Varables. 2. Rght-clck the Global Varables, and then clck Edt. 3. Create the global varables as descrbed n Table 216. Name Type Semens_HIMA1 Byte Semens_HIMA2 Byte Semens_HIMA3 WORD HIMA_Semens1 Byte HIMA_Semens2 Byte HIMA_Semens3 WORD Table 216: Global Varables To create the S&R TCP protocol n the resource 1. In the structure tree, open Confguraton, Resource. 2. Rght-clck Protocols, then clck New. 3. Select Send/Receve over TCP and enter a name for the protocol. 4. Clck OK to create a new protocol. 5. Rght-clck Send/Receve over TCP, then clck Propertes. 6. Clck COM Module. The remanng parameters retan the default values. To create the TCP connecton 1. Rght-clck Send/Receve over TCP, then clck New. 2. Rght-clck TCP Connecton, then clck Propertes. 3. Confgure the propertes such as specfed n the fgure. Fgure 70: TCP Connecton Propertes n SILworX If parameters for cyclc data exchange between two controllers should be set, the opton Cyclc data transfer must be actvated n the Propertes dalog box for the TCP Connecton. HI E Rev Page 245 of 386

246 8 Send & Receve TCP Communcaton To confgure the receve data of the HIMax controller 1. Rght-clck TCP Connecton, then clck Edt. 2. Select the Process Varables tab. 3. Drag the followng global varables from the Object Panel onto the Input Sgnals area. Global Varable Type Semens_HIMA1 Byte Semens_HIMA2 Byte Semens_HIMA3 WORD Table 217: Varables for Receve Data 4. Rght-clck anywhere n the Regster Inputs area, and then clck New Offsets to renumber the varable offsets. Take nto account that the varable offsets n the HIMax controller must be dentcal wth the varable addresses wth UDT_1 data type n the SIMATIC 300. To confgure the send data of the HIMax controller 1. Rght-clck TCP Connecton, then clck Edt. 2. Select the Process Varables tab. 3. Drag the followng global varables from the Object Panel onto the Input Sgnals area. Global Varable Type HIMA_Semens1 Byte HIMA_Semens2 Byte HIMA_Semens3 WORD Table 218: Varables for Send Data 4. Rght-clck anywhere n the Regster Inputs area, and then clck New Offsets to renumber the varable offsets. Note that the varable offsets n the HIMax controller must be dentcal wth the varable addresses wth UDT_1 data type n the SIMATIC 300. To verfy the S&R TCP confguraton 1. In the structure tree, open Confguraton, Resource, Protocols, Send/Receve Protocol over TCP. 2. Clck the Verfcaton button located on the Acton Bar, and then clck OK to confrm the acton. 3. Thoroughly verfy the messages dsplayed n the logbook and correct potental errors. Page 246 of 386 HI E Rev. 4.01

247 Communcaton 8 Send & Receve TCP 8.3 TCP S&R Protocols Menu Functons Edt The Edt dalog box for the S&R TCP protocol contans the followng tab: System Varables System varables are used to evaluate the state of the TCP Send Receve protocol from wthn the user program. Element Actve Connecton Count Dsturbed Connecton Count Status Table 219: System Varables S&R TCP Descrpton System varable provdng the number of actve (not dsturbed) connectons. System varable provdng the number of dsturbed connectons. Dsturbed means that the TCP connecton was nterrupted due to a tmeout or an error. No functon Propertes Over a TCP connecton, data s exchanged cyclcally or acyclcally. The S&R TCP functon blocks are requred for the acyclc data exchange. On a connecton, data cannot be smultaneously exchanged cyclcally and acyclcally. General Name Descrpton Type Send/Receve over TCP Name Name for the current Send/Receve over TCP Protocol. A maxmum of 31 characters. Module Selecton of the COM module wthn whch the protocol s processed. Actvate Max. µp Actvated: Budget Adopt the µp budget lmt from the Max. µp Budget n [%] feld. Max. µp budget n [%] Deactvated: Do not use the µp budget lmt for ths protocol. Maxmum µp budget for the module that can be used for processng the protocols. Behavor on CPU/COM Connecton Loss Range of values: % Default value: 30% If the connecton of the processor module to the communcaton module s lost, the nput varables are ntalzed or contnue to be used unchanged n the process module, dependng on ths parameter. Example: the communcaton module s removed when communcaton s runnng. Adopt Intal Data Input varables are reset to ther ntal values. Retan Last Value The nput varables retans the last value. Table 220: S&R TCP General Propertes HI E Rev Page 247 of 386

248 8 Send & Receve TCP Communcaton CPU/COM The default values of the parameters provde the fastest possble data exchange of S&R TCP data between the COM module (COM) and the processor module (CPU) wthn the controller. These parameters should only be changed f t s necessary to reduce the COM and CPU loads for an applcaton, and the process allows ths change. Only experenced programmers should modfy the parameters. Increasng the COM and CPU refresh rate means that the effectve refresh rate of the S&R TCP data s also ncreased. The system tme requrements must be verfed. Name Process Data Refresh Rate [ms] Force Process Data Consstency Descrpton Refresh rate n mllseconds at whch the COM and CPU exchange S&R TCP protocol data. If the Refresh Rate s zero or lower than the cycle tme for the controller, data s exchanged as fast as possble. Range of values: 0...(2 31-1), default value: 0. Actvated: Transfer of the S&R TCP data from the CPU to the COM wthn a CPU cycle. Table 221: Parameters of COM/CPU Deactvated: Transfer of the S&R TCP data from the CPU to the COM, dstrbuted over multple CPU cycles, each wth 1100 bytes per data drecton. Page 248 of 386 HI E Rev. 4.01

249 Communcaton 8 Send & Receve TCP 8.4 Menu Functons for TCP Connecton Edt The Edt menu functon s used to open the tabs Process Varables and System Varables. Process Varables Input Sgnals The Input Sgnals area contans the varables for cyclc data exchange that ths controller should receve. Any varables can be created n the Input Sgnals tab. Offsets and types of the receved varables must be dentcal wth offsets and types of the transmtted varables (send data) of the communcaton partner. Output Sgnals The varables for cyclc data exchange sent by ths controller are entered n the Output Sgnals area. Any varables can be created n the Output Sgnals tab. Offsets and types of the receved varables must be dentcal wth offsets and types of the transmtted varables (receve data) of the communcaton partner System Varables Usng the varables n the System Varables tab, the state of the TCP connecton can be assessed from wthn the user program. Name Bytes receved Bytes sent Error Code Error Code Tmestamp [ms] Error Code Tmestamp [s] Partner Request Tmeout Descrpton Number of bytes receved so far. Number of bytes sent so far. Error code of the TCP connecton. See Chapter Mllsecond fracton of the tmestamp. Pont n tme when the error occurred. Second fracton of the tmestamp. Pont n tme when the error occurred. Wth acyclc data transfer: Tmeout wthn whch the communcaton partner must receve at least one tme data after data sendng. Partner Connecton State Status Table 222: System Varables 0=Off [ms] If no data s receved wthn the tmeout, Partner Connecton State s set to Not Connected and the connecton s restarted. 0=No connecton 1=Connecton OK TCP connecton status. (see Chapter 8.8.5) HI E Rev Page 249 of 386

250 8 Send & Receve TCP Communcaton Propertes Over a TCP connecton, data s exchanged cyclcally or acyclcally. The S&R TCP functon blocks are requred for the acyclc data exchange. The S&R TCP functon blocks cannot be used for cyclc data exchange. Name Descrpton Type TCP connecton Name Any unque name for one TCP connecton. A maxmum of 31 characters. ID Any unque dentfcaton number (ID) for each TCP connecton. The ID s also requred as a reference for the S&R TCP functon blocks. Range of values: Default value: 0 Mode Server (default value): Ths staton operates as a server (passve mode). The connecton s establshed by the communcaton partner (clent). Once the connecton has been establshed, both communcaton partners are equal and can send data at any tme. The own port must be specfed. Server wth defned partner: Ths staton operates as a server (passve mode). The connecton s establshed by the communcaton partner (clent). Once the connecton has been establshed, both communcaton partners are equal and can send data at any tme. If the IP address and/or port of the communcaton partner are defned here, only the specfed communcaton partner can connect to the server. All other statons are gnored. If one of the parameters (IP address or port) s set to zero, the parameter s not verfed. Clent: Ths staton operates as a clent,.e., the staton establshes the connecton to the communcaton partner. IP address and port of the communcaton partner must be specfed. Also an own port can optonally be defned. Partner IP address of the communcaton partner. IP address : any IP address s permtted. Vald range: , Except for: 127.x.x.x Default value: 0 Partner port Port of the communcaton partner. 0: Any port Ports that are reserved or already used ( ), are rejected by the COM OS. Range of values: Default value: 0 Page 250 of 386 HI E Rev. 4.01

251 Communcaton 8 Send & Receve TCP Own Port Cyclc data transfer Send Interval [ms] Keep Alve Interval [s] Partner Request Tmeout [ms] Table 223: S&R TCP Connecton Propertes Own port. 0: Any port Ports that are reserved or already used ( ), are rejected by the COM OS. Range of values: Default value: 0 Deactvated (default value) Cyclc data transfer s deactvated. Functon blocks must be used to program the data exchange over ths TCP connecton. No cyclc E/A data may be defned on ths connecton. Actvated: Cyclc data transfer s actve. Data s defned n the Process Varable dalog box for the TCP connecton. Receve data must be defned. No functon blocks can be used on ths connecton. Only edtable wth cyclc data transfer. The send nterval s set here. Range of values ms (lower values are rounded to 10 ms) Default value: 0 Tme perod untl the connecton montorng provded by the TCP s actvated. Zero deactvates the connecton montorng. If no data s exchanged wthn the specfed KeepAlve nterval, the KeepAlve samples are sent to the communcaton partner. If the connecton stll exsts, the KeepAlve samples are acknowledged by the communcaton partner. If no data s exchanged between the partners wthn a perod of > 10 KeepAlve nterval, the connecton s closed. If no response s receved after a data packet sendng, the data packet s resent n predefned ntervals. The connecton s aborted after 12 unsuccessful resends (approx. 7 mnutes). Range of values s Default value: 0 = deactvated Wth acyclc data transfer: Tmeout wthn whch the communcaton partner must receve at least one tme data after data sendng. If no data s receved wthn the tmeout, Partner connecton state s set to not connected and the connecton s restarted. After a tmeout or another error closed the connecton, the actve sde re-establshes the connecton wth a delay of 10 x PartnerRequestTmeout or a delay of 10 seconds f PartnerRequestTmeout s equal to 0. The passve sde opens the port wthn half of ths tme. 0=Off Range of values: [ms] Default value: 0 HI E Rev Page 251 of 386

252 8 Send & Receve TCP Communcaton 8.5 Data exchange S&R TCP operates accordng to the clent/server prncple. The connecton s establshed by the communcaton partner whch s confgured as a clent. Once the connecton has been establshed, both communcaton partners are equal and can send data at any pont n tme. S&R TCP does not have ts own data protecton protocol; rather, t uses TCP/IP drectly. As the data sent by the TCP are arranged n a data stream, t must be ensured that offsets and types of the varables to be exchanged on the recevng staton are dentcal wth the ones on the sendng staton. S&R TCP s compatble wth the Semens SEND/RECEIVE nterface and allows cyclcal data exchange wth the Semens S7 functon blocks AG_SEND (FC5) and AG_RECV (FC6) (see Chapter 8.2, Example of S&R TCP Confguraton). Further, HIMA provdes fve S&R TCP functon blocks for controllng and ndvdually confgurng communcaton usng the user program. Wth the S&R TCP functon blocks, any arbtrary protocol transferred over TCP (e.g., Modbus) can be sent and receved TCP Connectons For each connecton to a communcaton partner over S&R TCP, at least one TCP connecton must exst n the HIMax controller. The dentfcaton number of the TCP connecton and the addresses/ports of the own controller and of the communcaton partner's controller must be set n the Propertes dalog box for the TCP connecton. A maxmum of 32 TCP connectons can be establshed n a HIMax controller. These TCP connectons must have dfferent dentfcaton numbers and dfferent addresses/ports. To create a new TCP connecton 1. In the structure tree, open Confguraton, Resource. 2. Rght-clck Protocols, then clck New. 3. Select Send/Receve over TCP and enter a name for the protocol. 4. Clck OK to create a new protocol. 5. Rght-clck Send/Receve over TCP, then clck Propertes. 6. Select COM Module. The remanng parameters retan the default values. TIP The HIMax/HIMatrx controller and the thrd-party system must be located n the same subnet or must have the correspondng routng settngs f a router s used. Page 252 of 386 HI E Rev. 4.01

253 Communcaton 8 Send & Receve TCP Cyclc Data Exchange If data s exchanged cyclcally, a send nterval must be defned n the HIMax/HIMatrx controller and n the communcaton partner. The send nterval defnes the cyclc tme perod wthn whch the sendng communcaton partner sends the varables to the recevng communcaton partner. To ensure a contnuous data exchange, both communcaton partners should defne almost the same send nterval (see Chapter 8.5.5, Flow Control). For cyclc data exchange, the Cyclc Data Transfer opton must be actvated n the TCP connecton n use. If the Cyclc Data Transfer opton s actvated n a TCP connecton, no functon blocks may be used. The varables to be sent and receved are assgned n the Process Varable dalog box for the TCP connecton. Receve data must exst, send data s optonal. The same varables (same offsets and types) that are defned as send data n a staton, must be defned as receve data n the other staton Acyclc Data Exchange wth Functon Blocks In HIMax/HIMatrx controllers, the acyclc data exchange s controlled by the user program va the TCP S&R functon blocks. Data exchange can thus be controlled usng a tmer or a mechancal swtch connected to a physcal nput of the HIMax/HIMatrx controller. The Cyclc Data Transfer opton must be deactvated n the TCP connecton n use. Only one S&R TCP functon block may send at any gven tme. The varables to be sent or receved are assgned n the Process Varables dalog box for the S&R TCP functon blocks (all except for Reset). The same varables (same offsets and types) that are defned as send data n a staton, must be defned as receve data n the other staton Smultaneous Cyclc and Acyclc Data Exchange For ths purpose, one TCP connecton must be confgured for cyclc data and one TCP connecton for acyclc data. The two TCP connectons must use dfferent partner IP addresses and partner ports. One ndvdual TCP connecton cannot be smultaneously used for cyclc and acyclc data exchange Flow Control The flow control s a component of the TCP and montors the contnuous data traffc between two communcaton partners. Wth cyclc data transfer, at least one packet must be receved after a maxmum of 3 to 5 packets have been sent; otherwse, transmsson s blocked untl a packet s receved or the connecton montorng process termnates the connecton. HI E Rev Page 253 of 386

254 8 Send & Receve TCP Communcaton The number (3...5) of potental transmssons wthout packet recepton depends on the sze of the packets to be sent. Number=5 for small packets < 4kB. Number=3 for bg packets 4kB. Whle plannng the project, t must be ensured that no staton sends more data than the other staton can smultaneously process. To ensure a cyclcal data exchange, both communcaton partners should defne almost the same send nterval 8.6 Thrd-Party Systems wth Pad Bytes Durng cyclc and acyclc data exchange, note that some controllers (e.g., SIMATIC 300) add so-called pad bytes. Pad bytes ensure that all data types exceedng one byte always begn at an even offset and that the total sze of the packets (n bytes) s also even. In the HIMax/HIMatrx controller, dummy bytes must be added n place of pad bytes n the correspondng postons. Fgure 71: Semens Lst of Varables In the Semens controller, a pad byte s added (not vsble) such that the InOut_3 varable begns at an even offset. Fgure 72: HIMax/HIMatrx Lst of Varables In the HIMax/HIMatrx controller, a dummy byte must be added such that the varable InOut_3 has the same offset as n the Semens controller. Page 254 of 386 HI E Rev. 4.01

255 Communcaton 8 Send & Receve TCP 8.7 S&R TCP Functon Blocks If the cyclc data transfer s not suffcent flexble, data can also be sent and receved usng the S&R TCP functon blocks. The Cyclc Data Transfer opton must be deactvated n the TCP connecton n use. The S&R TCP functon blocks s used to talor the data transfer over TCP/IP to best meet the project requrements. The functon blocks are confgured n the user program. The functons (Send, Receve, Reset) of the HIMax/HIMatrx controller can thus be set and evaluated n the user program. S&R TCP functon blocks are requred for the acyclc data exchange. These functon blocks are not requred for the cyclc data exchange between server and clent. The confguraton of the S&R TCP functon blocks s descrbed n Chapter The followng functon blocks are avalable: Functon block Functon descrpton TCP_Reset TCP connecton reset (see Chapter 8.7.1) TCP_Send Sendng of data (see Chapter 8.7.2) TCP_Receve Recepton of data packets wth fxed length (see Chapter 8.7.3) TCP_ReceveLne Recepton of an ASCII lne (see Chapter 8.7.4) TCP_ReceveVar Recepton of data packets wth varable length (wth length feld) (see Chapter 8.7.5) LATCH Only used wthn other functon blocks PIG Only used wthn other functon blocks PIGII Only used wthn other functon blocks Table 224: Functon Blocks for S&R TCP Connectons HI E Rev Page 255 of 386

256 8 Send & Receve TCP Communcaton TCP_Reset Fgure 73: Functon Block TCP_Reset The TCP Reset functon block s used to re-establsh a dsturbed connecton f a send or receve functon block reports a tmeout error (16#8A). To confgure the functon block, drag t from the functon block lbrary onto the user program (see also Chapter 13.1). Inputs and Outputs of the Functon Block wth Prefx A: These nputs and outputs can be used to control and evaluate the functon blocks usng the user program. The prefx A means Applcaton. A-Inputs Descrpton Type A_Req Rsng edge starts the functon block BOOL A_Id Identfcaton number (ID) of the dsturbed TCP connecton to be reset. INT Table 225: A-Inputs for the TCP_Reset Functon Block A_Outputs Descrpton Type A_Busy TRUE: The TCP connecton s stll beng reset. BOOL DONE TRUE: The data transmsson ended wthout error. BOOL A_Status The status and error code of the functon block and of the TCP connecton are output on A_Status. DWORD Table 226: A-Outputs for the TCP_Reset Functon Block Page 256 of 386 HI E Rev. 4.01

257 Communcaton 8 Send & Receve TCP Inputs and Outputs of the Functon Block wth Prefx F: These nputs and outputs of the functon block establsh the connecton to the Reset functon block n structure tree. The prefx F means Feld. Common varables are used to connect the Reset functon block (n the Functon Blocks drectory) to the TCP_Reset functon block (n the user program). These must be created beforehand usng the Varable Edtor. Connect the F-Inputs of the TCP_Reset functon block n the user program to the same varables that wll be connected to the outputs of the Reset functon block n the structure tree. F-Inputs Type F_Ack BOOL F_Busy BOOL F_Done BOOL F_Status DWORD Table 227: F-Inputs for the TCP_Reset Functon Block Connect the F-Outputs of the TCP_Reset functon block n the user program to the same varables that wll be connected to the nputs of the Reset functon block n the structure tree. F-Outputs Type F_Req BOOL F_Id DWORD Table 228: F-Outputs for the TCP_Reset Functon Block To create the Reset functon block n the structure tree 1. In the structure tree, open Confguraton, Resource, Protocols, Send/Receve over TCP, Functon Blocks, New. 2. Select the Reset functon block and clck OK. 3. Rght-clck the Reset functon block, and then clck Edt. The wndow for assgnng varables to the functon blocks appears. Connect the nputs of the Reset functon block n the structure tree to the same varables that have been prevously connected to the F-Outputs of the TCP_Reset functon block n the user program. Inputs Type ID DWORD REQ BOOL Table 229: Input System Varables HI E Rev Page 257 of 386

258 8 Send & Receve TCP Communcaton Connect the followng outputs of the Reset functon block n the structure tree to the same varables that have been prevously connected to the F-Inputs of the TCP_Reset functon block n the user program. Outputs ACK BUSY DONE STATUS Type BOOL BOOL BOOL DWORD Table 230: Output System Varables To operate the TCP_Reset functon block, the followng steps are essental: 1. In the user program, set the dentfcaton number for the dsturbed TCP connecton on the A_ID nput. 2. In the user program, set the A_Req nput to TRUE. The functon block reacts to a rsng edge on A_Req. The A_Busy output s set to TRUE untl a reset s sent to the specfed TCP connecton. Afterwards, A_Busy s set to FALSE and A_Done s set to TRUE. Page 258 of 386 HI E Rev. 4.01

259 Communcaton 8 Send & Receve TCP TCP_Send Fgure 74: Functon Block TCP_Send The TCP_Send functon block s used for acyclcally send varables to a communcaton partner. A functon block wth the same varables and offsets, e.g., Receve, must be confgured n the communcaton partner. To confgure the functon block, drag t from the functon block lbrary onto the user program (see also Chapter 13.1). Inputs and Outputs of the Functon Block wth Prefx A: These nputs and outputs can be used to control and evaluate the functon blocks usng the user program. The prefx A means Applcaton. A-Inputs Descrpton Type A_Req The rsng edge starts the functon block. BOOL A_Id Identfcaton number of the confgured TCP connecton to the INT communcaton partner to whch data should be sent. A_Len Number of transmtted varables, expressed n bytes. A_Len must be greater than zero and must not end wthn a varable. INT Table 231: A-Inputs for the TCP_Send Functon Block A_Outputs Descrpton Type A_Busy TRUE: Data s stll beng transmtted. BOOL DONE TRUE: The data transmsson ended wthout error. BOOL ERROR TRUE: An error occurred BOOL FALSE: No error A_Status The status and error code of the functon block and of the TCP connecton are output on A_Status. DWORD Table 232: A-Outputs for the TCP_Send Functon Block HI E Rev Page 259 of 386

260 8 Send & Receve TCP Communcaton Inputs and Outputs of the Functon Block wth Prefx F: These nputs and outputs of the functon block establsh the connecton to the Send functon block n structure tree. The prefx F means Feld. Common varables are used to connect the Send functon block (n the Functon Blocks drectory) to the TCP_Send functon block (n the user program). These must be created beforehand usng the Varable Edtor. Connect the F-Inputs of the TCP_Send functon block n the user program to the same varables that wll be connected to the outputs of the Send functon block n the structure tree. F-Inputs Type F_Ack BOOL F_Busy BOOL F_Done BOOL F_Error BOOL F_Status DWORD Table 233: F-Inputs for the TCP_Send Functon Block Connect the F-Outputs of the TCP_Send functon block n the user program to the same varables that wll be connected to the nputs of the Send functon block n the structure tree. F-Outputs Type F_Id DWORD F_Len INT F_Req BOOL Table 234: F-Outputs for the TCP_Send Functon Block To create the Send functon block n the structure tree 1. In the structure tree, open Confguraton, Resource, Protocols, Send/Receve over TCP, Functon Blocks, New. 2. Select the Send functon block and clck OK. 3. Rght-clck the Send functon block, and then clck Edt. The wndow for assgnng varables to the functon blocks appears. Connect the nputs of the Send functon block n the structure tree to the same varables that have been prevously connected to the F-Outputs of the TCP_Send functon block n the user program. Inputs Type ID DWORD LEN INT REQ BOOL Table 235: Input System Varables Page 260 of 386 HI E Rev. 4.01

261 Communcaton 8 Send & Receve TCP Connect the followng outputs of the Send functon block n the structure tree to the same varables that have been prevously connected to the F-Inputs of the TCP_Send functon block n the user program. Outputs Ack Busy Done ERROR STATUS Type BOOL BOOL BOOL BOOL DWORD Table 236: Output System Varables Data Send data Table 237: Send Data Descrpton Any varables can be created n the Process Varables tab. Offsets and types of the receved varables must be dentcal wth offsets and types of the transmtted varables of the communcaton partner. The followng steps are essental to operate the TCP_Send functon block: The send varables must be created n the Process Varables tab of the Send dalog box. Offsets and types of the receved varables must be dentcal wth offsets and types of the transmtted varables of the communcaton partner. 1. In the user program, set the dentfcaton number of the TCP connecton on the A_ID nput. 2. In the user program, set the expected length (n bytes) of the varables to be sent on the A_Len nput. 3. In the user program, set the A_Req nput to TRUE. The functon block reacts to a rsng edge on A_Req. The A_Busy output s set to TRUE untl the varables have been sent. Afterwards, A_Busy s set to FALSE and A_Done s set to TRUE. If the sendng process was not successful, the A_Error output s set to TRUE and an error code s output to A_Status. HI E Rev Page 261 of 386

262 8 Send & Receve TCP Communcaton TCP_Receve Fgure 75: Functon Block TCP_Receve The TCP_Receve functon block s used to receve predefned varables from the communcaton partner. A functon block wth the same varables and offsets, e.g., TCP_Send, must be confgured n the communcaton partner. To confgure the functon block, drag t from the functon block lbrary onto the user program (see also Chapter 13.1). Inputs and Outputs of the Functon Block wth Prefx A: These nputs and outputs can be used to control and evaluate the functon blocks usng the user program. The prefx A means Applcaton. A-Inputs Descrpton Type A_Req The rsng edge starts the functon block. BOOL A_Id Identfcaton number of the confgured TCP connecton to the INT communcaton partner from whch data should be receved. A_Tmo Receve tmeout TIME If no data are receved wthn the tmeout, the functon block stops and an error message appears. If the A_Tmo nput s not used or set to zero, the tmeout s deactvated. A_RLen A_RLen s the expected length of the varables to be receved, expressed n bytes. A_RLen must be greater than zero and must not end wthn a varable. INT Table 238: A-Inputs for the TCP_Receve Functon Block Page 262 of 386 HI E Rev. 4.01

263 Communcaton 8 Send & Receve TCP A_Outputs Descrpton Type A_Busy TRUE: Data s stll beng receved. BOOL A_Vald TRUE: The data recepton ended wthout error. BOOL ERROR TRUE: An error occurred BOOL FALSE: No error A_Status The status and error code of the functon block and of the TCP connecton are output on A_Status. DWOR D A_Len Number of receved bytes. INT Table 239: A-Outputs for the TCP_Receve Functon Block Inputs and Outputs of the Functon Block wth Prefx F: These nputs and outputs of the functon block establsh the connecton to the Receve functon block n structure tree. The prefx F means Feld. Common varables are used to connect the Receve functon block (n the Functon Blocks drectory) to the TCP_Receve functon block (n the user program). These must be created beforehand usng the Varable Edtor. Connect the F-Inputs of the TCP_Receve functon block n the user program to the same varables that wll be connected to the outputs of the Receve functon block n the structure tree. F-Inputs Type F_Ack BOOL F_Busy BOOL F_Vald BOOL F_Error BOOL F_Status DWORD F_Len INT Table 240: A-Inputs for the TCP_Receve Functon Block Connect the F-Outputs of the TCP_Receve functon block n the user program to the same varables that wll be connected to the nputs of the Receve functon block n the structure tree. F-Outputs Type F_Req BOOL F_Id DWORD F_Tmo INT F_RLen INT Table 241: F-Outputs for the TCP_Receve Functon Block HI E Rev Page 263 of 386

264 8 Send & Receve TCP Communcaton To create the correspondng Receve functon block n the structure tree: 1. In the structure tree, open Confguraton, Resource, Protocols, Send/Receve over TCP, Functon Blocks, New. 2. Select the Receve functon block and clck OK. 3. Rght-clck the Receve functon block, and then clck Edt. The wndow for assgnng varables to the functon blocks appears. Connect the nputs of the Receve functon block n the structure tree to the same varables that have been prevously connected to the F-Outputs of the TCP_Receve functon block n the user program. Inputs Type ID INT REQ BOOL RLEN INT TIMEOUT TIME Table 242: Input System Varables Connect the followng outputs of the Receve functon block n the structure tree to the same varables that have been prevously connected to the F-Inputs of the TCP_Receve functon block n the user program. Outputs Type Ack BOOL Busy BOOL ERROR BOOL LEN INT STATUS DWORD VALID BOOL Table 243: Output System Varables Data Descrpton Receve varables Any varables can be created n the Process Varables tab. Offsets and types of the receved varables must be dentcal wth offsets and types of the transmtted varables of the communcaton partner. Table 244: Receve Varables Page 264 of 386 HI E Rev. 4.01

265 Communcaton 8 Send & Receve TCP To operate the TCP_Receve functon block, the followng steps are essental: The receve varables must be created n the Process Varables tab located n the Receve dalog box. Offsets and types of the receve varables must be dentcal wth offsets and types of the send varables of the communcaton partner. 1. In the user program, set the dentfcaton number for the TCP connecton on the A_ID nput. 2. In the user program, set the receve tmeout on the A_Tmo nput. 3. In the user program, set the expected length of the varables to be receved on the A_RLen nput. 4. In the user program, set the A_Req nput to TRUE. The functon block starts wth a rsng edge on A_Req. The A_Busy output s set to TRUE untl the varables have been receved or the receve tmeout has expred. Afterwards, A_Busy s set to FALSE and A_Vald or A_Error to TRUE. If no error occurred durng the varable recepton, the A_Vald output s set to TRUE. The varables defned n the Data tab can be evaluated. If an error occurred durng the varable recepton, the A_Error output s set to TRUE and an error s output to A_Status. HI E Rev Page 265 of 386

266 8 Send & Receve TCP Communcaton TCP_ReceveLne Fgure 76: Functon Block TCP_ReceveLne The TCP_ReceveLne functon block s used for recevng an ASCII character strng wth LneFeed (16#0A) from a communcaton partner. To confgure the functon block, drag t from the functon block lbrary onto the user program (see also Chapter 13.1). Inputs and Outputs of the Functon Block wth Prefx A: These nputs and outputs can be used to control and evaluate the functon blocks usng the user program. The prefx A means Applcaton. A-Inputs Descrpton Type A_Req Rsng edge starts the functon block. BOOL A_Id Identfcaton number of the confgured TCP connecton to the INT communcaton partner from whch data should be receved. A_Tmo Receve tmeout TIME If no data are receved wthn the tmeout, the functon block stops and an error message appears. If the nput s not used or set to zero, the tmeout s deactvated. A_MLen Maxmum length of a lne to be receved, expressed n bytes. The receve varables must created n the Data tab located n the COM functon block. Transmtted bytes = Mn (A_MLen, lne length, length of the data range). INT Table 245: A-Inputs for the TCP_ReceveLne Functon Block Page 266 of 386 HI E Rev. 4.01

267 Communcaton 8 Send & Receve TCP A_Outputs Descrpton Type A_Busy TRUE: Data s stll beng receved. BOOL A_Vald TRUE: The data recepton ended wthout error. BOOL ERROR TRUE: An error occurred BOOL FALSE: No error A_Status The status and error code of the functon block and of the TCP DWORD connecton are output on A_Status. A_Len Number of receved bytes. INT Table 246: A-Outputs for the TCP_ReceveLne Functon Block Inputs and Outputs of the Functon Block wth Prefx F: These nputs and outputs of the functon block establsh the connecton to the ReceveLne functon block n structure tree. The prefx F means Feld. Common varables are used to connect the ReceveLne functon block n the structure tree (located n the Functon Blocks drectory) to the TCP_ReceveLne functon block (n the user program). These must be created beforehand usng the Varable Edtor. Connect the F-Inputs of the TCP_ReceveLne functon block n the user program to the same varables that wll be connected to the outputs of the ReceveLne functon block n the structure tree. F-Inputs Type F_Ack BOOL F_Busy BOOL F_Vald BOOL F_Error BOOL F_Status DWORD F_Len INT Table 247: F-Inputs for the TCP_ReceveLne Functon Block Connect the F-Outputs of the TCP_ReceveLne functon block n the user program to the same varables that wll be connected to the nputs of the ReceveLne functon block n the structure tree. F-Outputs Type A_Req BOOL A_Id INT A_Tmo TIME A_MLen INT Table 248: A-Outputs for the TCP_ReceveLne Functon Block HI E Rev Page 267 of 386

268 8 Send & Receve TCP Communcaton To create the correspondng ReceveLne functon block n the structure tree 1. In the structure tree, open Confguraton, Resource, Protocols, Send/Receve over TCP, Functon Blocks, New. 2. Select the ReceveLne functon block and clck OK. 3. Rght-clck the ReceveLne functon block, and then clck Edt. The wndow for assgnng varables to the functon blocks appears. Connect the nputs of the ReceveLne functon block n the structure tree to the same varables that have been prevously connected to the F-Outputs of the TCP_ReceveLne functon block n the user program. Inputs Type ID INT MLEN INT REQ BOOL TIMEOUT TIME Table 249: Input System Varables Connect the followng outputs of the ReceveLne functon block n the structure tree to the same varables that have been prevously connected to the F-Inputs of the TCP_ReceveLne functon block n the user program. Outputs Type ACK BOOL BUSY BOOL ERROR BOOL LEN INT STATUS DWORD VALID BOOL Table 250: Output System Varables Data Descrpton Receve varables The Process Varables tab should only contan varables of type BYTE. Offsets of the varables must be dentcal wth offsets of the varables of the communcaton partner. Table 251: Receve Varables Page 268 of 386 HI E Rev. 4.01

269 Communcaton 8 Send & Receve TCP To operate the TCP_ReceveLne functon block, the followng steps are essental: The receve varables of type BYTE must be created n the tab Process Varables located n the ReceveLne dalog box. Offsets of the receve varables must be dentcal wth offsets of the send varables of the communcaton partner. 1. In the user program, set the dentfcaton number for the TCP connecton on the A_ID nput. 2. In the user program, set the receve tmeout on the A_Tmo nput. 3. In the user program, set the maxmum length of the lne to be receved on the A_MLen nput. A_Mlen must be greater than zero and determnes the sze of the receve buffer n bytes. If the receve buffer s full and a lne end has not yet occurred, the readng process ends and no error message appears. The number of receved bytes s output to the A_Len output: Receved bytes = Mn (A_MLen, lne length, length of the data range). 4. In the user program, set the A_Req nput to TRUE. The functon block reacts to a rsng edge on A_Req. The A_Busy output s set to TRUE f the receve buffer s full or the end of lne LneFeed s receved or the receve tme-put has expred. Afterwards, A_Busy s set to FALSE and A_Vald or A_Error to TRUE. If no error occurred durng the lne recepton, the A_Vald output s set to TRUE. The varables defned n the Data tab can be evaluated. If an error occurred durng the lne recepton, the A_Error output s set to TRUE and an error s output to A_Status. HI E Rev Page 269 of 386

270 8 Send & Receve TCP Communcaton TCP_ReceveVar Fgure 77: Functon Block TCP_ReceveVar The TCP_ReceveVar functon block s used to evaluate data packets wth varable length and contanng a length feld. To confgure the functon block, drag t from the functon block lbrary onto the user program (see also Chapter 13.1). Functonal Descrpton The receved data packets must have the structure represented n the fgure below (e.g., Modbus protocol). Modfyng the nput parameters A_LfPos, A_LfLen, A_LfFac, A_LfLen, the receved data packets can be adapt to any protocol format. The receved data packet s composed of a header and a data range. The header contans data such as partcpant address, telegram functon, length feld etc. requred for establshng communcaton. To evaluate the data range, separate the header and read the length feld. The sze of the header s entered n the A_LfAdd parameter. The length of the data range must be read from the length feld of the data packet currently read. The poston of the length feld s entered n A_LfPos. The sze of the length feld expressed n bytes s entered n LfLen. If the length s not expressed n bytes, the correspondng converson factor must be entered n A_LfFac (e.g., 2 for WORD or 4 for DOUBLE WORD). Page 270 of 386 HI E Rev. 4.01

271 Communcaton 8 Send & Receve TCP A_LfPos Header Length feld A_LfLen A_LfAdd Data feld Fgure 78: Data Packet Structure Inputs and Outputs of the Functon Block wth Prefx A These nputs and outputs can be used to control and evaluate the functon blocks usng the user program. The prefx A means Applcaton. A-Inputs Descrpton Type A_Req Rsng edge starts the functon block. BOOL A_Id Identfcaton number (ID) of the confgured TCP connecton DWORD to the communcaton partner from whch the data should be receved. A_Tmo Receve tmeout INT If no data are receved wthn the tmeout, the functon block stops and an error message appears. If the nput s not used or set to zero, the tmeout s deactvated. A_LfPos Start poston of the length feld n the data packet; the USINT numberng begns wth zero. (measured n bytes) A_LfLen Sze of the A_LfLen length feld n bytes. USINT Permtted: 1, 2 or 4 bytes. A_LfFac Converson factor n bytes f the value set n the length feld USINT s not expressed n bytes. If the nput s not used or set to zero, 1 s used as default value. A_LfAdd Sze of the header n bytes. USINT Table 252: A-Inputs for the TCP_ReceveVar Functon Block HI E Rev Page 271 of 386

272 8 Send & Receve TCP Communcaton A-Outputs Descrpton Type A_Busy TRUE: Data s stll beng receved. BOOL A_Vald TRUE: The data recepton ended wthout error. BOOL ERROR TRUE: An error occurred durng the readng process BOOL FALSE: No error A_Status The status and error code of the functon block and of the DWORD TCP connecton are output on A_Status. A_Len Number of receved bytes. INT Table 253: A-Outputs for the TCP_ReceveVar Functon Block Inputs and Outputs of the Functon Block wth Prefx F: These nputs and outputs of the functon block establsh the connecton to the ReceveVar functon block n structure tree. The prefx F means Feld. Common varables are used to connect the ReceveVar functon block n the structure tree (located n the Functon Blocks drectory) to the TCP_ReceveVar functon block (n the user program). These must be created beforehand usng the Varable Edtor. Connect the F-Inputs of the TCP_ReceveVar functon block n the user program to the same varables that wll be connected to the outputs of the ReceveVar functon block n the structure tree. F-Inputs Type F_Ack BOOL F_Busy BOOL F_Vald BOOL F_Error BOOL A_Status DWORD A_Len INT Table 254: F-Inputs for the TCP_ReceveVar Functon Block Connect the F-Outputs of the TCP_ReceveVar functon block n the user program to the same varables that wll be connected to the nputs of the ReceveVar functon block n the structure tree. F-Outputs Type F_Req BOOL F_Id INT F_Tmo TIME F_LfPos USINT A_LfLen USINT A_LfFac USINT A_LfAdd USINT Table 255: F-Outputs for the TCP_ReceveVar Functon Block Page 272 of 386 HI E Rev. 4.01

273 Communcaton 8 Send & Receve TCP To create the ReceveVar functon block n the structure tree 1. In the structure tree, open Confguraton, Resource, Protocols, Send/Receve over TCP, Functon Blocks, New. 2. Select the ReceveVar functon block and clck OK. 3. Rght-clck the Receve functon block, and then clck Edt. The wndow for assgnng varables to the functon blocks appears. Connect the nputs of the ReceveVar functon block n the structure tree to the same varables that have been prevously connected to the F-Outputs of the TCP_ReceveVar functon block n the user program. Inputs Type ID INT Lf Add USINT Lf Fac USINT Lf Len USINT Lf Pos USINT REQ BOOL TIMEOUT TIME Table 256: Input System Varables Connect the followng outputs of the ReceveVar functon block n the structure tree to the same varables that have been prevously connected to the F-Inputs of the TCP_ReceveVar functon block n the user program. Outputs Type ACK BOOL BUSY BOOL ERROR BOOL LEN INT STATUS DWORD VALID BOOL Table 257: Output System Varables Data Descrpton Receve varables Any varables can be created n the Process Varables tab. Offsets and types of the receved varables must be dentcal wth offsets and types of the transmtted varables of the communcaton partner. Table 258: Receve Varables HI E Rev Page 273 of 386

274 8 Send & Receve TCP Communcaton To operate the TCP_ReceveVar functon block, the followng steps are essental: The receve varables must be created n the Process Varables tab located n the Varables dalog box. Offsets and types of the receve varables must be dentcal wth offsets and types of the send varables of the communcaton partner. 1. In the user program, set the dentfcaton number for the TCP connecton on the A_ID nput. 2. In the user program, set the receve tmeout on the A_Tmo nput. 3. In the user program, set the parameters A_LfPos, A_LfLen, A_LfFac and A_LfAdd. 4. In the user program, set the A_Req nput to TRUE. The functon block starts wth a rsng edge on A_Req. The A_Busy output s set to TRUE untl the varables have been receved or the receve tmeout has expred. Afterwards, A_Busy s set to FALSE and A_Vald or A_Error to TRUE. If no error occurred durng the varable recepton, the A_Vald output s set to TRUE. The varables defned n the Data tab can be evaluated. The A_Len output contans the amount of data n bytes that was actually read. If an error occurred durng the varable recepton, the A_Error output s set to TRUE and an error s output to A_Status. Page 274 of 386 HI E Rev. 4.01

275 Communcaton 8 Send & Receve TCP 8.8 Control Panel (Send/Receve over TCP) The Control Panel can be used to verfy and control the settngs for the Send/Receve protocol. Detals about the current status of the Send/Receve protocol (e.g., dsturbed connectons) are dsplayed. To open Control Panel for montorng the Send/Receve protocol 1. In the structure tree, clck Resource. 2. Clck Onlne on the Acton Bar. 3. In the System Log-n wndow, enter the access data to open the Control Panel for the resource. 4. In the structure tree for the Control Panel, select Send/Receve Protocol Vew box for General Parameters The vew box dsplays the followng values of the Send/Receve protocol. Element Descrpton Name TCP SR Protocol µp Load (planned) [%] See Chapter µp load (actual) [%] Undsturbed Connectons Number of undsturbed connectons Dsturbed Connectons Dsturbed Connecton Count Table 259: S&R Protocol Vew Box Vew box for TCP connectons The vew box dsplays the followng values of the selected TCP connectons. Element Descrpton Name TCP connecton Partner tmeout Yes: Partner request tmeout expred No: Partner request tmeout not expred Connecton State Current state of ths connecton 0x00: Connecton OK 0x01: Connecton closed 0x02: Server wats for the connecton to be establshed 0x04: Clent attempts to establsh connecton 0x08: Connecton s blocked Peer Address IP address of the communcaton partner. Peer Port Port of the communcaton partner. Own Port Port of ths controller Watchdog Tme [ms] It s the actual partner request tmeout wthn whch the communcaton partner receved data at least one tme after data has been sent. Error Code Error code (see Chapter 8.8.3) Tmestamp Error Code [ms] Tmestamp for the last reported fault Range of values: Seconds snce 1/1/1970 n mllseconds Receved Bytes [Bytes] Number of bytes receved n ths TCP connecton Transmtted Bytes [Bytes] Number of bytes sent n ths TCP connecton Table 260: Vew Box of the Modbus Slave HI E Rev Page 275 of 386

276 8 Send & Receve TCP Communcaton Error Code of the TCP Connecton The error codes can be read from the Error Code varable. For each confgured connecton: The connecton state s composed of the connecton state and error code of the last operaton. Error Code Error Code Descrpton Decmal Hexadecmal 0 16#00 OK 4 16#04 Interrupted system call 5 16#05 I/O Error 6 16#06 Devce unknown 9 16#09 Invald socket descrptor 12 16#0C No memory avalable 13 16#0D Access Dened 14 16#0E Invald address 16 16#10 Devce occuped 22 16#16 Invald value (e.g., n the length feld) 23 16#17 Descrptor table s full 32 16#20 Connecton aborted 35 16#23 Operaton s blocked 36 16#24 Operaton currently n process 37 16#25 Operaton already n process 38 16#27 Target address requred 39 16#28 Message to long 40 16#29 Incorrect protocol type for the socket 42 16#2A Protocol not avalable 43 16#2B Protocol not supported 45 16#2D Operaton on socket not supported 47 16#2F The address s not supported by the protocol 48 16#30 Address already n use 49 16#31 The address cannot be assgned 50 16#32 Network s down 53 16#35 Software caused connecton abort 54 16#36 Connecton reset by peer 55 16#37 No buffer space avalable 56 16#38 Socket already connected 57 16#39 Socket not connected 58 16#3A Socket closed 60 16#3C Operaton tme expred 61 16#3D Connecton refused (from peer) 65 16#41 No route to peer host 78 16#4E Functon not avalable #FE Tmeout occurred #FF Connecton closed by peer Table 261: Error Codes of the TCP Connecton Page 276 of 386 HI E Rev. 4.01

277 Communcaton 8 Send & Receve TCP Addtonal Error Code Table for the Functon Blocks The error codes for the functon blocks are only output to A_Status of the S&R TCP functon blocks. Error Code Error Code Descrpton Decmal Hexadecmal #81 No connecton exsts wth ths dentfer #82 Length s greater than or equal to null #83 Only cyclc data s permtted for ths connecton #84 IOC: Invald state #85 Tmeout value too large #86 Internal program error #87 Confguraton error #88 Transferred data does not match data area #89 Functon block stopped #8A Tmeout occurred or transmsson blocked #8B Another functon block of ths type s already actve on ths connecton Table 262: Addtonal Error Codes Connecton State Error Code Descrpton Hexadecmal 16#00 Connecton OK 16#01 Connecton closed 16#02 Server wats for the connecton to be establshed 16#04 Clent attempts to establsh connecton 16#08 Connecton s blocked Table 263: Connecton State Partner Connecton State Protocol State Descrpton Decmal 0 No connecton 1 Connecton OK Table 264: Partner's Connecton State HI E Rev Page 277 of 386

278 9 SNTP Protocol Communcaton 9 SNTP Protocol (Smple Network Tme Protocol) The SNTP protocol s used to synchronze the tme of the SNTP clent over the SNTP server. HIMax/HIMatrx controllers can be confgured and used as SNTP server and/or as SNTP clent. The SNTP standard n accordance wth RFC 2030 (SNTP verson 4) apples wth the lmtaton that only the uncast mode s supported. Equpment and system requrements Element Controller Actvaton Interface Descrpton HIMax wth COM module or only wth processor module HIMatrx: CPU OS versons beyond 7 and COM OS versons beyond 12 Ths functon s actvated by default n all HIMax/HIMatrx systems. Ethernet 10/100/1000BaseT Table 265: Equpment and System Requrements for the S&R TCP 9.1 SNTP Clent To synchronze tme settngs, the SNTP clent always uses the avalable SNTP server havng the hghest prorty. One SNTP clent can be confgured for tme synchronzaton n each resource. Tme synchronzaton of a remote I/O performed by a HIMax controller. If a SNTP clent s confgured on a HIMax controller, the nternal SNTP server of the HIMax controller s shut down. An SNTP server must be set up on the HIMax communcaton module connected to the remote I/O to ensure that the HIMax controller performs the tme synchronzaton of the remote I/O. To create a new SNTP clent 1. In the structure tree, open Confguraton, Resource, Protocols. 2. Rght-clck Protocols, then clck New, SNTP Clent. A new SNTP Clent s created. 3. Rght-clck the SNTP clent, and clck Propertes and select the COM module. The dalog box for the SNTP clent contans the followng parameters: Page 278 of 386 HI E Rev. 4.01

279 Communcaton 9 SNTP Protocol Element Type Name Module Behavor on CPU/COM Connecton Loss Actvate Max. µp Budget Max. µp budget n [%] Descrpton Current SNTP Verson Reference Stratum Clent Tme Request Interval [s] Descrpton SNTP Clent Name for the SNTP clent, composed of a maxmum of 32 characters. Selecton of the COM or processor module wthn whch the protocol s processed. If the connecton of the processor module to the communcaton module s lost, the nput varables are ntalzed or contnue to be used unchanged n the process module, dependng on ths parameter. For nstance, f the communcaton module s removed when communcaton s runnng. Adopt Intal Data Input varables are reset to ther ntal values. Retan Last Value The nput varables retans the last value. It s not taken nto account by the operatng system. Parameter was retaned due to CRC and reload stablty. It s not taken nto account by the operatng system. Parameter was retaned due to CRC and reload stablty. Any unque descrpton for the SNTP clent The current SNTP verson s dsplayed. The stratum of an SNTP clent specfes the precson of ts local tme. The lowest the stratum, the more precse ts local tme. Zero means an unspecfed or not avalable stratum (not vald). The SNTP server currently used by an SNTP clent s the one that can be reached and has the hghest prorty. If the stratum of the current SNTP server s lower than the stratum of the SNTP clent, the resource adopts the tme of the current SNTP server. If the stratum of the current SNTP server s hgher than the stratum of the SNTP clent, the resource does not adopt the tme of the current SNTP server. If the stratum of the current SNTP server s dentcal wth the stratum of the SNTP clent, two dfferent cases result: If the SNTP Clent (resource) only operates as SNTP clent, the resource adopts the tme of the current SNTP server. If the SNTP clent (resource) also operates as SNTP server, the resource adopts the half value of the tme dfference to the current SNTP server per SNTP clent request (tme approaches slowly). Range of values: Default value: 15 Tme nterval wthn whch the current SNTP Server performs the tme synchronzaton. The Clent Request Tme Interval set n the SNTP clent must be hgher than the tmeout set n the SNTP server. Range of values: s Default value: 16 Table 266: SNTP Clent Propertes HI E Rev Page 279 of 386

280 9 SNTP Protocol Communcaton 9.2 SNTP Clent (Server Informaton) The connecton to the SNTP server s confgured n the SNTP Server Info. 1 to 4 SNTP Server Info can be subordnate to a SNTP clent. To create a new SNTP Server Info 1. In the structure tree, open Confguraton, Resource, Protocols, SNTP Clent. 2. Rght-clck SNTP Clent, and then clck New, SNTP Server Info. A new SNTP server Info s created. 3. Rght-clck the SNTP-Server Info, clck Propertes, and then select the COM Module. The dalog box for the SNTP Server Info contans the followng parameters: Element Type Name Descrpton IP Address SNTP Server Prorty SNTP Server Tmeout[s] Descrpton SNTP Server Info Name for the SNTP server. A maxmum of 31 characters. Descrpton for the SNTP server. A maxmum of 31 characters. IP address of the resource or PC n whch the SNTP Server s confgured. Default value: Prorty wth whch the SNTP clent addresses ths SNTP server. The SNTP servers confgured for the SNTP clent should have dfferent prortes. Range of values: 0 (lowest prorty) to (hghest prorty). Default value: 1 The tmeout n the SNTP server must be set lower than the value for the Tme Request Interval n the SNTP clent. Range of values: s Default value: 1 Table 267: SNTP Server Info Propertes 9.3 SNTP Server The SNTP server accepts the requests from a SNTP clent and sends back to the SNTP clent ts current tme. To create a new SNTP server 1. In the structure tree, open Confguraton, Resource, Protocols. 2. Rght-clck Protocols, and then clck New, SNTP Server. A new SNTP server s created. 3. Rght-clck the SNTP Server, clck Propertes, and then clck the COM Module. The dalog box for the SNTP server contans the followng parameters: Page 280 of 386 HI E Rev. 4.01

281 Communcaton 9 SNTP Protocol Element Type Name Module Actvate Max. µp Budget Max. µp budget n [%] Behavor on CPU/COM Connecton Loss Descrpton Current SNTP Verson Stratum of Tmeserver Descrpton SNTP Server Name for the SNTP server, composed of a maxmum of 31 characters. Selecton of the COM or processor module wthn whch the protocol s processed. Actvated: Adopt the µp budget lmt from the Max. µp Budget n [%] feld. Deactvated: Do not use the µp budget lmt for ths protocol. Maxmum µp load of the module that can be used for processng the protocols. Range of values: % Default value: 30% If the connecton of the processor module to the communcaton module s lost, the nput varables are ntalzed or contnue to be used unchanged n the process module, dependng on ths parameter. For nstance, f the communcaton module s removed when communcaton s runnng. Adopt Intal Data Input varables are reset to ther ntal values. Retan Last Value The nput varables retans the last value. Descrpton for the SNTP The current SNTP verson s dsplayed. The stratum of an SNTP server specfes the precson of ts local tme. The lowest the stratum, the more precse the local tme. Zero means an unspecfed or not avalable stratum (not vald). The value for the SNTP server stratum must be lower or equal to the stratum value of the requestng SNTP clent. Otherwse, the SNTP clent does not accept the SNTP server tme. Range of values: Default value: 14 Table 268: SNTP Server Propertes HI E Rev Page 281 of 386

282 10 X OPC Server Communcaton 10 X OPC Server The HIMA X-OPC server serves as transmsson nterface between HIMax/HIMatrx controllers and thrd-party systems that are equpped wth an OPC nterface. OPC means Openess, Productvty & Collaboraton and s based on the technology developed by Mcrosoft. Ths technology allows the user to nterconnect process control systems, vsualzaton systems and controllers from dfferent manufacturers, and t enables them to exchange data wth one another (see also After nstallaton, the HIMA X OPC server s run on a PC as Wndows servce. SILworX s used to confgure and operate the entre X OPC server. The X OPC server can be loaded, started and stopped n the SILworX Control Panel lke a controller. The X OPC server supports the followng specfcatons: Data Access (DA) versons 1.0, 2.05a and 3.0 DA s used to ensure process data transmsson from the HIMax/HIMatrx controller to the OPC clent. Each global varable of the HIMax/HIMatrx controller can be transferred to a OPC clent. Alarm&Event (A&E) verson 1.10 A&E s used to transfer alarms and events from HIMax/HIMatrx controller to the OPC clent. Each global varable of the HIMax/HIMatrx controller can be montored usng sequence of events recordng. Events are state modfcatons of a varable that are performed by the plant or controllers and are provded wth a tmestamp. Alarms are events that sgnalze an ncreasng rsk potental. Events are dvded n Boolean and scalar events, see Chapter Equpment and System Requrements Element Actvaton PC Operatng System Requrements to the host PC Descrpton Software actvaton code requred, see Chapter 3.4. The followng lcenses can be actvated on an ndvdual bass: Data Access (DA) Server Alarm and Events (A&E) Server The OPC server can run on an x86 based PC wth the followng operatng systems: Wndows XP Professonal (mnd. Servce Pack 2) (32-bt) Wndows Server 2003 (32-bt) Wndows Vsta Ultmate (32-bt) Wndows Vsta Busness (32-bt) Mnmum requrements to the host PC: Pentum 4 1 GByte (XP) or 2.5 GByte RAM (Vsta) The network card must be desgned accordng to the data traffc (100 Mbt/s or 1 Gbt/s). The mnmum requrements only apply to the operaton for a X OPC server f no addtonal applcatons, such as SILworX or Word, s run on the host PC. Table 269: Equpment and System Requrements for the X-OPC Server Page 282 of 386 HI E Rev. 4.01

283 Communcaton 10 X OPC Server 10.2 X-OPC Server Propertes Element OPC server Safety-related Interface Data exchange Ethernet Network Global Varables Permssble Types of varables Impermssble ASCII characters HIMax/HIMatrx Controllers safeethernet Connecton X OPC Server X-OPC Clents Data Access Tags Alarm & Event Event Defntons Table 270: X-OPC Server Propertes Descrpton The X OPC server supports the followng functons: OPC Data Access Custom Interface, versons 1.0, 2.05a and 3.0. OPC Alarm & Event Interfaces 1.10 The X-OPC server s run on a PC and s not safety-related. Recommended: Ethernet 1GBt/s Data exchange va safeethernet. The underlyng Ethernet network speed must be desgned accordng to the data traffc (mn. 100 Mbt/s, recommended 1GBt/s). Only global varables from the confguraton context may be used! All data types that can be created n SILworX are permtted. The followng characters are reserved and must not be used (e.g., for global varables):! " # ',. / \` An X-OPC server can support a maxmum of 255 HIMax/HIMatrx controllers. The X-OPC server can exchange 128 kb n each safeethernet connecton. 10 X-OPC servers can be operated on a host PC. An X-OPC server supports 10 X-OPC clents. A Data Access server supports a maxmum of DA tags. Defnton: Tags: Data provded by the X-OPC server. Tags correspond to the defned global varables. Items: Data requred by the OPC clent. An X-OPC Alarm & Event server supports a maxmum of event defntons. HI E Rev Page 283 of 386

284 10 X OPC Server Communcaton 10.3 HIMax Controller Propertes for X-OPC Connecton Element HIMax HIMatrx L3 HIMatrx L2 Descrpton Process data volume 128 kb 128 kb 16 kb Process data volume that a HIMA controller may exchange for each safeethernet connecton to one X- OPC server. Fragment sze 1100 byte 1100 bytes 900 byte In each HIMax cycle, only a vew s sent to the X-OPC server. Ethernet nterfaces 10/100/ 1000BaseT Maxmum number of system events (CPU event) Max. Number of I/O Events (I/O event) 10/ 100BaseT 10/ 100BaseT Ethernet nterfaces n use can smultaneously be used for addtonal protocols n. a The events defned as CPU events are created on the processor module. The processor module creates all the events n each of ts cycle. Ths allows one to record and evaluate the value of each global varable as an event n. a n. a The event defned as I/O events can only be created on SOE I/O modules (e.g., AI or DI 32 04). The processor module creates all the events n each of ts cycle. Event memory sze (wth enabled SOE lcense only) Max. Number of X-OPC Server n. a. non-applcable n. a Non-volatle event buffer of the HIMax processor module. If the event buffer s full, no new events can be stored as long as at least one X-OPC A&E server has not read an event entry and thus marked t as to be overwrtten Maxmum number of X- OPC servers can access a HIMA controller and smultaneously read events from the event buffer of the processor module. Table 271: HIMax Controller Propertes for X-OPC Connecton Range of values for the UTC tmestamp (Unversal Tme Coordnated): sec fracton snce 1970 n [udword] ms fracton of the seconds as [udword] of Default value: 01/01/2000 / 00:00:00 An automatc change to/out of daylght-savng tme s not supported. Page 284 of 386 HI E Rev. 4.01

285 Communcaton 10 X OPC Server 10.4 Actons Requred as a Result of Changes The followng table shows the actons that must be performed after a change n the ndvdual systems. Type of Change Changes to HIMax HIMatrx X-OPC DA Add tags C+D C+D C+D Tag name (GV change of name) C+D C+D C+D Delete tags C+D C+D C+D Change fragments (Parameters and Add/Delete) C+D C+D C+D A&E Add event defnton C+D n.a. C+D Delete Event Defnton C+D n.a. C+D Change Event Source C+D n.a. C+D Change Alarm Texts - n.a. C+D Change Alarm Severty - n.a. C+D Change Ack Requred parameter - n.a. C+D Change Alarm Values wth scalar C+D n.a. C+D events Change the Alarm at False C+D n.a. C+D parameter wth Boolean events Change name C+D n.a. C+D Connect I/O channel to GV C+R n.a. - Connect state varables to GV C+R n.a. - In general Change safeethernet parameters C+D C+D C+D Table 272: Actons Requred as a Result of Changes C: Code generaton requred R: Reload requred D: Download requred n.a.: non-applcable -: No acton requred 10.5 Forcng Global Varables on I/O Modules If global varables connected to a process value are forced, the forced global varables have no effect on the global varables connected to the parameters ->State LL, L,- N, H, HH. Ths partcularty also apples f ths alarms are confgured n the Alarm&Event Edtor. When testng, these varables must be forced ndvdually. HI E Rev Page 285 of 386

286 10 X OPC Server Communcaton 10.6 Confgurng an OPC Server Connecton Ths example shows how to confgure a redundant X-OPC server connecton to a HIMax controller. The X-OPC servers provde the process varables and event values of the HIMax controller to the OPC clents. The OPC clents access these process varables and event values and represent them on ther user nterface Software requred: SILworX X-OPC server OPC clent SILworX s used to confgure and operate the entre X OPC server. The X-OPC server can be loaded, started and stopped n the SILworX Control Panel lke a controller Requrements for Operatng the X-OPC Server: The Ethernet network should have a bandwdth of at least 100 Mbt/s (better 1GBt/s). The system tme of computer and server must be synchronzed, e.g., usng SNTP. Make sure that the data records for Data Access and Alarm & Events on the controller, X-OPC servers and OPC clents match one another. Fgure 79: Redundant X-OPC Operaton Page 286 of 386 HI E Rev. 4.01

287 Communcaton 10 X OPC Server Installaton on Host PC The X-OPC server must be nstalled on the respectve host PCs. Note down the system ID and the number of the PADT port. These values are requred for generatng the lcense key! Fgure 80: Wzard for Installng the X-OPC Server To nstall the X-OPC server on the frst host PC Start the X-OPC.exe on each host PC and follow the nstructons of the nstall wzard. 1. Enter the followng data for the X-OPC server: - System ID: PADT port: An arbtrary name for the X-OPC server (t s dsplayed n the OPC clent). 2. To nstall the X-OPC server, clck Next> Fgure 81: Wzard for Installng the X-OPC Server HI E Rev Page 287 of 386

288 10 X OPC Server Communcaton To nstall the X-OPC server on the second host PC Frst determne the class ID of the frst X-OPC server pror to nstallng the second X-OPC server! If one OPC clent s redundantly connected to two X-OPC servers, some OPC clent systems expect that the class IDs of the two X-OPC servers are dentcal. Frst determne the class ID of the frst X-OPC server (e.g., usng the OPC clent) and note t down. Start the X-OPC.exe fle on the second host PC and follow the nstructons of the nstall wzard. 1. Enter the followng data for the X-OPC server: - System ID: PADT port: An arbtrary name for the X-OPC server (t s dsplayed n the OPC clent). PADT port and HH port of the second X-OPC server may be dentcal wth the frst one, f the X-OPC servers are run on dfferent PCs. 2. Clck Contnue> to confrm. To set the same class ID on the second host PC 1. Choose the CLSID settng manual for DA and AE. 2. Enter the class ID of the frst X-OPC server n the CLSID felds. 3. To nstall the X-OPC server, clck Next> Fgure 82: Settng the Class ID of the Second X-OPC Server Manually Page 288 of 386 HI E Rev. 4.01

289 Communcaton 10 X OPC Server To automatcally start the X-OPC servers after restartng the PCs 1. In Wndows, go to Start, Settngs, Control Panel, Admnstraton, Servces and select X-OPC Server from the lst. 2. Rght-clck the OPC Server, then select Propertes.. 3. In the General tab, select the Automatc start type. To verfy f the X-OPC server s runnng on the PC 1. Open the Wndows Task Manager and select the Processes tab. 2. Check f the X-OPC.exe process s runnng on the PC. If the OPC clent and OPC server are not runnng on the same PC, the DCOM nterface must be adjusted. To do ths, observe the nstructons gven n the manual of the OPC Foundaton Usng OPC va DCOM wtch Mcrosoft Wndows XP Servce Pack 2 Verson 1.10 (see HI E Rev Page 289 of 386

290 10 X OPC Server Communcaton Confgurng the OPC Server n SILworX To create a new OPC server set n SILworX 1. In the structure tree, open Confguraton. 2. Rght-clck Confguraton, and then clck New, OPC-Server Set. A new OPC-Server set s added. 3.Rght-clck OPC Server Set, select Propertes and accept the default values Fgure 83: Redundant X-OPC Operaton To confgure the frst X-OPC server n SILworX 1. In the structure tree, open Confguraton, OPC Server Set. 2. Rght-clck OPC Server Set and select New, OPC Server. A new OPC server s added. 3. Rght-clck OPC Server and select Propertes. - Enter the system ID [SRS] (e.g., 100) - Accept the default settngs. 3. Rght-clck OPC Host and select Edt. The OPC host dalog box for confgurng the IP nterfaces appears. 4. Rght-clck anywhere n the OPC host wndow and select New IP Devce. - Set the PADT port (e.g., 25138). - IP address of the PC on whch the X-OPC server s nstalled (e.g., ). - IP address of the PC on whch the X-OPC server s nstalled (e.g., ). - Defne t as Standard Interface checkng the correspondng checkbox. - Set the HH Port (e.g., 15138) Page 290 of 386 HI E Rev. 4.01

291 Communcaton 10 X OPC Server Confgure the redundant OPC server n the same OPC server set. To confgure the second OPC server 1. In the structure tree, open Confguraton, OPC Server Set. 2. Rght-clck OPC Server Set and select New, OPC Server. A new OPC server s created. 3. Rght-clck OPC Server and select Propertes. - Enter the system ID [SRS] (e.g., 110) - Accept the default settngs. 5. Rght-clck OPC Host and select Edt. The OPC host dalog box for confgurng the IP nterfaces appears. 6. Rght-clck anywhere n the OPC host wndow and select New IP Devce. - Set the PADT port (e.g., 25138). - IP address of the PC on whch the X-OPC server s nstalled (e.g., ). - IP address of the PC on whch the X-OPC server s nstalled (e.g., ). - Defne t as standard nterface checkng the correspondng checkbox. - Set the HH port (e.g., 15138) If a frewall s nstalled on the PC, the TCP/UDP PADT and HH ports for the X-OPC servers must be selected on the Excepton tab of the frewall confguraton Settngs for the OPC Server n the safeethernet Edtor To create the safeethernet connecton between the OPC server and the resource (HIMax controller) 1. In the OPC server set, open the safeethernet Edtor. 2. In the Object Panel, drag the resource anywhere onto the workspace of the safeethernet Edtor. 3. For Alarm & Events, the Actvate SOE parameter s actvated by default. Fgure 84: Redundant X-OPC Operaton The used Ethernet nterfaces of the PCs are represented n the IF CH1 (local) column. The Ethernet nterfaces of the HIMax controller must be selected n the IF CH1 (target) column. The safeethernet parameters of the X-OPC server communcaton are set by default for ensurng the maxmum avalablty. Receve Tmeout = 1000 ms, Response Tme = 500 ms etc. For more nformaton on the safeethernet parameters, refer to Chapter Confgurng the X-OPC Data Access Server n SILworX To create the fragment defntons for the safeethernet connecton HI E Rev Page 291 of 386

292 10 X OPC Server Communcaton Requrement: The safeethernet Edtor of the OPC server must be opened. 1. Rght-clck the row correspondng to the resource to open ts context menu. 2. Select Detal Vew to open the detal vew of the safeethernet connecton. 3. Clck the Fragment Defntons tab. 4. Rght-clck anywhere n the workspace and select New Fragment Defnton. The Prorty column s used to defne how often ths fragment should be sent compared to the other fragments (a fragment's sze s 1100 bytes). For fragment defntons, frst use the standard settng for Prorty 1, see also Chapter Clck the OPC Server Set<->Resource tab. To add the OPC receve varables OPC receve varables are sent from the resource to the OPC server. 1. Open the detal vew of the X-OPC safeethernet Edtor and select the OPC Server Set<->Resource tab. 2. In the Object Panel, drag a Global Varable onto the OPC Server Set <-Resource area. 3. Double-clck the Fragment Name column and select the Fragment Defnton created beforehand. 4. Repeat these steps for every further OPC receve varables. To add the OPC send varables OPC send varables are sent from the OPC server to the resource. 1. Open the detal vew of the X-OPC safeethernet Edtor and select the OPC Server Set<->Resource tab. 2. In the Object Panel, drag a Global Varable onto the OPC Server Set->Resource area. 3. Double-clck the Fragment Name column and select the Fragment Defnton created beforehand. 4. Repeat these steps for every further OPC send varables. The OPC send and receve varables must be created n the OPC server set one tme only. The varables are automatcally used by both X-OPC servers n the OPC server set. To generate the code and load a resource 1. In the structure tree, select Confguraton, Resource. 2. Clck Code Generaton n the Acton Bar and clck OK to confrm. 3. Thoroughly verfy the messages dsplayed n the logbook and correct potental errors. 4. Load the generated code nto the resource. To generate the code and verfy the OPC set 1. In the structure tree, open Confguraton, OPC Server Set. 2. Clck Code Generaton n the Acton Bar and clck OK to confrm. 3. Thoroughly verfy the messages dsplayed n the logbook and correct potental errors. To load the generated code nto the X-OPC server 1. Rght-clck OPC Server and select Onlne to perform a System Logn. 2. Enter the access data: Page 292 of 386 HI E Rev. 4.01

293 Communcaton 10 X OPC Server - IP address of the PC on whch the X-OPC server s nstalled (e.g., ). - User name: Admnstrator - Password: <empty> - Rghts: Admnstrator 3. Clck Logn to open the Control Panel. 4. In the SILworX menu bar, clck the Resource Download symbol. The code s loaded nto the X-OPC server. 5. In the SILworX menu bar, clck the Resource Cold Start symbol. The X-OPC server s runnng. To open the OPC clent The name of the X-OPC server dsplayed n the OPC clent s composed of : HIMA (manufacturer).servce name (see Chapter ) DA (Data Access). Connect to the X-OPC server. At ths pont, the confgured DA data should be transferred to the OPC clent. HI E Rev Page 293 of 386

294 10 X OPC Server Communcaton Confgurng the X-OPC Alarm&Event Server n SILworX Ths example shows how to connect an X-OPC A&E server to a HIMax controller. The X- OPC A&E server records the events from the HIMax controller va safeethernet and provde them to the OPC clent. The OPC clent accesses these event varables and dsplays them on ts user nterface. To create an Alarm&Event Edtor 1. In the structure tree, open Confguraton, Resource. 2. Rght-clck Resource and select New, Alarm&Events. A new Alarm&Event Edtor s created. To create the Alarm&Events 1. In the structure tree, open Confguraton, Resource. 2. Rght-clck Alarm & Events and select Edt. 3. Select the Event Defnton Bool tab for Boolean events, see Chapter Select the Event Defnton Scalar tab for scalar events, see Chapter In the Object Panel, drag the global varable anywhere onto the workspace of the Alarm & Event Edtor. 6. Enter the event prorty n the safeethernet Edtor, see Chapter Fgure 85: Alarm & Event Edtor Page 294 of 386 HI E Rev. 4.01

295 Communcaton 10 X OPC Server To establsh the acknowledge connecton between both Alarm&Event X-OPC servers: If two Alarm&Event X-OPC servers are operated redundantly, the acknowledgements to confrm the alarms on both X-OPC servers can be synchronzed. To do ths, an acknowledge connecton s created. 1. In the structure tree, open Confguraton, OPC Server Set, New. 2. Rght-clck OPC Server Set and select New, OPC A&E Ack. 3. Select the followng IP connectons n the OPC A&E Ack dalog box. - IF CH1 (OPC Server 1, e.g., ). - IF CH2 (OPC server 1, e.g., ). - IF CH1 (OPC server 2, e.g., ). - IF CH2 (OPC server 2, e.g., ). Fgure 86: Redundant X-OPC Operaton To generate the code and load a resource 1. In the structure tree, select Confguraton, Resource. 2. Clck Code Generaton located on the Acton Bar and clck OK to confrm. 3. Thoroughly verfy the messages dsplayed n the logbook and correct potental errors. 4. Load the generated code nto the resource. To generate the code and verfy the OPC set 1. In the structure tree, open Confguraton, OPC Server Set. 2. Clck Code Generaton located on the Acton Bar and clck OK to confrm. 3. Thoroughly verfy the messages dsplayed n the logbook and correct potental errors. To load the generated code nto the X-OPC server 1. Rght-clck the OPC Server and select Onlne to log n to the system. 2. Enter the access data: - IP address of the PC on whch the X-OPC server s nstalled (e.g., ). - User name: Admnstrator - Password: <empty> - Rghts: Admnstrator 3. Clck Logn to open the Control Panel. 4. In the SILworX menu bar, clck the Resource Download symbol. The code s loaded nto the OPC server. 5. In the SILworX menu bar, clck the Resource Cold Start symbol. The OPC server s runnng. HI E Rev Page 295 of 386

296 10 X OPC Server Communcaton To open the OPC clent The name of the X-OPC server dsplayed n the OPC clent s composed of: HIMA (manufacturer).servce name (see Chapter ) AE (Alarm&Event). Connect to the X-OPC server. At ths pont, the confgured alarms and events should be transferred to the OPC clent. If a controller and an X-OPC A&E server are connected, the X-OPC A&E server must synchronze wth the controller. To do ths, the X-OPC A&E server reads the current state of all the varables defned as events and transfers the upcomng alarms to the OPC clent. An mage of the current controller state can thus be created n the OPC clent. The events are only read at ths moment. After the X-OPC server has synchronzed wth the controller, all the events on the OPC clent are updated. Entres for events wth an older tmestamp are overwrtten wth the currently read states of the event varables Page 296 of 386 HI E Rev. 4.01

297 Communcaton 10 X OPC Server Confgurng the Fragments and Prortes n SILworX Dependng on ts type and for each safeethernet connecton, a HIMA controller can send 128 kb or 16 kb to an X-OPC server, but only one fragment (1100 bytes or 900 bytes) per HIMA CPU cycle. To send more data va a safeethernet connecton, data must be fragmented. The Prorty parameter assocated wth these fragments can be used to defne how often these fragments should be refreshed. Fragments wth the prorty n and fragments wth the prorty m are sent at a rato of n to m tmes. For the reacton tme from the controller to the X-OPC server, also observe the number of SOE fragments and commands (e.g., stop, start). T R = t 1 + t 2 + t 3 +t 4 only apples f the prorty of all fragments for state data s equal to 1 T R Worst Case Reacton Tme t 1 Safety Tme of PES 1 t 2 Number of Fragments * Receve TMO t 3 Safety Tme of X-OPC Server t 4 Delay due to SOE functon; dependng on the number of events and on how the connecton s establshed. The response tme for the nverse drecton can be determned usng the same formula, but only one fragment s usually relevant n ths case, snce the X- OPC server only transfers the data wrtten by OPC clents. Maxmum number of fragments: 1024 Maxmum sze of a fragment: 1100 bytes or 900 bytes Range of values for the prortes: 1 (hghest) to (lowest) Desgnaton Prorty default value Prorty of events (Alarm&Event) 1 Prorty of state values (Alarm&Event) 10 Prorty of the fragment defntons (Data 1 Access) Table 273: Default Values Assocated wth the Prortes HI E Rev Page 297 of 386

298 10 X OPC Server Communcaton Prorty of Fragments for Events (Alarm&Event) The events created by the user n the Alarm&Event Edtor are automatcally fragmented and transferred n fragments. Enter the event prorty n the columns Prorty of Events and Prorty of State Values of the safeethernet Edtor. These prortes are thus vald for all the Alarm&Event fragments of that gven safeethernet connecton. To set the prorty values for Alarm&Event Fragments 1. In the OPC server set, open the safeethernet Edtor. Fgure 87: safeethernet Edtor 2. Double-clck Prorty of Events to modfy the prorty of the events. All event fragments receve the prorty entered n the Prorty of Events column (e.g., 1). Ths s done to defne the prorty wth whch the X-OPC server requres events from the controller. If no events exst n the controller at a gven pont n tme, none s transferred. 3. Double-clck Prorty of State Values to modfy the prorty of the event state values. The fragments for the event state values are assgned wth the prorty entered n the Prorty of State Values column (e.g., 10). The state values of the events are only requred for synchronzaton reasons (e.g., when the connecton s beng establshed); they can thus be transferred n larger ntervals than the events. Page 298 of 386 HI E Rev. 4.01

299 Communcaton 10 X OPC Server Prortes of Data Access Fragments The user can assgn global varables to each Data Access Fragment and set ts prorty to determne how often these varables must be refreshed. To set the prorty values for Data Access Fragments Requrement: The safeethernet Edtor of the OPC server must be opened. 1. Rght-clck the row correspondng to the resource to open ts context menu. 2. Select Detal Vew to open the detal vew of the safeethernet connecton. 3. Clck the Fragment Defntons tab. 4. Set the prorty for Data Access Vews n the Prorty column. - Assgn a hgh prorty to Data Access Fragments wth global varables that should be refreshed frequently (e.g., 1). - Assgn a lower prorty to data access fragments wth global varables that should be refreshed less frequently (e.g., 10) Fgure 88: Detaled Vew of the safeethernet Connecton Further, the state and tmestamp of each data access fragment can be read usng the followng varables. Name Descrpton Fragment tmestamp [ms] Mllsecond fracton of the tmestamp (current system tme) Fragment tmestamp [s] Second fracton of the tmestamp (current system tme) Fragment status Status Descrpton 0 CLOSED: Connecton s closed 1 TRY OPEN: An attempt s made to open the connecton, but t s stll closed. 2 CONNECTED: The connecton exsts and current fragment data was receved (cp. tmestamp). As long as no fragment data s receved, the fragment state s set to TRY_OPEN when establshng the connecton. The connecton state of the safeethernet Edtor (see Chapter 4.4) s set to CONNECTED as soon as the connecton s open. Unlke Fragment State, no data may have been exchanged here. Table 274: State and Tmestamp for the Data Access Fragments HI E Rev Page 299 of 386

300 10 X OPC Server Communcaton 10.7 Alarm & Event Edtor The Alarm & Event Edtor s used to set the parameters for the alarms and events of the HIMax controller. To create an Alarm&Event Edtor 1. In the structure tree, open Confguraton, Resource. 2. Rght-clck Resource and select New, Alarm&Events. A new Alarm & Events object s added. To create the Alarm&Events 1. In the structure tree, open Confguraton, Resource. 2. Rght-clck Alarm & Events and select Edt. 3 Select the Event Defnton Bool tab for Boolean events, see Chapter Select the Event Defnton Scalar tab for scalar events, see Chapter In the Object Panel, drag the global varable anywhere onto the workspace of the Alarm & Event Edtor. 6. Enter the event prorty n the safeethernet Edtor, see Chapter HIMax dfferentates between Boolean and scalar events Boolean Events Changes of Boolean varables, e.g., of dgtal nputs. Alarm and normal state: They can be arbtrarly assgned to the varable states. Enter the parameters for the Boolean events n the Alarm & Event Edtor of the resource; the edtor contans the followng tabs: Column Descrpton Range of values Name Name of the event defnton Text, max. 31 characters. Global Varable Name of the assgned global varable (added usng a drag&drop operaton) Data Type Data type of the global varable; t cannot be modfed. BOOL Event source CPU event The tmestamp s created on a processor module. The processor module creates all the events n each of ts cycle. IO event The tme stamp s created on a sutable I/O module (e.g., DI 32 04). Auto event A CPU event and, f avalable, IO events of the I/O module are created. Default value: CPU event CPU Event, IO Event, Auto Event Alarm when FALSE Actvated If the global varable value changes from TRUE to FALSE, an event s trggered. Checkbox actvated, deactvated Deactvated If the global varable value changes from FALSE to TRUE, an event s trggered. Default value: Deactvated Alarm Text Text specfyng the alarm state Text Alarm prorty Prorty of the alarm state Default value: Page 300 of 386 HI E Rev. 4.01

301 Communcaton 10 X OPC Server Alarm Acknowledgment Requred Return to Normal Text Return to Normal Severty Return to Normal Ack Requred Actvated The alarm state must be confrmed by the user (acknowledgement) Deactvate The alarm state may not be confrmed by the d user Default value: Deactvated Text specfyng the alarm state Checkbox actvated, deactvated Text Prorty of the normal state The normal state must be confrmed by the user (acknowledgement) Default value: Deactvated Table 275: Parameters for Boolean Events Checkbox actvated, deactvated Scalar Events Exceedance of the lmts defned for a scalar varable, e.g., an analog nput. Two upper lmts and two lower lmts are possble. For the lmt values, the followng condton must be met: Superor lmt upper lmt normal area lower lmt nferor lmt. An hysteress s effectve n the followng cases: - If the value falls below the upper lmt - If the value exceeds the lower lmt An hysteress s defned to avod a needless large number of events when a global varable strongly oscllate around a lmt. HH Alarm Value H Alarm Value L Alarm Value LL Alarm Value Hysteress Fgure 89: Fve Areas of a Scalar Event HI E Rev Page 301 of 386

302 10 X OPC Server Communcaton Enter the parameters for the scalar events n the Alarm & Event Edtor of the resource; the edtor contans the followng tabs: Column Descrpton Range of values Name Name of the event defnton Text, max. 31 characters. Global Varable Name of the assgned global varable (added usng a drag&drop operaton) Data Type Data type of the global varable; t cannot be modfed. dependng on the global varable type Event source CPU event The tmestamp s created on a processor module. CPU Event, IO Event, The processor module creates all the events n Auto Event each of ts cycle. I/O Event The tmestamp s bult on an approprate I/O module (e.g., AI 32 02). Auto event A CPU event and, f avalable, IO events of the I/O module are created. Default value: CPU Event HH Alarm Text Text specfyng the alarm state of the upper lmt. Text HH Alarm Value Upper lmt trggerng an event. Condton: (HH Alarm Value - Hysteress) > H Alarm Value or HH Alarm Value = H Alarm Value dependng on the global varable type HH Alarm Prorty Prorty of the upper lmt; default value: HH Alarm Acknowledgment Actvated The user must confrm that the upper lmt has been exceeded (acknowledgment). Checkbox actvated, deactvated Requred Deactvate The user may not confrm that the upper lmt has d been exceeded. Default value: Deactvated H Alarm Text Text specfyng the alarm state of the upper lmt. Text H Alarm Value Upper lmt trggerng an event. Condton: (H Alarm Value - Hysteress) > (L Alarm Value + Hysteress) dependng on the global varable type or H Alarm Value = L Alarm Value H Alarm Prorty Prorty of the upper lmt; default value: H alarm acknowledgment requred Return to Normal Text Return to Normal Severty Return to Normal Ack Requred Actvated The user must confrm that the upper lmt has been exceeded (acknowledgment). Deactvate The user may not confrm that the upper lmt has d been exceeded. Default value: Deactvated Text specfyng the alarm state Checkbox actvated, deactvated Text Prorty of the normal state; default value: The normal state must be confrmed by the user (acknowledgement); default value: Deactvated L Alarm Text Text specfyng the alarm state of the lower lmt. Text Checkbox actvated, deactvated Page 302 of 386 HI E Rev. 4.01

303 Communcaton 10 X OPC Server L Alarm Value Lower lmt trggerng an event. Condton: (L Alarm Value + Hysteress) < (H Alarm Value - Hysteress) or L Alarm Value = H Alarm Value dependng on the global varable type L Alarm Prorty Prorty of the lower lmt; default value: L alarm acknowledgment Actvated The user must confrm that the lower lmt has been exceeded (acknowledgment). Checkbox actvated, deactvated requred Deactvate The user may not confrm that the lower lmt has d been exceeded. Default value: Deactvated LL Alarm Text Text specfyng the alarm state of the lowest lmt. Text LL Alarm Value Lower lmt trggerng an event. Condton: (LL Alarm Value + Hysteress) < (L Alarm Value) or LL Alarm Value = L Alarm Value dependng on the global varable type LL Alarm Prorty Prorty of the lowest lmt; default value: LL alarm acknowledgment Actvated The user must confrm that the lowest lmt has been exceeded (acknowledgment). requred Deactvate The user may not confrm that the lowest lmt has d been exceeded. Default value: Deactvated Alarm Hysteress The hysteress avods that many events are contnuously created when the process value often oscllate around a lmt. Table 276: Parameters for Scalar Events Checkbox actvated, deactvated dependng on the global varable type HI E Rev Page 303 of 386

304 10 X OPC Server Communcaton 10.8 Parameters for the X-OPC Server Propertes SILworX s used to confgure and operate the entre X OPC server. The X OPC server can be loaded, started and stopped n the SILworX Control Panel lke a controller OPC Server Set The OPC set s used as common platform for confgurng up to two OPC servers. The OPC Server Set propertes for the two redundant X-OPC servers are automatcally set dentcal. To create a new OPC server set 1. In the structure tree, open Confguraton. 2. Rght-clck Confguraton and select New, OPC Server Set to create a new OPC server set. 3. Rght-clck OPC Server Set and select Propertes. Accept the default values. The Propertes dalog box for the OPC server set contans the followng parameters: Element Descrpton Name Name of the OPC server set. A maxmum of 31 characters. Safety Tme [ms] The safety tme s the tme n mllseconds wthn whch the X- OPC server must react to an error. Condton: safety tme 2 * watchdog tme Range of values: ms Watchdog Tme [ms] Default value: ms The watchdog tme s the maxmum tme that the OPC server may requre to complete a program cycle. If the defned watchdog tme s exceeded (the executon of a program cycle takes too long), the X-OPC server s stopped. Condton: WDT 1000 ms and 0.5 * safety tme Range of values: ms Default value: ms Page 304 of 386 HI E Rev. 4.01

305 Communcaton 10 X OPC Server Man Enable The settng of the 'Man Enable' OPC swtch affects the functon of the other OPC swtches. If 'Man Enable' s deactvated, the parameters set for the other OPC swtches cannot be modfed whle the user program s beng processed (the controller s n RUN). Autostart Start Allowed Default value: actvated Autostart defnes f the OPC confguratons may be automatcally started wth a cold start or a warm start after powerng up or bootng the controller or should not be started (Off). If Autostart s deactvated, the X-OPC server adopts the STOP/VALID CONFIGURATION state after bootng. Default value: Deactvated Only f Start Allowed s actvated, an X-OPC server can be started from wthn the programmng tool. If Start Allowed s deactvated, the X-OPC server cannot be started from wthn the programmng tool. In such a case, the X-OPC server can only be started f Autostart s actvated and the host PC s started or rebooted. Load allowed Reload Allowed Global Forcng Allowed If nether Autostart nor Start Allowed s actvated, the X-OPC server cannot be started. Ths can be requred, for nstance, durng mantenance actons to prevent the system from startng. Default value: actvated If Load Allowed s deactvated, no (new) OPC confguraton can be loaded nto the controller. Deactvate Loadng Allowed to avod that the OPC confguraton loaded nto the X-OPC server s overwrtten. Default value: actvated No functon yet! Global forcng can only be started f Global Forcng Allowed s actvated. The Force Edtor can also be used to dsplay varable contents f Global Forcng Allowed s deactvated. Default value: Deactvated HI E Rev Page 305 of 386

306 10 X OPC Server Communcaton Global Force Tmeout Reacton If Global Force Tmeout Reacton, Stop Resource s selected, the X-OPC server enters the STOP state after the preset force tme has expred. All the outputs of the X-OPC server are set to LOW. If Global Force Tmeout Reacton, Stop Forcng Only s selected, the X-OPC server contnues executng the OPC confguraton after the force tme has expred. If forcng s allowed, carefully check the settng for 'Stop at Force Tmeout'. Also observe the nstructons provded n the Safety Manual. Max.Com. Tme Slce ASYNC [ms] Target Cycle Tme [ms] safeethernet CRC Namespace Separator Dot. Slash / Colon : Backslash \ Default value: Stop Resource Max. Com. Tme Slce ASYNC [ms] s the tme n mllseconds that s reserved n each X-OPC server cycle for performng all the communcaton tasks scheduled for P2P communcaton. Default value: 500 ms Target cycle tme for the X-OPC Server Default value: 50 ms -Current verson SILworX V2.36 Namespace Type Changeless Update Default value: Dot Dependng on the OPC clent requrements, the followng name space types can be set: - Herarchcal Namespace - Flat Namespace Default value: Herarchcal Namespace Settng accordng to the OPC clent requrement Actvated: If Changeless Update s selected and 'OPC Group UpdateRate' has expred, the X-OPC server provdes all tems to the OPC clent. Deactvated: If Changeless Update s not selected,only the modfed values are provded to the OPC clent (ths behavor s n accordance wth the OPC Specfcaton. Cycle Delay [ms] The cycle delay lmts the CPU load of the PC due to the X- OPC server to allow other programs to be run. Range of values: ms Default value: 5 ms Page 306 of 386 HI E Rev. 4.01

307 Communcaton 10 X OPC Server Short Tag Names for DA Smple-Events for CPU I/O Events Short tag-names for A&E Table 277: Propertes Ths parameter can only be actvated f Flat Namespace s selected. It s an opton n whch data and event are offered to the OPC clent wthout any further context (path name). Default value: Deactvated Never Only at Start Allways Ths parameter can only be actvated f Flat Namespace s selected. It s an opton n whch data and event sources are offered to the OPC clent wthout any further context (path name). Default value: Deactvated HI E Rev Page 307 of 386

308 10 X OPC Server Communcaton OPC Server To create a new OPC server 1. In the structure tree, open Confguraton, OPC Server Set. 2. Rght-clck OPC Server Set and select New, OPC Server to create a new OPC server. 3. Rght-clck OPC Server and select Propertes. The Propertes dalog box for the OPC server contans the followng parameters: Element Descrpton Name Name for the OPC server. A maxmum of 31 characters. System ID [SRS] Default value: Namespace Prefx Table 278: Propertes To open the OPC host 1. In the structure tree, open Confguraton, OPC Server Set, OPC Server. 2. Rght-clck OPC Host and select Edt to get an overvew of the IP nterfaces. The Edt dalog box for the OPC host contans the followng parameters: Element Descrpton PADT Port Default value: Name Name for the OPC server set. A maxmum of 31 characters. IP Address IP address of the host PC. Default value: Standard Interface It must be selected f the host PC s equpped wth more than one Ethernet port. Default value: actvated HH Port Default value: Table 279: Edt 10.9 Unnstallng the X-OPC Server To unnstall the X-OPC server 1. Open Start, Settngs, Control Panel, Software n Wndows. 2. From the lst, select the X-OPC server to be unnstalled and clck the Remove button. 3. Follow the nstructons of the Unnstall Wzard. Page 308 of 386 HI E Rev. 4.01

309 Communcaton 11 Synchronous Seral Interface 11 Synchronous Seral Interface The synchronous seral nterface (SSI) s a non-safety-related nterface for absolute encoders (angle measurng system). The SSI submodule allows synchronzaton of up to three absolute encoders wth a common pulse and thus obtanng the X-Y-Z poston smultaneously. Pror to startng up the SSI submodule, the COM must be confgured usng the ComUserTask and the user program logc must be created usng the programmng tool SILworX System Requrements Equpment and system requrements Element Controller Descrpton HIMax wth COM module HIMatrx: CPU OS versons beyond 7.24 and COM OS versons beyond The nterfaces on the processor module may not be used for SSI. Processor module COM module If the seral feldbus nterfaces (FB1 or FB2) are used, they must be equpped wth the SSI submodule, see Chapter 3.6. Actvaton Software actvaton code requred, see Chapter 3.4. Table 280: Equpment and System Requrements for the ComUserTask 11.2 Block Dagram The SSI submodule s electrcally solated from the HIMA controller. +5V TxD RxD D1+, D1- D2+, D2- CL2+, CL2-/ D3+, D3- CL1+, CL1- Processor Module (CPU) Communcaton Module (COM) Internal Seral Interface SSI Submodule SSI, FB1 or FB2 Fgure 90: Block Dagram HI E Rev Page 309 of 386

310 11 Synchronous Seral Interface Communcaton 11.3 D-SUB Connectors FB1 and FB2 If the SSI submodule s used, apply the pn assgnment of D-SUB connectors FB1 and FB2 as specfed n Chapter Confgurng Data Exchange between COM Module and SSI Submodule Data s exchanged between the communcaton module (COM) and the SSI submodule va the nternal seral nterface as confgured wth the ComUserTask, see Chapter 12 ComUserTask. The data protocol created n the ComUserTask for exchangng data between the COM module and the SSI submodule must be set to the followng parameters: Baud rate kbt/s Data length: 8 bts Party even 1 stop bt 11.5 Confguraton of the SSI The SSI s confgured usng the SSISTART start command byte, see Table 281. Whenever a new sensor data record (current poston) s requred, the SSISTART start command byte must be set n the user program and forwarded to the the SSI submodule. The SSISTART start command byte to be sent has the followng format: Bt Descrpton 7 Auxlary bt Ths bt defnes the assgnment of the start command byte. If bt 7 = The followng settng s possble for the SSI clock khz khz khz khz 3 It swtches pns 3 and 8 ether for use as a data nput or as a pulsed output. 0: D3+, D3- swtched for use as an nput 1: CL2+, CL2- swtched for use as a pulsed output 2 Pulsed output CL1 0: Actvated 1: Deactvated: 1 Not used 0 Pulsed output CL2 0: Actvated 1: Deactvated: If bt 7 = Not used Table 281: Data Format of the SSISTART Start Command Bytes Page 310 of 386 HI E Rev. 4.01

311 Communcaton 11 Synchronous Seral Interface The SSI submodule transmts the sensor data determned va the SSI to the COM va the nternal seral nterface n the followng format and order. The sensor data can be evaluated n the user program for determnng the X-Y-Z poston (note: the data bts are transferred to the user program n the same order as provded by the sensor). No. Channe Data bt l 1 Channe D47.. D40 2 l 1 D39.. D32 3 D31.. D24 4 D23.. D16 5 D15.. D8 6 D7.. D0 7 Channe D47.. D40 8 l 2 D39.. D32 9 D31.. D24 10 D23.. D16 11 D15.. D8 12 D7.. D0 13 Channe D47.. D40 14 l 3 D39.. D32 15 D31.. D24 16 D23.. D16 17 D15.. D8 18 D7.. D0 Table 282: Format and Order of the Sensor Data Wre Lengths and Recommended Clock Rates The followng table specfes the recommended clock rates for the SSI accordng wth the feld wre lengths. Wre length / m Clock rate /khz < < 50 < 400 < 100 < 300 < 200 < 200 < 400 < 100 Table 283: Recommended Clock Rates Accordng to the Feld Wre Lengths HI E Rev Page 311 of 386

312 11 Synchronous Seral Interface Communcaton 11.6 Applcaton Notes The SSI sensors must be suppled n the feld wth an external power supply snce the SSI submodule s electrcally solated from the HIMA controller. The followng applcatons are possble wth an SSI submodule: Connecton of 3 sensors for smultaneously determnng the x, y and z coordnates 1 SSI clock (CL1+, CL1-) and 3 data channels (D1+, D1-, D2+, D2-, D3+, D3-) for smultaneously determnng the x, y and z coordnates. All the 3 sensors are energzed from the same clock (CL1+, CL1-) and thus from the same clock rate. Connecton of 2 sensors for smultaneously determnng the x and y coordnates 1 SSI clocks (CL1+, CL1-, CL2+, CL2-) and 2 data channels (D1+, D1-, D2+, D2-) for smultaneously determnng the x and y coordnates. Both sensors are energzed from 2 dfferent clocks (CL1+, CL1-, CL2+, CL2-). They have the same clock rate. Connecton of 1 sensor 1 SSI clock (CL1+, CL1- or CL2+, CL2-) and 1 data channel (D1+, D1- or D2+, D2-). If the specal condtons X are observed, the SSI submodule may be mounted n zone 2 (EC Drectve 94/9/EC, ATEX). Page 312 of 386 HI E Rev. 4.01

313 Communcaton 12 ComUserTask 12 ComUserTask In addton to the user program created n SILworX, a C program can also be run n the controller. As ComUserTask, ths non-safety-related C program operates nterference-free to the safe processor module on the controller's communcaton module. The ComUserTask has ts own cycle tme that does not depend on the CPU cycle. Ths allows the users to program n C any knd of applcatons and mplement them as ComUserTask, for example: Communcaton nterfaces for specal protocols (TCP, UDP, etc.). Gateway functon between TCP/UDP and seral communcaton System Requrements Equpment and system requrements Element Descrpton Controller HIMax wth COM module HIMatrx: CPU OS versons beyond 7 and COM OS versons beyond 12 Processor module The Ethernet nterfaces on the processor module may not be used for ComUserTask. Communcaton Ethernet 10/100BaseT module Pn assgnment of the D-sub connectors FB1 and FB2 e.g., for RS 232 If the seral feldbus nterfaces (FB1 or FB2) oder FB3 for HIMatrx (RS 485) are used, they must be equpped wth an optonal HIMA submodule, see Chapter 3.6. Actvaton Software actvaton code requred, see Chapter 3.4. Table 284: Equpment and System Requrements for the ComUserTask Propertes of the ComUserTask: Element Descrpton ComUserTask One ComUserTask can be confgured for each HIMax/HIMatrx controller. Safety-related No Data Exchange Confgurable Code and data area See Chapter Stack The stack s located n a reserved memory outsde the code/data area. See Chapter Table 285: ComUserTask Propertes Creatng a ComUserTask To create a new ComUserTask 1. In the structure tree, open Confguraton, Resource, Protocols. 2. On the context menu for protocols, clck New, ComUserTask to add a ComUserTask. 3. Rght-clck the ComUserTask, clck Propertes and select the COM module. Accept the default settngs for the frst confguraton. HI E Rev Page 313 of 386

314 12 ComUserTask Communcaton 12.2 Requrements In addton to the normal C commands, a specfc lbrary wth defned functons s avalable for programmng a ComUserTask (see Chapter 12.4). Development Envronment The development envronment comprses the GNU C Compler and Cygwn whch are provded wth the HIMA DVD (not ncluded n ELOP II Factory) and are subject to the condtons of the GNU General Publc Lcense (see Controller In the HIMax/HIMatrx controllers, the ComUserTask has no access to the safe hardware nputs and outputs. If an access to the safe hardware nputs and outputs s requred, a CPU user program must exst for connectng the varables (see ) Abbrevatons Abbrevato Descrpton n CUCB COM user callback (CUCB_ Functons nvoked by the COM) CUIT COM user IRQ task CUL COM user lbrary (CUL_ Functons nvoked n the CUT) CUT ComUserTask GNU GNU project IF Interface FB Feldbus nterface of the controller FIFO Frst n frst out (Data memory) NVRam Non volatle random access memory, non volatle memory SSI Synchronous seral nterface Table 286: Abbrevatons Page 314 of 386 HI E Rev. 4.01

315 Communcaton 12 ComUserTask 12.4 CUT Interface n SILworX The process data communcaton of the ComUserTask runs between COM and CPU. WARNING The CUT code operates n the COM n an nterference-free manner wth the safe CPU. Ths ensures that the safe CPU s protected aganst the CUT code. Note that errors n the CUT code can dsturb the entre COM functon, thus affectng or stoppng the controller's functon. The CPU safety functons, however, are not compromsed Schedule Interval [ms] The ComUserTask s nvoked n a predefned schedule nterval [ms] durng the controller's states RUN and STOP_VALID_CONFIG (COM module). In SILworX, Schedule Interval [ms] can be set n the ComUserTask Propertes. Schedule Interval [ms] Range of ms values: Default value: 15 ms Table 287: Schedule Interval [ms] The COM processor tme avalable to the CUT depends on the other confgured COM functons such as safeethernet or Modbus TCP. If CUT s not fnshed wthn the schedule nterval, each call to restart the CUT s gnored untl CUT has been processed Schedulng Preprocessng In the controller's state RUN: Before each CUT call, the COM module provdes the process data of the safe CPU to the CUT n a memory area defned by CUT. In the controller's state STOP: No process data s exchanged between COM and safe CPU Schedulng Postprocessng In the controller's state RUN: After each CUT call, the COM module provdes the process data of the CUT to the safe CPU. In the controller's state STOP: No process data s exchanged between COM and safe CPU STOP_INVALID_CONFIG If the COM s n the STOP_INVALID_CONFIG state, CUT s not executed. If the COM module enters the STOP_INVALID_CONFIG state and executes CUT or CUIT, these functons are termnated. HI E Rev Page 315 of 386

316 12 ComUserTask Communcaton CUT Interface Varables (CPU<->CUT) Confgurng not safety-related process data communcaton between safe CPU and COM (CUT). For each drecton, a maxmum of 1 byte data can be exchanged for non-safety-related communcaton (ncludng the system varables), see Chapter 3.2. Ths data budget s no longer avalable for the remanng safety related process protocolls. Process data exchange wth ComUserTask PDI PDO CPU (Safe User Program) Data Outputs (CPU->COM) COM (ComUserTask) Data Inputs (COM->CPU) Fgure 91: Process Data Exchange between CPU and COM (CUT) All data types that are used n SILworX can be exchanged. The data structure must be confgured n SILworX. The sze of the data structures CUT_PDI and CUT_PDO (n the compled CUT C code) must correspond to the sze of the data structures confgured n SILworX. If the data structures CUT_PDI and CUT_PDO are not avalable n the compled C code or do not have the same sze as the process data confgured n SILworX, the confguraton s nvald and the COM module enters the STOP_INVALID_CONFIG state. Process data communcaton takes place n the RUN state only. Page 316 of 386 HI E Rev. 4.01

317 Communcaton 12 ComUserTask Menu Functon: Propertes The Propertes functon of the context menu for the ComUserTask appears the Propertes dalog box. Element Type Name Force Process Data Consstency Module Actvate Max. µp Budget Max. µp Budget n [%] Behavor on CPU/COM Connecton Loss Schedule Interval [ms] User Task Descrpton ComUserTask Any unque name for a ComUserTask Actvated: Transfer of all protocol data from the CPU to the COM wthn a CPU cycle. Deactvated: Transfer of all protocol data from the CPU to the COM, dstrbuted over multple CPU cycles, each wth 1100 bytes per data drecton. The cycle tme of the controller can thus be reduced. Default value: actvated Selecton of the COM module wthn whch the protocol s processed. Not used Not used If the connecton of the processor module to the communcaton module s lost, the nput varables are ntalzed or contnue to be used unchanged n the process module, dependng on ths parameter. Example: the communcaton module s removed when communcaton s runnng. If a project created wth a SILworX verson pror to V3 should be converted, ths value must be set to Retan Last Value to ensure that the CRC does not change. For HIMatrx controllers wth CPU OS verson pror to V8, ths value must always be set to Retan Last Value. Adopt Intal Data Input varables are reset to ther ntal values. Retan Last Value The nput varables retans the last value. The ComUserTask s nvoked n a predefned schedule nterval [ms] of controller (COM module), see Chapter Range of values: ms Default value: 15 ms Loadable fle path, f already loaded Table 288: PROFINET IO Devce General Propertes HI E Rev Page 317 of 386

318 12 ComUserTask Communcaton Menu Functon: Edt The Edt menu functon s used to open the tabs Process Varables and System Varables System Varables The System Varables tab contans the followng system parameters for montorng and controllng the CUT: Name Executon Tme [DWORD] Real Schedule Interval [DWORD] User Task State Control [WORD] State of the User Task [BYTE] Functon Executon tme of the ComUserTask n µs Tme between two ComUserTask cycles n ms The followng table shows how the user can control the ComUserTask wth the User Task State Control system parameter: Functon Descrpton DISABLED The applcaton program locks 0x8000 the CUT (CUT s not started). Autostart Default: 0 Table 289: ComUserTask System Varables After termnaton a new start of the CUT s automatcally allowed f the error s elmnated. 1 = RUNNING (CUT s runnng) 0 = ERROR (CUT s not runnng due to an error) TIP If the CUT s termnated and restarted, the COM state STOP / LOADING DATA FROM FLASH s dsplayed from the flash memory even f the ComUserTask s n the RUN state. Page 318 of 386 HI E Rev. 4.01

319 Communcaton 12 ComUserTask Process Varables Input Sgnals (COM->CPU) The Input Sgnals tab contans the sgnals that should be transferred from the COM module (CUT) to the CPU (CPU nput area). CAUTION ComUserTask s not safety-related! Non-safe varables of the ComUserTask must not be used for the safety functons of the CPU user program. Requred entry n the C code The C code of the COM User Tasks must have the followng CUT_PDO data structure for the COM outputs (CPU nput area): The sze of the CUT_PDO data structure must correspond to the sze of the data nputs confgured n SILworX. Output Sgnals (CPU->COM) The Output Sgnals tab contans the sgnals that should be transferred from the CPU (CPU output area) to the COM module (CUT). Requred entry n the C code The C code of the ComUserTask must have the followng CUT_PDI data structure for the COM nputs (CPU output area): The sze of the CUT_PDI data structure must correspond to the sze of the data outputs confgured n SILworX. HI E Rev Page 319 of 386

320 12 ComUserTask Communcaton 12.5 CUT Functons COM User Callback Functons The COM User callback functons have all the CUCB _ prefx and are drectly nvoked from the COM when events occur. All COM user callback functons must be defned n the user's C code! Also the CUCB_IrqServce functon, whch s not supported for HIMax and HIMatrx L2 (but for HIMatrx L3 wth CAN module), must be defned n the user C-Code for reasons of compatblty. Funkton prototype: vod CUCB_IrqServce(udword devno) {} The COM user callback (CUCB) and the COM user lbrary (CUL) functons share the stack and the same code and data memory. These functons mutually ensure the consstency of the data shared (varables) COM User Lbrary Functons All COM user lbrary functons and varables have the CUL_ prefx and are nvoked n the CUT. All the CUL functons are avalable va the lbcut.a object fle Header Fles The two header fles cut.h and cut_types.h contan all functon prototypes for CUL/CUCB and the related data types and constants. For the data types, the followng short cuts are defned n the header fle cut_types.h: typedef unsgned long typedef unsgned short typedef unsgned char typedef sgned long typedef sgned short typedef sgned char udword; uword; ubyte; dword; word; sbyte; #fndef HAS_BOOL typedef unsgned char bool; // wth 0=FALSE, otherwse TRUE #endf Page 320 of 386 HI E Rev. 4.01

321 Communcaton 12 ComUserTask Code/Data Area and Stack for CUT The code/data area s a coherent memory area that begns wth the code segment and the ntal data segment and contnues wth the data segments. In the HIMA lnker fles (makenc.nc.app and secton.dld), the wrtten segment sequence and the avalable storage capacty are predefned (ths apples to HIMax/HIMatrx and HM31). Element HIMax V.4 and beyond HIMax pror to V.4 HIMatrx L2 HIMatrx L3 Start address 0x x x Length 512 kbytes 448 kbytes 4 MB Table 290: Memory Area for Code and Data The stack s located n a reserved memory area defned when the COM operatng system s started. Element HIMax / HIMatrx L2 HIMatrx L3 End address Dynamcally (from the pont of vew of CUT) Dynamcally (from the pont of vew of CUT) Length approx. 10 kbyte approx. 600 kbyte Table 291: Stack Memory Start Functon CUCB_TaskLoop CUCB_TaskLoop() s the startng functon assocated wth the ComUserTask. The ComUserTask program executon begns when ths functon s nvoked (see Chapter Schedule Interval[ms]). Functon Prototype: vod CUCB_TaskLoop(udword mode) Parameter: The functon has the followng parameter (returns the value): Parameter Descrpton mode 1 = MODE_STOP corresponds to the mode STOP_VALID_CONFIG 2 = MODE_RUN controller's normal operaton Table 292: Parameter HI E Rev Page 321 of 386

322 12 ComUserTask Communcaton RS485 / RS232 IF Seral Interfaces The used feldbus nterfaces must be equpped wth the correspondng feldbus submodules (hardware). For each HIMax/HIMatrx and HM31 controller, the user can refer to the correspondng system documentaton CUL_AscOpen The CUL_AscOpen()functon ntalzes the entered seral nterface (comid) wth the gven parameters. After nvokng the CUL_AscOpen()functon, the COM mmedately begns recevng data va ths nterface. The receved data s stored n a FIFO software wth a sze of 1kByte for each ntalzed seral nterface. The data s stored untl t s read out wth the CUT functon CUL_AscRcv(). If data s read out of the FIFO more slowly than t s receved, the new data s rejected. Functon Prototype: udword CUL_AscOpen( Udword comid, Ubyte duplex, udword baudrate, ubyte party, ubyte stopbts) Parameters: The functon has the followng parameters: Parameter Descrpton comid Feldbus nterface (RS485, RS 232) 1 = FB1 2 = FB2 3 = FB3 duplex 0 = Full duplex 1 = Half duplex baudrate 1 = 1200 Bt 2 = 2400 Bt 3 = 4800 Bt 4 = 9600 Bt 5 = B 6 = bts (maxmum baud rate for HIMax pror to V.4) 7 = bts (maxmum baud rate for HIMax V.4 and beyond) 8 = bts (HIMatrx only) The data bt length s fxed and set to 8 data bts. Start, party and stop bts must be added to these 8 data bts. party 0 = NONE 1 = EVEN 2 = ODD stopbts 1 = 1 bt 2 = 2 bts Table 293: Parameter Page 322 of 386 HI E Rev. 4.01

323 Communcaton 12 ComUserTask Return Value: An error code (udword) s returned. The error codes are defned n the cut.h header fle. Error Code Descrpton CUL_OKAY The nterface was ntalzed successfully. CUL_ALREADY_IN_USE The nterface s used by other COM functons or s already open. CUL_INVALID_PARAM Incorrect parameters or parameter combnatons transmtted. CUL_DEVICE_ERROR Other errors Table 294: Return Value HI E Rev Page 323 of 386

324 12 ComUserTask Communcaton CUL_AscClose The CUL_AscClose()functon closes the seral nterface entered n comid. In dong so, the data that has already been receved but not read out wth the functon CUL_AscRcv() s deleted n FIFO. Functon Prototype: Udword CUL_AscClose(udword comid) Parameter: The functon has the followng parameter: Parameter Descrpton comid Feldbus nterface (RS485, RS 232) 1 = FB1 2 = FB2 3 = FB3 Table 295: Parameter Return Value: An error code (udword) s returned. The error codes are defned n the cut.h header fle. Error Code Descrpton CUL_OKAY The nterface was closed successfully. CUL_NOT_OPENED The nterface was not opened (by the CUT). CUL_INVALID_PARAM Incorrect parameters or parameter combnatons transmtted. CUL_DEVICE_ERROR Other errors Table 296: Return Value Page 324 of 386 HI E Rev. 4.01

325 Communcaton 12 ComUserTask CUL_AscRcv The CUL_AscRcv()functon nstructs the COM to provde a defned data volume from the FIFO. As soon as the requested data s avalable (and the CUL or the schedulng allows t), the COM nvokes the CUCB_AscRcvReady() functon. If not enough data s contaned n FIFO, the CUL_AscRcv()functon returns mmedately. The nstructon to receve data s stored untl: The nstructon was completely processed or the CUL_AscClose() functon s nvoked or redefned due to a new nstructon Untl the nstructon s completely processed, the *pbuf content may only be changed usng the CUCB_AscRcvReady() functon. Functon Prototype: Udword CUL_AscRcv(udword comid, CUCB_ASC_BUFFER *pbuf) typedef struct CUCB_AscBuffer { bool bascstate; bool berror; uword reserved1; udword mdataidx; udword mdatamax; udword adata[0]; }CUCB_ASC_BUFFER; // for usng by CUT/CUCB // for usng by CUT/CUCB // 2 unused bytes // byte offset n adata from whch the data are ava // max. byte offset 1 for data n adata, // // Start pont of the data copy range Parameter: The functon has the followng parameters: Parameter Descrpton comid Feldbus nterface (RS485, RS 232) 1 = FB1 2 = FB2 3 = FB3 pbuf It defnes the requested amount of data and the locaton, to whch the data should be coped, before CUCB_AscReady() s nvoked. If suffcent data has already been receved n the FIFO, the CUCB_AscRcvReady() functon s nvoked durng CUL_AscRcv(). Table 297: Parameter Return Value: HI E Rev Page 325 of 386

326 12 ComUserTask Communcaton An error code (udword) s returned. The error codes are defned n the cut.h header fle. Error Code CUL_OKAY CUL_NOT_OPENED CUL_INVALID_PARAM CUL_DEVICE_ERROR Table 298: Return Value Descrpton If the order was successful, otherwse error code. If the nterface was not opened by the CUT. Incorrect parameters or parameter combnatons transmtted. Other errors Restrctons: If the memory area (defned by CUCB_ASC_BUFFER) s not allocated n the CUT data segment, CUT and CUIT are termnated. A maxmum of 1024 bytes of data can be requested. A maxmum of 1 byte of data can be requested. Page 326 of 386 HI E Rev. 4.01

327 Communcaton 12 ComUserTask CUCB_AscRcvReady If the COM module nvokes calls the CUCB_AscRcvReady()functon, the requested amount of data s ready n FIFO (data from the seral nterface defned n the comid parameter). The data has been prevously requested wth the CUL_AscRcv()functon. The CUCB_AscRcvReady()functon can be nvoked before, after or whle nvokng the CUL_AscRcv()functon. The task context s always that of CUT. The CUCB_AscRcvReady()functon may nvoke all CUT lbrary functons. These actons are also permtted: Increasng mdatamax or Reconfgurng mdataidx and mdatamax by the *.pbuf data assgned to comid (for further readng) The structure element of CUCB_ASC_BUFFER.mDataIdx has the value of CUCB_ASC_BUFFER.mDataMax. Functon Prototype: vod CUCB_AscRcvReady(udword comid) Parameter: The functon has the followng parameter: Parameter Descrpton comid Feldbus nterface (RS485, RS 232) 1 = FB1 2 = FB2 3 = FB3 Table 299: Parameter Restrctons: If the memory area (defned by CUCB_ASC_BUFFER) s not located n the CUT data segment, CUIT and CUT are termnated. HI E Rev Page 327 of 386

328 12 ComUserTask Communcaton CUL_AscSend The CUCB_AscSend functon sends the data set defned by the parameter pbuf va the seral nterface comid. The defned data set must be 1 byte and 1kByte. After data have been sent, the CUCB_AscSendReady()functon s nvoked.if an error occurs, t s not be sent and the CUCB_AscSendReady()functon wll not be nvoked. Functon Prototype: Udword CUL_AscSend( udword comid, CUCB_ASC_BUFFER *pbuf) Parameter: The functon has the followng parameters: Parameter Descrpton comid Feldbus nterface (RS485, RS 232) 1 = FB1 2 = FB2 3 = FB3 pbuf Defnes the data amount to be sent Table 300: Parameter Return Value: An error code (udword) s returned. The error codes are defned n the cut.h header fle. Error Code Descrpton CUL_OKAY If data sendng was successfully CUL_WOULDBLOCK If a message prevously sent has not been sent yet CUL_NOT_OPENED If the nterface was not opened by the CUT CUL_INVALID_PARAM Incorrect parameters or parameter combnatons transmtted. CUL_DEVICE_ERROR Other errors Table 301: Return Value Restrctons: If the memory area (defned by CUCB_ASC_BUFFER) s not located n the CUT data segment, CUIT and CUT are termnated CUCB_AscSendReady If the COM nvokes the CUCB_AscSendReady()functon, data s completely sent wth the CUCB_AscSend()functon va the seral nterface. Page 328 of 386 HI E Rev. 4.01

329 Communcaton 12 ComUserTask The task context s always that of CUT. The CUCB_AscSendReady()functon may nvoke all CUT lbrary functons. Functon Prototype: vod CUCB_AscSendReady(udword comid) Parameter: The functon has the followng parameter: Parameter Descrpton comid Feldbus nterface (RS485, RS 232) 1 = FB1 2 = FB2 3 = FB3 Table 302: Parameter HI E Rev Page 329 of 386

330 12 ComUserTask Communcaton UDP/TCP Socket IF A maxmum of 8 sockets can smultaneously be used rrespectve of the used protocol. The physcal connecton runs over the 10/100BaseT Ethernet nterfaces of the controller CUL_SocketOpenUdpBnd The CUL_SocketOpenUdpBnd()functon creates a socket of UDP type and bnds the socket to the selected port. The bndng address s always INADDR_ANY,.e., all messages for UDP/port addressed to the COM module are receved. Sockets are always run n non-blockng mode,.e., ths functon does not block. Functon Prototype: dword CUL_SocketOpenUdpBnd( uword port, uword *assgned_port_ptr ) Parameter: The functon has the followng parameters: Parameter Descrpton port An avalable port number, not occuped by the COM 0. If the port parameter = 0, the socket s bound to the frst avalable port. assgned_port_ptr Address to whch the bounded port number should be coped, f the port parameter = 0 or NULL f not. Table 303: Parameter Return Value: An error code (udword) s returned. The error codes are defned n the cut.h header fle. Error Code Descrpton Socket number Socket number assgned to UDP f > 0 Error codes are < 0 CUL_ALREADY_BOUND Impossble bndng to a port for UDP CUL_NO_MORE_SOCKETS No more resources are avalable for socket CUL_SOCK_ERROR Other socket errors Table 304: Return Value Restrctons: If the CUT does not possess assgned_port_ptr then CUT/CUIT are termnated. Page 330 of 386 HI E Rev. 4.01

331 Communcaton 12 ComUserTask CUL_SocketOpenUdp The CUL_SocketOpenUdp()functon creates a socket of UDP type wthout bndng to a port. Afterwards, messages can only be sent, but not receved va the socket. Functon Prototype: dword CUL_SocketOpenUdp ( vod ) Parameter: None Return Value: An error code (udword) s returned. The error codes are defned n the cut.h header fle. Error Code Descrpton Socket number Socket number assgned to UDP f > 0 Error codes are < 0 CUL_NO_MORE_SOCKETS No more resources are avalable for socket CUL_SOCK_ERROR Other socket errors Table 305: Return Value HI E Rev Page 331 of 386

332 12 ComUserTask Communcaton CUL_NetMessageAlloc The CULMessageAlloc()functon allocates message memory for usng CUL_SocketSendTo() wth UDP and CUL_SocketSend() wth TCP A maxmum of 10 messages can be smultaneously used n CUT. Functon Prototype: vod *CUL_NetMessageAlloc(udword sze, ubyte proto) Parameter: The functon has the followng parameters: Parameter sze Descrpton Memory requrements n bytes proto Table 306: Parameter HIMatrx L2/ HIMax pror to V.4 1 byte and 1400 bytes 0 = TCP 1 = UDP HIMatrx L3/ HIMax V.4 and beyond 1 byte and 1472 bytes Return Value: Buffer address to whch the data to be sent must be coped. Memory ranges must never be wrtten outsde the allocated area. There are no ranges for the used transmsson protocols (EtherNet/IP/UDP or TCP). Restrctons: If no more memory resources are avalable or f the parameter sze s too bg or proto > 1, CUT and CUIT are termnated. Page 332 of 386 HI E Rev. 4.01

333 Communcaton 12 ComUserTask CUL_SocketSendTo The CUL_SocketSendTo()functon sends the message prevously allocated and flled wth the CUL_NetMessageAlloc()functon as UDP package to the destip/destport target address. After the message has been sent, the pmsg message memory s released automatcally. Whenever messages are sent, frstly the message memory must be allocated wth the CULMessageAlloc()functon. Functon Prototype: dword CUL_SocketSendTo( dword socket, vod *pmsg, udword sze, udword destip, uword destport) Parameter: The functon has the followng parameters: Parameter Descrpton Socket Socket created wth CUL_SocketOpenUdp() pmsg UDP user data memory prevously reserved wth CUL_NetMessageAlloc() Sze Memory sze n bytes, t must be than the allocated memory destip Target address!= 0, also 0xffffffff s allowed as broadcast destport Target port!= 0 Table 307: Parameter Return Value: An error code (udword) s returned. The error codes are defned n the cut.h header fle. Error Code Descrpton CUL_OKAY Message was sent successfully CUL_NO_ROUTE No routng avalable to obtan destip CUL_WRONG_SOCK Invald socket type or socket not avalable CUL_SOCK_ERROR Other socket errors Table 308: Return Value Restrctons: If the CUT does not possess the pmsg message or f the sze of pmsg s too hgh, CUT and CUIT are termnated. HI E Rev Page 333 of 386

334 12 ComUserTask Communcaton CUCB_SocketUdpRcv The COM nvokes the CUCB_SocketUdpRcv() functon f data from the socket s avalable. In callback, data must be coped from *pmsg to CUT data, f requred. After the functon return, no access to *pmsg s allowed. Functon Prototype: vod CUCB_SocketUdpRcv( dword socket, vod *pmsg, udword packetlength, udword datalength) Parameter: The functon has the followng parameters: Parameter socket pmsg packetlength datalength Table 309: Parameter Descrpton Socket created wth CUL_SocketOpenUdp() pmsg ponts to the UDP package begn ncludng the Ethernet header. The transmtter of the message can be dentfed va the Ethernet header. The length of the package s stored n packetlength, ncluded the length of the header. The length of the UDP user data part s stored n datalength. Page 334 of 386 HI E Rev. 4.01

335 Communcaton 12 ComUserTask CUL_NetMessageFree The CUL_NetMessageFree()functon releases the message prevously allocated wth CUL_NetMessageAlloc(). Ths functon s usually not requred snce nvokng the CUL_SocketSendTo()functon results n an automatc release. Functon Prototype: vod CUL_NetMessageFree(vod *pmsg) Parameter: The functon has the followng parameter: Parameter pmsg Table 310: Parameter Descrpton TCP user data memory prevously reserved wth CUL_NetMessageAlloc() Restrctons: If the CUT does not possess the pmsg message, CUT and CUIT are termnated. HI E Rev Page 335 of 386

336 12 ComUserTask Communcaton CUL_SocketOpenTcpServer_TCP The CUL_SocketOpenServer()functon creates a socket of type TCP and bnds the socket to the selected port. The address for bndng s always INADDR_ANY. Addtonally, the COM s requested to perform a lsten on the stream socket. Sockets are always runnng n non-blockng mode,.e., ths functon does not block. For further nformaton on how to use the socket, refer to CUCB_SocketTryAccept() and CUL_SocketAccept(). Functon Prototype: dword CUL_SocketOpenTcpServer(uword port, udword backlog) Parameter: The functon has the followng parameters: Parameter Descrpton port Port number not occuped by the COM > 0 backlog Max. number of watng connectons for socket. If the value s 0, the default value 10 s used. The maxmum upper lmt for ths parameter s 50. Hgher values are lmted to 50. Table 311: Parameter Return Value: An error code (udword) s returned. The error codes are defned n the cut.h header fle. Error Code Descrpton Socket number Socket number already assgned to TCP f > 0 Error codes are < 0 CUL_ALREADY_BOUND Bndng to a port/proto not possble CUL_NO_MORE_SOCKETS No more resources are avalable for socket CUL_SOCK_ERROR Other socket errors Table 312: Return Value Restrctons: If successfully one socket s used. Page 336 of 386 HI E Rev. 4.01

337 Communcaton 12 ComUserTask CUCB_SocketTryAccept The COM nvokes the CUCB_SocketTryAccept()functon f a TCP connecton request s present. Ths request can be used to create a socket wth the CUL_SocketAccept()functon. Functon Prototype: vod CUCB_SocketTryAccept(dword serversocket) Parameter: The functon has the followng parameter: Parameter Descrpton serversocket Socket prevously created by CUL_SocketOpenTcpServer(). Table 313: Parameter HI E Rev Page 337 of 386

338 12 ComUserTask Communcaton CUL_SocketAccept The CUL_SocketAccept()functon creates a new socket for the connecton request prevously sgnalzed wth CUCB_SocketTryAccept(). Functon Prototype: dword CUL_SocketAccept( dword serversocket, udword *pipaddr, uword *ptcpport) Parameter: The functon has the followng parameters: Parameter serversocket pipaddr ptcpport Table 314: Parameter Descrpton serversocket sgnalzed wth CUCB_SocketTryAccept() Address to whch the IP address of the peer should be coped or 0 f not Address to whch the TCP port number of the peer should be coped or 0 f not Return Value: An error code (udword) s returned. The error codes are defned n the cut.h header fle. Error Code Descrpton Socket f > 0, then new created socket. If < 0, then error code. CUL_WRONG_SOCK Invald socket type or socket not avalable CUL_NO_MORE_SOCKETS No more socket resources are avalable CUL_SOCK_ERROR Other socket error Table 315: Return Value Restrctons: If the CUT does not possess the messages pipaddr and ptcpport, CUT and CUIT are termnated. Page 338 of 386 HI E Rev. 4.01

339 Communcaton 12 ComUserTask CUL_SocketOpenTcpClent The CUL_SocketOpenTcpClent()functon creates a socket of type TCP wth free local port and orders a connecton to destip and destport. Sockets are always run n non-blockng mode,.e., ths functon does not block. The CUCB_SocketConnected()functon s nvoked as soon as the connecton has been establshed. Functon Prototype: dword CUL_SocketOpenTcpClent(udword destip, uword destport) Parameter: The functon has the followng parameters: Parameter Descrpton destip IP address of the communcaton partner destport Port number of the communcaton partners Table 316: Parameter Return Value: An error code (udword) s returned. The error codes are defned n the cut.h header fle. Error Code Descrpton Socket number f > 0; error codes are < 0 CUL_NO_MORE_SOCKETS No more resources are avalable for socket CUL_NO_ROUTE No routng avalable to reach destip CUL_SOCK_ERROR Other socket error Table 317: Return Value HI E Rev Page 339 of 386

340 12 ComUserTask Communcaton CUCB_SocketConnected The CUCB_SocketConnected()functon s nvoked by the COM module f a TCP connecton was establshed wth the CUL_SocketOpenTcpClent()functon. Functon Prototype: vod CUCB_SocketConnected(dword socket, bool successfully ) Parameter: The functon has the followng parameters: Parameter Descrpton socket Socket prevously created and nstructed by CUL_SocketOpenTcpClent() successfully TRUE f the connecton attempt was successfully, otherwse FALSE Table 318: Parameter Page 340 of 386 HI E Rev. 4.01

341 Communcaton 12 ComUserTask CUL_SocketSend The CUL_SocketSend()functon sends the message allocated and flled wth the CUL_NetMessageAlloc()functon as TCP package. After the message has been sent, the pmsg message memory s released automatcally. Whenever messages are sent, frstly the message memory must be allocated wth the CULMessageAlloc()functon. Functon Prototype: dword CUL_SocketSend( dword socket, vod *pmsg, udword sze) Parameter: The functon has the followng parameters: Parameter Descrpton socket Socket prevously created by CUL_SocketOpenTcpClent() pmsg TCP user data memory prevously reserved wth CUL_NetMessageAlloc() sze Memory sze n bytes, t must be than the allocated memory Table 319: Parameter Return Value: An error code (udword) s returned. The error codes are defned n the cut.h header fle. Error Code Descrpton CUL_OKAY Message was sent successfully CUL_WRONG_SOCK Invald socket type or socket not avalable CUL_WOULD_BLOCK Message cannot be sent, otherwse the socket would be blocked CUL_SOCK_ERROR Other socket error Table 320: Return Value Restrctons: If the CUT does not possess the pmsg message or f the sze of pmsg s too hgh, CUT and CUIT are termnated. HI E Rev Page 341 of 386

342 12 ComUserTask Communcaton CUCB_SocketTcpRcv The CUCB_SocketTcpRcv()functon s nvoked by the COM module f socket user data are placed. After quttng the functon CUCB_SocketTcpRcv(), *pmsg must no longer be accessed. If user data are also requred outsde the CUCB_SocketTcpRcv()functon, t must be coped from *pmsg n an area created ad hoc. If the TCP connecton s closed asynchronously (after an error or due to a request from the other sde), the CUCB_SocketTcpRcv()functon wth datalength = 0 s selected. The call sgnalzed to CUT that the socket must be closed to re-synchronzed communcaton. Functon Prototype: vod CUCB_SocketTcpRcv( dword socket, vod *pmsg, udword datalength) Parameter: The functon has the followng parameters: Parameter Descrpton socket Socket used to receve the user data. pmsg The pmsg parameter ponts to the user data begn wthout Ethernet /IP /TCP header. datalength Length of the user data n bytes Table 321: Parameter Page 342 of 386 HI E Rev. 4.01

343 Communcaton 12 ComUserTask CUL_SocketClose The CUL_SocketClose()functon closes a socket prevously created. The socket s closed wthn 90 seconds. Only f the socket has been closed, the SocketOpen functon can be executed once agan. Functon Prototype: dword CUL_SocketClose(dword socket) Parameter: The functon has the followng parameter: Parameter Descrpton socket Socket prevously created Table 322: Parameter Return Value: An error code (udword) s returned. The error codes are defned n the cut.h header fle. Error Code Descrpton CUL_OKAY Socket closed and one socket resource free agan. CUL_WRONG_SOCK Socket not avalable Table 323: Return Value HI E Rev Page 343 of 386

344 12 ComUserTask Communcaton Tmer-IF CUL_GetTmeStampMS The CUL_GetTmeStampMS()functon provdes a mllsecond tck. Ths tck s sutable for mplementng an own tmer n CUT/CUIT. The counter s derved from the quartz of the COM processor and has therefore the same precson. Functon Prototype: udword CUL_GetTmeStampMS(vod) CUL_GetDateAndTme The CUL_GetDateAndTme()functon provdes the seconds snce the 1st January 1970, 00:00 to the *psec memory and the mllseconds to the *pmsec memory. The values are compared wth the safe CPU and, dependng on the confguraton, they can be externally synchronzed va SNTP (see Chapter 9). The values for CUL_GetDateAndTme()should not be used for tme measurement, tmer or somethng else because the values can be provded by the synchronzaton and/or by the user durng operaton. Functon Prototype: vod CUL_GetDateAndTme(udword *psec, udword *pmsec) Restrctons: If the memory of psec or pmsec are not allocated n the CUT data segment, CUT and CUIT are termnated. Page 344 of 386 HI E Rev. 4.01

345 Communcaton 12 ComUserTask Dagnoss The CUL_DagEntry()functon records an event n the COM short tme dagnoss that can be read out usng the PADT. Functon Prototype: vod CUL_DagEntry( udword severty, udword code, udword param1, udword param2) Parameter: The functon has the followng parameters: Parameter severty code param1, param2 Table 324: Parameter Descrpton It s used to classfy events 0x45 ('E') == error, 0x57 ('W') == warnng, 0x49 ('I') == nformaton The user defnes the parameter code wth an arbtrary number for the correspondng events. If the event occurs, the number s dsplayed n the dagnoss. Addtonal nformaton on the event HI E Rev Page 345 of 386

346 12 ComUserTask Communcaton 12.6 Functons for HIMatrx L3 and HM31 The followng functons only apply for the HIMatrx L3 and HM31 controllers ComUserIRQTask The ComUserIRQTask (CUIT) shares the code and data memory wth the CUT. It has an own stack and s confgured as well as the CUT stack by the COM OS (consdered by the CUIT dynamcally). The stack has a sze of 32kByte. There s only one CUIT n the COM. Intally the IrqServces are dsabled, e.g. after power on or after loadng the confguraton. The CUIT stack sze must not exceed 32 kbyte! If the maxmum CUIT stack allowed s exceeded, data s wrtten to the COM memory and can lead to malfunctons! Restrctons: From the CUIT only the CUL functons for the semaphore handlng are nvoked CUCB_IrqServce The CUCB_IrqServce() functon s nvoked by the COM after actvaton of one of the two possble CAN IRQs. Ths functon s responsble for the operaton of the devno IRQ source of the correspondng CAN chp and must ensure that the CAN chp cancels ts IRQ request. Functon Prototype: vod CUCB_IrqServce(udword devno) Restrctons: The IRQ management of the COM processor s performed by the COM OS and must not be performed by the CUCB_IrqServce() functon. The CUCB_IrqServce() functon must be mplemented very effcently to mnmze unneeded latences of other COM processor functons. Otherwse, functons could no longer be performed at hgh COM processor load whch could nterfere wth the safe CPU's safe communcaton. The CUT lbrary allows the COM IRQ channel to whch the CAN controller s connected, to be unlocked and swtched off. CUL_IrqServceEnable The CUL_IrqServceEnable() functon enables the COM IRQ channel for the selected devno CAN controller. From now on, CAN IRQs trgger the call of the CUT IRQ task. Functon Prototype: vod CUL_IrqServceEnable(udword devno) Parameter: Page 346 of 386 HI E Rev. 4.01

347 Communcaton 12 ComUserTask The functon has the followng parameter: Parameter devno Table 325: Parameter Descrpton 1 = CAN controller A 2 = CAN controller B Restrctons: If devno values other than 1 or 2 are used or a feld bus nterface not set wth CAN s employed, CUIT/CUT are termnated CUL_IrqServceDsable The CUL_IrqServceDsable()functon locks the COM IRQ channel for the devno CAN controller. From now on, the CAN IRQs no longer trgger the call of the CUT IRQ task. However, ncompletely handled IRQs are processed. Functon Prototype: vod CUL_IrqServceDsable(udword devno) Parameter: The functon has the followng parameter: Parameter Descrpton devno 1 = CAN controller A 2 = CAN controller B Table 326: Parameter Restrctons: If devno values other than 1 or 2 are used or a feld bus nterface not set wth CAN s employed, CUIT/CUT are termnated CUL_DevceBaseAddr The CUL_DevceBaseAddr() functon provdes the 32-bt basc address of the CAN controllers. Functon Prototype: vod* CUL_DevceBaseAddr(udword devno) Parameter: The functon has the followng parameter: Parameter Descrpton devno 1 = CAN controller A 2 = CAN controller B Table 327: Parameter Restrctons: If devno values other than 1 or 2 are used or a feld bus nterface not set wth CAN s employed, CUIT/CUT are termnated. HI E Rev Page 347 of 386

348 12 ComUserTask Communcaton NVRam IF The CUT and the CUIT can read and wrte the avalable range. The sze of the avalable NVRam depends on the controller n use. Element HIMax V.4 and beyond HIMatrx L3 HIMatrx L2 NVRam sze bytes (64 kbyte -40 kbyte) Table 328: Memory Area for Code and Data bytes (512 kbyte-40 kbyte) Not avalable The COM cannot ensure data consstency f the operaton voltage fals whle accessng t and f two tasks are accessng t smultaneously. No dfference s made between memory areas that are wrtten often and those that are wrtten seldom CUL_NVRamWrte The CUL_NVRamWrte() functon wrtes data to the NVRam. Functon Prototype: vod CUL_NVRamWrte(udword offset, vod *source, udword sze) Parameter: The functon has the followng parameters: Parameter Descrpton offset Values vald n the NVRam range, see Chapter source Memory area n CUT data segment whch should be coped to the NVRam. sze Number of bytes that should be coped Table 329: Parameter Restrctons: Wth nvald parameters, the CUT and the CUIT are termnated, for example: offset sze of the avalable NVRam offset+sze sze of the avalable NVRam Source out of the CUT data segment Source+sze out of the CUT data segment CUL_NVRamRead The functon CUL_NVRamRead() reads data from the NVRam. Page 348 of 386 HI E Rev. 4.01

349 Communcaton 12 ComUserTask Functon Prototype: vod CUL_NVRamRead(udword offset, vod *destnaton, udword sze) Parameter: The functon has the followng parameters: Parameter Descrpton offset Values vald n the NVRam range, see Chapter destnaton Memory area n CUT data segment whch should be coped to the NVRam. sze Number of bytes that should be coped Table 330: Parameter Restrctons: Wth nvald parameters, the CUT and the CUIT are termnated, for example: offset sze of the avalable NVRam offset+sze sze of the avalable NVRam Destnaton out of the CUT data segment Destnaton+sze out of the CUT data segment Semaphore IF The CUT and the CUIT have one common semaphore for process synchronzaton. A semaphore must be used to protect the data of CUCB and CUL functons that s shared wth the CUCB_IrqServce()functon. Ths guarantees that data shared wth the CUCB_IrqServce()functon s consstent. Restrcton: If the controller has processng the semaphore functon, s stopped and rebooted, the COM could be rebooted CUL_SemaRequest() The CUL_SemaRequest() functon sends a request to the CUT/CUIT semaphore. If the semaphore s avalable, the functon returns wth the pcontext value. s not avalable, the nvokng task s blocked untl the semaphore s released by another task and s returns wth the pcontext value. The context, whch s referenced by the pcontext parameter, s only used by the CUL functons for the nvokng task and must not change between request and release. Functon Prototype: vod CUL_SemaRequest(udword *pcontext) HI E Rev Page 349 of 386

350 12 ComUserTask Communcaton Parameter: The functon has the followng parameter: Parameter pcontext Table 331: Parameter Descrpton Only used by the CUL functon wthn the nvokng task. The context s returned va pcontext and must be specfed n the CUL_SemaRelease() functon. Restrctons: If the number of admssble recursons s exceeded then the CUT/CUIT are termnated. If the CUT s blocked by a semaphore no more CUCB_'s are executed wth the excepton of the functon CUCB_IrqServce() CUL_SemaRelease The functon CUL_SemaRelease()releases agan the semaphore defned by *pcontext. Functon Prototype: vod CUL_SemaRelease(udword *pcontext) Parameter: The functon has the followng parameter: Parameter pcontext Table 332: Parameter Descrpton Wth the same value for *pcontext as wrtten by CUL_SemaRequest or CUL_SemaTry. Restrctons: If Release s nvoked more tmes than Request/Try, then the CUT/CUIL are termnated. Page 350 of 386 HI E Rev. 4.01

351 Communcaton 12 ComUserTask CUL_SemaTry The functon CUL_SemaTry() tres to request the semaphore of the CUT/CUIT. If the semaphore s free the functon returns wth the value TRUE and reserves the semaphore. s not free the functon returns wth the value FALSE and does not reserve the semaphore. The udword referenced by pcontext s only used by CUL for the nvokng task and must not be changed between request and release. Functon Prototype: bool CUL_SemaTry(udword *pcontext) Parameter: The functon has the followng parameter: Parameter Descrpton pcontext Only used by the CUL functon wthn the nvokng task. Table 333: Parameter Return Value: An error code (udword) s returned. The error codes are defned n the cut.h header fle. Return Value Descrpton TRUE Semaphore could be reserved FALSE Semaphore could not be reserved Table 334: Return Value The context s returned va pcontext and must be specfed n the CUL_SemaRelease() functon. Restrctons: If the number of admssble recursons s exceeded then the CUT/CUIT are termnated. If the CUT s blocked by a semaphore no more CUCB_'s are executed wth the excepton of the functon CUCB_IrqServce(). The functons CUL_SemaTry()and CUL_SemaRequest() may also be nvoked wthout blockade f the nvokng task has already reserved the semaphore; n such a case, however, the same number of CUL_SemaRelease must occur untl the semaphore s avalable agan. The recurson allows a mnmum of steps. If more steps are allowed, depends on the correspondng COM verson. HI E Rev Page 351 of 386

352 12 ComUserTask Communcaton 12.7 Installng the Development Envronment Ths chapter descrbes how to nstall the development envronment and create a ComUserTask. The latest development envronment s ncluded n the current HIMA DVD. For HIMatrx L3 valld from HIMA DVD (Edton 2012), see Chapter Installng the Cygwn Envronment The Cygwn envronment s requred snce the GNU C compler tools only runs under the Cygwn envronment. Cygwn envronment must be nstalled under Wndows 2000/XP/Vsta/Wn7. For further detals on the nstallaton requrements, refer to Chapter Deactvate the vrus scanner on the PC on whch Cygwn should be nstalled to avod problems when nstallng Cygwn. Perform the followng steps to nstall the Cygwn envronment: Start the setup program for nstallng Cygwn: 1. Copy the Cygwn nstallaton archve cygwn_ from the nstallaton CD to the local hard dsk (e.g., drve C:\). 2. Open the Cygwn ndex n Wndows Explorer C:\ cygwn_ Double-clck the setup exe fle to start the Cygwn nstallaton. 4. Clck the Next button to start the setup. Fgure 92: Cygwn Setup Dalog Box Page 352 of 386 HI E Rev. 4.01

353 Communcaton 12 ComUserTask The Dsable Vrus Scanner dalog box appears f the vrus scanner was not deactvated. Follow these steps to deactvate the vrus scanner durng the nstallaton of Cygwn. Deactvate the vrus scanner before nstallng Cygwn snce, dependng on the vrus scanner n use, the warnng dalog box could not appear although the vrus scanner s runnng. 1. Select Dsable Vrus Scanner to prevent potental problems durng the nstallaton due to the vrus scanner. 2. Clck the Next button to confrm. Select the nstallaton source n the Choose Installaton Type dalog box: 1. Select Install from Local Drectory as nstallaton source. 2. Clck the Next button to confrm. In the Choose Installaton Drectory dalog box, select the nstallaton target drectory for Cygwn: 1. Enter the drectory n whch Cygwn should be nstalled. 2. Accept all the defaults of the dalog box. 3. Clck the Next button to confrm. In the Select Local Package Drectory dalog box, select the Cygwn nstallaton archve. 1. Enter the name for the Cygwn nstallaton archve n the feld Local Package Drectory. Select the archve wth the nstallaton fles. 2. Clck the Next button to confrm. In the Select Packages dalog box, select all nstallaton packages: 1. Select the Curr rado button. 2. In the vew box, slowly clck the nstallaton opton next to All untl Install s dsplayed for a complete nstallaton of all packages (approx GB memory requrements). Make sure that Install s placed behnd each package. If the packages are not completely nstalled, mportant functons mght be mssng for complng the CUT C code! 3. Clck the Next button to confrm. HI E Rev Page 353 of 386

354 12 ComUserTask Communcaton Fgure 93: Select Packages Cygwn Setup Dalog Box Perform the followng steps to complete the Cygwn nstallaton: 1. Select Entry n the Start Menu. 2. Select Desktop Icon. 3. Clck the Fnsh button to complete the Cygwn nstallaton. Cygwn Commands cd (drectory name) cd.. ls -l help Descrpton Change drectory Move to parent drectory Dsplay all fles of a drectory Overvew of bash shell commands Table 335: Commands n Cygwn (Bash Shell) Installng the GNU Compler Perform the followng steps to nstall the GNU Compler: 1. In Wndows Explorer, open the drectory of the nstallaton CD. 2. Double-clck gcc-ppc-v3.3.2_bnutls-v2.15.zp. 3. Extract all fles n the Cygwn drectory (e.g., C:\cygwn\ ). The GNU compler s unpacked n the gcc-ppc subdrectory. 4. Set the envronment varables n the system control: Page 354 of 386 HI E Rev. 4.01

355 Communcaton 12 ComUserTask - Use the Wndows start menu Settngs->System Control->System to open the system propertes. - Select the Advanced tab. - Clck the Envronment Varables button. - Select the Path system varable n the System Varables box and extend the system varable wth C:\cygwn\gcc-ppc\bn. Copy the cut_src drectory from the nstallaton CD to the home drectory. The cut_src drectory contans all the 'nclude' and 'lb' drectores requred for creatng a ComUserTask. Fgure 94: Cygwn Structure Tree If the home drectory was not created automatcally, create t wth Wndows Explorer (e.g., C:\cygwn\home\User1). To create another home drectory for cygwn bash shell, add the set Home command to the cygwn.bat batch off C: chdr C:\cygwn\bn set Home=C:\User1 bash --logn - Fgure 95: Cygwn.bat Batch Fle Refer to Chapter for further nformaton on how to generate executable code for the example_cut program provded on the DVD. HI E Rev Page 355 of 386

356 12 ComUserTask Communcaton 12.8 Creatng New CUT Projects Ths chapter shows how to create a new CUT project and specfes whch fles must be adapted. The example cut CUT project located on the nstallaton CD s fully adapted. For creatng new CUT projects, HIMA recommends to create a new subdrectory of...\cut_src\ for each CUT project. Example: As a test, create the example cut drectory, name the C source example_cut.c, the ldb fle created n the make drectory s named example_cut.ldb. Create the drectory example_cut for the new ComUserTask. Fgure 96: Cygwn Structure Tree 1. Copy the fles - Example_cut.c - Example_cut.mke - makefle n the drectory example_cut. Fgure 97: C Code Fle n the example_cut Folder As descrbed n the followng chapters, perform all changes to.mke fle and makefle for every new project. Page 356 of 386 HI E Rev. 4.01

357 Communcaton 12 ComUserTask CUT Makefles Confguraton of CUT makefles for dfferent source fles and ldb fles. As descrbed n the followng chapters, a total of three makefles must be adapted Makefle wth ".mke" Extenson The.mke fle s located n the correspondng source code drectory, e.g., cut_src\example_cut\example_cut.mke. Fgure 98:.mke Fle n the example_cut Folder Change the mke fle as descrbed below: 1. The module varable must have the same loadable name as the correspondng.mke fle (e.g., example_cut). 2. One or multple C fles requred for creatng the target code (loadable fle) are assgned to the c_sources varable. #################################################################### # # make fle (DOS/NT) # $Id: example_cut.mke :35:46Z es_fp $ #################################################################### # # assgn name of module here (e.g. nl for NetworkLayer) module= example_cut # # assgn module sources here sources= c_sources= $(module).c asm_sources= Fgure 99:.mke Fle Startng wth Lne 1 HI E Rev Page 357 of 386

358 12 ComUserTask Communcaton Makefle The makefle fle s located n the correspondng source code drectory, e.g., cut_src\example_cut\makefle. Fgure 100: makefle n the example_cut Folder Change the makefle fle as descrbed below: 1. Drag the nclude lne for the.mke fle upwards and enter the current name for the the.mke fle. 2. Expand the make call wth the two varables SUBMOD_DIRS and CUT_NAME. all_objects: nclude example_cut.mke cut: $(MAKE) -C../make elf SUBMOD_DIRS=cut_src/$(module) CUT_NAME=$(module) all_objects: $(c_objects) $(asm_objects) $(objects) Fgure 101: makefle Startng wth Lne Makefle wth the 'makenc.nc.app' Extenson The only change made to ths and all the followng CUT projects s that the name of the CUT loadable s made changeable va a make varable. The makenc.nc.app fle s located n the cut_src drectory e.g., cut_src\makenc.nc.app. Fgure 102: makenc.nc.app fle n the example_cut Folder Change the makenc.nc.app fle as descrbed below: Page 358 of 386 HI E Rev. 4.01

359 Communcaton 12 ComUserTask 1. Expand the fle wth the CUT_NAME varable. all: 'dd make for module ['lb$(module).$(libext)']' lb$(module).$(libext): $(objects) $(c_objects) $(asm_objects) $(lbrares) SUBMOD2_LIBS=$(foreach lb,$(submod_libs),../../$(lb)) CUT_NAME=cut makealllbs: $(MAKE) -C../../cut_src cut_src \ BGTYPE=" $(CUT_NAME)"; \ f [! -f $$BGTYPE.map ] ; then \ echo "Error: MAP-Date $$BGTYPE.map exstert ncht"; \ ext 1; \ f; \ OS_LENGTH=$$(gawk '/ OS_LENGTH/ {prnt substr($$1,3,8)}' $$BGTYPE.map); \ echo; \ $(OBJCOPY) --strp-all --strp-debug -O bnary $$BGTYPE.elf $$BGTYPE.bn;\ echo; \ echo "Buldng C3-Loadable-Bnary..."; \ $(MCRC) $$BGTYPE.bn 0 $$OS_LENGTH $$OS_LENGTH $$BGTYPE.ldb; \ echo; \ $(CUT_NAME).elf: makealllbs $(SUBMOD2_LIBS) test -f secton.dld && $(MAKE) $(CUT_NAME).elf && $(MAKE) makeloadable \ { echo "ERROR: Invald subdr. Please nvoke elf target only from make/ subdrectory." && echo && false ; } ; # end of fle: makenc.nc Fgure 103: makenc.nc.app Startng wth Lne Adaptng C Source Codes Perform the followng steps to open the source code fle: 1. Open the project drectory cut_src\example_cut that has been created and confgured n the prevous steps. 2. Open the C source code fle wth the extenson.c wth an edtor (e.g. notepad). HI E Rev Page 359 of 386

360 12 ComUserTask Communcaton Confgure Input and Output Varables Perform the followng steps to confgure the nput and output varables n the source code fle: 1. The data sze of the varables that should be created n the SILworX Output Varables tab must be set n the CUT_PDI[X] array of the source code fle. 2. The data sze of the varables that should be created n the SILworX Input Varables tab must be set n the CUT_PDO[X] array of the source code fle Start Functon n CUT The vod CUCB_TaskLoop (udword mode)c functon s the start functon and s cyclcally nvoked by the user program Example Code "example_cut.c" The followng C code copes the value from the CUT_PDI[0] nput to the CUT_PDO[0] output and returns the value unchanged to the SILworX user program. The C code example_cut.c s located on the nstallaton CD. Fgure 104: Resource Structure Tree Page 360 of 386 HI E Rev. 4.01

361 Communcaton 12 ComUserTask Fgure 105: C Code example_cut.c HI E Rev Page 361 of 386

362 12 ComUserTask Communcaton Creatng Executable Codes (ldb fle) Perform the followng steps to create the executable code (ldb fle): 1. Start Cygwn Bash Shell. 2. Move to the drectory.../cut_src/example_cut/. 3. Start the code generaton by specfyng: make cut_hmax for HImax make cut_l2 for HIMatrx L2 make cut_l3 for HIMatrx L3. The cut.ldb bnary fle located n the /cut_src/make/ drectory s generated automatcally. 4. If CRC32 was generated, also the executable code was generated (see red markng n Fgure 106). Fgure 106: Cygwn Bash Shell Ths executable code (ldb fle) must be loaded nto the ComUserTask, see Chapter Page 362 of 386 HI E Rev. 4.01

363 Communcaton 12 ComUserTask Implementng the ComUserTask n the Project Perform the followng steps n SILworX to ntegrate the ComUserTask nto the project: Creatng the ComUserTask To create a new ComUserTask 1. In the structure tree, open Confguraton, Resource, Protocols. 2. On the context menu for protocols, clck New, ComUserTask to add a ComUserTask. 3. Rght-clck the ComUserTask, clck Propertes and select the COM module. Accept the default settngs for the frst confguraton. Only one ComUserTask per resource may be created Loadng Program Code nto the Project To load a ComUserTask nto the project 1. In the structure tree, open Confguraton, Resource, Protocols. 2. Rght-clck ComUserTask and select Load User Task. Open the drectory.../cut_src/make/ 3. Select the ldb fle that should be processed n the ComUserTask. Dfferent versons of the ldb fle can be ntegrated by reloadng the executable code (ldb fle). The correctness of the ldb fle's content s not checked when loadng. The ldb fle s then compled n the project together wth the resource confguraton and can be loaded nto the controller. If the ldb fle s changed, the project must be recompled and reloaded. Connectng Varables to CUT The user can defne a not safety-related process communcaton between the safe CPU and the not safe COM (CUT). Dependng on the controller, a gven data amount can be exchanged n each drecton (see Chapter sehe Kaptel 3.2). Create the followng global varables: Varable COM_CPU CPU_COM Type UINT UINT HI E Rev Page 363 of 386

364 12 ComUserTask Communcaton Connectng Process Varables Process varables n the ComUserTask: 1. Rght-clck ComUserTask and select Edt. 2. In the Edt dalog box, select the Process Varables tab. Output Varables (CPU->COM) The Output Varables tab contans the varables that should be transferred from the CPU to the COM module. Name Type Offset Global Varable CPU_COM UINT 0 CPU_COM Table 336: Output Varables (CPU->COM) 1. Drag the global varables to be sent from the Object Panel onto the Output Varables tab. 2. Rght-clck anywhere n the Output Varables area to open the context menu. 3. Clck New Offsets to re-generate the varable offsets. Input Varables (COM->CPU) The Input Varables tab contans the varables that should be transferred from the COM to the CPU module. Name Type Offset Global Varable COM_CPU UINT 0 COM_CPU Table 337: Input Varables(COM->CPU) 1. Drag the global varables to be receved from the Object Panel onto the Input Varables area. 2. Rght-clck anywhere n the the Input Varables area to open the context menu. 3. Clck New Offsets to re-generate the varable offsets. To verfy the ComUserTask confguraton 1. In the structure tree, open Confguraton, Resource, Protocols, ComUserTask. 2. Rght-clck Verfcaton to verfy the CUT confguraton. 3. Thoroughly verfy the messages dsplayed n the logbook and correct potental errors. Page 364 of 386 HI E Rev. 4.01

365 Communcaton 12 ComUserTask Creatng the SILworX User Program To create the SILworX user program 1. In the structure tree, open Confguraton, rght-clck Resource, then select Edt. 2. Drag the global varables COM_CPU and CPU_COM from the Object Panel to the drawng area. 3. Create the user program as specfed n the followng fgure. Fgure 107: SILworX Program Edtor To confgure the schedule nterval [ms] 1. Rght-clck ComUserTask, then clck Propertes. 2. In the Schedule Interval [ms] nput box, specfy n whch ntervals the ComUserTask should be nvoked. Use the resource's user program to recomple the ComUserTask confguraton and load t nto the controller. The new confguraton can only be used wth the HIMax/HIMatrx system after ths step s completed. To check the ComUserTask wth the onlne test I 1. In the structure tree, select Confguraton, Resource, Program. 2. Rght-clck Program and select Onlne. Log n to the system. Fgure 108: SILworX Onlne Test Functon of the SILworX user program: The SILworX user program adds the value 1 to the sgnal COM_CPU (data nputs) and transmts the result to the sgnal CPU_COM (data outputs). Wth the next CUT call (schedule nterval [ms]), the sgnal CPU_COM s transmtted to the CUT functon (see example code n Chapter ). The ComUserTask receves the sgnal CPU_COM and returns the value unchanged wth the sgnal COM_CPU. HI E Rev Page 365 of 386

366 12 ComUserTask Communcaton DCP: Error n loadng a confguraton wth CUT Run Tme Problems (e.g., ComUserTask n nfnte loop): Reason for run tme problems: Programmng a loop, whch runs for a long tme, n the correspondng CUT source code results n a deadlock of the COM processor. As a consequence, no connecton can be establshed to the controller and the resource confguraton can no longer be deleted. Soluton: Reset the HIMax communcaton module or the HIMatrx controller: In the onlne vew assocated wth the Hardware Edtor, use the Mantenance/Servce, Module (Restart) functon to reset the communcaton module (or the reset push-button to reset the HIMatrx system, see the controller's data sheet). Create a new CUT (wthout run tme errors, endless loops). Load the CUT (ldb fle) nto the project. Generate the code. Load the code nto the controller. Page 366 of 386 HI E Rev. 4.01

367 Communcaton 13 General 13 General 13.1 Confgurng the Functon Blocks The feldbus protocols and the correspondng functon blocks operate on the COM module of the HIMax controller. Therefore, the functon blocks must be created n the SILworX. To do ths, open Confguraton, Resource, Protocols... n the structure tree. To control the functon blocks on the COM module, functon blocks can be created n the SILworX user program (see Chapter ). These can be used as standard functon blocks. Common varables are used to connect the functon blocks n the SILworX user program to the correspondng functon blocks n the SILworX structure tree. These must be created beforehand usng the Varable Edtor. De Verbndung der Funktonsbaustene m Anwenderprogramm von SILworX mt den entsprechenden Funktonsbaustenen m Strukturbaum von SILworX erfolgt über gemensame Varablen. Dese müssen zuvor vom Anwender m Varablenedtor erstellt werden Purchasng Functon Block Lbrares The functon block lbrares for PROFIBUS DP and TCP Send/Receve must be added to the project usng the Restore... functon (from the context menu for the project). The functon block lbrares are avalable upon request from HIMA support. Phone: +49 (0) E-Mal: support@hma.com Confgurng the Functon Blocks n the User Program Drag the requred functon blocks onto the user program. Confgure the nputs and outputs as descrbed for the ndvdual functon block. Upper Part of the Functon Block The upper part of the functon block corresponds to the user nterface that the user program uses for controllng t. The varables used n the user program are connected here. The prefx "A" means Applcaton. Fgure 109: Functon Block PNM_MSTST (oberer Tel) HI E Rev Page 367 of 386

368 13 General Communcaton Lower Part of the Functon Block The functon block s lower part represents the connecton to the functon block (n the SILworX structure tree). The varables that must be connected to the functon block located n SILworX structure tree are connected here. Fgure 110: Functon Block PNM_MSTST (unterer Tel) Confgurng the Functon Blocks n the SILworX Structure Tree To confgure the functon block n the SILworX structure tree 1. In the structure tree, open Confguraton, Resource, Protocols, e.g., PROFIBUS Master. 2. Rght-clck Functon Blocks, and then clck New. 3. In the SILworX structure tree, clck the sutable functon block. Fgure 111: Functon Blocks Page 368 of 386 HI E Rev. 4.01

369 Communcaton 13 General The nputs of the functon block (checkmark n the Input Varables column) must be connected to the same varables that are connected n the user program to the F_Outputs of the functon block. The outputs of the functon block (no checkmark n the Input Varables column) must be connected to the same varables that are connected n the user program to the F_Inputs of the functon block. Fgure 112: Systemvarables of Functon Block MSTAT HI E Rev Page 369 of 386

370 13 General Communcaton 13.2 Maxmum Communcaton Tme Slce The maxmum communcaton tme slce s the tme perod n mllseconds (ms) and per CPU cycle assgned to the processor module for processng the communcaton tasks.if not all upcomng communcaton tasks can be processed wthn one CPU cycle, the whole communcaton data s transferred over multple CPU cycles (number of communcaton tme slces > 1) For HIMax Controllers To determne the maxmum communcaton tme slce 1. Use the system under the maxmum load: All communcaton protocols are operatng (safeethernet and standard protocols). 2. Open the Control Panel and select the Statstcs structure tree element. 3. Open Cyc.Async to read the number of communcaton tme slces. 4. Open Tme.Async to read the duraton of one communcaton tme slce. For calculatng the maxmum response tme (see Chapter 4.7), the number of communcaton tme slces must be equal to 1. The duraton of the communcaton tme slce must be set such that, when usng the communcaton tme slce, the CPU cycle cannot exceed the watchdog tme specfed by the process Load Lmtaton A computng tme budget expressed n % (µp-budget) can be defned for each communcaton protocol. It allows one to dstrbute the avalable computng tme among the confgured protocols. The sum of the computng tme budgets confgured for all communcaton protocols on a CPU or COM modules may not exceed 100%. The defned computng tme budgets of the ndvdual communcaton protocols are montored. If a communcaton protocol already acheved or exceeded ts budget and no reserve computng tme s avalable, the communcaton protocol cannot be processed. If suffcent addtonal computng tme s avalable, t s used to process the communcaton protocols that already acheved or exceeded ther budget. It can therefore happen that a communcaton protocol uses more budget than t has bee allocated to t. It s possble that more than 100 % computng tme budget s dsplayed onlne. Ths s not a fault; the budget exceedng 100 % ndcates the addtonal computng tme used. The addtonal computng tme budget s not a guarantee for a certan communcaton protocol and can be revoked from the system at any tme. Page 370 of 386 HI E Rev. 4.01

371 Communcaton 13 General Appendx Glossary Term Descrpton ARP Address Resoluton Protocol: Network protocol for assgnng the network addresses to hardware addresses AI Analog Input Connector Board Connector board for the HIMax module COM Communcaton module CRC Cyclc Redundancy Check DI Dgtal Input DO Dgtal Output EMC Electromagnetc Compatblty EN European Norm ESD ElectroStatc Dscharge FB Feldbus FBD Functon Block Dagram FTT Fault Tolerance Tme ICMP Internet Control Message Protocol: Network protocol for status or error messages IEC Internatonal Electrotechncal Commsson MAC address Hardware address of one network connecton (Meda Access Control) PADT Programmng And Debuggng Tool (n accordance wth IEC ), PC wth SILworX PE Protectve Earth PELV Protectve Extra Low Voltage PES Programmable Electronc System PFD Probablty of Falure on Demand, probablty of falure on demand of a safety functon PFH Probablty of Falure per Hour, probablty of a dangerous falure per hour R Read Rack ID Base plate dentfcaton (number) Non-reactve Supposng that two nput crcuts are connected to the same source (e.g., a transmtter). An nput crcut s termed "non-reactve" f t does not dstort the sgnals of the other nput crcut. R/W Read/Wrte SB System Bus (Module) SELV Safety Extra Low Voltage SFF Safe Falure Fracton, porton of safely manageable faults SIL Safety Integrty Level (n accordance wth IEC 61508) SILworX Programmng tool for HIMax SNTP Smple Network Tme Protocol (RFC 1769) SRS System.Rack.Slot addressng of a module SW Software TMO TMeOut TMR Trple Module Redundancy W Wrte r P Peak value of a total AC component Watchdog (WD) Tme montorng for modules or programs. If the watchdog tme s exceeded, the module or program enters the ERROR STOP state. WDT WatchDog Tme HI E Rev Page 371 of 386

372 13 General Communcaton Index of Fgures Fgure 1: System Structures 38 Fgure 2: Structure for Confgurng a Redundant Connecton 40 Fgure 3: Resource Structure Tree 40 Fgure 4: Parameter Values for a Redundant safeethernet Connecton: 41 Fgure 5: Detal Vew n the safeethernet Edtor 41 Fgure 6: Redundant Connecton between Two HIMax Controllers 50 Fgure 7: Redundant Connecton of Two HIMax Controllers usng a Lne 50 Fgure 8: Reacton Tme wth Interconnecton of Two HIMax Controllers 56 Fgure 9: Reacton Tme for Connecton between One HIMax and One HIMatrx Controller 56 Fgure 10: Reacton Tme wth Two Remote I/Os and One HIMax controller 57 Fgure 11: Reacton Tme wth Two HIMax Controllers and One HIMatrx controller 57 Fgure 12: Reacton Tme wth Interconnecton of Two HIMatrx Controllers 58 Fgure 13: Reacton Tme wth Remote I/Os 59 Fgure 14: Reacton Tme wth Two HIMatrx Controllers and One HIMax Controller 59 Fgure 15: safeethernet Connecton between A1 n Project A and B1 n Project B 64 Fgure 16: Project A as Local Project 65 Fgure 17: Project B as Local Project 65 Fgure 18: Confgurng Communcaton between SILworX and ELOP II Factory 66 Fgure 19: HIMatrx Proxy Resource 67 Fgure 20: Parameter for a safeethernet Connecton to a Proxy Resource 68 Fgure 21: safeethernet Connecton Export 69 Fgure 22: Importng Connectons n ELOP II Factory 70 Fgure 23: P2P Edtor n ELOP II Factory 70 Fgure 24: Assgnng Send Sgnals n ELOP II Factory 71 Fgure 25: Assgnng Receve Sgnals n ELOP II Factory 71 Fgure 26: Control Panel for Connecton Control 72 Fgure 27: Controllng the Consumer/Provder Status (IOxS) 75 Fgure 28: PROFIsafe Control Byte and Status Byte 77 Fgure 29: Reacton Tme between an F-Devce and a HIMA F-Host 79 Fgure 30: Reacton Tme usng a HIMA F-Host and two F-Devces 79 Fgure 31: Structure Tree for the PROFINET IO Controller 84 Fgure 32: Devce Access Pont (DAP) for the PROFINET-IO Devce 85 Fgure 33: Structure Tree for the PROFINET IO Controller 89 Fgure 34: Communcaton va PROFINET IO/PROFIsafe 103 Fgure 35: Structure Tree for the PROFINET IO Devce 109 Fgure 36: Communcaton va PROFINET IO 120 Fgure 37: HIMax PROFIBUS DP Slave wth Modules 123 Fgure 38: User Data Feld 126 Fgure 39: Verfcaton Dalog Box 126 Page 372 of 386 HI E Rev. 4.01

373 Communcaton 13 General Fgure 40: PROFIBUS DP Master Propertes 127 Fgure 41: PROFIBUS DP Slave Propertes 128 Fgure 42: Isochronous PROFIBUS DP Cycle 137 Fgure 43: Edt User Parameters Dalog Box 147 Fgure 44: MSTAT Functon Block 149 Fgure 45: RALRM Functon Block 152 Fgure 46: RDIAG Functon Block 156 Fgure 47: RDREC Functon Block 160 Fgure 48: SLACT Functon Block 163 Fgure 49: WRREC Functon Block 166 Fgure 50: The ACTIVE Auxlary Functon Block 169 Fgure 51: The ALARM Auxlary Functon Block 170 Fgure 52: The DEID Auxlary Functon Block 171 Fgure 53: The ID Auxlary Functon Block 172 Fgure 54: The NSLOT Auxlary Functon Block 173 Fgure 55: The SLOT Auxlary Functon Block 173 Fgure 56: The STDDIAG Auxlary Functon Block 174 Fgure 57: RS485 Bus Topology 188 Fgure 58: Communcaton va Modbus TCP/IP 192 Fgure 59: Modbus Network 207 Fgure 60: Modbus Gateway 210 Fgure 61: Seral Modbus 213 Fgure 62: Modbus Telegram 213 Fgure 63: Connectng a HIMax to a Semens Controller 239 Fgure 64: Data Transfer between a HIMax and a Semens Controller 240 Fgure 65: Lst of Varables n the Semens UDT1 Block 241 Fgure 66: Lst of Varables n the Semens DB1 Functon Block 242 Fgure 67: SIMATIC Symbol Edtor 242 Fgure 68: Receve Functon Chart 243 Fgure 69: Send Functon Chart 244 Fgure 70: TCP Connecton Propertes n SILworX 245 Fgure 71: Semens Lst of Varables 254 Fgure 72: HIMax/HIMatrx Lst of Varables 254 Fgure 73: Functon Block TCP_Reset 256 Fgure 74: Functon Block TCP_Send 259 Fgure 75: Functon Block TCP_Receve 262 Fgure 76: Functon Block TCP_ReceveLne 266 Fgure 77: Functon Block TCP_ReceveVar 270 Fgure 78: Data Packet Structure 271 Fgure 79: Redundant X-OPC Operaton 286 HI E Rev Page 373 of 386

374 13 General Communcaton Fgure 80: Wzard for Installng the X-OPC Server 287 Fgure 81: Wzard for Installng the X-OPC Server 287 Fgure 82: Settng the Class ID of the Second X-OPC Server Manually 288 Fgure 83: Redundant X-OPC Operaton 290 Fgure 84: Redundant X-OPC Operaton 291 Fgure 85: Alarm & Event Edtor 294 Fgure 86: Redundant X-OPC Operaton 295 Fgure 87: safeethernet Edtor 298 Fgure 88: Detaled Vew of the safeethernet Connecton 299 Fgure 89: Fve Areas of a Scalar Event 301 Fgure 90: Block Dagram 309 Fgure 91: Process Data Exchange between CPU and COM (CUT) 316 Fgure 92: Cygwn Setup Dalog Box 352 Fgure 93: Select Packages Cygwn Setup Dalog Box 354 Fgure 94: Cygwn Structure Tree 355 Fgure 96: Cygwn Structure Tree 356 Fgure 97: C Code Fle n the example_cut Folder 356 Fgure 98:.mke Fle n the example_cut Folder 357 Fgure 99:.mke Fle Startng wth Lne Fgure 100: makefle n the example_cut Folder 358 Fgure 101: makefle Startng wth Lne Fgure 102: makenc.nc.app fle n the example_cut Folder 358 Fgure 103: makenc.nc.app Startng wth Lne Fgure 104: Resource Structure Tree 360 Fgure 105: C Code example_cut.c 361 Fgure 106: Cygwn Bash Shell 362 Fgure 107: SILworX Program Edtor 365 Fgure 108: SILworX Onlne Test 365 Fgure 109: Functon Block PNM_MSTST (oberer Tel) 367 Fgure 110: Functon Block PNM_MSTST (unterer Tel) 368 Fgure 111: Functon Blocks 368 Fgure 112: Systemvarables of Functon Block MSTAT 369 Page 374 of 386 HI E Rev. 4.01

375 Communcaton 13 General Index of Tables Table 1: Addtonal Vald Manuals 11 Table 2: Standards for EMC, Clmatc and Envronmental Requrements 14 Table 3: General requrements 14 Table 4: Clmatc Requrements 14 Table 5: Mechancal Tests 15 Table 6: Interference Immunty Tests 15 Table 7: Nose Emsson Tests 15 Table 8: Revew of the DC Supply Characterstcs 16 Table 9: Standard Protocols 19 Table 10: Avalable Standard Protocols 20 Table 11: Protocols on one Communcaton Module 20 Table 12: Protocols on one Communcaton Module 20 Table 13: Protocols Avalable for the HIMax/HIMatrx Systems 22 Table 14: Ethernet Interfaces Propertes 23 Table 15: Confguraton Parameters 27 Table 16: Routng Parameters 28 Table 17: Ethernet Swtch Parameters 28 Table 18: VLAN Tab 29 Table 19: Values for LLDP 29 Table 20: Avalable Feldbus Submodules 31 Table 21: Optons for Feldbus Interfaces FB1 and FB2 31 Table 22: Avalable HIMax Components 32 Table 23: Examples of COM Module Part Numbers and Names 32 Table 24: Equpment of HIMatrx Controller wth Feldbus Submodules 32 Table 25: Examples of HIMatrx Controller Part Numbers 33 Table 26: Pn Assgnment of D-Sub Connectors for RS Table 27: Pn Assgnment of D-sub Connectors for PROFIBUS DP 34 Table 28: Pn Assgnment of the D-Sub Connectors for INTERBUS 34 Table 29: Pn Assgnment of D-Sub Connectors for RS Table 30: Pn Assgnment of D-Sub Connectors for RS Table 31: Pn Assgnment of D-Sub Connectors for SSI 35 Table 32: Safety-Related Protocol (safeethernet) 36 Table 33: safeethernet Protocol Parameters 44 Table 34: System Varables Tab n the safeethernet Edtor 48 Table 35: Avalable Ethernet Interfaces 48 Table 36: Combnatons for safeethernet Connectons 50 Table 37: Vew Box of the safeethernet Connecton 73 Table 38: Overvew of PROFINET IO Functon Blocks 74 Table 39: Equpment and System Requrements for the PROFINET IO Controller. 83 HI E Rev Page 375 of 386

376 13 General Communcaton Table 40: PROFINET IO Controller Propertes 83 Table 41: The PROFINET IO Devce (Propertes) Tab 90 Table 42: Parameters (Propertes) Tab 91 Table 43: Parameters (Propertes) Tab 91 Table 44: Parameters Tab 92 Table 45: System Varables Tab 92 Table 46: Parameter Tab of the I/O PROFINET IO Module 93 Table 47: Parameters Tab 94 Table 48: System Varables Tab 97 Table 49: F Parameters for Submodule Input (Propertes) 98 Table 50: Parameters Tab 99 Table 51: System Varables Tab 100 Table 52: Parameters Tab 101 Table 53: System Varables Tab 102 Table 54: Applcaton Relaton (Propertes) 103 Table 55: Alarm CR (Propertes) 104 Table 56: Input CR (Propertes) 105 Table 57: Input CR (Edt) 106 Table 58: Output CR (Propertes) 107 Table 59: Equpment and System Requrements for the PROFINET IO Controller. 108 Table 60: PROFINET IO Controller Propertes 108 Table 61: PROFINET IO Devce General Propertes 112 Table 62: PROFINET IO Modules 113 Table 63: PROFIsafe Modules 114 Table 64: Devce Module General Propertes 115 Table 65: Edt Dalog Box for the Input Submodule 117 Table 66: Equpment and System Requrements 119 Table 67: PROFIBUS DP Master Propertes 119 Table 68: Outputs n the HIMA PROFIBUS DP Slave 121 Table 69: Inputs n the HIMA PROFIBUS DP Slave 121 Table 70: Varables of the Input Module [000] DP Input/ELOP Export: 2 Bytes 124 Table 71: Varables of the Input Module [001] DP Input/ELOP Export: 8 Bytes 124 Table 72: Varables of the Input Module [002] DP Input/ELOP Export: 1 Byte 124 Table 73: Varables of the Output Module [003] DP Output/ELOP Import: 2 Bytes 125 Table 74: Varables of the Output Module [004] DP Output/ELOP Import: 1 Byte 125 Table 75: System Varables n the PROFIBUS DP Master 129 Table 76: General Propertes for PROFIBUS DP Master 130 Table 77: Tmngs Tab n the Propertes Dalog Box for the PROFIBUS DP Master 132 Table 78: CPU/COM Tab n the Propertes Dalog Box for the PROFIBUS DP Master 132 Table 79: Other Propertes for the PROFIBUS DP Master 133 Page 376 of 386 HI E Rev. 4.01

377 Communcaton 13 General Table 80: Default Values for Token Rotaton Tme Used wth Dfferent Transfer Rates 134 Table 81: Transmsson Tme for a Character Used wth dfferent Transfer Rates 135 Table 82: Elements Requred for Calculatng the Target Token Rotaton Tme 135 Table 83: System Varables n the PROFIBUS DP Slave 139 Table 84: Parameters Tab n the PROFIBUS DP Slave 140 Table 85: Groups Tab n the Propertes Dalog Box for the PROFIBUS DP Slave 141 Table 86: DP V1 Tab n the Propertes Dalog Box for the PROFIBUS DP Slave 141 Table 87: Alarms Tab n the Propertes Dalog Box for the PROFIBUS DP Slave 142 Table 88: Data Tab n the Propertes Dalog Box for the PROFIBUS DP Slave 142 Table 89: Model Tab n the Propertes Dalog Box for the PROFIBUS DP Slave 143 Table 90: Features Tab n the Propertes Dalog Box for the PROFIBUS DP Slave 143 Table 91: Baud Rates Tab n the Propertes Dalog Box for the PROFIBUS DP Slave 144 Table 92: Acyclc Tab n the Propertes Dalog Box for the PROFIBUS DP Slave 144 Table 93: GSD Fle of the HIMax/HIMatrx PROFIBUS DP Slave 145 Table 94: Example: Group of the User Data Feld 147 Table 95: Example: Group of the User Data Feld 147 Table 96: Overvew of the PROFIBUS DP Functon Blocks 148 Table 97: A-Inputs for the MSTAT Functon Block 149 Table 98: A-Outputs for the MSTAT Functon Block 149 Table 99: F-Inputs for the MSTAT Functon Block 150 Table 100: F-Outputs for the MSTAT Functon Block 150 Table 101: Input System Varables 150 Table 102: Output System Varables 151 Table 103: A-Inputs for the RDIAG Functon Block 152 Table 104: A-Outputs for the RDIAG Functon Block 153 Table 105: F-Inputs for the RALRM Functon Block 153 Table 106: F-Outputs for the RALRM Functon Block 153 Table 107: Input System Varables 154 Table 108: Output System Varables 154 Table 109: Alarm Data 155 Table 110: A-Inputs for the RDIAG Functon Block 156 Table 111: A-Outputs for the RDIAG Functon Block 156 Table 112: F-Inputs for the RDIAG Functon Block 157 Table 113: F-Outputs for the RDIAG Functon Block 157 Table 114: Input System Varables 157 Table 115: Output System Varables 158 Table 116: Dagnostc Data 158 Table 117: A-Inputs for the RDREC Functon Block 160 Table 118: A-Outputs for the RDREC Functon Block 160 Table 119: F-Inputs for the RDREC Functon Block 161 HI E Rev Page 377 of 386

378 13 General Communcaton Table 120: F-Outputs for the RDREC Functon Block 161 Table 121: Input System Varables 161 Table 122: Output System Varables 162 Table 123: Data 162 Table 124: A-Inputs for the SLACT Functon Block 163 Table 125: A-Outputs for the SLACT Functon Block 164 Table 126: F-Inputs for the SLACT Functon Block 164 Table 127: F-Outputs for the SLACT Functon Block 164 Table 128: Input System Varables 165 Table 129: Output System Varables 165 Table 130: A-Inputs for the WRREC Functon Block 166 Table 131: A-Outputs for the WRREC Functon Block 166 Table 132: F-Inputs for the WRREC Functon Block 167 Table 133: F-Outputs for the WRREC Functon Block 167 Table 134: Input System Varables 167 Table 135: Output System Varables 168 Table 136: Data 168 Table 137: Overvew of the Auxlary Functon Blocks 169 Table 138: Inputs for the ACTIVE Auxlary Functon Block 169 Table 139: Outputs for the ACTIVE Auxlary Functon Block 169 Table 140: Inputs for the ALARM Auxlary Functon Block 170 Table 141: Outputs for the ALARM Auxlary Functon Block 171 Table 142: Inputs for the DEID Auxlary Functon Block 171 Table 143: Outputs for the DEID Auxlary Functon Block 171 Table 144: Inputs for the ID Auxlary Functon Block 172 Table 145: Outputs for the ID Auxlary Functon Block 172 Table 146: Inputs for the NSLOT Auxlary Functon Block 173 Table 147: Outputs for the NSLOT Auxlary Functon Block 173 Table 148: Inputs for the SLOT Auxlary Functon Block 174 Table 149: Outputs for the SLOT Auxlary Functon Block 174 Table 150: Inputs for the STDDIAG Auxlary Functon Block 175 Table 151: Outputs for the STDDIAG Auxlary Functon Block 175 Table 152: Error Codes of the Functon Blocks 176 Table 153: Vew Box of the PROFIBUS Master 179 Table 154: PROFIBUS DP Master State 179 Table 155: Behavor of the PROFIBUS DP Master 179 Table 156: The FBx LED 180 Table 157: The FAULT FBx 180 Table 158: Equpment and System Requrements for the HIMA PROFIBUS DP Slave 181 Table 159: Propertes of the HIMA PROFIBUS DP Slave 181 Page 378 of 386 HI E Rev. 4.01

379 Communcaton 13 General Table 160: System Varables n the PROFIBUS DP Slave 183 Table 161: Slave Propertes: General Tab 185 Table 162: Vew Box of the PROFIBUS DP Slave 186 Table 163: The FBx LED 187 Table 164: The FAULT FBx 187 Table 165: Termnal Assgnment for H Table 166: Bus Cable 189 Table 167: Propertes of the RS485 Transmsson 190 Table 168: Equpment and System Requrements for the Modbus Master 191 Table 169: Propertes of the Modbus Master 192 Table 170: System Varables for the Modbus Master 197 Table 171: General Propertes of the Modbus Master 199 Table 172: Parameters of COM/CPU 199 Table 173: Modbus Functon Codes 200 Table 174: Request Telegram Read Cols 203 Table 175: Request Telegram Read Dscrete Inputs 203 Table 176: Request Telegram Read Holdng Regsters 203 Table 177: Request Telegram Read Input Regsters 204 Table 178: Read Wrte Holdng Regster 205 Table 179: Request Telegram Wrte Multple Cols 205 Table 180: Request Telegram Wrte Multple Regsters 206 Table 181: Request Telegram Wrte Sngle Col (05) 206 Table 182: Request Telegram Wrte Sngle Regster 206 Table 183: System Varables for TCP/UDP Slaves 208 Table 184: Confguraton Parameters 209 Table 185: Connecton Parameters for the Modbus Gateway 212 Table 186: Status Varables for the Gateway Slave 212 Table 187: Connecton Parameters for the Gateway Slave 212 Table 188: Parameters for the Seral Modbus Master 214 Table 189: System Varables n the Modbus Slave 214 Table 190: Connecton Parameters for the Modbus Master 215 Table 191: Vew Box of the Modbus Master 216 Table 192: The FBx LED 217 Table 193: The FAULT FBx 217 Table 194: Equpment and System Requrements for the HIMA Modbus Slave 218 Table 195: Propertes of the Modbus Slave 218 Table 196: Slots Allowed for the Redundant Modbus Slave COM Modules 220 Table 197: Modbus Slave Propertes Set Tab 222 Table 198: Modbus Slave Set Tab 223 Table 199: TCP and UDP Ports Tab for HIMA Modbus Slave 225 HI E Rev Page 379 of 386

380 13 General Communcaton Table 200: System Varables Tab for the HIMA Modbus Slave 225 Table 201: Modbus Functon Codes of the HIMA Modbus Slave 226 Table 202: Regster Varables n the Regster Area of the Modbus Slave 230 Table 203: Bt Varables n the Bt Area of the Modbus Slave 231 Table 204: Offsets Tab for HIMA Modbus Slave 232 Table 205: Varables Mrrored from the Regster Area to the Bt Area 233 Table 206: Varables Mrrored from the Bt Area to the Regster Area 234 Table 207: Vew Box of the Modbus Slave 236 Table 208: Master Data Vew Box 236 Table 209: The FBx LED 237 Table 210: The FAULT FBx 237 Table 211: Error Codes of Modbus TCP/IP 237 Table 212: Equpment and System Requrements for the S&R TCP 238 Table 213: S&R TCP Propertes 238 Table 214: HIMax Controller Confguraton 240 Table 215: Semens SIMATIC 300 Confguraton 240 Table 216: Global Varables 245 Table 217: Varables for Receve Data 246 Table 218: Varables for Send Data 246 Table 219: System Varables S&R TCP 247 Table 220: S&R TCP General Propertes 247 Table 221: Parameters of COM/CPU 248 Table 222: System Varables 249 Table 223: S&R TCP Connecton Propertes 251 Table 224: Functon Blocks for S&R TCP Connectons 255 Table 225: A-Inputs for the TCP_Reset Functon Block 256 Table 226: A-Outputs for the TCP_Reset Functon Block 256 Table 227: F-Inputs for the TCP_Reset Functon Block 257 Table 228: F-Outputs for the TCP_Reset Functon Block 257 Table 229: Input System Varables 257 Table 230: Output System Varables 258 Table 231: A-Inputs for the TCP_Send Functon Block 259 Table 232: A-Outputs for the TCP_Send Functon Block 259 Table 233: F-Inputs for the TCP_Send Functon Block 260 Table 234: F-Outputs for the TCP_Send Functon Block 260 Table 235: Input System Varables 260 Table 236: Output System Varables 261 Table 237: Send Data 261 Table 238: A-Inputs for the TCP_Receve Functon Block 262 Table 239: A-Outputs for the TCP_Receve Functon Block 263 Page 380 of 386 HI E Rev. 4.01

381 Communcaton 13 General Table 240: A-Inputs for the TCP_Receve Functon Block 263 Table 241: F-Outputs for the TCP_Receve Functon Block 263 Table 242: Input System Varables 264 Table 243: Output System Varables 264 Table 244: Receve Varables 264 Table 245: A-Inputs for the TCP_ReceveLne Functon Block 266 Table 246: A-Outputs for the TCP_ReceveLne Functon Block 267 Table 247: F-Inputs for the TCP_ReceveLne Functon Block 267 Table 248: A-Outputs for the TCP_ReceveLne Functon Block 267 Table 249: Input System Varables 268 Table 250: Output System Varables 268 Table 251: Receve Varables 268 Table 252: A-Inputs for the TCP_ReceveVar Functon Block 271 Table 253: A-Outputs for the TCP_ReceveVar Functon Block 272 Table 254: F-Inputs for the TCP_ReceveVar Functon Block 272 Table 255: F-Outputs for the TCP_ReceveVar Functon Block 272 Table 256: Input System Varables 273 Table 257: Output System Varables 273 Table 258: Receve Varables 273 Table 259: S&R Protocol Vew Box 275 Table 260: Vew Box of the Modbus Slave 275 Table 261: Error Codes of the TCP Connecton 276 Table 262: Addtonal Error Codes 277 Table 263: Connecton State 277 Table 264: Partner's Connecton State 277 Table 265: Equpment and System Requrements for the S&R TCP 278 Table 266: SNTP Clent Propertes 279 Table 267: SNTP Server Info Propertes 280 Table 268: SNTP Server Propertes 281 Table 269: Equpment and System Requrements for the X-OPC Server 282 Table 270: X-OPC Server Propertes 283 Table 271: HIMax Controller Propertes for X-OPC Connecton 284 Table 272: Actons Requred as a Result of Changes 285 Table 273: Default Values Assocated wth the Prortes 297 Table 274: State and Tmestamp for the Data Access Fragments 299 Table 275: Parameters for Boolean Events 301 Table 276: Parameters for Scalar Events 303 Table 277: Propertes 307 Table 278: Propertes 308 Table 279: Edt 308 HI E Rev Page 381 of 386

382 13 General Communcaton Table 280: Equpment and System Requrements for the ComUserTask 309 Table 281: Data Format of the SSISTART Start Command Bytes 310 Table 282: Format and Order of the Sensor Data 311 Table 283: Recommended Clock Rates Accordng to the Feld Wre Lengths 311 Table 284: Equpment and System Requrements for the ComUserTask 313 Table 285: ComUserTask Propertes 313 Table 286: Abbrevatons 314 Table 287: Schedule Interval [ms] 315 Table 288: PROFINET IO Devce General Propertes 317 Table 289: ComUserTask System Varables 318 Table 290: Memory Area for Code and Data 321 Table 291: Stack Memory 321 Table 292: Parameter 321 Table 293: Parameter 322 Table 294: Return Value 323 Table 295: Parameter 324 Table 296: Return Value 324 Table 297: Parameter 325 Table 298: Return Value 326 Table 299: Parameter 327 Table 300: Parameter 328 Table 301: Return Value 328 Table 302: Parameter 329 Table 303: Parameter 330 Table 304: Return Value 330 Table 305: Return Value 331 Table 306: Parameter 332 Table 307: Parameter 333 Table 308: Return Value 333 Table 309: Parameter 334 Table 310: Parameter 335 Table 311: Parameter 336 Table 312: Return Value 336 Table 313: Parameter 337 Table 314: Parameter 338 Table 315: Return Value 338 Table 316: Parameter 339 Table 317: Return Value 339 Table 318: Parameter 340 Table 319: Parameter 341 Page 382 of 386 HI E Rev. 4.01

383 Communcaton 13 General Table 320: Return Value 341 Table 321: Parameter 342 Table 322: Parameter 343 Table 323: Return Value 343 Table 324: Parameter 345 Table 325: Parameter 347 Table 326: Parameter 347 Table 327: Parameter 347 Table 328: Memory Area for Code and Data 348 Table 329: Parameter 348 Table 330: Parameter 349 Table 331: Parameter 350 Table 332: Parameter 350 Table 333: Parameter 351 Table 334: Return Value 351 Table 335: Commands n Cygwn (Bash Shell) 354 Table 336: Output Varables (CPU->COM) 364 Table 337: Input Varables(COM->CPU) 364 HI E Rev Page 383 of 386

384 13 General Communcaton Index actvaton...33 operatng requrements clmatc...14 EMC...15 ESD protecton...16 mechancal...15 power supply...16 part number HIMatrx...32 HIMax...32 pn assgnment...33 regstraton...33 Page 384 of 386 HI E Rev. 4.01

385

386 HI E

IP Camera Configuration Software Instruction Manual

IP Camera Configuration Software Instruction Manual IP Camera 9483 - Confguraton Software Instructon Manual VBD 612-4 (10.14) Dear Customer, Wth your purchase of ths IP Camera, you have chosen a qualty product manufactured by RADEMACHER. Thank you for the

More information

VRT012 User s guide V0.1. Address: Žirmūnų g. 27, Vilnius LT-09105, Phone: (370-5) , Fax: (370-5) ,

VRT012 User s guide V0.1. Address: Žirmūnų g. 27, Vilnius LT-09105, Phone: (370-5) , Fax: (370-5) , VRT012 User s gude V0.1 Thank you for purchasng our product. We hope ths user-frendly devce wll be helpful n realsng your deas and brngng comfort to your lfe. Please take few mnutes to read ths manual

More information

FIBARO WALL PLUG OPERATING MANUAL FGBWHWPE-102/FGBWHWPF-102 CONTENTS

FIBARO WALL PLUG OPERATING MANUAL FGBWHWPE-102/FGBWHWPF-102 CONTENTS OPERATING MANUAL EN FIBARO WALL PLUG FGBWHWPE-102/FGBWHWPF-102 CONTENTS #1: Descrpton and features 3 #2: Parng the accessory 4 #3: Reset 5 #4: Functonalty 6 v1.0 #5: W-F 8 #6: Confgurable parameters 9

More information

HIMatrix Safety-Related Controller F10 PCI 03 Manual

HIMatrix Safety-Related Controller F10 PCI 03 Manual HIMatrix Safety-Related Controller F10 PCI 03 Manual HIMA Paul Hildebrandt GmbH + Co KG Industrial Automation Rev. 2.00 HI 800 483 E All HIMA products mentioned in this manual are protected by the HIMA

More information

Filling level and Temperature Sensor HFT C4 / R / MD

Filling level and Temperature Sensor HFT C4 / R / MD Fllng level and Temperature Sensor HFT C4 / R / MD Level measurng range 0.25-5.0 m Pressure measurng range 0-0.5 bar Temperature measurng range -10 100 C Voltage supply 18 30 V DC Features Fllng level

More information

Codian MCU MCU 4200 Series

Codian MCU MCU 4200 Series Codan MCU MCU 4200 Seres Gettng started Codan MCU MCU 4200 Seres Gettng started Copyrght Codan 2008. All rghts reserved. Ths Gettng Started Gude may not be coped, photocoped, translated, reproduced, or

More information

mquest Quickstart Version 11.0

mquest Quickstart Version 11.0 mquest Quckstart Verson 11.0 cluetec GmbH Emmy-Noether-Straße 17 76131 Karlsruhe Germany www.cluetec.de www.mquest.nfo cluetec GmbH Karlsruhe, 2016 Document verson 5 27.04.2016 16:59 > Propretary notce

More information

Product documentation. Issue:

Product documentation. Issue: Product documentaton Issue: 02.05.2017 Table of Contents Product documentaton 1 enet SMART HOME system... 5 1.1 System requrements... 5 1.2 Commssonng va... 5 1.3 Operaton va enet SMART HOME app... 7 2

More information

F-5000 View Software Installation and Operation Guide Belcher Road South, Largo, FL USA Tel +1 (727) Fax +1 (727)

F-5000 View Software Installation and Operation Guide Belcher Road South, Largo, FL USA Tel +1 (727) Fax +1 (727) ONICON Flow and Energy Measurement F-5000 Vew Software Installaton and Operaton Gude 11451 Belcher Road South, Largo, FL 33773 USA Tel +1 (727) 447-6140 Fax +1 (727)442-5699 2032-1 / 107050 Rev B www.oncon.com

More information

Cisco TelePresence MCU 4200 Series

Cisco TelePresence MCU 4200 Series Csco TelePresence MCU 4200 Seres Gettng started 61-0002-08 Contents General nformaton... 3 About the Csco TelePresence MCU 4200 Seres... 3 Package contents... 3 Port and LED locaton... 3 LED behavor...

More information

HIMatrix Safety-Related Controller System Manual Compact Systems

HIMatrix Safety-Related Controller System Manual Compact Systems HIMatrix Safety-Related Controller System Manual Compact Systems HIMA Paul Hildebrandt GmbH + Co KG Industrial Automation Rev. 2.02 HI 800 141 E All HIMA products mentioned in this manual are protected

More information

VideoJet X10 SN Network Video Server. Installation and Operating Manual

VideoJet X10 SN Network Video Server. Installation and Operating Manual VdeoJet X10 SN Network Vdeo Server en Installaton and Operatng Manual VdeoJet X10 SN VdeoJet X10 SN Table of Contents en 3 Table of Contents 1 Preface 7 1.1 About ths Manual 7 1.2 Conventons n ths Manual

More information

HIMatrix Safety-Related Controller System Manual for the Modular Systems

HIMatrix Safety-Related Controller System Manual for the Modular Systems HIMatrix Safety-Related Controller System Manual for the Modular Systems HIMA Paul Hildebrandt GmbH + Co KG Industrial Automation Rev. 1.00 HI 800 191 E All HIMA products mentioned in this manual are protected

More information

InfoTerminal Touch Installation Instructions

InfoTerminal Touch Installation Instructions Order no.: 2071 xx 1. Safety warnngs Electrcal equpment must be nstalled and ftted by qualfed electrcans only and n strct observance of the relevant accdent preventon regulatons. Cut out the crcut breaker

More information

11. HARMS How To: CSV Import

11. HARMS How To: CSV Import and Rsk System 11. How To: CSV Import Preparng the spreadsheet for CSV Import Refer to the spreadsheet template to ad algnng spreadsheet columns wth Data Felds. The spreadsheet s shown n the Appendx, an

More information

G4CM690V16ATL20 Part No Technical data. Power factor monitoring (cosφ) in 1- or 3-phase mains

G4CM690V16ATL20 Part No Technical data. Power factor monitoring (cosφ) in 1- or 3-phase mains Power factor montorng (cosφ) n 1- or 3-phase mans Loadmontors - GAMMA seres Montorng of nductve and capactve consumers Multfuncton Temperature montorng of the motor wndng -ey, Fault latch Recognton of

More information

Security. Workplace Manager

Security. Workplace Manager User Gude Manageablty and Securty Workplace Manager Congratulatons on your purchase of an nnovatve product from Fujtsu. The latest nformaton about our products, tps, updates etc. can be found on the Internet

More information

HIMax. Manual X-CPU 01

HIMax. Manual X-CPU 01 HIMax Manual X-CPU 01 All HIMA products mentioned in this manual are protected by the HIMA trade-mark. Unless noted otherwise, this also applies to other manufacturers and their respective products referred

More information

ELEC 377 Operating Systems. Week 6 Class 3

ELEC 377 Operating Systems. Week 6 Class 3 ELEC 377 Operatng Systems Week 6 Class 3 Last Class Memory Management Memory Pagng Pagng Structure ELEC 377 Operatng Systems Today Pagng Szes Vrtual Memory Concept Demand Pagng ELEC 377 Operatng Systems

More information

A mathematical programming approach to the analysis, design and scheduling of offshore oilfields

A mathematical programming approach to the analysis, design and scheduling of offshore oilfields 17 th European Symposum on Computer Aded Process Engneerng ESCAPE17 V. Plesu and P.S. Agach (Edtors) 2007 Elsever B.V. All rghts reserved. 1 A mathematcal programmng approach to the analyss, desgn and

More information

Installation Instructions. METRAwin Version 8/ Calibration Software

Installation Instructions. METRAwin Version 8/ Calibration Software Installaton Instructons METRAwn 90 Calbraton Software 3-349-717-15 Verson 8/05.13 Copyrght Copyrght 2003-2013 GMC-I Messtechnk GmbH. All rghts reserved. These nstallaton nstructons, as well as the software

More information

TN348: Openlab Module - Colocalization

TN348: Openlab Module - Colocalization TN348: Openlab Module - Colocalzaton Topc The Colocalzaton module provdes the faclty to vsualze and quantfy colocalzaton between pars of mages. The Colocalzaton wndow contans a prevew of the two mages

More information

Actuator / controller for electrothermal actuators

Actuator / controller for electrothermal actuators Actuator / controller for electrothermal actuators Code: EK-HE1-TP Datasheet STEKHE1TP_E KX devce for control of electrothermal actuators for zone valves n heatng and / or coolng systems. It has to be

More information

MRKOMNO. kéï=~ë=çñw= pfabufp=ud. aáöáí~ä=o~çáçöê~éüó. nìáåâ=êéñéêéååé=öìáçé==== båöäáëü

MRKOMNO. kéï=~ë=çñw= pfabufp=ud. aáöáí~ä=o~çáçöê~éüó. nìáåâ=êéñéêéååé=öìáçé==== båöäáëü kéï=~ë=çñw= MRKOMNO pfabufp=ud aáöáí~ä=o~çáçöê~éüó nìáåâ=êéñéêéååé=öìáçé==== båöäáëü 0123 Ths product bears the CE markng n accordance wth the provsons of the Councl Drectve 93/42/EEC of June 14, 1993

More information

Protection relay with full PLC function

Protection relay with full PLC function S U B S T A T I O N S Protecton relay wth full PLC functon SEPCOS-NG s a hgh-tech equpment that satsfes the most demandng safety requrements applcable to DC electrcal power transmsson networks. SEPCOS-NG

More information

Assembler. Building a Modern Computer From First Principles.

Assembler. Building a Modern Computer From First Principles. Assembler Buldng a Modern Computer From Frst Prncples www.nand2tetrs.org Elements of Computng Systems, Nsan & Schocken, MIT Press, www.nand2tetrs.org, Chapter 6: Assembler slde Where we are at: Human Thought

More information

Oracle Database: 12c Administrator

Oracle Database: 12c Administrator Oracle Database: 12c Admnstrator 1 Duraton: 5 Days (30 hours) What you wll learn: Ths Oracle Database: SQL and PL/SQL Fundamentals tranng delvers the fundamentals of SQL and PL/SQL along wth the benefts

More information

HIMatrix Safety-Related Controller CPU 01 Manual

HIMatrix Safety-Related Controller CPU 01 Manual HIMatrix Safety-Related Controller CPU 01 Manual HIMA Paul Hildebrandt GmbH + Co KG Industrial Automation Rev. 2.00 HI 800 189 E All HIMA products mentioned in this manual are protected by the HIMA trade-mark.

More information

HIMax System Manual SYSTEM

HIMax System Manual SYSTEM HIMax System Manual SYSTEM All HIMA products mentioned in this manual are protected by the HIMA trade-mark. Unless noted otherwise, this also applies to other manufacturers and their respective products

More information

TECHNIQUE OF FORMATION HOMOGENEOUS SAMPLE SAME OBJECTS. Muradaliyev A.Z.

TECHNIQUE OF FORMATION HOMOGENEOUS SAMPLE SAME OBJECTS. Muradaliyev A.Z. TECHNIQUE OF FORMATION HOMOGENEOUS SAMPLE SAME OBJECTS Muradalyev AZ Azerbajan Scentfc-Research and Desgn-Prospectng Insttute of Energetc AZ1012, Ave HZardab-94 E-mal:aydn_murad@yahoocom Importance of

More information

Compiler Design. Spring Register Allocation. Sample Exercises and Solutions. Prof. Pedro C. Diniz

Compiler Design. Spring Register Allocation. Sample Exercises and Solutions. Prof. Pedro C. Diniz Compler Desgn Sprng 2014 Regster Allocaton Sample Exercses and Solutons Prof. Pedro C. Dnz USC / Informaton Scences Insttute 4676 Admralty Way, Sute 1001 Marna del Rey, Calforna 90292 pedro@s.edu Regster

More information

User Manual SAPERION Rich Client 7.1

User Manual SAPERION Rich Client 7.1 User Manual SAPERION Rch Clent 7.1 Copyrght 2016 Lexmark. All rghts reserved. Lexmark s a trademark of Lexmark Internatonal, Inc., regstered n the U.S. and/or other countres. All other trademarks are the

More information

DLK Pro the all-rounder for mobile data downloading. Tailor-made for various requirements.

DLK Pro the all-rounder for mobile data downloading. Tailor-made for various requirements. DLK Pro the all-rounder for moble data downloadng Talor-made for varous requrements www.dtco.vdo.com Smply brllant, brllantly smple Always the rght soluton The DLK Pro s the VDO product famly, whch sets

More information

T3 (IP) Classic connected to Integral 5

T3 (IP) Classic connected to Integral 5 IP Telephony Contact Centers Moblty Servces T3 (IP) Classc connected to Integral 5 Benutzerhandbuch User s gude Manual de usuaro Manuel utlsateur Manuale d uso Gebrukersdocumentate Contents Contents...

More information

AADL : about scheduling analysis

AADL : about scheduling analysis AADL : about schedulng analyss Schedulng analyss, what s t? Embedded real-tme crtcal systems have temporal constrants to meet (e.g. deadlne). Many systems are bult wth operatng systems provdng multtaskng

More information

HIMatrix Safety-Related Controller F30 Manual

HIMatrix Safety-Related Controller F30 Manual HIMatrix Safety-Related Controller F30 Manual HIMA Paul Hildebrandt GmbH + Co KG Industrial Automation Rev. 1.01 HI 800 145 E All HIMA products mentioned in this manual are protected by the HIMA trade-mark.

More information

Virtual Memory. Background. No. 10. Virtual Memory: concept. Logical Memory Space (review) Demand Paging(1) Virtual Memory

Virtual Memory. Background. No. 10. Virtual Memory: concept. Logical Memory Space (review) Demand Paging(1) Virtual Memory Background EECS. Operatng System Fundamentals No. Vrtual Memory Prof. Hu Jang Department of Electrcal Engneerng and Computer Scence, York Unversty Memory-management methods normally requres the entre process

More information

4-channel universal dimming actuator 210W Installation Instructions

4-channel universal dimming actuator 210W Installation Instructions 4-channel unversal dmmng actuator 210W Order no.: 1043 00 System nformaton Ths devce s a product of the Instabus KNX/EIB-system and comples wth KNX drectves. Techncal knowledge obtaned n KNX tranng courses

More information

Advanced Computer Networks

Advanced Computer Networks Char of Network Archtectures and Servces Department of Informatcs Techncal Unversty of Munch Note: Durng the attendance check a stcker contanng a unque QR code wll be put on ths exam. Ths QR code contans

More information

T3 (IP) Classic connected to Integral 5

T3 (IP) Classic connected to Integral 5 IP Telephony Contact Centers Moblty Servces T3 (IP) Classc connected to Integral 5 Benutzerhandbuch User s gude Manual de usuaro Manuel utlsateur Manuale d uso Gebrukersdocumentate Contents Contents Famlarze

More information

HIMatrix Safety-Related Controller HIMatrix for Railway Applications

HIMatrix Safety-Related Controller HIMatrix for Railway Applications HIMatrix Safety-Related Controller HIMatrix for Railway Applications HIMA Paul Hildebrandt GmbH + Co KG Industrial Automation Rev. 2.00 HI 800 437 E All HIMA products mentioned in this manual are protected

More information

ANSYS FLUENT 12.1 in Workbench User s Guide

ANSYS FLUENT 12.1 in Workbench User s Guide ANSYS FLUENT 12.1 n Workbench User s Gude October 2009 Copyrght c 2009 by ANSYS, Inc. All Rghts Reserved. No part of ths document may be reproduced or otherwse used n any form wthout express wrtten permsson

More information

T3 (IP) Comfort connected to Integral 5

T3 (IP) Comfort connected to Integral 5 IP Telephony Contact Centers Moblty Servces T3 (IP) Comfort connected to Integral 5 Benutzerhandbuch User s gude Manual de usuaro Manuel utlsateur Manuale d uso Gebrukersdocumentate Contents Contents Famlarze

More information

Product Information. Miniature rotary unit PRH

Product Information. Miniature rotary unit PRH Product Informaton Mnature rotary unt PRH PRH Mnature rotary unt Precse. Compact. Bus capable. PRH unversal rotary unt servo-electrc mnature rotary unt wth angle > 360, center bore, and precson gear Feld

More information

Avaya Scopia XT Meeting Center

Avaya Scopia XT Meeting Center Avaya Scopa XT Meetng Center Quck Setup Gude Sngle Montor Dual Montor Package Content: Cart Components 3x/4x IEC320 Power Cords Internatonal (4xIEC) Outlet Strp Avaya Scopa XT Meetng Center Quck Setup

More information

Operator's Manual EU4 / EU6 / EU8. External Unwinder. Made in Germany

Operator's Manual EU4 / EU6 / EU8. External Unwinder. Made in Germany Operator's Manual External Unwnder EU4 / EU6 / EU8 Made n Germany 2 Operator's Manual 2 for the followng products Part.-No. Descrpton Type 5946091 External Unwnder EU4 5946421 External Unwnder EU6 5945806

More information

Wireless Temperature Monitoring Overview

Wireless Temperature Monitoring Overview Wreless Temperature Montorng Overvew Wreless Temperature Montorng and Alerts. Your Dashboard gves you advanced montorng, alerts (SMS or Emals), graphng and PDF reports from anywhere n the world. Product

More information

Installation and User Guide. Digidim Remote Control (303) Product description. Switching Lights On/Off using Digidim 303 Remote

Installation and User Guide. Digidim Remote Control (303) Product description. Switching Lights On/Off using Digidim 303 Remote Installaton and User Gude Dgdm Remote Control (0) Product descrpton The Dgdm Remote (0) can be used n conjuncton wth the Dm Sense to modfy the preset lght levels and recall/ store scenes, as well as actvatng

More information

userguide Intrinsically safe pager, type APG7

userguide Intrinsically safe pager, type APG7 usergude Intrnscally safe pager, type APG7 1 APG7 INTRINSICALLY SAFE PAGER LIMITATIONS OF USE Ths page contans BASEEFA related. No alteratons are permtted wthout reference to the BASEEFA lason offcer THE

More information

Wightman. Mobility. Quick Reference Guide THIS SPACE INTENTIONALLY LEFT BLANK

Wightman. Mobility. Quick Reference Guide THIS SPACE INTENTIONALLY LEFT BLANK Wghtman Moblty Quck Reference Gude THIS SPACE INTENTIONALLY LEFT BLANK WIGHTMAN MOBILITY BASICS How to Set Up Your Vocemal 1. On your phone s dal screen, press and hold 1 to access your vocemal. If your

More information

HIMax Safety Manual SAFETY

HIMax Safety Manual SAFETY HIMax Safety Manual SAFETY All HIMA products mentioned in this manual are protected by the HIMA trade-mark. Unless noted otherwise, this also applies to other manufacturers and their respective products

More information

FIBARO DIMMER 2 OPERATING MANUAL FGD-212 CONTENTS

FIBARO DIMMER 2 OPERATING MANUAL FGD-212 CONTENTS OPERATING MANUAL EN FIBARO DIMMER 2 FGD-212 CONTENTS #1: Descrpton and features 4 #2: Supported loads 5 #3: FIBARO Bypass 2 (FGB-002) 7 #4: Installaton 8 #5: Addng/removng the devce 11 #6: Operatng the

More information

HIMatrix Safety-Related Controller F35 03 Manual

HIMatrix Safety-Related Controller F35 03 Manual HIMatrix Safety-Related Controller F35 03 Manual HIMA Paul Hildebrandt GmbH + Co KG Industrial Automation Rev. 1.00 HI 800 477 E All HIMA products mentioned in this manual are protected by the HIMA trade-mark.

More information

Bangalore Electricity Supply Company Limited (wholly owned Government of Karnataka undertaking)

Bangalore Electricity Supply Company Limited (wholly owned Government of Karnataka undertaking) Format - 5 Bangalore Electrcty Supply Company Lmted (wholly owned Government of Karnataka undertakng) Telephone : Emal ID : Ref No.: Offce of the.. Date: To, (Name & address of the applcant) Madam/Sr,

More information

PT100 SCANNER. EPLC9600-CHANNEL8 96 x 96 DIN 1/4. 8 Channel PT-100 Scanner

PT100 SCANNER. EPLC9600-CHANNEL8 96 x 96 DIN 1/4. 8 Channel PT-100 Scanner PT SCANNER EPLC96CHANNEL8 96x96 /4 DIN EPLC96CHANNEL8 96 x 96 DIN /4 8 Channel PT Scanner 8 x 64 Graphcal LCD dsplay 8 PT temperature sensor nputs ONOFF control Relay or (pnp source ) transstor output

More information

Efficient Distributed File System (EDFS)

Efficient Distributed File System (EDFS) Effcent Dstrbuted Fle System (EDFS) (Sem-Centralzed) Debessay(Debsh) Fesehaye, Rahul Malk & Klara Naherstedt Unversty of Illnos-Urbana Champagn Contents Problem Statement, Related Work, EDFS Desgn Rate

More information

LED Fixture Controller ELED1 Programming Guide

LED Fixture Controller ELED1 Programming Guide LED Fxture Controller ELED1 Programmng Gude ELED1-AUN ELED1-AUS Copyrght 2018 Echoflex Solutons, Inc. All rghts reserved. Product nformaton and specfcaton detals subject to change Document number: 8DC-5745

More information

Operating Manual CELVIN NAS

Operating Manual CELVIN NAS Operatng Manual System CELVIN NAS Congratulatons on your purchase of an nnovatve product from Fujtsu. Latest nformaton about our products, tps, updates etc. can be found on the Internet at: http://www.fujtsu.com/fts/

More information

Load-Balanced Anycast Routing

Load-Balanced Anycast Routing Load-Balanced Anycast Routng Chng-Yu Ln, Jung-Hua Lo, and Sy-Yen Kuo Department of Electrcal Engneerng atonal Tawan Unversty, Tape, Tawan sykuo@cc.ee.ntu.edu.tw Abstract For fault-tolerance and load-balance

More information

T3 (IP) Classic connected to Integral 5

T3 (IP) Classic connected to Integral 5 T3 (IP) Classc connected to Integral 5 Benutzerhandbuch User s gude Manual de usuaro Manuel utlsateur Manuale d uso Gebrukersdocumentate Contents Contents Famlarze yourself wth your telephone Important

More information

FIBARO DIMMER 2 OPERATING MANUAL FGD-212 CONTENTS

FIBARO DIMMER 2 OPERATING MANUAL FGD-212 CONTENTS OPERATING MANUAL EN FIBARO DIMMER 2 FGD-212 CONTENTS #1: Descrpton and features 4 #2: Supported loads 5 #3: FIBARO Bypass 2 (FGB-002) 7 #4: Installaton 8 #5: Addng/removng the devce 11 #6: Operatng the

More information

ETAtouch RESTful Webservices

ETAtouch RESTful Webservices ETAtouch RESTful Webservces Verson 1.1 November 8, 2012 Contents 1 Introducton 3 2 The resource /user/ap 6 2.1 HTTP GET................................... 6 2.2 HTTP POST..................................

More information

EN Operating and installation instructions for RADEMACHER tubular motors... 27

EN Operating and installation instructions for RADEMACHER tubular motors... 27 Operatng and nstallaton nstructons for RADEMACHER tubular motors... 27 Applcable for the followng seres: RolloTube Intellgent Small/Medum Item numbers: 2640 06 95 / 2640 10 95 / 2660 10 95 / 2660 20 95

More information

with Optic65 and Optic25 Cameras FOR OUTDOOR TRACKING ONLY unless used in conjunction with the Indoor Tracking Accessory.

with Optic65 and Optic25 Cameras FOR OUTDOOR TRACKING ONLY unless used in conjunction with the Indoor Tracking Accessory. wth Optc6 and Optc Cameras Quck Start Gude FOR OUTDOOR TRACKING ONLY unless used n conjuncton wth the Indoor Trackng Accessory. CONGRATULATIONS ON SCORING YOUR SOLOSHOT Our category-creatng lne of personal

More information

FIBARO DIMMER 2 OPERATING MANUAL FGD-212 ENG CONTENTS

FIBARO DIMMER 2 OPERATING MANUAL FGD-212 ENG CONTENTS OPERATING MANUAL ENG FIBARO DIMMER 2 FGD-212 CONTENTS #1: Descrpton and features 4 #2: Supported loads 5 #3: FIBARO Bypass 2 (FGB-002) 7 #4: Installaton 8 #5: Addng/removng the devce 11 #6: Operatng the

More information

FIBARO DIMMER 2 OPERATING MANUAL FGD-212 CONTENTS

FIBARO DIMMER 2 OPERATING MANUAL FGD-212 CONTENTS OPERATING MANUAL US FIBARO DIMMER 2 FGD-212 CONTENTS #1: Descrpton and features 4 #2: Supported loads 5 #3: FIBARO Bypass 2 (FGB-002) 7 #4: Installaton 8 #5: Addng/removng the devce 11 #6: Operatng the

More information

T3 Classic connected to IP Office

T3 Classic connected to IP Office elephony IP T Contact Centers Moblty Servces T3 Classc connected to IP Offce Benutzerhandbuch User s gude Manual de usuaro Manuel utlsateur Manuale d uso Gebrukersdocumentate Contents Contents Famlarse

More information

Lobachevsky State University of Nizhni Novgorod. Polyhedron. Quick Start Guide

Lobachevsky State University of Nizhni Novgorod. Polyhedron. Quick Start Guide Lobachevsky State Unversty of Nzhn Novgorod Polyhedron Quck Start Gude Nzhn Novgorod 2016 Contents Specfcaton of Polyhedron software... 3 Theoretcal background... 4 1. Interface of Polyhedron... 6 1.1.

More information

User s Guide for Express and Select Class Printers

User s Guide for Express and Select Class Printers User s Gude for Express and Select Class Prnters ImageCard and UltraGrafx Seres June 2000 Part No. 526945-001 Lablty statement Regulatory complance Trademark acknowledgments Propretary Notce Please note

More information

In this section, user interface of the device, how to access to the parameters, description of the parameters are explained.

In this section, user interface of the device, how to access to the parameters, description of the parameters are explained. ABOUT INSTRUCTION MANUAL Instructon manual of ESM-4450 Process Controller conssts of two man sectons. Explanaton of these sectons are below. Also, there are other sectons whch nclude order nformaton and

More information

Touch & See Control and visualization unit

Touch & See Control and visualization unit Code * Materal Package Dmens. [mm] EK-FOQ-GAx EK-FOQ-GBx plastc metal pcs. 86 x 86 Touch & See Control and vsualzaton unt Code: EK-EC-TP-... S TP Datasheet STEKECTP_EN KNX devce for swtchng, controllng

More information

Configuration guide. PlantWatchPRO. supervisor for small-medium installations LEGGI E CONSERVA QUESTE ISTRUZIONI READ AND SAVE THESE INSTRUCTIONS.

Configuration guide. PlantWatchPRO. supervisor for small-medium installations LEGGI E CONSERVA QUESTE ISTRUZIONI READ AND SAVE THESE INSTRUCTIONS. 30/06/2006 30/06/2006 30/06/2006 30/06/2006 16:36:16 16:36:16 16:36:16 16:36:16 X X X 30/06/2006 30/06/2006 30/06/2006 30/06/2006 16:36:16 16:36:16 16:36:16 16:36:16 X X 30/06/2006 16:36:16 16:36:16 16:36:16

More information

A Frame Packing Mechanism Using PDO Communication Service within CANopen

A Frame Packing Mechanism Using PDO Communication Service within CANopen 28 A Frame Packng Mechansm Usng PDO Communcaton Servce wthn CANopen Mnkoo Kang and Kejn Park Dvson of Industral & Informaton Systems Engneerng, Ajou Unversty, Suwon, Gyeongg-do, South Korea Summary The

More information

Real-Time Guarantees. Traffic Characteristics. Flow Control

Real-Time Guarantees. Traffic Characteristics. Flow Control Real-Tme Guarantees Requrements on RT communcaton protocols: delay (response s) small jtter small throughput hgh error detecton at recever (and sender) small error detecton latency no thrashng under peak

More information

User Manual SAPERION Web Client 7.1

User Manual SAPERION Web Client 7.1 User Manual SAPERION Web Clent 7.1 Copyrght 2016 Lexmark. All rghts reserved. Lexmark s a trademark of Lexmark Internatonal, Inc., regstered n the U.S. and/or other countres. All other trademarks are the

More information

PRIMERGY ECONEL 30. Operating manual. Introduction. Important notes. Preparing for use. Operation. Troubleshooting and tips.

PRIMERGY ECONEL 30. Operating manual. Introduction. Important notes. Preparing for use. Operation. Troubleshooting and tips. Introducton Important notes PRIMERGY ECONEL 30 Preparng for use Operaton Operatng manual Troubleshootng and tps System expansons Techncal data Index November 2002 edton Mcrosoft, MS, MS-DOS, Wndows, and

More information

HIMatrix M45. Safety Manual

HIMatrix M45. Safety Manual HIMatrix M45 Safety Manual All HIMA products mentioned in this manual are protected by the HIMA trademark. Unless noted otherwise, this also applies to other manufacturers and their respective products

More information

The Codesign Challenge

The Codesign Challenge ECE 4530 Codesgn Challenge Fall 2007 Hardware/Software Codesgn The Codesgn Challenge Objectves In the codesgn challenge, your task s to accelerate a gven software reference mplementaton as fast as possble.

More information

An Optimal Algorithm for Prufer Codes *

An Optimal Algorithm for Prufer Codes * J. Software Engneerng & Applcatons, 2009, 2: 111-115 do:10.4236/jsea.2009.22016 Publshed Onlne July 2009 (www.scrp.org/journal/jsea) An Optmal Algorthm for Prufer Codes * Xaodong Wang 1, 2, Le Wang 3,

More information

General Description. Description

General Description. Description June 0 Sheet 0 Metal-Enclosed Swtchgear MVS Medum Voltage Load Interrupter Fusble Swtch General Descrpton.0- Motor Operated MVS Swtches Applcaton Eaton s Cutler-Hammer MVS Pow-R- Drve motor operator makes

More information

CMPS 10 Introduction to Computer Science Lecture Notes

CMPS 10 Introduction to Computer Science Lecture Notes CPS 0 Introducton to Computer Scence Lecture Notes Chapter : Algorthm Desgn How should we present algorthms? Natural languages lke Englsh, Spansh, or French whch are rch n nterpretaton and meanng are not

More information

ST70 Instruments. Operating Guide. Welcome. This Operating Guide. Contents

ST70 Instruments. Operating Guide. Welcome. This Operating Guide. Contents ST70 Instruments Operatng Gude Welcome Congratulatons on havng chosen a Raymarne ST70 nstrument. Ths gves you easy access to the mportant nformaton you need to make your boatng experence both safe and

More information

Setup and Use. For events not using AuctionMaestro Pro. Version /7/2013

Setup and Use. For events not using AuctionMaestro Pro. Version /7/2013 Verson 3.1.2 2/7/2013 Setup and Use For events not usng AuctonMaestro Pro MaestroSoft, Inc. 1750 112th Avenue NE, Sute A200, Bellevue, WA 98004 425.688.0809 / 800.438.6498 Fax: 425.688.0999 www.maestrosoft.com

More information

Operating Manual CELVIN NAS

Operating Manual CELVIN NAS Operatng Manual System CELVIN NAS Congratulatons on your purchase of an nnovatve product from Fujtsu. Latest nformaton about our products, tps, updates etc. can be found on the Internet at: http://www.fujtsu.com/fts/

More information

SMART PHOTO PRINTER USER'S GUIDE. Version V MODEL SmartD90-EV

SMART PHOTO PRINTER USER'S GUIDE. Version V MODEL SmartD90-EV SMART PHOTO PRINTER MODEL SmartD90-EV USER'S GUIDE Verson V1.5.2.0 1 TABLE OF CONTENTS Introducton Introducton 3 Bascs 4 Constructon of compostons 5 Operaton Easy Prnt Servce 8 Fun Prnt Servce 10 Sharng

More information

Bild in der Größe 215x70 mm einfügen. COMAND Operator s Manual

Bild in der Größe 215x70 mm einfügen. COMAND Operator s Manual Bld n der Größe 215x70 mm enfügen COMAND Operator s Manual Welcome to COMAND! Please make yourself famlar wth your COMAND control unt and read the nstructons n ths manual before operatng the COMAND system.

More information

THE HEAT CONTROLLER RADIATOR THERMOSTAT FGT-001

THE HEAT CONTROLLER RADIATOR THERMOSTAT FGT-001 OPERATING MANUAL EN THE HEAT CONTROLLER RADIATOR THERMOSTAT FGT-001 CONTENTS #1: Descrpton and features 3 #2: Basc actvaton 4 #3: Addng to Z-Wave network 5 #4: Removng the devce 6 #5: Controllng the temperature

More information

Zwick. Materials testing I 8 ~ I J S / KAlnhalt / V4.7

Zwick. Materials testing I 8 ~ I J S / KAlnhalt / V4.7 Zwck Materals testng Copyrght (C) 1995-2002 Zwck GmbH & Co August-Nagel-StraBe 11, Ulm, Deutschland Telefon: +49 1 02 25 Telefax: +49 1 02 00 Zwck m nternet: http://wn.zwck.com und http://www.zwck.de EMal:

More information

Setup and Use. Version 3.7 2/1/2014

Setup and Use. Version 3.7 2/1/2014 Verson 3.7 2/1/2014 Setup and Use MaestroSoft, Inc. 1750 112th Avenue NE, Sute A200, Bellevue, WA 98004 425.688.0809 / 800.438.6498 Fax: 425.688.0999 www.maestrosoft.com Contents Text2Bd checklst 3 Preparng

More information

Virtual Machine Migration based on Trust Measurement of Computer Node

Virtual Machine Migration based on Trust Measurement of Computer Node Appled Mechancs and Materals Onlne: 2014-04-04 ISSN: 1662-7482, Vols. 536-537, pp 678-682 do:10.4028/www.scentfc.net/amm.536-537.678 2014 Trans Tech Publcatons, Swtzerland Vrtual Machne Mgraton based on

More information

OPERATOR S MANUAL COMAND AND REAR-CABIN AUDIOVISUAL SYSTEM. Grafik in der Größe 216x79 mm in den Grafikrahmen importieren!

OPERATOR S MANUAL COMAND AND REAR-CABIN AUDIOVISUAL SYSTEM. Grafik in der Größe 216x79 mm in den Grafikrahmen importieren! OPERATOR S MANUAL COMAND AND REAR-CABIN AUDIOVISUAL SYSTEM Grafk n der Größe 216x79 mm n den Grafkrahmen mporteren! Welcome to COMAND and the rear-cabn audovsual system! Please make yourself famlar wth

More information

3D vector computer graphics

3D vector computer graphics 3D vector computer graphcs Paolo Varagnolo: freelance engneer Padova Aprl 2016 Prvate Practce ----------------------------------- 1. Introducton Vector 3D model representaton n computer graphcs requres

More information

HIMax. Maintenance Manual MAINTENANCE

HIMax. Maintenance Manual MAINTENANCE d HIMax Maintenance Manual MAINTENANCE All HIMA products mentioned in this manual are protected by the HIMA trade-mark. Unless noted otherwise, this also applies to other manufacturers and their respective

More information

Bus Capable. Flexible. High Performance Density. PG Universal Gripper

Bus Capable. Flexible. High Performance Density. PG Universal Gripper PG Bus Capable. Flexble. Hgh Performance Densty. PG Unversal Grpper Servo-electrc 2-fnger parallel grpper wth hghly precse grppng force control and long stroke Feld of Applcaton A ll-purpose, ultra-flexble

More information

Wishing you all a Total Quality New Year!

Wishing you all a Total Quality New Year! Total Qualty Management and Sx Sgma Post Graduate Program 214-15 Sesson 4 Vnay Kumar Kalakband Assstant Professor Operatons & Systems Area 1 Wshng you all a Total Qualty New Year! Hope you acheve Sx sgma

More information

A New Transaction Processing Model Based on Optimistic Concurrency Control

A New Transaction Processing Model Based on Optimistic Concurrency Control A New Transacton Processng Model Based on Optmstc Concurrency Control Wang Pedong,Duan Xpng,Jr. Abstract-- In ths paper, to support moblty and dsconnecton of moble clents effectvely n moble computng envronment,

More information

A RECONFIGURABLE ARCHITECTURE FOR MULTI-GIGABIT SPEED CONTENT-BASED ROUTING. James Moscola, Young H. Cho, John W. Lockwood

A RECONFIGURABLE ARCHITECTURE FOR MULTI-GIGABIT SPEED CONTENT-BASED ROUTING. James Moscola, Young H. Cho, John W. Lockwood A RECONFIGURABLE ARCHITECTURE FOR MULTI-GIGABIT SPEED CONTENT-BASED ROUTING James Moscola, Young H. Cho, John W. Lockwood Dept. of Computer Scence and Engneerng Washngton Unversty, St. Lous, MO {jmm5,

More information

SAFETY. HIMax Safety Manual

SAFETY. HIMax Safety Manual SAFETY HIMax Safety Manual All HIMA products mentioned in this manual are protected by the HIMA trademark. Unless otherwise noted, this also applies to other manufacturers and their respective products

More information

HIMax Field Termination Assembly Manual X-FTA

HIMax Field Termination Assembly Manual X-FTA d HIMax Field Termination Assembly Manual X-FTA 002 02 All HIMA products mentioned in this manual are protected by the HIMA trade-mark. Unless noted otherwise, this also applies to other manufacturers

More information

Sample Solution. Advanced Computer Networks P 1 P 2 P 3 P 4 P 5. Module: IN2097 Date: Examiner: Prof. Dr.-Ing. Georg Carle Exam: Final exam

Sample Solution. Advanced Computer Networks P 1 P 2 P 3 P 4 P 5. Module: IN2097 Date: Examiner: Prof. Dr.-Ing. Georg Carle Exam: Final exam Char of Network Archtectures and Servces Department of Informatcs Techncal Unversty of Munch Note: Durng the attendance check a stcker contanng a unque QR code wll be put on ths exam. Ths QR code contans

More information