Herunterladen Inhalt Inhalt Diese Seite drucken
Inhaltsverzeichnis

Werbung

Verfügbare Sprachen

Verfügbare Sprachen

B&R KOMPAKTSTEUERUNG
Dieses Manual ist zweisprachig ausgeführt. Die deutschsprachige
Dokumentation beginnt auf
Seite 3
If you would prefer to read this manual in English please turn to
page 129
- 1 -

Werbung

Inhaltsverzeichnis
loading

Inhaltszusammenfassung für B&R BRCOMP1-0

  • Seite 1 B&R KOMPAKTSTEUERUNG Dieses Manual ist zweisprachig ausgeführt. Die deutschsprachige Dokumentation beginnt auf Seite 3 If you would prefer to read this manual in English please turn to page 129 - 1 -...
  • Seite 2 B&R KOMPAKTSTEUERUNG - 2 -...
  • Seite 3 B&R KOMPAKTSTEUERUNG B&R KOMPAKTSTEUERUNG ANWENDERHANDBUCH Version: 2.00 (Dezember 1995) Herausgeber: Bernecker und Rainer Industrie-Elektronik GmbH. Best. Nr.: MABRCOMP1-0E - 3 -...
  • Seite 4 B&R KOMPAKTSTEUERUNG Inhaltliche Änderungen dieses Handbuches behalten wir uns ohne Ankündigung vor. Die Bernecker und Rainer Industrie-Elektronik GmbH haftet nicht für technische oder drucktechnische Fehler und Mängel in diesem Handbuch. Außerdem übernimmt die Bernecker und Rainer Industrie-Elektronik GmbH keine Haftung für Schäden, die direkt oder indirekt auf Lieferung, Leistung und Nutzung dieses Materials zurückzuführen sind.
  • Seite 5 B&R KOMPAKTSTEUERUNG B&R KOMPAKTSTEUERUNG Inhalt: 1. Allgemeines 2. Bestellnummern 2.1 B&R Kompaktsteuerung 2.2 Relais-Aufsteckkarte 2.3 Standardsoftware 2.4 Feldklemmen 3. Technische Daten 4. Abmessungen 5. Montage 5.1 Einbaurichtlinien 5.2 Es gibt zwei Montagemöglichkeiten 5.2.1 Direkt an Schaltschrankrückwand 5.2.2 Auf Hutschiene 6. Beschreibung der Komponenten 7.
  • Seite 6 B&R KOMPAKTSTEUERUNG 12. Analogeingänge 12.1 Technische Daten 12.2 Pinbelegung 12.3 Eingangsschaltung 12.4 Schirm erden 12.5 Verdrahtungsschema 12.6 Softwaremäßige Bedienung 12.7 AINJ - Analogeingang Kompaktsteuerung 12.8 Analogumwandlung 13. Analogausgänge 13.1 Technische Daten 13.2 Pinbelegung 13.3 Ausgangsschaltung 13.4 Schirm erden 13.5 Verdrahtungsschema 13.6 Softwaremäßige Bedienung 13.7 AOTF - Analogausgang Kompaktsteuerung 13.8 Analogwandlung...
  • Seite 7 B&R KOMPAKTSTEUERUNG 15.7 Montage 15.8 Kompaktsteuerung und Relais-Aufsteckkarte 15.9 Verbindung mit der Kompaktsteuerung 15.10 Relais-Versorgung 15.11 Schaltkreis 16. IF1 - RS232 Schnittstelle 16.1 Technische Daten 16.2 Pinbelegung 16.3 Verdrahtungsschema 16.4 Schirmung und Erdung 16.5 Softwaremäßige Bedienung 16.6 Compact MMI P120 und MMI P121 17.
  • Seite 8 B&R KOMPAKTSTEUERUNG 27. Lithium-Batterie 28. Zeittakte 29. Zeitimpulse 30. Echtzeituhr 31. Softwarezeiten 32. Inport/Outport Adresse $3400 33. Zusätzliches Anwender-EEPROM 33.1 Daten lesen 33.2 Daten schreiben 34. Inport Adresse $3480 35. Watchdog 35.1 Softwarewatchdog 35.2 Hardwarewatchdog 36. Timerinterruptroutinen 37. Fehlermeldungen 38. Stichwortverzeichnis - 8 -...
  • Seite 9: Allgemeines

    B&R KOMPAKTSTEUERUNG 1. ALLGEMEINES Mit der Steuerungsfamilie MINI-/MULTICONTROL bietet B&R ein Steuerungssystem an, das aufgrund seiner modularen Struktur und 100%igen Softwarekompatibilität individuell den kundenspezi- fischen Erfordernissen angepaßt werden kann. Um diesen Anforderungen noch mehr gerecht zu werden, hat B&R seine Produktpalette mit einer neuen Kompaktsteuerung erweitert.
  • Seite 10: Bestellnummern

    16 Digitaleingängen, 14 Digitalausgängen, 2 Analogeingängen, 2 Analogausgängen, Kanäle A und B für Positionieraufgaben, Referenzeingang, Ereigniszähler, Interrupteingang, B&R Online Schnittstelle, RS232 Schnittstelle (nicht galvanisch getrennt), RS232/RS485 Schnittstelle (RS485 galvanisch getrennt), PATA/SSI Schnittstelle, ohne CAN Bus BRCOMP1-0 mit CAN Bus auf IF5 BRCOMP2-0 - 10 -...
  • Seite 11: Relais-Aufsteckkarte

    B&R KOMPAKTSTEUERUNG 2.2 RELAIS-AUFSTECKKARTE Für die Kompaktsteuerung ist eine Relais-Aufsteckkarte erhältlich. Dadurch erhält man zu den vorhan- denen 14 Transistorausgängen zusätzlich 16 Relaisausgänge (A 060 - A 06F). Die Relais-Aufsteckkarte ist im Abschnitt "15. Relais-Aufsteckkarte für BRCOMP" beschrieben. 2.3 STANDARDSOFTWARE Speziell für die Kompaktsteuerung wurde eine Diskette mit der wichtigsten Standardsoftware zusam- mengestellt.
  • Seite 12: Technische Daten

    B&R KOMPAKTSTEUERUNG 3. TECHNISCHE DATEN Prozessor 6303 Bearbeitungszeit ca. 4 ms / K Anweisungen Anwenderprogrammspeicher 16 KBytes RAM/EEPROM Erweiterungsspeicher 16 KBytes EEPROM (für Daten) Status-LED Anzahl 8 Bit-Speicher 7168 remanent 7148 nicht remanent Anzahl 1 Bit-Speicher remanent nicht remanent Uhrzeit/Datum Echtzeituhr Software-Timer Zeittakte/Zeitimpulse...
  • Seite 13 B&R KOMPAKTSTEUERUNG 4. ABMESSUNGEN DCOK +24V OUTPUTS STATUS +24V P .L.C. FUSE 1,25 AT +24V Reset D-Out D-In D-Out D-In RE 485 GND 485 DATA 485 DATA 485 n.c. n.c. n.c. KTY2 n.c. SHUNT 2 n.c. n.c. SHUNT 1 KTY1 - 13 -...
  • Seite 14: Direkt An Schaltschrankrückwand

    B&R KOMPAKTSTEUERUNG 5. MONTAGE 5.1 EINBAURICHTLINIEN Bei Geräten, die starke elektromagnetische Störungen verursachen (z. B. Frequenzumrichter, Transfor- matoren, Motorregler usw.) ist auf ausreichende räumliche Trennung zu achten. Der Abstand dieser Geräte zur SPS sollte so groß wie möglich sein. Gegebenenfalls ist eine Abschirmung durch Trenn- bleche (MU-Metall) vorzunehmen.
  • Seite 15 B&R KOMPAKTSTEUERUNG HINWEIS: Die Hutschiene muß geerdet sein. Der durch die Befestigungslaschen bedingte Abstand zum Nachbarmodul reicht für eine ausreichende Luftzirkulation. DCOK +24V OUTPUTS STATUS +24V P .L.C. FUSE 1,25 AT +24V Reset D-Out D-In D-Out D-In RE 485 GND 485 DATA 485 DATA 485 n.c.
  • Seite 16: Beschreibung Der Komponenten

    B&R KOMPAKTSTEUERUNG 6. BESCHREIBUNG DER KOMPONENTEN DCOK +24V OUTPUTS STATUS +24V P .L.C. FUSE 1,25 AT +24V Reset D-Out D-In D-Out D-In RE 485 GND 485 DATA 485 DATA 485 n.c. n.c. n.c. KTY2 n.c. SHUNT 2 n.c. SHUNT 1 n.c.
  • Seite 17: Spannungsversorgung

    B&R KOMPAKTSTEUERUNG 7. SPANNUNGSVERSORGUNG Die LED DCOK zeigt an, daß die Steuerung versorgt wird. Es gibt zwei Möglichkeiten die Kompakt- steuerung mit Spannung zu versorgen: - ein Netzteil: - gemeinsame Versorgung für Ein- und Ausgänge - zwei Netzteile: - eine für die Steuerung - eine für die digitalen Ausgänge Ein Netzteil Die Versorgung der Kompaktsteuerung mit einem Netzteil ist der Standardfall (Schaltung siehe...
  • Seite 18: Sicherung

    B&R KOMPAKTSTEUERUNG 8. SICHERUNG Die Kompaktsteuerung ist mit einer Sicherung geschützt (250 V / 1,25 AT). Der Sockel für die Sicherung befindet sich unter der Feldklemme für die Digitalausgänge. HINWEIS: Die Digitalausgänge werden extra versorgt. Die Einspeisung muß über eine eigene Sicherung geführt werden (siehe Abschnitte "7.
  • Seite 19 B&R KOMPAKTSTEUERUNG 9. LEDs 32 LEDs informieren den Anwender über den Zustand der Digitaleingänge, der Digitalausgänge, der Spannungsversorgung und der Zentraleinheit. DCOK STATUS LEDs für Beschreibung Digitaleingänge Die grünen LEDs (0 - F) auf der linken Seite zeigen den Status der digitalen Eingänge aus ...
  • Seite 20: Betriebszustand

    B&R KOMPAKTSTEUERUNG Status-LED Die Kompaktsteuerung ist mit einer roten Status-LED ausgestattet, die verschiedene Betriebszustände anzeigt. LED-Status Betriebszustand Anwenderprogramm läuft im RAM Zentraleinheit ist im HALT-Zustand Onlinekabel während PROM-Programmieren abgesteckt Fehler bei der Ausführung des Anwenderprogramms Anwenderprogramm läuft im PROM - 20 -...
  • Seite 21: Digitaleingänge

    B&R KOMPAKTSTEUERUNG 10 DIGITALEINGÄNGE Die Digitaleingänge wandeln die binären Signale des Prozesses in die Binärwerte 0 und 1 um. Der Zustand der Eingänge wird über grüne Status-LEDs angezeigt. Die Kompaktsteuerung ist mit 16 Digitaleingängen (E 040 - E 04F) ausgestattet. Die Eingänge E 04C - E 04F können auch für Sonderaufgaben verwendet werden: Ereigniszähler Interrupteingang...
  • Seite 22: Eingangsschaltung

    B&R KOMPAKTSTEUERUNG 10.2 EINGANGSSCHALTUNG E 0-B Filter Adreß-, 18 V ... 4 ms Daten- 24 V ... 2 ms 30 V ... 1,6 ms Steuerbus E C-F Filter Latch 20 kHz Zähler- und Interrupt- Filter logik Die Zähler- und Interruptlogik ist im Abschnitt "14. Zählereingänge und Interrupteingang" beschrieben. 10.3 VERDRAHTUNGSSCHEMA FÜR DIGITALEINGÄNGE 24 VDC - 22 -...
  • Seite 23: Digitalausgänge

    B&R KOMPAKTSTEUERUNG 11. DIGITALAUSGÄNGE Digitalausgänge dienen zur Ansteuerung von externen Lasten (Relais, Motoren, Magnetventile usw.). Der Zustand der Ausgänge wird über orange Status-LEDs angezeigt. Die Kompaktsteuerung ist mit 14 Transistorausgängen (A 050 - A 05D) ausgestattet. 11.1 TECHNISCHE DATEN Anzahl Statusanzeige über 14 orange LEDs Potentialtrennung...
  • Seite 24: Ausgangsschaltung

    B&R KOMPAKTSTEUERUNG 11.2 AUSGANGSSCHALTUNG +24 V Outputs Adreß-, Daten- 14 x Ansteu- Steuerbus erung Filter A 0-D 11.3 VERDRAHTUNGSSCHEMA Ein weiteres Verdrahtungsschema ist im Abschnitt "7. Spannungsversorgung" abgebildet. Relais Hilfskontakt 10 AT +24 V OUTPUTS +24 VDC PLC 24 VDC / 1 A + I Summenstrom aller Ausgänge - 24 -...
  • Seite 25 B&R KOMPAKTSTEUERUNG 11.4 SCHALTEN OHMSCH-INDUKTIVER LASTEN Beim Schalten ohmsch-induktiver Lasten muß auf den Spulenwiderstand und auf die Spuleninduktivität geachtet werden. Das unten abgebildete Diagramm zeigt die maximale Anzahl der Schaltspiele pro Sekunde im Zusam- menhang von Spuleninduktivität und Spulenwiderstand. Es wird davon ausgegangen, daß alle Ausgän- ge gleichzeitig geschaltet werden (0,5 A bei 24 V).
  • Seite 26 B&R KOMPAKTSTEUERUNG Wenn der Spulenwiderstand kleiner 24 Ω ist, spricht der Thermoschutz der Digitalausgänge an und schaltet die Ausgänge ab. Bei einem Spulenwiderstand zwischen 24 Ω und 48 Ω muß auf die Einschaltdauer geachtet werden. Je nach Schaltfrequenz darf sie nicht länger als 10 s bzw. nicht länger als die Ausschaltzeit sein. Ein Dauerbetrieb ist in diesem Bereich nicht möglich! Wenn z.
  • Seite 27: Analogeingänge

    B&R KOMPAKTSTEUERUNG 12. ANALOGEINGÄNGE Mit analogen Eingängen werden Meßwerte (Ströme, Spannungen, Widerstände oder Temperatur) in Zahlenwerte umgewandelt, die in der SPS verarbeitet werden können. Die B&R Kompaktsteuerung ist mit zwei Analogeingängen ausgestattet. Für jeden Kanal kann softwaremäßig eines der folgenden Signale selektiert werden. Die Auswahl erfolgt durch Angabe einer Moduszahl (0 - 9).
  • Seite 28 B&R KOMPAKTSTEUERUNG Diagramme für Widerstandsmessung Aus den folgenden Diagrammen kann die Auflösung Ω/Bit bei einem bestimmten Widerstandswert abgelesen werden. 1) Widerstandsmessung 0 - 65000 Ω: Modus: 57,5 52,5 47,5 42,5 37,5 32,5 27,5 22,5 17,5 12,5 6500 13000 19500 26000 32500 39000 45500...
  • Seite 29 B&R KOMPAKTSTEUERUNG 2) Widerstandsmessung 0 - 4500 Ω: Modus: 2,896 2,792 2,687 2,583 2,479 2,375 2,271 2,167 2,063 1,958 1,854 1,75 1,646 1,542 1,438 1,333 1,229 1,125 1,021 0,917 0,812 0,708 0,604 1350 1800 2250 2700 3150 3600 4050 4500 zu messender Widerstandswert - 29 -...
  • Seite 30 B&R KOMPAKTSTEUERUNG 12.1 TECHNISCHE DATEN Anzahl galvanische Trennung Differenzeingänge, nicht galvanisch getrennt ±12 V Gleichtaktbereich Eingangswiderstand min. 10 MΩ ±30 V max. Spannungsfestigkeit Auflösung A/D Wandler 16 Bit Adressierung über Betriebssystem Genauigkeit bei 25 °C softwaremäßige Kompensation auf ±0,01 % (10 Hz Notch) ±10 V Bereich: ±0,03 % / °C ±0,9 LSB / °C Temperaturdrift...
  • Seite 31 B&R KOMPAKTSTEUERUNG 12.2 PINBELEGUNG 9polige DSUB-Buchse Belegung + Eingang 1 - Eingang 1 - Eingang 2 + Eingang 2 KTY 1 Shunt 1 Shunt 2 KTY 2 12.3 EINGANGSSCHALTUNG -Uref. 10 M + Eingang Adreß-, Shunt Differenz- Daten- Filter verstärker 124 Ω...
  • Seite 32 B&R KOMPAKTSTEUERUNG 12.4 SCHIRM ERDEN Vollmetallschrauben oder metallisierte Steckergehäuse stellen die einfachste und wirkungsvollste Lösung zur Ableitung der Störungen vom Kabelschirm zum Gehäuse der Kompaktsteuerung dar. Der Schirm ist direkt auf das Steckergehäuse zu legen. Kabelschirm mit Kabelschelle und Gehäuse verbunden 12.5 VERDRAHTUNGSSCHEMA Spannungsgeber potentialfreier...
  • Seite 33 B&R KOMPAKTSTEUERUNG Stromgeber Shunt potentialfreier 9polige Geber DSUB-Buchse Strom Shunt geerdeter 9polige Geber DSUB-Buchse Strom KTY10 Fühler Die KTY Fühler sind Halbleiter Temperaturfühler. Die KTY10 Serie hat bei 25 °C einen Nenn- widerstand von 2000 Ω (z. B. KTY10-6, KTY11-6, KTY13-6, KTY16-6 und KTY19-6). KTY10 Temperatursensor 9polige...
  • Seite 34 B&R KOMPAKTSTEUERUNG Widerstandsmessung mit NTC, PTC, PT1000 usw. zu messender Widerstand 9polige DSUB-Buchse Installation: potentialfrei - 34 -...
  • Seite 35 B&R KOMPAKTSTEUERUNG 12.6 SOFTWAREMÄSSIGE BEDIENUNG Die Initialisierung der Analogeingänge wird über die 8 Bit-Speicher C 1000 - C 1003 durchgeführt. Der Analogwert wird entweder in der END Routine oder durch einen AWL Aufruf gewandelt. Die gewandelten Werte werden in den Speichern C 1004 - C 1007 abgelegt. Die Initialisierung kann entweder durch Befehle in der AWL oder mit Hilfe des Funktionsblocks AINJ (siehe Abschnitt 12.7) durchgeführt werden.
  • Seite 36 B&R KOMPAKTSTEUERUNG 8 Bit-Speicher C 1001 Wandlung im END reserviert Filter für beide Kanäle EN r Wandlung im END Definiert, ob die Wandlung während der Ausführung der END Routine durchgeführt werden soll. Wenn die Wandlung nicht in der END Routine durchgeführt wird, muß die Analogwandelroutine über einen AWL Aufruf gestartet werden (siehe Analogumwandlung).
  • Seite 37 B&R KOMPAKTSTEUERUNG 8 Bit-Speicher C 1003 reserviert Überschreitung Kanal 1 Drahtbruch Kanal 1 reserviert Überschreitung Kanal 0 Drahtbruch Kanal 0 r O1 D1 r r O0 D0 reserviert Für spätere Anwendungen reserviert. Überschreitung Kanal 1 1 ... Bereichsüberschreitung Kanal 1 Drahtbruch Kanal 1 1 ...
  • Seite 38: Ainj - Analogeingang Kompaktsteuerung

    B&R KOMPAKTSTEUERUNG 12.7 AINJ - ANALOGEINGANG KOMPAKTSTEUERUNG Der Funktionsblock wird für die Initialisierung der Analogeingänge verwendet. Die gewandelten Werte und die Alarmbits für Bereichsüberschreitung und Drahtbruch werden auf Ausgänge gelegt. HINWEIS: Die Analogwandlung wird immer in der END Routine durchgeführt. Analogeingang AINJ Kompaktsteuer.
  • Seite 39 B&R KOMPAKTSTEUERUNG Ein-/Ausgänge Beschreibung Adreßtypen FILTER Definiert den Filter für beide Kanäle. C, # Filter Frequenz Wandelzeit Auflösung 10 Hz 302 ms ±14 Bit 50 Hz 62 ms ±14 Bit 250 Hz 16,2 ms ±12 Bit 1000 Hz 4,1 ms ±8 Bit RATE Definiert die Wandelfrequenz von Kanal 1 (0 - 255).
  • Seite 40 B&R KOMPAKTSTEUERUNG Ein-/Ausgänge Beschreibung Adreßtypen FILTER enthält den gewandelten Wert von Kanal 1. Wertebereich: Signal Wert ±10 V -32768 bis +32767 ±2,5 V -32768 bis +32767 0 - 20 mA 0 bis 32767 -50,00 bis +150,00 °C -5000 bis +15000 -58,00 bis +302,00 F -5800 bis +30200 0 bis 65000 Ω...
  • Seite 41: Analogumwandlung

    B&R KOMPAKTSTEUERUNG 12.8 ANALOGUMWANDLUNG HINWEIS: Im ersten Programmdurchlauf sind die Werte in den Speichern C 1004 - C 1007 null. Ist Bit 7 von C 1000 (Modusregister) nicht gesetzt, erfolgt keine Analogwandlung (C 1004 - C 1007 = 0). 1) Wandlung in der END Routine Software Wandlung Die Wandlung wird immer in der END Routine durchgeführt.
  • Seite 42 B&R KOMPAKTSTEUERUNG 3) Kanalrefreshzeit (bei Wandlung in der END Routine) a) Programmdurchlaufzeit ist kleiner als die Kanalwandelzeit (abhängig vom Filter) Refreshzeit = Anzahl der Kanäle * (Kanalwandelzeit + Programmdurchlaufzeit) b) Programmdurchlaufzeit ist größer als die Kanalwandelzeit (abhängig vom Filter) Refreshzeit = Anzahl der Kanäle * Programmdurchlaufzeit (pro Durchlauf ein Kanal) 4) END Routine Wenn die Analogwandlung in der END Routine durchgeführt wird, kontrolliert die Routine ob die...
  • Seite 43: Analogausgänge

    B&R KOMPAKTSTEUERUNG 13. ANALOGAUSGÄNGE Analogausgänge werden verwendet, um interne Zahlenwerte der SPS in Ströme und Spannungen zu konvertieren. 13.1 TECHNISCHE DATEN Anzahl Ausführung kurzschlußfest Adressierung über Betriebssystem ±10 V / 10 mA Spannungsausgang 0 - 20 mA, Bürde 50 Ω (400 Ω max.) Stromausgang Auflösung D/A Wandler 12 Bit...
  • Seite 44: Pinbelegung

    B&R KOMPAKTSTEUERUNG 13.2 PINBELEGUNG 9polige DSUB-Buchse Belegung U Ausgang 1 I Ausgang 1 n.c. U Ausgang 2 I Ausgang 2 n.c. n.c. 13.3 AUSGANGSSCHALTUNG Adreß-, Daten- U Ausgang Filter Steuerbus I Ausgang Filter - 44 -...
  • Seite 45: Verdrahtungsschema

    B&R KOMPAKTSTEUERUNG 13.4 SCHIRM ERDEN Vollmetallschrauben oder metallisierte Steckergehäuse stellen die einfachste und wirkungsvollste Lösung zur Ableitung der Störungen vom Kabelschirm zum Gehäuse der Kompaktsteuerung dar. Der Schirm ist direkt auf das Steckergehäuse zu legen. Kabelschirm mit Kabelschelle und Gehäuse verbunden 13.5 VERDRAHTUNGSSCHEMA Spannungsausgang 9polige...
  • Seite 46: Softwaremässige Bedienung

    B&R KOMPAKTSTEUERUNG 13.6 SOFTWAREMÄSSIGE BEDIENUNG Die Initialisierung der Analogausgänge wird über den 8 Bit-Speicher C 1009 durchgeführt. Die zu wandelnden Werte sind in den Speichern C 1010 - C 1013 gespeichert. Die Initialisierung kann entweder durch Befehle in der AWL oder mit Hilfe des Funktionsblocks AOTF (siehe Abschnitt 13.7) durchgeführt werden.
  • Seite 47: Aotf - Analogausgang Kompaktsteuerung

    B&R KOMPAKTSTEUERUNG 8 Bit-Speicher C 1010 - C 1013 Quellspeicher In den 8 Bit-Speichern C 1010 - C 1013 sind die zu wandelnden Werte abgelegt. Speicher Kanal C 1010& C 1012& Wertebereich: Signal Wert ±10 V -32768 bis +32767 0 - 20 mA 0 bis 32767 13.7 AOTF - ANALOGAUSGANG KOMPAKTSTEUERUNG Der Funktionsblock wird für die Initialisierung der Analogausgänge verwendet.
  • Seite 48: Analogwandlung

    B&R KOMPAKTSTEUERUNG Ein-/Ausgänge Beschreibung Adreßtypen OUT0 enthält den zu wandelnden Wert von Kanal 0. Wertebereich: Signal Wert ±10 V -32768 bis +32767 0 - 20 mA 0 bis 32767 enthält den zu wandelnden Wert von Kanal 1. OUT1 Wertebereich: Signal Wert ±10 V -32768 bis +32767...
  • Seite 49: Zählereingänge Und Interrupteingang

    B&R KOMPAKTSTEUERUNG 14. ZÄHLEREINGÄNGE UND INTERRUPTEINGANG Die Kompaktsteuerung ist mit 16 Digitaleingängen ausgestattet. Die Eingänge C - F können auch für Sonderaufgaben verwendet werden: Ereigniszähler Interrupteingang Referenzeingang Inkrementalgeber (Kanäle A und B) für Positionieraufgaben Die Software für die Bedienung der Eingänge ist auf der Standardsoftwarediskette für die Kompakt- steuerung gespeichert.
  • Seite 50: Funktionen Der Eingänge

    B&R KOMPAKTSTEUERUNG Funktionen der Eingänge Eingang Funktion Dekrementiert mit jeder negativen Flanke den Zähler 0. Der Zähler 0 kann auf zwei verschiedene Arten verwendet werden. Die Definition erfolgt über den Funktionsblockeingang MODE oder im Modusregister (siehe Abschnitt "14.6.3 Modusregister"). 1) Ereigniszähler ... Zähler mit 4 Bytes (0 - 4 294 967 295) 2) HW-Zähler ...
  • Seite 51: Bedienung Der Zähler

    B&R KOMPAKTSTEUERUNG 14.1 VERDRAHTUNGSSCHEMA Verdrahtungsschema mit bis zu zwölf Digitaleingängen, drei Zählereingängen und einem Interruptein- gang: 24 VDC Schirm 14.2 BEDIENUNG DER ZÄHLER Die Bedienung erfolgt entweder über den Funktionsblock CMDC oder CMDD oder über den Aufruf von Betriebssystemroutinen aus der AWL. Es können aber auch beide Methoden miteinander gemischt werden.
  • Seite 52: Cmdc - Zählerauswertung (Brcomp)

    B&R KOMPAKTSTEUERUNG 14.3 CMDC - ZÄHLERAUSWERTUNG (BRCOMP) Bei Verwendung des Funktionsblockes werden Vorwahlwerte und neue Zählerstände im nächsten END (Programmende) übernommen bzw. aufgefrischt. ZAEHLERAUSW. CMDC BRCOMP1 Funktionsblocklänge: 120 Zeilen ENABLE CMDC First Scan: MODE ERROR [ADR] 2 RUN1/0 [ADR] 2 CLR1/0 [ADR] 2 PREDEF...
  • Seite 53 B&R KOMPAKTSTEUERUNG Ein-/Ausgänge Beschreibung Adreßtypen RUN1/0 An diesen Eingang wird die Startadresse eines 4 Bytes langen Speicherbe- [ADR] C, reichs angeschlossen. Mit diesen Speichern kann jeder Zähler einzeln [ADR] M gestoppt und wieder freigegeben werden. Zuordnung der Speicher Speicherzustände 1. Speicher ... Zähler 0 0 ...
  • Seite 54: Cmdd - Zähler 0 Auswertung (Brcomp)

    B&R KOMPAKTSTEUERUNG 14.4 CMDD - ZÄHLER 0 AUSWERTUNG (BRCOMP) Der Hardwarezähler kann nur vorgeladen werden, wenn der Zähler nicht als Interruptquelle ausgewählt ist. Nach dem Vorladen muß der Hardwarezähler als Interruptquelle definiert werden. Der Istwert des Hardwarezählers ändert sich erst nach der nächsten Flanke am Zähleingang auf den Vorladewert.
  • Seite 55 B&R KOMPAKTSTEUERUNG Ein-/Ausgänge Beschreibung Adreßtypen RUN1/0 Zähler 0 stoppen bzw. freigeben. C, M 0 ... stoppen 1 ... weiterzählen Der Speicher kann natürlich nur sinnvoll verwendet werden, wenn auch der richtige Betriebsmodus eingestellt ist. Z. B. hat das Setzen des Speichers keinerlei Wirkung, wenn als Interruptquelle Hardwarezähler 0 selektiert ist.
  • Seite 56 B&R KOMPAKTSTEUERUNG 14.5 INTERRUPTMODUS Im Modusregister bzw. über den Funktionsblockeingang MODE kann eine Interruptquelle für die Generierung eines Interrupts definiert werden. Die Interrupts werden erst beim Ausführen des nächsten END (Programmende) freigegeben bzw. gesperrt und nicht nach der Definition des Modusregisters oder während der Exekution des Funktionsblockes. Durch Aufruf der Betriebssystemroutine wird der Interrupt sofort freigegeben oder gesperrt.
  • Seite 57: Bedienung Über Awl

    B&R KOMPAKTSTEUERUNG 14.6 BEDIENUNG ÜBER AWL Die Bedienung der drei Zähler und des Referenz- bzw. Interrupteingangs kann auch über die AWL erfolgen. Die vorgenommenen Einstellungen werden in der END Routine übernommen. Wenn eine sofortige Übernahme der Einstellungen nötig ist, können Betriebssystemroutinen aufgerufen werden.
  • Seite 58: Enable Zähler

    B&R KOMPAKTSTEUERUNG 14.6.2 Steuerregister $2120 Enable Zähler Funktion Enable Zähler 0 Mit diesen Bits kann jeder Zähler einzeln gestoppt und wieder freigegeben werden. Enable Zähler 1 Enable Zähler 2 Clear Zähler Enable Zweikanalzähler (Encoder) Diese Bits dürfen nur für einen Programmdurchlauf Clear Zähler 0 gesetzt werden.
  • Seite 59: Adressen Der Betriebssystemroutinen

    B&R KOMPAKTSTEUERUNG 14.6.4 Initialisierungsregister $2122 Initialisierung der Zählerfunktionen und der Hardware reserviert für spätere Anwendungen Flanke für Input Capture Interrupt 0 ... negative Flanke 1 ... positive Flanke Zähler aktivieren 0 ... Zähler deaktivieren 1 ... Zähler aktivieren 7 6 5 4 3 2 1 0 Wenn das Nullsignal von Hardwarezähler 0 als Interruptquelle selektiert wird, muß...
  • Seite 60: Funktion Der Zähler

    B&R KOMPAKTSTEUERUNG 14.6.6 Funktion der Zähler Im Initialisierungsregister ($2122) muß Bit 0 gesetzt werden, um die Zähler und die Generierung des Input Capture Interrupts zu aktivieren. Die Zählerfunktionen können gesammelt oder für jeden Zähler einzeln gesetzt werden (Steuerregi- ster $2120). Im Steuerregister ($2120) kann jeder einzelne Kanal (abhängig vom Betriebsmodus) freigegeben bzw.
  • Seite 61: Zähler Initialisieren

    B&R KOMPAKTSTEUERUNG 14.6.7 Zähler initialisieren Die Einstellung des Zählermodus, der Interruptquelle und die Aktivierung der Zähler erfolgt mit dem Modus- und dem Initialisierungsregister. Der Betriebsmodus kann allerdings auch während des Betriebs jederzeit geändert werden. Damit die Einstellungen übernommen werden, muß Bit 7 im Initialisierungsregister ($2122) gesetzt werden.
  • Seite 62: Aufruf Von Betriebssystemroutinen

    B&R KOMPAKTSTEUERUNG 14.6.8 Aufruf von Betriebssystemroutinen 1) Setze Modusregister keine Aufrufparameter, keine Rückgabedaten HINWEIS: Der Aufruf der Betriebssystemroutine darf frühestens einen Programmdurchlauf nach dem Initialisieren erfolgen. Beispiel Initialisierungsregister $2122: positive Flanke für Input Capture Interrupt Muß positiv sein, wenn Hardwarezähler 0 als Interruptquelle verwendet wird.
  • Seite 63 B&R KOMPAKTSTEUERUNG 2) Referenzimpuls Vor dem Aufruf "Lese Referenzimpuls" muß unbedingt die Funktion "Aktiviere Referenzimpuls" aufgerufen werden. Das Referenzbit 0 wird dabei auf 0 gesetzt. Das Eintreffen eines Referenzimpulses setzt das Referenzbit auf 1. Dieses bleibt solange auf 1, bis wieder die Funktion "Aktiviere Referenzimpuls"...
  • Seite 64 B&R KOMPAKTSTEUERUNG 4) Vorwahlwert des Zählers x ändern Die Vorwahlwerte der Zähler sind auf den Adressen $2110 - $211F gespeichert. Um die Werte zu ändern, muß wie im Beispiel beschrieben vorgegangen werden. Beispiel Der Vorwahlwert von Zähler 0 wird geändert. Der Wert steht in den 8 Bit-Speichern C 2000 - C 2003.
  • Seite 65 B&R KOMPAKTSTEUERUNG 6) Zähler x lesen Die Istwerte der Zähler sind auf den Adressen $2100 - $210F gespeichert. Die Pointer zu den Betriebssystemroutinen liegen auf den folgenden Adressen: Adresse Istwert $C12F lese Zähler 0 $C132 lese Zähler 1 und 2 $C135 lese Zweikanalzähler (Encoder) HINWEIS:...
  • Seite 66 B&R KOMPAKTSTEUERUNG 8) Hardwarezähler 0 Der Istwert des Hardwarezählers 0 wird in den Adressen $2123 und $2124 gespeichert. Er wird mit der Funktion "Lade Zähler 0" ausgelesen (siehe Punkt 6). Durch Hardwarebeschränkungen kann der Stand des 4 Byte-Zählers 0 im Speicherbereich $2100 - $2103 nicht mit dem Hardwarezähler synchronisiert werden.
  • Seite 67: Relais-Aufsteckkarte Für Brcomp

    B&R KOMPAKTSTEUERUNG 15. RELAIS-AUFSTECKKARTE FÜR BRCOMP 15.1 ALLGEMEINES Für die Kompaktsteuerung ist eine Relais-Aufsteckkarte erhältlich. Dadurch erhält man zu den vorhan- denen 14 Transistorausgängen zusätzlich 16 Relaisausgänge (A 060 - A 06F). Die Kompaktsteuerung und die Relais-Aufsteckkarte können entweder nebeneinander oder übereinan- der montiert werden.
  • Seite 68: Technische Daten

    B&R KOMPAKTSTEUERUNG 15.3 TECHNISCHE DATEN Anzahl Relais Anzahl der Gruppen Schaltspannung 5 - 240 VAC, 50/60 Hz 5 - 30 VDC Schaltstrom pro Ausgang max. 3 A pro Gruppe max. 6 A Schaltverzögerung log. 0 → 1 ca. 10 ms log.
  • Seite 69: Abmessungen

    B&R KOMPAKTSTEUERUNG 15.5 ABMESSUNGEN - 69 -...
  • Seite 70: Einbaurichtlinien

    B&R KOMPAKTSTEUERUNG 15.6 EINBAURICHTLINIEN Die Relais-Aufsteckkarte kann horizontal oder vertikal montiert werden. Der durch die Befestigungs- laschen bedingte Abstand zum Nachbarmodul reicht für eine ausreichende Luftzirkulation. Die maximale Betriebstemperatur von 55 °C ist unterhalb der Relais-Aufsteckkarte einzuhalten. Es ist keine Fremdbelüftung des Gehäuses erforderlich. 15.7 MONTAGE Es gibt zwei Montagemöglichkeiten direkt an Schaltschrankrückwand...
  • Seite 71 B&R KOMPAKTSTEUERUNG Relais-Aufsteckkarte auf der Hutschiene befestigen. Die Hutschiene muß geerdet sein! Links und rechts von der Relais-Aufsteckkarte eine Schutzleiterklemme einsetzen. Relais-Aufsteckkarte über die vorbereiteten Kontakte erden. Verbindung über Flachstecker Input: +24Vdc +24V Reset D-OUT D-IN D-OUT D-IN Verbindung über Flachstecker - 71 -...
  • Seite 72: Kompaktsteuerung Und Relais-Aufsteckkarte

    B&R KOMPAKTSTEUERUNG 15.8 KOMPAKTSTEUERUNG UND RELAIS-AUFSTECKKARTE Die Kompaktsteuerung und die Relais-Aufsteckkarte können entweder nebeneinander oder übereinan- der montiert werden. 1. Nebeneinander Wenn die beiden Gehäuse nebeneinander montiert werden, beachten Sie bitte die angegebenen Einbau- und Montagehinweise. 2. Übereinander In diesem Fall wird zuerst die Relais-Aufsteckkarte direkt an die Schaltschrankrückwand oder auf die Hutschiene montiert (Hinweise beachten).
  • Seite 73: Verbindung Mit Der Kompaktsteuerung

    B&R KOMPAKTSTEUERUNG 15.9 VERBINDUNG MIT DER KOMPAKTSTEUERUNG Mit dem Kabel BRKA08-0 wird über die PATA Schnittstelle die Verbindung zur Steuerung hergestellt. Das Kabel muß extra bestellt werden. 15.10 RELAIS-VERSORGUNG +24 VDC ±15 %, max. 400 mA - 73 -...
  • Seite 74 B&R KOMPAKTSTEUERUNG 15.11 SCHALTKREIS VDC < 18 V Relais-Versorgung 24 VDC ±15% DC Error Ausgang PATA Status- Data in Filter Data out 16 x Reset Schieberegister 5 VDC Versorgung Logik +24 V Spannungsregler 200 nF Gehäuse - 74 -...
  • Seite 75 B&R KOMPAKTSTEUERUNG 16. IF1 - RS232 SCHNITTSTELLE 16.1 TECHNISCHE DATEN Schnittstelle RS232 galvanisch getrennt NEIN Anschluß 9poliger DSUB Stecker Reichweite max. 15 m, geschirmtes Kabel Handshakeleitungen DSR, RTS Baudrate 300 - 19200 Baud Datenformat Datenbits 5 bis 8 Parity ja / nein / gerade / ungerade Einstellung softwaremäßig Versorgung für Compact...
  • Seite 76: Verdrahtungsschema

    B&R KOMPAKTSTEUERUNG 16.3 VERDRAHTUNGSSCHEMA DSR / CTS RTS / DTR 16.4 SCHIRMUNG UND ERDUNG Für Schnittstellenverbindungen müssen geschirmte Kabel verwendet werden. Der Kabelschirm ist auf beiden Seiten zu erden. 16.5 SOFTWAREMÄSSIGE BEDIENUNG Die softwaremäßige Bedienung der Schnittstelle ist im Abschnitt "18. Bedienung der Schnittstellen IF1 und IF2"...
  • Seite 77 B&R KOMPAKTSTEUERUNG 17. IF2 - RS232/RS485 SCHNITTSTELLE 17.1 TECHNISCHE DATEN Schnittstelle RS232 RS485 galvanisch getrennt NEIN Reichweite max. 15 m, geschirmtes Kabel max. 1200 m, geschirmtes Twisted Pair Handshakeleitungen DSR, RTS Anschluß 9polige DSUB Buchse Baudrate 300 - 19200 Baud Datenformat Datenbits 5 bis 8...
  • Seite 78 B&R KOMPAKTSTEUERUNG 17.3 VERDRAHTUNGSSCHEMA RS232 Schnittstelle DSR / CTS RTS / DTR RS485 Schnittstelle DATA DATA DATA DATA Enable - 78 -...
  • Seite 79 B&R KOMPAKTSTEUERUNG 17.4 SCHIRMUNG UND ERDUNG Für Schnittstellenverbindungen müssen geschirmte Kabel verwendet werden. Der Kabelschirm ist auf beiden Seiten zu erden. 17.5 SOFTWAREMÄSSIGE BEDIENUNG Die softwaremäßige Bedienung der Schnittstelle ist im Abschnitt "18. Bedienung der Schnittstellen IF1 und IF2" beschrieben. - 79 -...
  • Seite 80: Bedienung Der Schnittstellen If1 Und If2

    B&R KOMPAKTSTEUERUNG 18. BEDIENUNG DER SCHNITTSTELLEN IF1 UND IF2 Die softwaremäßige Bedienung der Anwenderschnittstelle erfolgt über die folgenden Register: Register Datenregister P 100 P 300 Statusregister P 101 P 301 Befehlsregister P 102 P 302 Programmregister P 103 P 303 Initialisierung Bei der Initialisierung werden Programmregister und Befehlsregister mit bestimmten Vorwahlwerten beschrieben.
  • Seite 81 B&R KOMPAKTSTEUERUNG Beispiel Initialisierung der Anwenderschnittstelle IF1: Baudrate = 9600, 8 Datenbits, 1 Stoppbit, Parity aus, Echo Mode aus # %00011110 9600 Baud, 8 Datenbits, 1 Stoppbit # %00001011 Parity aus, Echo Mode aus P 102 Programmregister & Befehlsregister Das RT Bit RS485 Schnittstelle - Busankopplung: Um den RS485 Sender einzuschalten, muß...
  • Seite 82 B&R KOMPAKTSTEUERUNG RS232 Schnittstelle - Punkt zu Punkt: Bei einer RS232 Verbindung ist das RT Bit üblicherweise gesetzt. Wenn der Anwender ein Busy Signal absetzen möchte, kann er das RT Bit auf "0" setzen. HINWEIS: Wenn das RT Bit "0" ist, ist der eigene Sender ebenfalls inaktiv! Das folgende Diagramm zeigt die Signale einer RS232 Kommunikation.
  • Seite 83: Statusregister

    B&R KOMPAKTSTEUERUNG Statusregister Das Statusregister liefert Informationen über den Zustand der seriellen Schnittstelle und über eventuell aufgetretene Fehler. Der Zustand des Statusregisters muß bei jedem Sende- oder Empfangsvorgang berücksichtigt werden. Zustand DSR-Leitung 0 ... DSR low - Gegenstation bereit Statusregister 1 ...
  • Seite 84: Zeichen Ausgeben

    B&R KOMPAKTSTEUERUNG Zeichen ausgeben Vor dem Beschreiben des Datenregisters mit dem auszugebenden Zeichen ist zu überprüfen, ob der Sender bereit ist, ein Zeichen zu senden (Bit 4 im Statusregister muß 1 sein). P 101 Statusregister # %00010000 Sender bereit ? Sprung, wenn Sender nicht bereit x xxx auszugebendes Zeichen...
  • Seite 85: Verwendung Des Schnittstelleninterrupts

    B&R KOMPAKTSTEUERUNG 18.1 VERWENDUNG DES SCHNITTSTELLENINTERRUPTS Der Schnittstellenbaustein liefert folgende Interrupts: a) Sendeinterrupt: Wenn der Sender bereit ist, ein Zeichen zu senden. b) Empfangsinterrupt: Wenn ein Zeichen empfangen wurde (auch wenn ein Übertragungs- fehler auftrat). Zur Quittierung des Interrupts muß in der Interruptroutine bei einem: a) Sendeinterrupt: Das Datenregister beschrieben werden.
  • Seite 86: Interruptauswertung

    B&R KOMPAKTSTEUERUNG Beispiele 1) Freigeben des Empfangsinterrupts: # %00001001 P 102 Befehlsregister 2) Freigeben des Sendeinterrupts: # %00000111 P 102 Befehlsregister 3) Freigeben des Sende- und Empfangsinterrupts: # %00000101 P 102 Befehlsregister Interruptauswertung Die beiden Interrupts können im Befehlsregister getrennt freigegeben und gesperrt werden. Sie führen jedoch auf denselben Vektor.
  • Seite 87 B&R KOMPAKTSTEUERUNG Im Unterprogramm "SEND" werden Daten in Im Unterprogramm "EMPF" wird kontrolliert, einen Sendepuffer geschrieben und der ob ein Zeichen im Empfangspuffer ist. Wenn Sendeinterrupt freigegeben. ein Zeichen empfangen wurde, wird es ausgewertet. SEND EMPF Daten in Sendepuffer schreiben Nein Zeichen im Empfangspuffer...
  • Seite 88 B&R KOMPAKTSTEUERUNG Nein Gegenstelle bereit HINWEIS: (nur m. HW-Handshake) Wenn die Gegenstelle nicht bereit ist, wird der Sendeinterrupt gesperrt. Die erneute Frei- Zeichen aus Sendepuffer gabe erfolgt im Unterprogramm "SEND". ins Datenregister schreiben Durch das Sperren des Interrupts wird verhindert, Nein daß...
  • Seite 89 B&R KOMPAKTSTEUERUNG 19. IF3 - PATA/SSI SCHNITTSTELLE Die Schnittstelle IF3 ist eine modifizierte RS422 Schnittstelle. An die IF3 kann ein MINICONTROL Bedientableau oder eine Relais-Aufsteckkarte angeschlossen werden (PATA Schnittstelle). Für den Anschluß absoluter Wegmeßsysteme ist sie auch als SSI Schnittstelle ausgeführt. Pinbelegung 9polige DSUB-Buchse Belegung...
  • Seite 90 B&R KOMPAKTSTEUERUNG SSI Schnittstelle Für den Anschluß von Absolutgebern an die SSI Schnittstelle müssen folgende Voraussetzungen erfüllt werden: Es können nur Absolutgeber mit einer Monoflopzeit zwischen 20 µs und 260 µs verwendet werden. Es können Absolutgeber mit maximal 24 Bit (AG24) bzw. 32 Bit (AG32) eingelesen werden.
  • Seite 91: Buslänge Und Kabeltyp

    B&R KOMPAKTSTEUERUNG 21. IF5 - CAN BUS 21.1 MERKMALE DES CAN BUSSES Feldbus geringe Kosten hohe Störsicherheit durch Differenzsignale Busstruktur offenes System schnelle Datenübertragung für kleine Datenpakete (bis zu 8 Bytes) Fehlererkennung mittels CRC (Cyclic Redundancy Check) und Rahmenprüfung -> Hamming Distance 6 vorhersagbare Übertragungszeiten für hochpriore Meldungen (Echtzeitverhalten) einfache Anwendung...
  • Seite 92 B&R KOMPAKTSTEUERUNG Bitrate [kBit/s] Synchronisationssprungweite (SJW) Buslänge [m] zul. Oszillatortoleranz [%] 0,121 0,242 0,363 0,485 0,121 0,242 0,363 0,485 0,121 0,242 0,363 0,485 0,121 0,242 0,363 0,485 1397 0,121 1284 0,242 1056 0,363 0,485 3613 0,121 3329 0,242 2761 0,363 2193 0,485 7306...
  • Seite 93: Anschlussbelegung

    B&R KOMPAKTSTEUERUNG 21.4 ANSCHLUSSBELEGUNG Die Kompaktsteuerung BRCOMP2-0 (Betriebssystemversion 4.1) ist mit einer CAN Bus-Schnittstelle nach ISO-DIS 11898 ausgestattet. Die Anschlußbelegung ist nach CiA DS 102-1 ausgeführt. Pinbelegung 9poliger DSUB-Stecker Belegung CAN L CAN GND CAN H 21.5 VERDRAHTUNG Die Verdrahtung erfolgt in einer Busstruktur. Beide Busenden sind mit einem Abschlußwiderstand zu beschalten.
  • Seite 94: Blockschaltbild Eines Knotens

    B&R KOMPAKTSTEUERUNG 21.5.1 Verdrahtungsprinzip Knoten 1 Knoten n-1 Knoten n Opto- Opto- Opto- Opto- Opto- Opto- koppler koppler koppler koppler koppler koppler Transceiver Transceiver Transceiver CAN H CAN L CAN H CAN L CAN H CAN L Abschlußwiderstand 120 Ω Abschlußwiderstand 120 Ω...
  • Seite 95: Bedienung Des Can Busses

    B&R KOMPAKTSTEUERUNG 21.6 BEDIENUNG DES CAN BUSSES Der CAN Bus wird über die Funktionsblöcke CNSW und CNCS bedient. Die Funktionsblöcke sind als Standardsoftware erhältlich (auf 3,5" Disketten). Sprache Bestellnummer deutsch SWSPSCAN01-0 englisch SWPLCCAN01-0 21.6.1 CNSW - CAN Knotenschalter Der Funktionsblock liest die Schalterstellungen der beiden Hex-Schalter (zwischen Digitaleingänge und IF3 - PATA) ein und stellt sie dem CAN Client/Server Funktionsblock CNCS zur Verfügung.
  • Seite 96: Einschaltverhalten (Power-On)

    B&R KOMPAKTSTEUERUNG 22. EINSCHALTVERHALTEN (POWER-ON) SPS wird eingeschaltet PROM Status LED HALT angesteckt PROM in das RAM kopieren Status LED Status LED blinkt START HALT (im PROM) 23. BEFEHLSSATZ In der Kompaktsteuerung kommt ein 6303 Prozessor (Hitachi) zum Einsatz. Das ist derselbe Prozessor, der auch in den Zentraleinheiten der MINICONTROL verwendet wird.
  • Seite 97 B&R KOMPAKTSTEUERUNG 24. MATHEMATIKROUTINEN Die Zentraleinheit der Kompaktsteuerung ist standardmäßig mit schnellen Fließkomma Mathema- tikroutinen ausgestattet. Diese Routinen sind Bestandteil des Betriebssystems. Sie werden durch Befehlsmnemoniks aus der Anweisungsliste aufgerufen. Neben den Grundrechenarten Addition, Subtraktion, Multiplikation, Division und Quadratwurzel stehen zahlreiche Umwandlungs- und Hilfsprogramme zur Verfügung (z. B. zum Vergleichen oder Kopieren).
  • Seite 98 B&R KOMPAKTSTEUERUNG Quelle bzw. Ziel bzw. Mögliche Fehlermeldungen Ausführungszeit Bef. Funktion in µ µ µ µ µ s Operanden Ergebnis 9 10 11 12 13 14 ● ● ● ● ● MADD OP1 := OP1 + OP2 OP1, OP2 209/690 ●...
  • Seite 99 B&R KOMPAKTSTEUERUNG Fehlermeldungen Die in der Tabelle (siehe vorhergehende Seite) mit ● gekennzeichneten Fehlermeldungen, sind für die jeweilige Funktion möglich. Tritt bei der Ausführung einer Routine ein Fehler auf, wird das Carry Flag gesetzt und die 8 Bit-Speicherstelle C 1024 enthält die Fehlernummer. Fehlernummer Beschreibung Bei einer Berechnung wurde der darstellbare Zahlenbereich überschritten...
  • Seite 100: Operanden Und Speicher

    B&R KOMPAKTSTEUERUNG Operanden und Speicher Speicherstellen Funktion C 1024 Fehlernummer C 1025 reserviert C 1026 bis C 1029 Operand 1 (OP1) C 1030 bis C 1033 Operand 2 (OP2) C 1034 bis C 1037 Zwischenspeicher 1 (MEM1) C 1038 bis C 1041 Zwischenspeicher 2 (MEM2) C 1042 bis C 1045 Zwischenspeicher 3 (MEM3)
  • Seite 101 B&R KOMPAKTSTEUERUNG 25. SYSTEMSPEICHERSTELLEN Einige 8 Bit-Speicher und 1 Bit-Speicher sind für Betriebssystemfunktionen reserviert. Diese dürfen vom Anwenderprogramm nicht bzw. nur eingeschränkt verwendet werden: 8 Bit-Speicher: C 0800 bis C 1499 1 Bit-Speicher: M 800 bis M 999 1 Bit-Speicher mit Adressen ab M 800, die für Betriebssystem-Sonderfunktionen verwendet sind, werden mit Adressen F Dxx bzw.
  • Seite 102 B&R KOMPAKTSTEUERUNG Im folgenden Abschnitt sind die Systemspeicherstellen beschrieben, die vom Anwenderprogramm nur eingeschränkt verwendet werden dürfen: Zulässiger Zugriff Adresse(n) Funktion Lesen Schreiben C 0800 bis C 0863 Vorteiler für Softwarezeiten ● C 0899 First Scan Speicher C 0900 bis C 0963 Zähler für Softwarezeiten ●...
  • Seite 103 B&R KOMPAKTSTEUERUNG 26. FIRST SCAN FLAG Das First Scan Flag ist eine 1 Bit-Speicherstelle (Z D64), die vom Betriebssystem automatisch während des ersten Programmzyklus auf 1 gesetzt wird, sonst ist dieses Flag 0. Das First Scan Flag wird für Programminitialisierungen verwendet. Auch die Speicherstelle C 0899 liefert die First Scan Funktion: Z D64 First Scan Flag (1 = erster Programmzyklus) C 0899...
  • Seite 104: Lithium-Batterie

    B&R KOMPAKTSTEUERUNG 27. LITHIUM-BATTERIE Die Kompaktsteuerung ist mit einer Lithium-Batterie ausgestattet. Sie wird für die Pufferung des SRAM und der Echtzeituhr benötigt. HINWEIS: Lithium-Batterien sind nicht umweltverträglich und fallen in die Kategorie Sondermüll. Bitte beachten Sie die in Ihrem Land geltenden gesetzlichen Entsorgungsvorschriften. Pufferdauer 3 Jahre bei 70 °C 6 Jahre bei 40 °C...
  • Seite 105 B&R KOMPAKTSTEUERUNG Batteriewechsel Der Wechsel muß im spannungslosen Zustand erfolgen. HINWEIS: Die im RAM gespeicherten Daten und die Uhrzeit gehen verloren. Mit dem Befehl "UPDL" des B&R PROgrammierSYStems können die Daten jedoch gesichert werden. - 105 -...
  • Seite 106 B&R KOMPAKTSTEUERUNG 28. ZEITTAKTE Zeittakte sind 1 Bit-Adressen, die vom Betriebssystem automatisch mit Blinktakten angesteuert werden: Adresse Z D80 10 ms 10 ms Z D81 40 ms 60 ms Z D82 0,4 s 0,6 s Z D83 29. ZEITIMPULSE Zeitimpulse sind 1 Bit-Adressen, die vom Betriebssystem automatisch für die Dauer eines Programmzy- klus auf 1 gesetzt werden.
  • Seite 107 B&R KOMPAKTSTEUERUNG 30. ECHTZEITUHR Wenn die SPS ausgeschaltet ist, läuft die Uhrzeit weiter (gepuffert von der Lithium-Batterie). Uhrzeitspeicherstellen (alle Angaben in BCD): C 0980 1/100 Sekunden ($00 bis $99) C 0981 Sekunden ($00 bis $59) C 0982 Minuten ($00 bis $59) C 0983 Stunden ($00 bis $23) C 0984...
  • Seite 108: Zeitlicher Ablauf

    B&R KOMPAKTSTEUERUNG 31. SOFTWAREZEITEN Die Zentraleinheit der Kompaktsteuerung verfügt über 64 Softwarezeiten, die als Anzugsverzögerung arbeiten. Jede Softwarezeit besteht aus folgenden Adressen: F Dxx Freigabe (starten) der Softwarezeit. Durch Beschreiben dieser Speicherstelle mit 1 wird die Softwarezeit xx (xx = 00 bis 63) gestartet. Diese Speicherstelle kann auch gelesen werden (z.
  • Seite 109 B&R KOMPAKTSTEUERUNG Beispiel 5,5 Sekunden nach Betätigen eines Tasters (E 042) wird ein Motor (A 058) gestartet. Mit einem weiteren Taster (E 043) wird der Motor wieder gestoppt: 0000 5"50 Zeitdefinition 0001 E 042 Taster START 0002 M 100 Pos. Flanke von E 042 0003 M 100 Pos.
  • Seite 110 B&R KOMPAKTSTEUERUNG 32. INPORT/OUTPORT ADRESSE $3400 reserviert Blockauswahl Block reserviert Für spätere Anwendungen reserviert. Blockauswahl Mit den Bits 0 - 2 wird der anzusprechende 2 KByte Speicherbereich des Zusatz-EEPROM ausgewählt. 0 ... Block 0 1 ... Block 1 7 ... Block 7 Nähere Beschreibung siehe Abschnitt "33.
  • Seite 111: Zusätzliches Anwender-Eeprom

    B&R KOMPAKTSTEUERUNG 33. ZUSÄTZLICHES ANWENDER-EEPROM Von diesem EEPROM stehen dem Anwender 16 KBytes zur Verfügung. Es ist in 8 Blöcke zu je 2 KBytes unterteilt. Der gewünschte Block wird mit den ersten 3 Bits des Inport/Outport Bytes (Adresse $3400) definiert. Beispiel Definition von Block 6 des Zusatz-EEPROM.
  • Seite 112: Daten Lesen

    B&R KOMPAKTSTEUERUNG 33.1 DATEN LESEN Zum Lesen von Daten aus einem Block wird das AWL Makro DFEE verwendet Übergabeparameter: Quelle Blocknummer in C 0881 Offset zu Adresse $3800 in C 0882& Ziel Indexregister Datenlänge in Ergebnisregister D Rückgabeparameter: Kein Fehler aufgetreten: Carry = 0 Datentransfer o.k.
  • Seite 113 B&R KOMPAKTSTEUERUNG C 0884 DATA 04 aktuelle Datenlänge DFE1 keine ungerade Datenlänge C 0884 DATA 04 aktuelle Datenlänge C 0866 & SOURCE 0 I 000 erstes Byte lesen C 0866 & SOURCE C 0868 & DEST 0 I 000 erstes Byte speichern C 0868 &...
  • Seite 114: Daten Schreiben

    B&R KOMPAKTSTEUERUNG 33.2 DATEN SCHREIBEN Beim Schreiben von Daten in ein EEPROM ist zu beachten, daß dies im Gegensatz zum Schreiben in einen 1 oder 8 Bit-Speicherbereich mit einer gewissen Verzögerung geschieht. Zum Schreiben von Daten in einen Block wird das AWL Makro DTEE verwendet Das AWL Makro DTEE eignet sich zum Programmieren von Parameterdaten, die sich während des Betriebs einer Anlage nicht ändern.
  • Seite 115 B&R KOMPAKTSTEUERUNG DTEE C 0884 DATA 04 aktuelle Datenlänge C 0866 & SOURCE 0 C 0882 DATA 02 Offset # %00000111 begrenzen auf 2 KBytes / Block # $3800 Startadresse EEPROM-Block C 0882 DATA 02 C 0884 DATA 04 # $3FFF J<= DTE5 *----------------------...
  • Seite 116 B&R KOMPAKTSTEUERUNG DTE2 C 0882 DATA 02 MEM-Adreßpointer erhöhen # 00001 C 0882 DATA 02 C 0866 & SOURCE 0 C 0866 & SOURCE 0 C 0884 DATA 04 aktuelle Datenlänge # 00001 alle Daten kopiert ? C 0884 DATA 04 DTE4 DTE3 DTE4...
  • Seite 117 B&R KOMPAKTSTEUERUNG 34. INPORT ADRESSE $3480 reserviert Input Capture Eingang E 04C über 50 µs Filter Batterie o.k. reserviert r IC EF Ba r reserviert Für spätere Anwendungen reserviert. Input Capture Durch das Modusregister $2121 (siehe Abschnitt "14.6.3 Modusregister $2121") wird die Interruptquelle für den Input Capture Eingang bestimmt.
  • Seite 118: Softwarewatchdog

    B&R KOMPAKTSTEUERUNG 35. WATCHDOG 35.1 SOFTWAREWATCHDOG Der Softwarewatchdog überwacht die maximal zulässige Programmzykluszeit von 100 ms. Ist ein Programmzyklus nach dieser Zeit noch nicht beendet, wird das Anwenderprogramm gestoppt und ein Softwarereset ausgelöst (alle Ausgänge werden zurückgesetzt). Ein Laufzeitfehler wird im Statustest des Programmiergerätes und durch Einschalten der Status-LED angezeigt.
  • Seite 119 B&R KOMPAKTSTEUERUNG 36. TIMERINTERRUPTROUTINEN Unabhängig von der Länge des Anwenderprogramms wird alle 10 ms ein Interrupt ausgelöst und die sogenannte Timerinterruptroutine ausgeführt. Diese Betriebssystemfunktion wird für Sicherheits- und Diagnosefunktionen sowie für die Generierung von Softwarezeiten, Uhrzeitfunktionen, Zeittakten und Zeitimpulsen verwendet. Der Timerinterruptvektor (die Adresse der Timerinterruptroutine) steht in C 0972&.
  • Seite 120 B&R KOMPAKTSTEUERUNG Zum Ausschalten einer aktivierten User-Timerinterruptroutine wird ERA mit 0 geladen und der Interrupthandler ($US1 oder $US2) erneut aufgerufen. Beispiel Alle 3 ms wird der Zählerstand eines Abwärtszählers ausgelesen und mit 10000 verglichen. Bei Unterschreitung dieses Wertes wird ein Ausgang gesetzt. Der Timerinterrupthandler $US1 wird nur einmal in einer Initialisierungsroutine aufgerufen: INIT Z D64...
  • Seite 121: Fehlermeldungen

    B&R KOMPAKTSTEUERUNG 37. FEHLERMELDUNGEN Die Zentraleinheit ist mit umfangreichen Sicherheits- und Diagnosefunktionen ausgestattet (z. B. Programm-Checksumtest bei Power-on). Im Fehlerfall wird das Anwenderprogramm angehalten, die Status-LED eingeschaltet und ein Softwarereset ausgelöst, d. h. alle digitalen Ausgänge werden gelöscht, alle analogen Ausgänge werden auf 0 V bzw. 0 mA zurückgesetzt. Falls ein Programmierge- rät angeschlossen ist, wird im Statustest eine Klartext-Fehlermeldung angezeigt (z.
  • Seite 122 B&R KOMPAKTSTEUERUNG Bezeichnung Beschreibung/Ursachen Abhilfe Pointerfehler Beim Checksumtest während Power- Siehe "Checksumfehler". on wurde festgestellt, daß Betriebs- systemvektoren nicht stimmen. Mögliche Ursachen: siehe "Check- sumfehler". Kommunikations- Bei der Kommunikation zwischen Funktion wiederholen. fehler dem Programmiergerät und der Zen- traleinheit (RUN, Statustest) tritt ein Fehler auf.
  • Seite 123 B&R KOMPAKTSTEUERUNG 38. STICHWORTVERZEICHNIS Abmessungen Digitalausgänge BRCOMP Ausgangsschaltung Relais-Aufsteckkarte LEDs Adressen Schalten ohmsch-induktiver Lasten Inport Adresse $3480 Schutzbeschaltung Inport/Outport Adresse $3400 Technische Daten AINJ - Analogeingang Kompaktsteuerung Verdrahtungsschema Analogausgänge Digitaleingänge Analogwandlung Eingangsschaltung AOTF - Analogausgang Kompaktsteuerung LEDs Ausgangsschaltung Technische Daten Betriebssystemroutine Verdrahtungsschema Pinbelegung...
  • Seite 124 B&R KOMPAKTSTEUERUNG IF1 - RS232 Schnittstelle Referenzeingang 49, 50 IF2 - RS232/RS485 Schnittstelle Relais-Aufsteckkarte IF3 - PATA/SSI Schnittstelle Abmessungen IF4 - B&R Online Schnittstelle Einbaurichtlinien IF5 - CAN Bus (BRCOMP2-0) Kompaktsteuerung und Relais-Aufsteckkarte Initialisierungsregister $2122 Montage Inport Adresse $3480 Pinbelegung Inport/Outport Adresse $3400 Relais-Versorgung Input Capture...
  • Seite 125 B&R KOMPAKTSTEUERUNG Uhr (Echtzeit) Watchdog Hardware Software "XFER" - Programm übertragen Zähler Bedienung Betriebssystemadressen Betriebssystemroutinen Adressen Aufruf CMDC - Zählerauswertung (BRCOMP) CMDD - Auswertung Zähler 0 (BRCOMP) Funktion 50, 60 Hardwarezähler 0 50, 56, 66 Initialisierung Initialisierungsregister $2122 59, 61 Interrupteingang 49, 50, 56 Interruptmodus...
  • Seite 126 B&R KOMPAKTSTEUERUNG STAMMHAUS B&R ÖSTERREICH, A-5142 Eggelsberg 120 Tel: ++43 / 7748 /6586-0, Fax: ++43 / 7748 / 6586-26 VERTRIEBS- UND APPLIKATIONSZENTRALEN B&R DEUTSCHLAND, Norsk-Data-Str. 3, D-61352 Bad Homburg, Tel: ++49 / 6172 / 4019-0, Fax: ++49 / 6172 / 457790 B&R GROSSBRITANNIEN, Milnyard Square, Orton Southgate, Peterborough, PE2 6GX, Tel: ++44 / 1733 / 371320, Fax: ++44 / 1733 / 371306 B&R ITALIEN, Viale Certosa 191, I-20151 Milano, Tel: ++39 / 2 / 3085844, 3083822, 3084358, Fax: ++39 / 2 / 38001864 B&R SCHWEIZ, Langfeldstr.
  • Seite 127 B&R KOMPAKTSTEUERUNG - 127 -...
  • Seite 128 B&R KOMPAKTSTEUERUNG - 128 -...
  • Seite 129 B&R COMPACT PLC B&R COMPACT PLC USER'S MANUAL Version: 2.00 (December 1995) Published by: Bernecker und Rainer Industrie-Elektronik GmbH. Model No.: MABRCOMP1-0E - 129 -...
  • Seite 130 B&R COMPACT PLC The information contained herein is believed to be accurate as of the date of publication, however, Bernecker und Rainer Industrie-Elektronik Ges.m.b.H. makes no warranty, expressed or implied, with regards to the products or the documentation contained within this book. Bernecker und Rainer Industrie- Elektronik Ges.m.b.H.
  • Seite 131 B&R COMPACT PLC B&R COMPACT PLC Contents: 1. General Information 2. Model Number 2.1 B&R Compact PLC 2.2 Relais-Aufsteckkarte 2.3 Standardsoftware 2.4 Feldklemmen 3. Technical Data 4. Measurements 5. Installation Mounting 5.1 Installation Guidelines 5.2 There are two Installation Possibilities 5.2.1 Directly to Control Cabinet Wall 5.2.2 Rail Mount 6.
  • Seite 132 B&R COMPACT PLC 12. Analog Inputs 12.1 Technical Data 12.2 Pin-outs 12.3 Input Circuit 12.4 Shield Grounding 12.5 Wiring 12.6 Software Operation 12.7 AINJ - Analog Input Compact PLC 12.8 Analog Conversion 13. Analog Outputs 13.1 Technical Data 13.2 Pin-outs 13.3 Output Circuit 13.4 Grounding Your Cable Shielding 13.5 Wiring...
  • Seite 133 B&R COMPACT PLC 15.7 Mounting 15.8 Compact PLC and Relay Expansion Card 15.9 Connection to the Compact PLC 15.10 Relay Supply 15.11 Switching Circuit 16. IF1 - RS232 Interface 16.1 Technical Data 16.2 Pin-outs 16.3 Wiring 16.4 Grounding and Shielding 16.5 Software Operation 16.6 Compact MMI P120 and MMI P121 17.
  • Seite 134 B&R COMPACT PLC 27. Lithium Battery 28. Time Cycles 29. Time pulses 30. Real-time Clock 31. Software Timers 32. Inport/Outport Address $3400 33. Additional User EEPROM 33.1 Reading Data 33.2 Writing Data 34. Inport Address $3480 35. Watchdog 35.1 Software Watchdog 35.2 Hardware Watchdog 36.
  • Seite 135: General Information

    B&R COMPACT PLC 1. GENERAL INFORMATION The MINI/MULTICONTROL family is offered by B&R as control system which can be adapted to all customer specific wishes because of its modular structure and 100% software compatibility. To enhance this list, B&R has now expanded the product palette with a new Compact PLC. The compact is basically a controller which settles into the family just under the MINICONTROL.
  • Seite 136 16 digital inputs, 14 digital outputs, 2 analog inputs, 2 analog outputs, channels A and B for positioning tasks, reference input, event counter, interrupt input, B&R on-line interface, RS232 interface (not galvanically isolated), RS232/RS485 interface (RS485 galvanically isolated), PATA/SSI interface, without CAN Bus BRCOMP1-0 with CAN Bus on IF5 BRCOMP2-0 - 136 -...
  • Seite 137: Terminal Blocks

    B&R COMPACT PLC 2.2 RELAY EXPANSION CARD A relay expansion card is available for the Compact Control which adds an additional 16 relay outputs to the 14 transistor outputs (O 060 - O 06F). The relay expansion card is described in section "15. Relay Expansion Card for BRCOMP". 2.3 STANDARD SOFTWARE A diskette with the most important standard software has been put together especially for the Compact Control.
  • Seite 138: Technical Data

    B&R COMPACT PLC 3. TECHNICAL DATA Processor 6303 Processing time approx. 4 msec / K instructions User program memory 16 Kbytes RAM/EEPROM Expansion memory 16 Kbytes EEPROM (for data) Status-LED Number of registers 7168 Non-volotile 7148 Volotile Number of flags Non-volotile Volotile Time/date...
  • Seite 139 B&R COMPACT PLC 4. MEASUREMENTS DCOK +24V OUTPUTS STATUS +24V P .L.C. FUSE 1,25 AT +24V Reset D-Out D-In D-Out D-In RE 485 GND 485 DATA 485 DATA 485 n.c. n.c. n.c. KTY2 n.c. SHUNT 2 n.c. SHUNT 1 n.c. KTY1 - 139 -...
  • Seite 140: Installation Mounting

    B&R COMPACT PLC 5. INSTALLATION MOUNTING 5.1 INSTALLATION GUIDELINES Make sure that devices that create heavy electromagnetic disturbances (e.g. frequency converter, transformer, motor controller etc.) are at a sufficient distance. The distance from these devices to the PLC should be as large as possible. If necessary, they are to be separated with a magnetic shielding â...
  • Seite 141 B&R COMPACT PLC NOTE: The DIN rail must also be grounded. The width of the mounting plates which are attached to the unit provide enough space between the Compact PLC and neighboring modules for ventilation. DCOK +24V OUTPUTS STATUS +24V P .L.C. FUSE 1,25 AT +24V...
  • Seite 142: Description Of Components

    B&R COMPACT PLC 6. DESCRIPTION OF COMPONENTS DCOK +24V OUTPUTS STATUS +24V P .L.C. FUSE 1,25 AT +24V Reset D-Out D-In D-Out D-In RE 485 GND 485 DATA 485 DATA 485 n.c. n.c. n.c. KTY2 n.c. SHUNT 2 n.c. n.c. SHUNT 1 KTY1 - 142 -...
  • Seite 143: Power Supply

    B&R COMPACT PLC 7. POWER SUPPLY The LED DCOK indicates that the control is being supplied with power. There are two different ways to supply the Compact PLC: - One power supply: Combinational supply for inputs and outputs - Two power supplies: - One for the control One for the digital outputs One Power Supply...
  • Seite 144 B&R COMPACT PLC 8. FUSE The Compact PLC is protected with a 250 V / 1.25 AT fuse. The fuse compartment can be found under the terminal block for the digital outputs. NOTE: The digital outputs are supplied separately. The supply must be fed through a separate fuse (see section "7.
  • Seite 145 B&R COMPACT PLC 9. LEDs 32 LEDs inform the user of digital input status, digital output status, power supply and the CPU activity. DCOK STATUS LEDs for Description Digital inputs The green LEDs (0 - F) on the left-hand side of the unit indicate the status of the digital inputs.
  • Seite 146: Operating Status

    B&R COMPACT PLC Status-LED The Compact PLC is equipped with a red status LED which is used to indicate the various operating states. LED-Status Operating status User program is running in RAM CPU in HALT status On-line unplugged during PROM programming Error during user program execution User program is running in PROM - 146 -...
  • Seite 147: Digital Inputs

    B&R COMPACT PLC 10. DIGITAL INPUTS The digital inputs convert the binary signals of the process in binary values 0 and 1. States of the inputs are indicated by means of the green LEDs. The Compact PLC is equipped with 16 digital inputs (I 040 - I 04F). Inputs I 04C - I 04F can also be used for special tasks: Event counter Interrupt input...
  • Seite 148 B&R COMPACT PLC 10.2 INPUT CIRCUIT E 0-B Filter Address, 18 V ... 4 msec. data 24 V ... 2 msec. 30 V ... 1.6 msec. control bus E C-F Filter Latch 20 kHz Counter and interrupt Filter logic Counter and interrupt logic is described in section "14. Counter Inputs and Interrupt Input". 10.3 DIGITAL INPUT WIRING 24 VDC - 148 -...
  • Seite 149: Digital Outputs

    B&R COMPACT PLC 11. DIGITAL OUTPUTS Digital outputs are for controlling external loads (Relays, Motors, Magnetic valves, etc.). The status of the outputs is indicated with orange LEDs. The Compact PLC is equipped with 14 transistor outputs (O 050 - O 05D). 11.1 TECHNICAL DATA Amount Status display...
  • Seite 150: Output Circuit

    B&R COMPACT PLC 11.2 OUTPUT CIRCUIT +24 V Outputs Address, data 14 x Controller control bus Filter O 0-D 11.3 WIRING Another wiring diagram is shown in section "7. Power Supply". Relay 10 A slow +24 V OUTPUTS +24 VDC PLC 24 VDC / 1 A + I Total current of all outputs - 150 -...
  • Seite 151 B&R COMPACT PLC 11.4 SWITCHING RESISTIVE-INDUCTIVE LOAD When switching resistive-inductive loads, attention must be paid to coil resistance and to coil inductivity. The diagram shown below indicates the maximum number of switching cycles per second in connection with the coil resistance and coil inductivity. All outputs are switched simultaneously (0.5 A at 24 V). Ω...
  • Seite 152 B&R COMPACT PLC If the coil resistance is less than 24 Ω, the thermal protection unit takes over and switches the output off. At a coil resistance of between 24 Ω and 48 Ω the switch-on tiem should be paid attention to. Depend- ing on the switching frequency, it may not be longer than 10 seconds or not longer than the switch-off time.
  • Seite 153: Analog Inputs

    B&R COMPACT PLC 12. ANALOG INPUTS With analog inputs, measurement values (current, voltage, resistance or temperature) are converted to numerical values which can be processed by the PLC. The B&R Compact Control is equipped with two analog inputs. One of the following signals can be selected with software for each channel.
  • Seite 154 B&R COMPACT PLC Diagram for Resistance Measurements The resolution Ω/bit for a certain resistance value can be read from the following diagrams. 1) Resistance measurement 0 - 65000 Ω: Mode: 57.5 52.5 47.5 42.5 37.5 32.5 27.5 22.5 17.5 12.5 6500 13000 19500...
  • Seite 155 B&R COMPACT PLC 2) Resistance Measurement 0 - 4500 Ω: Mode: 2.896 2.792 2.687 2.583 2.479 2.375 2.271 2.167 2.063 1.958 1.854 1.75 1.646 1.542 1.438 1.333 1.229 1.125 1.021 0.917 0.812 0.708 0.604 1350 1800 2250 2700 3150 3600 4050 4500 Resistance Value to be Measured...
  • Seite 156 B&R COMPACT PLC 12.1 TECHNICAL DATA Amount Galvanic isolation Differential inputs, not galvanically isolated ±12 V Common mode voltage Input resistance min. 10 MΩ ±30 V max. Dielectric strength Resolution A/D converter 16 Bit Addressing Operating system Precision at 25 °C Software compensation to ±0.01 % (10 Hz Notch) ±10 V range: ±0.03 % / °C ±0.9 LSB / °C...
  • Seite 157 B&R COMPACT PLC 12.2 PIN-OUTS 9 pin D-type (female) Assignment + Input 1 - Input 1 - Input 2 + Input 2 KTY 1 Shunt 1 Shunt 2 KTY 2 12.3 INPUT CIRCUIT -Vref. 10 M + Input Address, Shunt data Difference Filter...
  • Seite 158 B&R COMPACT PLC 12.4 SHIELD GROUNDING Metal screws or a metallic connector housing are the easiest and most efficient methods of diverting any possible disturbances to the housing of the Compact PLC. The cable shielding should be in direct contact with the connector housing. Shielding connected with cable clamp and housing...
  • Seite 159: Current Source

    B&R COMPACT PLC Current source Shunt Floating 9 pin current D-type (female) source Shunt Grounded 9 pin current D-type (female) source KTY10 sensor The KTY sensors are semiconductor temperature sensors. The KTY10 series has a nominal resistance of 2000 Ω at 25 °C (e.g. KTY10-6, KTY11-6, KTY13-6, KTY16-6 and KTY19-6). KTY10 Temperature sensor 9 pin...
  • Seite 160 B&R COMPACT PLC Resistance measurement with NTC, PTC, PT1000 etc. Resistance to be Measured 9 Pin D-Type Connector (F) Installation: Potential Free - 160 -...
  • Seite 161 B&R COMPACT PLC 12.6 SOFTWARE OPERATION The initialization of the analog input is handled through registers R 1000 - R 1003. The analog value is either converted in the END routine or by an STL call. The converted values are then stored in registers R 1004 - R 1007.
  • Seite 162 B&R COMPACT PLC Register R 1001 Conversion in END Reserved Filter for both channels EN R R R R R Conversion in END Defines whether the conversion should be done during the END routine execution or not. If the conversion is not done during the END routine, the analog conversion routine must be started with an STL call (see Analog Conversion).
  • Seite 163 B&R COMPACT PLC Register R 1003 Reserved Channel 1 exceeded Signal failure channel 1 Reserved Channel 0 exceeded Signal failure channel 0 R R O1 D1 R R O0 D0 Reserved Reserved for later use. Channel 1 exceeded 1 ... Range exceeded for channel 1 Signal failure channel 1 1 ...
  • Seite 164 B&R COMPACT PLC 12.7 AINJ - ANALOG INPUT COMPACT PLC The function block is used for initializing the analog inputs. The converted values and the alarm bits for range exceeding and Signal failures are sent to outputs. NOTE: The analog conversion is always done in the END routine. Analog input AINJ Compact PLC...
  • Seite 165 B&R COMPACT PLC Inputs/Outputs Description Address types FILTER Defines the filter for both channels. R, # Filter Frequency Conversion time Resolution 10 Hz 302 msec. ±14 bit 50 Hz 62 msec. ±14 bit 250 Hz 16.2 msec. ±12 bit 1000 Hz 4.1 msec.
  • Seite 166 B&R COMPACT PLC Inputs/Outputs Description Address types INPUT1 Contains the converted value from channel 1. Value range: Signal Value ±10 V -32768 to +32767 ±2.5 V -32768 to +32767 0 - 20 mA 0 to 32767 -50.00 to +150.00 °C -5000 to +15000 -58.00 to +302.00 F -5800 to +30200...
  • Seite 167 B&R COMPACT PLC 12.8 ANALOG CONVERSION NOTE: The values in registers R 1004 - R 1007 are zero for the first program cycle. If bit 7 of R 1000 (Mode register) is not set, no analog conversion is performed (R 1004 - R 1007 = 0). 1) Conversion in the END routine Software Conversion...
  • Seite 168 B&R COMPACT PLC 3) Channel Refresh Time (with conversion in END routine) a) Program cycle time is less than channel conversion time (depends on the filter) Refresh time = Number of channels * (Channel conversion time + Program cycle time) b) Program cycle time is longer than the channel conversion time (depends on the filter) Refresh time = Number of channels * Program cycle time (one channel per cycle)
  • Seite 169: Analog Outputs

    B&R COMPACT PLC 13. ANALOG OUTPUTS Analog outputs are utilized for converting internal numerical values from the PLC into current and voltage. 13.1 TECHNICAL DATA Amount Revision Short circuit protected Addressing Through the operating system ±10 V / 10 mA Voltage output 0 - 20 mA, load 50 Ω...
  • Seite 170 B&R COMPACT PLC 13.2 PIN-OUTS 9 pin D-type (female) Assignment V output 1 I output 1 n.c. V output 2 I output 2 n.c. n.c. 13.3 OUTPUT CIRCUIT Address, data V output Filter control bus I output Filter - 170 -...
  • Seite 171 B&R COMPACT PLC 13.4 GROUNDING YOUR CABLE SHIELDING Metal screws or a metallic connector housing are the easiest and most efficient methods of diverting any possible disturbances to the housing of the Compact PLC. The cable shielding should be in direct contact with the connector housing. Shielding connected with cable clamp and housing...
  • Seite 172: Software Operation

    B&R COMPACT PLC 13.6 SOFTWARE OPERATION The initialization of the analog outputs is done with the register R 1009. The values to be converted are stored in registers R 1010 - R 1013. The initialization can either be done with commands in STL or with the help of the AOTF function block (see section 13.7).
  • Seite 173 B&R COMPACT PLC Registers R 1010 - R 1013 Source registers In registers R 1010 - R 1013, the values to be converted are stored. Registers Channel R 1010& R 1012& Value range: Signal Value ±10 V -32768 to +32767 0 - 20 mA 0 to 32767...
  • Seite 174 B&R COMPACT PLC Inputs/Outputs Description Address types OUT0 Contains the values to be converted from channel 0. Value range: Signal Value ±10 V -32768 to +32767 0 - 20 mA 0 to 32767 Contains the values to be converted from channel 1. OUT1 Value range: Signal...
  • Seite 175 B&R COMPACT PLC 14. COUNTER INPUTS AND INTERRUPT INPUT The Compact PLC is equipped with 16 digital inputs. Inputs C - F can also be used for special assign- ments: Event counter Interrupt input Reference input Incremental encoder (Channels A and B) for positioning tasks The software for the operation of the inputs is saved on the standard software diskette for the Compact Control.
  • Seite 176 B&R COMPACT PLC Input Functions Input Function Decrements with every negative edge of counter 0. Counter 0 can be used in two ways. The definition is done through the MODE function block input or in the mode register (see section "14.6.3 Mode Register"). 1) Event counter ...
  • Seite 177 B&R COMPACT PLC 14.1 WIRING Wiring schematic with up to twelve digital inputs, three counter inputs and an interrupt input: 24 VDC Shielding 14.2 USING THE COUNTERS The counters can be operated with the CMDC function block or the CMDD function block or by calling operating system routines from the STL.
  • Seite 178 B&R COMPACT PLC 14.3 CMDC - COUNTER MODULE DRIVER (BRCOMP) When using this function block, preselected values and new counter states are taken or updated at the next END (program end). COUNTER MODULE CMDC DRIVER C Function block length: 120 lines ENABLE CMDC First Scan:...
  • Seite 179 B&R COMPACT PLC Inputs/Outputs Description Address types RUN1/0 The start address of a 4 byte long range of memory is attached to this input. [ADR] R, Every counter can be stopped or restarted again with this range of memory. [ADR] F Memory assignment Memory status 1st byte...
  • Seite 180 B&R COMPACT PLC 14.4 CMDD - COUNTER 0 MODULE DRIVER (BRCOMP) The hardware counter can only be predefined if the counter is not selected as interrupt source. After the hardware counter is predefined, it must be defined as interrupt source. The actual value of the hardware counter only changes to the predefined value after the next edge on the counter input.
  • Seite 181 B&R COMPACT PLC Inputs/Outputs Description Address types RUN1/0 Stop or free counter 0. R, F 0 ... stop 1 ... continue counting Naturally, the memory can only be used in manner that makes sense if the correct operating mode is set. e.g. Setting the memory only has no effect if hardware counter 0 is selected as interrupt source.
  • Seite 182 B&R COMPACT PLC 14.5 INTERRUPT MODE An interrupt source for the generation of an interrupt can be defined in the mode register or with the MODE function block input. Interrupts are only enabled or locked when the next END (program end) is executed and not after the definition of the mode register or during the execution of the function block.
  • Seite 183: Operation In Stl

    B&R COMPACT PLC 14.6 OPERATION IN STL Utilizing the three counters and the reference or interrupt input can also be done in STL. The settings are made in the END routine. If the settings must be used immediately, operating system routines can be called. This is done with a pointer in the operating system.
  • Seite 184 B&R COMPACT PLC 14.6.2 Control Register $2120 Enable Counter Function Enable counter 0 These bits can be used to individually stop every counter and enable it again. Enable counter 1 Enable counter 2 Clear Counter Enable 2 channel counter (Encoder) These bits may only be set for one program cycle.
  • Seite 185 B&R COMPACT PLC 14.6.4 Initialization Register $2122 Initialization of the counter functions and the hardware Reserved for later use Edge for Input Capture Interrupt 0 ... Negative edge 1 ... Positive edge Counter activation 0 ... Deactivate counter 1 ... Activate counter 7 6 5 4 3 2 1 0 If the zero signal from hardware counter 0 is selected as the interrupt source, bit 1 must be set on the positive edge.
  • Seite 186 B&R COMPACT PLC 14.6.6 Function of the Counter Bit 0 must be set in initialization register ($2122), in order to activate the counter and the generation of the Input Capture Interrupt. The counter functions can be collected or be set for each counter individually (control register $2120). In the control register ($2120), every individual channel (depending on the operating system mode) can be enabled or stopped.
  • Seite 187 B&R COMPACT PLC 14.6.7 Counter Initialization Setting the counter mode, the interrupt source and activating the counter are done with the mode register and the initialization register. The operating mode can also be changed at any time during operation. In order to put the settings to use, bit 7 in the initialization register ($2122) must be set. The initializa- tion is executed and bit 7 is cleared again in the END routine.
  • Seite 188 B&R COMPACT PLC 14.6.8 Calling Operating System Routines 1) Setting the Mode Register No call parameters, no response data NOTE: Calling the operating system routine may be done one program cycle after the initializa- tion at the earliest. Example Initialization register $2122: Positive edge for Input Capture Interrupt Must be positive, if hardware counter 0 is used as the interrupt source.
  • Seite 189 B&R COMPACT PLC 2) Reference Pulse Before the call "Read reference pulse", the function "Activate reference pulse" must be called first. Reference bit 0 is set to 0. When the reference pulse occurs the reference bit is set to 1. This remains 1 until the function "Activate reference pulse"...
  • Seite 190 B&R COMPACT PLC 4) Changing the Preset Value of Counter x The preset values of the counter are stored in addresses $2110 - $211F. In order to change the values, the procedure in the following example must be followed. Example The preset value of counter 0 is changed.
  • Seite 191 B&R COMPACT PLC 6) Read Counter x The actual values of the counters are stored at addresses $2100 - $210F. The pointers to the operating system routines sit at the following addresses: Address Actual value $C12F Read counter 0 $C132 Read counters 1 and 2 $C135 Read 2 channel counter (Encoder)
  • Seite 192 B&R COMPACT PLC 8) Hardware Counter 0 The actual value of hardware counter 0 is stored at addresses $2123 and $2124. It is read by using the "Load Counter 0" function (see point 6). Because of hardware limitations, the status of the 4 byte counter 0 in the memory range $2100 - $2103 cannot be synchronized with the hardware counter.
  • Seite 193 B&R COMPACT PLC 15. RELAY EXPANSION CARD FOR BRCOMP 15.1 GENERAL INFORMATION A relay expansion card is available for the Compact PLC which adds 16 additional relay outputs to the 14 transistor outputs that already exist (O 060 - O 06F). The Compact PLC and the relay expansion card can be mounted either beside each other or piggyback (one on top of the other).
  • Seite 194: Technical Data

    B&R COMPACT PLC 15.3 TECHNICAL DATA Number Type Relay Number of Groups Switching Voltage 5 - 240 VAC, 50/60 Hz 5 - 30 VDC Switching Current per Output max. 3 A per Group max. 6 A Switching Delay log. 0 → 1 approx.
  • Seite 195 B&R COMPACT PLC 15.5 MEASUREMENTS - 195 -...
  • Seite 196 B&R COMPACT PLC 15.6 INSTALLATION GUIDELINES The relay expansion card can be mounted either horizontally or vertically. The distance to the neighboring module caused by the fastening bracket is enough to ensure sufficient air circulation. The area under the relay expansion card is to be kept below the maximum operating temperature of 55 °C.
  • Seite 197 B&R COMPACT PLC Install relay expansion card on the mounting rail. The mounting rail must be grounded! Install a grounding clamp left and right of the relay expansion card. Ground the relay expansion card with the blade terminal provided. Blade Terminal for Ground Connection Input: +24Vdc...
  • Seite 198 B&R COMPACT PLC 15.8 COMPACT PLC AND RELAY EXPANSION CARD The Compact PLC and the relay expansion card can be mounted either beside each other or piggyback (one on top of the other). 1. Beside Each Other If the two housings are mounted next to each other, please follow installation and mounting instructions given.
  • Seite 199 B&R COMPACT PLC 15.9 CONNECTION TO THE COMPACT PLC The connection to the Compact PLC is made with the cable BRKA08-0 via the PATA interface. The cable must be ordered separately. 15.10 RELAY SUPPLY +24 VDC ±15 %, max. 400 mA - 199 -...
  • Seite 200 B&R COMPACT PLC 15.11 SWITCHING CIRCUIT VDC < 18 V Relay Supply 24 VDC ±15% DC Error Output PATA Status Data in Filter Data out 16 x Reset Shift Register 5 VDC Supply Logic +24 V Voltage Regulator 200 nF Housing - 200 -...
  • Seite 201 B&R COMPACT PLC 16. IF1 - RS232 INTERFACE 16.1 TECHNICAL DATA Interface RS232 Galvanic isolation Connection 9 pin D-type (male) Max. distance 15 m, shielded cable Handshake lines DSR, RTS Baudrate 300 - 19200 Baud Data format Data bits 5 to 8 Parity yes / no / even / odd Configuration...
  • Seite 202 B&R COMPACT PLC 16.3 WIRING DSR / CTS RTS / DTR 16.4 GROUNDING AND SHIELDING Shielded cable must be used for interface connections. The cable shielding must be grounded at both ends. 16.5 SOFTWARE OPERATION The software functionality of the interface is described in section "18. Using Interfaces IF1 and IF2". 16.6 COMPACT MMI P120 AND MMI P121 Interface panels Compact MMI P120 and MMI P121 are available for the Compact PLC.
  • Seite 203 B&R COMPACT PLC 17. IF2 - RS232/RS485 INTERFACE 17.1 TECHNICAL DATA Interface RS232 RS485 Galvanic isolation Max. distance 15 m, Shielded Cable 1200 m, Shielded Twisted Pair Handshake lines DSR, RTS Connection 9 pin D-type (female) Baudrate 300 - 19200 Baud Data format Data bits 5 to 8...
  • Seite 204 B&R COMPACT PLC 17.3 WIRING RS232 interface DSR / CTS RTS / DTR RS485 interface DATA DATA DATA DATA Enable - 204 -...
  • Seite 205 B&R COMPACT PLC 17.4 GROUNDING AND SHIELDING Shielded cable must be used for interface connections. The shielding must be grounded on both ends. 17.5 SOFTWARE OPERATION The software functionality of the interface is described in section "18. Using Interfaces IF1 and IF2". - 205 -...
  • Seite 206 B&R COMPACT PLC 18. USING INTERFACES IF1 AND IF2 Operating the user interfaces is done with the following registers: Register Data register P 100 P 300 Status register P 101 P 301 Command register P 102 P 302 Program register P 103 P 303 Initialization...
  • Seite 207 B&R COMPACT PLC Example Initializing user interface IF1: Baudrate = 9600, 8 Databits, 1 Stopbit, Parity off, Echo Mode off LDAB # %00011110 9600 Baud, 8 Databits, 1 Stopbit LDAA # %00001011 Parity off, Echo Mode off P 102 Program register & command register The RT Bit RS485 interface - Bus connection: In order to switch on the RS485 sender, the RT bit must first be set to 1.
  • Seite 208 B&R COMPACT PLC RS232 Interface - Point to Point: The RT bit is normally set for RS232 communication. If the user wants to set a busy signal, the RT bit can be set to "0". NOTE: If the RT bit is "0", this sender is also inactive! The following diagram shows signals in an RS232 communication.
  • Seite 209 B&R COMPACT PLC Status Register The status register delivers information about the status of the serial interface and about possible errors. The status of the status register must be checked for every send or receive procedure. Status register DSR Line Status 0 ...
  • Seite 210 B&R COMPACT PLC Outputting a Character Before writing the character to be output to the data register, the transmitter (sender) must first be checked for whether it is ready to send a character or not (Bit 4 must be 1 in the status register). LDAB P 101 Status register...
  • Seite 211 B&R COMPACT PLC 18.1 USING INTERFACE INTERRUPTS The interface module triggers the following interrupts: a) Send Interrupt: If the transmitter is ready to send a character. b) Receive Interrupt: If a character is received (also if an error occurs). In order to acknowledge the interrupt, the interrupt routine must: a) Send Interrupt: write to the data register.
  • Seite 212 B&R COMPACT PLC Example 1) Enabling the receive interrupt: LDAA # %00001001 STAA P 102 Command register 2) Enabling the send interrupt: LDAA # %00000111 STAA P 102 Command register 3) Enabling the send and receive interrupts: LDAA # %00000101 STAA P 102 Command register...
  • Seite 213 B&R COMPACT PLC Data is written in a send buffer and the send A check is made by the in the "REC" subrou- interrupt is triggered in the "SEND" subroutine. tine to see if a character is in the receive buffer. If a character is received, it is evaluated.
  • Seite 214 B&R COMPACT PLC Other station ready NOTE: (only w/ HW handshake) If the other station isn' t ready, the send interrupt will be disabled. A re-enable Write character from is done with the "SEND" subroutine. send buffer to data register By disabling the interrupt, the application program is no longer disrupted by Send buffer empty...
  • Seite 215 B&R COMPACT PLC 19. IF3 - PATA/SSI INTERFACE The IF3 interface is a modified RS422 interface. A MINICONTROL operator panel or a relay expan- sion card can be connected to the IF3 interface (PATA interface). It is also set up as an SSI interface for connecting absolute encoder systems. Pin-outs 9 pin D-type (female) Assignment...
  • Seite 216: Ssi Interface

    B&R COMPACT PLC SSI Interface The following conditions must be met in order to connect absolute encoders to the SSI interface: Only absolute encoders with a monoflop time between 20 µsec and 260 µsec can be used. Absolute encoders with a maximum 24 Bit (AG24) or 32 Bit (AG32) can be read. The function blocks AG24 and AG32 are provided for the operation.
  • Seite 217 B&R COMPACT PLC 21. IF5 - CAN BUS 21.1 CHARACTERISTICS OF THE CAN BUS Field bus Low cost High resistance to disturbance because of differential signal Bus structure Open system Fast data transfer for small data packets (up to 8 bytes) Error recognition via CRC (Cyclic Redundancy Check) and frame check ->...
  • Seite 218 B&R COMPACT PLC Bit Rate [kBit/sec] Synchronization Jump Width (SJW) Bus Length [m] Permissible Osc. Tolerance [%] 0.121 0.242 0.363 0.485 0.121 0.242 0.363 0.485 0.121 0.242 0.363 0.485 0.121 0.242 0.363 0.485 1397 0.121 1284 0.242 1056 0.363 0.485 3613 0.121 3329...
  • Seite 219: Connector Pin Assignments

    B&R COMPACT PLC 21.4 CONNECTOR PIN ASSIGNMENTS The Compact Control BRCOMP2-0 (operating system version 4.1) is equipped with a CAN Bus interface that conforms to ISO-DIS 11898. The pin assignments of the connector conform to CiA DS 102-1. Pin Assignments 9 Pin D-Type Assignment Connector (M)
  • Seite 220: Wiring Principle

    B&R COMPACT PLC 21.5.1 Wiring Principle Node 1 Node n-1 Node n Opto- Opto- Opto- Opto- Opto- Opto- coupler coupler coupler coupler coupler coupler Transceiver Transceiver Transceiver CAN H CAN L CAN H CAN L CAN H CAN L Termination Resistance 120 Ω Termination Resistance 120 Ω...
  • Seite 221 B&R COMPACT PLC 21.6 OPERATING THE CAN BUS The CAN bus is operated with the function blocks CNSW and CNCS. The function blocks are available as standard software (on 3.5" diskettes). Language Model Number German SWSPSCAN01-0 English SWPLCCAN01-0 21.6.1 CNSW - CAN Node Switch The function block reads the switch settings of both hex switches (between the digital inputs and IF3 - PATA) and provides this information to the CAN Client/Server function block CNCS.
  • Seite 222: Power-On Sequence

    B&R COMPACT PLC 22. POWER-ON SEQUENCE PLC is Turned On PROM Status LED STOP Connected Copy PROM to RAM Status LED Status LED is Blinking START STOP (in PROM) 23. COMMAND SET A 6303 processor (Hitachi) is implemented in the Compact PLC. This is the same processor which is used in the MINICONTROL CPU.
  • Seite 223 B&R COMPACT PLC 24. MATHEMATIC ROUTINES The CPU of the Compact PLC is equipped with fast floating point mathematic routines. These routines are components of the operating system. They are called by means of statement list instruction mnemonics. In addition to the basic mathematics addition, subtraction, multiplication, division and square root numerous conversion and utility programs available (e.g.
  • Seite 224 B&R COMPACT PLC Source or Destination Possible Error Messages Execution time Instr. Function in µ µ µ µ µ sec. or Result Operands 9 10 11 12 13 14 ● ● ● ● ● MADD OP1 := OP1 + OP2 OP1, OP2 209/690 ●...
  • Seite 225 B&R COMPACT PLC Error Messages The error messages in the table (see previous page) which are marked with ●, are possible for the respective function on the same line. If an error occurs during the execution of a routine, the Carry Flag is set and the error number is put into register R 1024.
  • Seite 226 B&R COMPACT PLC Operands and Registers Registers Function R 1024 Error number R 1025 Reserved R 1026 to R 1029 Operand 1 (OP1) R 1030 to R 1033 Operand 2 (OP2) R 1034 to R 1037 Interim memory 1 (MEM1) R 1038 to R 1041 Interim memory 2 (MEM2) R 1042 to R 1045...
  • Seite 227 B&R COMPACT PLC 25. SYSTEM REGISTERS AND FLAGS Several registers and flags are reserved for the operating system. These may not be used or may only be partially utilized by application programs: Registers: R 0800 to R 1499 Flags: F 800 to F 999 Flag addresses beginning at F 800, which are used for operating system functions are entered with the addresses S Dxx or T Dxx: Addresses...
  • Seite 228 B&R COMPACT PLC The registers and flags which can be used in limited form by applications programs are described below: Permitted Access Address(es) Function Read Write R 0800 to R 0863 Pre-multiplexer for software timers ● R 0899 First scan register R 0900 to R 0963 Counter for software timers ●...
  • Seite 229 B&R COMPACT PLC 26. FIRST SCAN FLAG The first scan flag is a flag (T D64), which is set to 1 automatically during the first program cycle and otherwise is 0. The first scan flag is used for program initialization. Register R 0899 also provides the first scan functions: T D64 First Scan Flag (1 = first program cycle)
  • Seite 230: Lithium Battery

    B&R COMPACT PLC 27. LITHIUM BATTERY The Compact PLC is provided with a lithium battery. This is required in order to provide back-up for the SRAM and the real-time clock. NOTE: Lithium batteries fall into the catagory of hazardous waiste. Please be sure to follow the guidelines for disposal that are valid for your area.
  • Seite 231 B&R COMPACT PLC Changing the Battery To change the battery, all power must be switched off. NOTE: Data stored in RAM and the clock time is lost. By using the B&R PROgramming SYStem "UPDL" command the data can be saved however. - 231 -...
  • Seite 232 B&R COMPACT PLC 28. TIME CYCLES Time cycles are flags which are generated by the operating system: Address T D80 10 msec 10 msec T D81 40 msec 60 msec T D82 0.4 sec 0.6 sec T D83 4 sec 6 sec 29.
  • Seite 233: Real-Time Clock

    B&R COMPACT PLC 30. REAL-TIME CLOCK If the PLC is switched off, the real-time clock keeps running (buffered by the lithium battery). Time registers (all specifications in BCD): R 0980 1/100 Seconds ($00 to $99) R 0981 Seconds ($00 to $59) R 0982 Minutes ($00 to $59) R 0983...
  • Seite 234 B&R COMPACT PLC 31. SOFTWARE TIMERS The CPU of the Compact PLC has 64 timers that work on an On-Delay. Every software timer consists of the following addresses: S Dxx Starts the software timer. By writing a 1 to this flag, the software timer xx (xx = 00 to 63) is started.
  • Seite 235 B&R COMPACT PLC Example 5.5 seconds after pressing a key (I 042) an motor (O 058) is to be started. Another key (I 043) is used to stop the motor: 0000 5"50 Time definition 0001 LDAA I 042 START key 0002 F 100 Pos.
  • Seite 236 B&R COMPACT PLC 32. INPORT/OUTPORT ADDRESS $3400 Reserved Block selection R R R R R Block Reserved Reserved for later use. Block selection With the bits 0 - 3, the desired 2 Kbyte memory area in the additional EEPROM can be selected. 0 ...
  • Seite 237 B&R COMPACT PLC 33. ADDITIONAL USER EEPROM The user is provided with 16 Kbytes of additional EEPROM memory. It is split up into 8 blocks of 2 Kbytes each. The desired block is defined with the first 3 bits of the Inport/Outport byte (address $3400).
  • Seite 238 B&R COMPACT PLC 33.1 READING DATA To read data from a block, the STL macro DFEE is used Send parameters: Source Block number in R 0881 Offset to address $3800 in R 0882& Destination ... Index register Data length ... In accumulator D Return parameters: No error:...
  • Seite 239 B&R COMPACT PLC R 0884 DATA 04 Current data length LSRD DFE1 No odd data lengths R 0884 DATA 04 Current data length R 0866 & SOURCE 0 LDAA X 000 Read first byte R 0866 & SOURCE R 0868 & DEST 0 STAA X 000 Store first byte...
  • Seite 240 B&R COMPACT PLC 33.2 WRITING DATA When writing data to an EEPROM, remember that there is a slight delay in comparison to writing to a flag or register. To write data to a block, the STL macro DTEE is used The STL macro DTEE is used for programming parameter data which does not change while a facility is in operation.
  • Seite 241 B&R COMPACT PLC DTEE R 0884 DATA 04 Current data length R 0866 & SOURCE 0 R 0882 DATA 02 Offset ANDA # %00000111 Limit to 2 Kbytes / Block ADDD # $3800 Start address of EEPROM block R 0882 DATA 02 ADDD R 0884 DATA 04 SUBD...
  • Seite 242 B&R COMPACT PLC DTE2 R 0882 DATA 02 Increase MEM address pointer ADDD # 00001 R 0882 DATA 02 R 0866 & SOURCE 0 R 0866 & SOURCE 0 R 0884 DATA 04 Current data length SUBD # 00001 All data copied ? R 0884 DATA 04 DTE4 DTE3...
  • Seite 243 B&R COMPACT PLC 34. INPORT ADDRESS $3480 Reserved Input Capture Input I 04C over 50 µsec Filter Battery OK Reserved R R R R IC IF Ba R Reserved Reserved for later use. Input Capture The interrupt source for the Input Capture Input is determined with the mode register $2121 (see section "14.6.3 Mode Register $2121").
  • Seite 244 B&R COMPACT PLC 35. WATCHDOG 35.1 SOFTWARE WATCHDOG The software watchdog monitors the maximum permitted program cycle time of 100 msec. If a program cycle has not ended when this time elapses, the application program is stopped and a software reset is executed (all outputs are reset).
  • Seite 245 B&R COMPACT PLC 36. TIMER INTERRUPT ROUTINES Independent of the length of an application program, an interrupt is triggered every 10 msec and the timer interrupt routine is called. This operating system function is used for security and diagnostic functions as well as the generation of software timers, clock functions, time cycles and time pulses. The timer interrupt vector (the address of the timer interrupt routine) sits at R 0972&.
  • Seite 246 B&R COMPACT PLC To switch off an active timer interrupt routine, load the AA with 0 and call the interrupt handler ($US1 or $US2) again. Example Every 3 msec a descending counter is to be read and compared to 10 000. If the counter falls below this value, a flag is to be set.
  • Seite 247: Error Messages

    B&R COMPACT PLC 37. ERROR MESSAGES The CPU is equipped with extensive security and diagnostic functions (e.g. Program checksum tests at Power-on). In the event of an error the application program is stopped, the status LED is switched on and a software reset is executed. All digital outputs are reset, all analog outputs are set to 0 V or 0 mA. If a programming system is connected, an appropriate error message is displayed in the debugger (e.g.
  • Seite 248 B&R COMPACT PLC Message Description/Cause Solution Communication error An error occurred during communication Perform the download again. between the programming device and the PLC (RUN, debug). Possible causes: The Online link between the programming device and the PLC is affected by electromagnetic disturbance. Stack pointer error At the end of a program scan (END) the Correct program error.
  • Seite 249 B&R COMPACT PLC 38. INDEX Counter Actual Value 183, 191 CMDC - Evaluating Counter (BRCOMP) Accessories CMDD - Evaluating Counter 0 (BRCOMP) Relay Expansion Card Control Register $2120 Standard Software Function 176, 186 Terminal Blocks Hardware Counter 0 176, 182, 192 Additional Application EEPROM Initialization Addresses...
  • Seite 250 B&R COMPACT PLC First Scan Flag Mathematics Routines Function Blocks Measurements AINJ - Analog Input Compact Control BRCOMP AOTF - Analog Output Compact Control Relay Expansion Card CMDC - Evaluation of Counter (BRCOMP) MMI P120 CMDD - Evaluation of Counter 0 (BRCOMP) MMI P121 CNCS - CAN Client/Server Mode Register $2121...
  • Seite 251 B&R COMPACT PLC Software for BRCOMP Software Times Software Watchdog SSI/PATA Interface Standard Software for BRCOMP Status LED Supply Voltage LED DCOK System Registers and Flags Technical Data BRCOMP Relay Expansion Card Terminal Blocks (accessories) Time Clock Time Pulse Timer Interrupt Routines Two Channel Counter Voltage Monitoring Voltage Monitoring Battery...
  • Seite 252 B&R COMPACT PLC - 252 -...

Diese Anleitung auch für:

Brcomp2-0

Inhaltsverzeichnis