Table of Contents
Available languages

Available languages

Quick Links

SIMATIC Industrie PC SIMATIC Rack PC 547B
SIMATIC
Industrial PC
SIMATIC PCIe DIO4
Kompaktbetriebsanleitung
Compact Operating Instructions
11/2011
A5E03493449-01
______________
______________
______________
______________
______________
______________

Chapters

Table of Contents
loading

Summary of Contents for Siemens SIMATIC PCIe DIO4

  • Page 1 SIMATIC Industrie PC SIMATIC Rack PC 547B ______________ SIMATIC ______________ Industrial PC SIMATIC PCIe DIO4 ______________ ______________ Kompaktbetriebsanleitung ______________ Compact Operating Instructions ______________ 11/2011 A5E03493449-01...
  • Page 2 SIMATIC IPC227D Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 3 ___________________ SIMATIC PCIe DIO4 Überblick DIO-Baugruppe einbauen ___________________ und anschließen ___________________ Technische Angaben SIMATIC Beispiele und ___________________ Registerbelegungen Industrie-PC SIMATIC PCIe DIO4 Kompaktbetriebsanleitung 11/2011 A5E03493449-01...
  • Page 4 Hinweise in den zugehörigen Dokumentationen müssen beachtet werden. Marken Alle mit dem Schutzrechtsvermerk ® gekennzeichneten Bezeichnungen sind eingetragene Marken der Siemens AG. Die übrigen Bezeichnungen in dieser Schrift können Marken sein, deren Benutzung durch Dritte für deren Zwecke die Rechte der Inhaber verletzen kann. Haftungsausschluss Wir haben den Inhalt der Druckschrift auf Übereinstimmung mit der beschriebenen Hard- und Software geprüft.
  • Page 5: Table Of Contents

    1.3.3 Counter ............................9 DIO-Baugruppe einbauen und anschließen..................... 11 Wichtiger Einbauhinweis......................11 Stromversorgung für die Ausgänge anschließen.................11 Technische Angaben ..........................13 Anschlussbelegung........................13 Technische Daten ........................14 Beispiele und Registerbelegungen ......................17 DIO initialisieren und freigeben....................17 Beispiele............................18 Register............................20 SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 6 Inhaltsverzeichnis SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 7: Überblick

    24 V-Ausgänge zur Verfügung. Darüber hinaus bietet die DIO-Baugruppe acht hardwarebasierte Zähler (62,5 MHz Basistakt), die für Funktionen wie PWM, Frequenzmessung und Pulsbreitenmessung konfiguriert werden können. Alle Funktionseinheiten (Eingänge, Ausgänge, Zähler) können Interrupts generieren (steigende/fallende Flanken, Zählerüberläufe, Nulldurchgang, etc.). SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 8: Aufbau Der Dio-Baugruppe

    ● PWM Ausgangs-Signal erzeugen ● Frequenzen und Pulslängen messen ● Ereignisse zählen und interruptgesteuert auf Zählerzustände reagieren, z. B. Nulldurchgang, Überlauf Aufbau der DIO-Baugruppe Die DIO-Baugruppe besteht aus drei Hauptteilen: ● Input ● Output ● Counter SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 9: Input

    ● Die Eingangsinterrupts GCR.IIEN sind aktiviert. ● Die Interrupts GCR.IEN sind freigegeben. Die Software kann dann die Quelle INPIF, INPIFR, INPIFF feststellen und muss die entsprechenden Interrupts durch Schreiben der Bits in INPIF, INPIFR oder INPIFF löschen. SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 10: Output

    ● Die Ausgangsinterrupts GCR.OIEN sind aktiviert. ● Die Interrupts GCR.IEN sind freigegeben. Die Software kann dann die Quelle OUTPIF, OUTPIFR, OUTPIFF feststellen und muss die entsprechenden Interrupts durch Schreiben der Bits in OUTPIF, OUTPIFR oder OUTPIFF löschen. SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 11: Counter

    Der aktuelle Wert des Counter- oder Capture-Registers, auswählbar über CxSR.CSEL, wird mit dem Compare-Register verglichen. Das Ergebnis gleich, größer oder kleiner wird über CxSR.CE, CxSR.CG oder CxSR.CS abgebildet. Der Counter kann Interrupts bei Counter-Overflow und Compare-Events auslösen. SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 12 ● Event "Clear" (CxTR2): Der Counter wird gelöscht (0). ● Event "Reload" (CxTR3): Der Wert aus dem Reload-Register CxRELR wird in das Counter-Register CxVR geladen. ● Event "Capture" (CxTR4): Der aktuelle Counterwert aus CxVR wird im Capture-Register CxCAPR gespeichert. SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 13: Dio-Baugruppe Einbauen Und Anschließen

    Für die +24 V-Stromversorgungsleitung benötigen Sie den mitgelieferten Klapp-Ferrit der Firma Würth, Bestellnummer 742711112. ACHTUNG Gehäuse des Klapp-Ferrit nicht schließen Wenn das Gehäuse des Klapp-Ferrit einmal geschlossen ist, dann kann es nicht mehr geöffnet werden. Lassen Sie das Gehäuse des Klapp-Ferrit zunächst geöffnet. SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 14 3. Führen Sie die +24 V-Stromversorgungsleitung für die Ausgänge durch das geöffnete Gehäuse des mitgelieferten Klapp-Ferrit. 4. Führen Sie die +24 V-Stromversorgungsleitung einmal um das Gehäuse des Klapp-Ferrit herum. 5. Schließen Sie das Gehäuse des Klapp-Ferrit. SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 15: Technische Angaben

    Technische Angaben Anschlussbelegung SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 16: Technische Daten

    Ja; Meldungen bei Spannungsausfall, Überlast, Temperaturüberschreitung der Ausgänge Komponenten der Baureihe BLITZDUCTOR® XT sind mit entsprechendem Zubehör fernüberwachbar. Weitere Informationen unter http://www.dehn.de. Direktbezug der Bauteile über: DEHN+SÖHNE GMBH+CO.KG., Hans-Dehn-Str. 1, D-92318 Neumarkt, Tel. +49 (0)9181-906-730 SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 17 Widerstand angeschlossen. Ausgangsstrom 0,5 A Für Signal "1", Nennwert  5 mA Für Signal "1", Mindestlaststrom  0,5 mA Für Signal "0", Reststrom  Summenstrom der Ausgänge bis 50 °C max. 2 A SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 18 36 Bit, 16 ns Verknüpfung der Eingänge mit Zähler Beliebig Verknüpfung der Ausgänge mit Zähler Beliebig Zählerfunktionen PWM, Pulsbreiten-/Frequenzmessung, Zähler aufwärts, abwärts, löschen, laden, ... Anzahl Vergleicher pro Zähler Interruptfähigkeit pro Zähler Überlauf, Vergleich kleiner/größer/gleich SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 19: Beispiele Und Registerbelegungen

    Die Software nutzt nun die DIO für ihren Programmablauf. DIO deaktivieren Löschen Sie GCR.EN. Die internen Register werden zurückgesetzt und die 24 V-Ausgänge abgeschaltet. DIO freigeben Schreiben Sie das INUSE-Flag GSR.INUSE. Dadurch wird das INUSE-Flag zurückgesetzt. SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 20: Beispiele

    ● GSR.IIF: Werten Sie INPIF, INPIFR und INPIFF aus und löschen Sie diese Interrupt- Flags durch Schreiben (INPIF = INPIF löscht alle Eingangsinterrupts). ● GSR.OIF: Werten Sie OUTPIF, OUTPIFR und OUTPIFF aus und löschen Sie diese Interrupt-Flags durch Schreiben (OUTPIF = OUTPIF löscht alle Ausgangsinterrupts). SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 21 ● Event "Capture" programmieren: C1TR4 = 0x2A0A (Source 0x2A = Eingang 2, 0x0A = Fallende Flanke) ● C1 aktivieren: C1CR.EN |= 1 Die Pulslänge berechnet sich dann wie folgt: t = (C1CAPR + 1) * 16 ns SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 22: Register

    Ausgänge 0-31 Interrupt-Flags (steigende 0x0420 Flanke) BASE + OUTPIFF Ausgänge 0-31 Interrupt-Flags (fallende 0x0430 Flanke) BASE + OUTP0C Konfiguration von Ausgang 0: Invertierung, 0x0500 Quelle, ... BASE + OUTP1C Konfiguration von Ausgang 1: Invertierung, 0x0508 Quelle, ... SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 23 C1TR1 Counter 1 Trigger-Register 1 ("Down") 0x1128 BASE + C1TR2 Counter 1 Trigger-Register 2 ("Clear") 0x1130 BASE + C1TR3 Counter 1 Trigger-Register 3 ("Reload") 0x1138 BASE + C1TR4 Counter 1 Trigger-Register 4 ("Capture") 0x1140 SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 24 Eingänge intern mit den Ausgangs-Registern verbunden. Die Ausgangssignale verändern nicht ihren letzten Wert. EIEN Error-Interrupt aktiviert. Wenn "1" und GSR.EIF = 1, wird GSR.IF gesetzt. 6..5 Reserviert CIEN Counter-Interrupt aktiviert. Wenn "1" und GSR.CIF = 1, wird GSR.IF gesetzt. SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 25 Treiber auf die DIO zugreifen können. Wenn das Bit mit "1" beschrieben wird, wird das Bit zurückgesetzt. Eingangs-Register INP: Eingangs-Register (BASE + 0x0100) Zugriff Name Default Beschreibung 31..0 Jedes Bit spiegelt den entsprechenden Eingang wieder, nach Filterung und Invertierung. SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 26 Flanke am Eingang detektiert wird, wird das entsprechende Bit in INPIFR.IFRE gesetzt. Aktiviert den Eingangsfilter. Wenn "1", wird der Eingang gefiltert mit den Einstellungen von FSRATE und FTHRES. Wenn "1", wird das Eingangssignal invertiert, bevor es weiter verarbeitet wird. SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 27 Wahl des Ausgang-Modus: 00: Normal, 01 = Wechselnd (1→0, 0→1) 35..33 DMODE Wahl des Ausgang-Detect-Modus: 000: hoher Level  001: niedriger Level  100: nur steigende Flanke  101: nur fallende Flanke  110: steigende und fallende Flanke  SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 28 Die Werte für den Index von Input, Output und Counter sollten Sie nach folgender Formel berechnen: Counter x index Index = 8 + x*4 Input x index Index = 8 + VER.NRCT*4 + x Output x index Index = 8 + VER.NRCT*4 + VER.NRIP + x SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 29 Vergleichs-Registers CxCR.CSEL gleich dem Compare-Register. CSIF Interrupt-Flag für Vergleichs-Ergebnis "kleiner". Wenn "1", wurde ein Interrupt beim Vergleichs-Ergebnis "kleiner" ausgelöst: CxVR/CxCAPR < CxCOMR. Wenn das Bit mit "1" beschrieben wird, wird das Bit zurückgesetzt. SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 30 Wahl des Trigger-Detect-Modus: 000: hoher Level  001: niedriger Level  100: nur steigende Flanke  101: nur fallende Flanke  110: steigende und fallende Flanke  Trigger-Status. Wenn "1", ist der Trigger aktiv. SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 31 Index = 8 + VER.NRCT*4 + x Output x index Index = 8 + VER.NRCT*4 + VER.NRIP + x CxCOMR: Counter x Compare-Register (BASE + 0x1060 + (x*0x100)) Zugriff Name Default Beschreibung 35..0 Compare value SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 32 Reserved Interrupt enable: Wenn dieses Bit gesetzt ist, leitet der PCIe-Kernel Interrupts an das System weiter. Wenn dieses Bit nicht gesetzt ist, wird kein Interrupt erzeugt, auch nicht wenn GCR.IEN gesetzt ist. 6...0 Reserved SIMATIC PCIe DIO4 Kompaktbetriebsanleitung, 11/2011, A5E03493449-01...
  • Page 33 ___________________ SIMATIC PCIe DIO4 Overview Installing and connecting the ___________________ DIO module Technical specifications SIMATIC Examples and register ___________________ assignments Industrial PCs SIMATIC PCIe DIO4 Compact Operating Instructions 11/2011 A5E03493449-01...
  • Page 34 Note the following: WARNING Siemens products may only be used for the applications described in the catalog and in the relevant technical documentation. If products and components from other manufacturers are used, these must be recommended or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and maintenance are required to ensure that the products operate safely and without any problems.
  • Page 35 Important installation note......................11 Connecting the power supply of the outputs................11 Technical specifications........................... 13 Terminal assignment........................13 Technical specifications .......................14 Examples and register assignments ......................17 Initializing and enabling DIO ......................17 Examples .............................18 Registers ............................20 SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 36 Table of contents SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 37: Overview

    PWM, frequency measurement and pulse width measurement. All functional units (inputs, outputs, counters) can generate interrupts (rising/falling edges, counter overflows, zero passage, etc.). SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 38: Design Of The Dio Module

    ● Counting results and responding interrupt-controlled to counter states, e.g. zero passage, overflow Design of the DIO module The DIO module consists of three main parts: ● Input ● Output ● Counter SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 39 ● The input interrupts GCR.IIEN are enabled. ● The interrupts GCR.IEN are enabled. The software can detect the source INPIF, INPIFR, INPIFF and must delete the corresponding interrupts by writing the bits in INPIF, INPIFR or INPIFF. SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 40: Output

    ● The output interrupts GCR.OIEN are enabled. ● The interrupts GCR.IEN are enabled. The software can detect the source OUTPIF, OUTPIFR, OUTPIFF and must delete the corresponding interrupts by writing the bits in OUTPIF, OUTPIFR or OUTPIFF. SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 41: Counter

    The result is equal to, greater than or less than and is mapped by means of CxSR.CE, CxSR.CG or CxSR.CS. The counter can trigger interrupts in case of counter overflow and compare events. SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 42 ● Event "Reload" (CxTR3): The value from the CxRELR reload register is loaded into the CxVR counter register. ● Event "Capture" (CxTR4): The current counter value from CxVR is saved in the CxCAPR capture register. SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 43: Installing And Connecting The Dio Module

    Do not close the housing of the clamp-on ferrite core Once the housing of the clamp-on ferrite core is closed, it cannot be opened again. First, leave the housing of the clamp-on ferrite core open. SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 44 3. Route the +24 V power supply cable for the outputs through the open housing of the supplied clamp-on ferrite core. 4. Route the +24 V power supply cable once around the housing of the clamp-on ferrite core. 5. Close the clamp-on ferrite core housing. SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 45: Technical Specifications

    Technical specifications Terminal assignment SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 46: Technical Specifications

    Components of the BLITZDUCTOR® XT series can be remotely monitored with the appropriate accessories. For further information, refer to http://www.dehn.de. Components can be ordered directly at: DEHN+SÖHNE GMBH+CO.KG., Hans-Dehn-Str. 1, D-92318 Neumarkt, Tel. +49 (0)9181-906-730 SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 47 For signal "1", rated value  5 mA For signal "1", minimum load current  0.5 mA For signal "0", residual current  Aggregate current of the outputs up to 50 °C max. 2 A SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 48 Linking of inputs with counter Linking of outputs with counter Counter functions PWM, pulse width/frequency measurement, counter up, down, delete, load, ... Number of comparators per counter Interrupt capability per counter Overflow, comparison less than/greater than/equal SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 49: Examples And Register Assignments

    Disabling the DIO Delete the GCR.EN. The internal registers are reset and the 24 V outputs are disabled. Enabling the DIO Write the INUSE flag GSR.INUSE; this step resets the INUSE flag. SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 50: Examples

    ● GSR.IIF: Evaluate INPIF, INPIFR and INPIFF and delete these interrupt flags through writing (INPIF = INPIF deletes all input interrupts). ● GSR.OIF: Evaluate OUTPIF, OUTPIFR and OUTPIFF and delete these interrupt flags through writing (OUTPIF = OUTPIF deletes all output interrupts). SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 51 ● Programming event "Capture": C1TR4 = 0x2A0A (Source 0x2A = input 2, 0x0A = falling edge) ● Enabling C1: C1CR.EN |= 1 The pulse length is then calculated as follows: t = (C1CAPR + 1) * 16 ns SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 52: Registers

    Outputs 0-31 Interrupt flags (rising edge) 0x0420 BASE + OUTPIFF Outputs 0-31 Interrupt flags (falling edge) 0x0430 BASE + OUTP0C Configuration of output 0: Inversion, source, 0x0500 BASE + OUTP1C Configuration of output 1: Inversion, source, 0x0508 SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 53 Counter 1 Trigger Register 1 ("Down") 0x1128 BASE + C1TR2 Counter 1 Trigger Register 2 ("Clear") 0x1130 BASE + C1TR3 Counter 1 Trigger Register 3 ("Reload") 0x1138 BASE + C1TR4 Counter 1 Trigger Register 4 ("Capture") 0x1140 SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 54 Error interrupt enabled. If "1" and GSR.EIF = 1, GSR.IF is set. 6..5 Reserved CIEN Counter interrupt enabled. If "1" and GSR.CIF = 1, GSR.IF is set. OIEN Output interrupt enabled. If "1" and GSR.OIF = 1, GSR.IF is set. SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 55 DIO. If the bit is written with "1", the bit is reset. Input Register INP: Input register (BASE + 0x0100) Access Name Default Description 31..0 Each bit reflects the corresponding input after filtering and inversion. SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 56 INPIFR.IFRE. Enables the input filter. If "1", the input is filtered with the settings of FSRATE and FTHRES. If "1", the input signal is inverted before it is processed further. SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 57 001: Low level  100: Rising edge only  101: Falling edge only  110: Rising and falling edge  Status of the output selection. If "1", the output is enabled. 31..4 Reserved SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 58 Counter x index Index = 8 + x*4 Input x index Index = 8 + VER.NRCT*4 + x Output x index Index = 8 + VER.NRCT*4 + VER.NRIP + x SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 59 Interrupt flag for comparison result "greater than". If "1", an interrupt is triggered with the comparison result "greater than": CxVR/CxCAPR > CxCOMR. If the bit is written with "1", the bit is reset. SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 60 Selection of trigger detect mode: 000: High level  001: Low level  100: Rising edge only  101: Falling edge only  110: Rising and falling edge  Trigger status. If "1", trigger is enabled. SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 61 Index = 8 + VER.NRCT*4 + x Output x index Index = 8 + VER.NRCT*4 + VER.NRIP + x CxCOMR: Counter x Compare Register (BASE + 0x1060 + (x*0x100)) Access Name Default Description 35..0 Compare value SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...
  • Page 62 Interrupt enable: If this bit is set, the PCIe kernel forwards interrupts to the system. If this bit is not set, an interrupt is not generated even if GCR.IEN is set. 6...0 Reserved SIMATIC PCIe DIO4 Compact Operating Instructions, 11/2011, A5E03493449-01...

Table of Contents