1 / 12

CPU

CPU. + 24 VDC. I. IA. U. U. .0. .1. .2. U. U. U. .3. .4. .5. .6. .7. U. U. U. RAM/. 0. 0. 0. 1. 1. 1. 0. 1. Modul. (Flash). Modul. CPU. SBI. Data. KOS. m. P. I/Q. m. RAM. P. P2. P1. IA. RS 232C. m. P. .0. 1. 2. U. U. U. 3. 4. 5. U. U. U.

Download Presentation

CPU

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CPU + 24 VDC I... IA... U U .0 .1 .2 U U U .3 .4 .5 .6 .7 U U U RAM/ 0 0 0 1 1 1 0 1 Modul (Flash) Modul CPU SBI Data KOS m P I/Q m RAM P P2 P1 IA... RS 232C m P .0 1 2 U U U 3 4 5 U U U U 0V 1 1 1 10 Suconet K Q... QA... - +

  2. Hilfsvariablen / Merkerbereiche PS4-150/-200 Basisspeicher max. 32 KByte Frei deklarierbare ca. 2 KByte Betriebssystem Hilfsvariablen Direkt adressierbarer Merkerbereich VAR Anlage_Ein : BOOL ; BCD_Wert : WORD ; Ana_In : UINT ; END_VAR min. %MB0.0.0.0 max. %MB0.0.0.16383 Anlage_Ein } BCD_Wert Ana_In

  3. Programmparameter  Merkerbereiche Benutzter Merkerbereich Warmstart Remanenz Kaltstart Remanenz Programmparameter

  4. Externe Speichermodule

  5. Hersteller-FB  WriteMC 511 510 509 508 . . . 24 23 22 . . . 3 2 1 0 Schreibdatenfeld (ANY_ARRAY) WriteMC SourceAddress Strobe SegmentNumber DataLength ANY_ARRAY Schreiben_ausloesen 23 16 BOOL UINT USINT BOOL UINT USINT Active MaxSegmentNumber Error } Max. 128 Byte je Segment 64 K Byte Flash-Memory-Modul FB_Schreiben 23 VAR FB_Schreiben : WriteMC ; Schreibdatenfeld : ARRAY [0..15] OF USINT ; Schreiben_ausloesen AT %I0.0.0.0.0 : BOOL ; END_VAR

  6. Hersteller-FB  ReadMC 511 510 509 508 . . . 24 23 22 . . . 3 2 1 0 Lesedatenfeld (ANY_ARRAY) ReadMC DestinationAddress Strobe SegmentNumber DataLength ANY_ARRAY Lesen_ausloesen 23 16 BOOL UINT USINT BOOL UINT USINT Active MaxSegmentNumber Error } Max. 128 Byte je Segment 64 K Byte Flash-Memory-Modul FB_Lesen 23 VAR FB_Lesen : ReadMC ; Lesedatenfeld : ARRAY [0..15] OF USINT ; Lesen_ausloesen AT %I0.0.0.1.0 : BOOL ; END_VAR

  7. Abbildregister / Peripherieoperanden I0 I1 I0 .0 .1 .2 .3 .4 .5 .6 .7 .0 .1 .0 .1 .2 Sys Sys I Q I Q ST %Q0.0.0.0.4 ST %QP0.0.0.0.4 Cycle Cycle Q0 Q0 .0 .1 .2 .3 .4 .5 .0 .1 .2 .3 .4 .5 VAR VAR In 2_Peripherie AT %IP0.0.0.0.2 : BOOL_EXP ; IN 2 AT %I0.0.0.0.2 : BOOL; Out 4_Peripherie AT %QP0.0.0.0.4 : BOOL_EXP ; Out 4 AT %Q0.0.0.0.4 : BOOL; END_VAR END_VAR LD %IP0.0.0.0.2 LD %I0.0.0.0.2

  8. Nachrichtenbits der Funktion PLC_Message Prototyp der Funktion PLC_Message BOOL MESSAGE_TYPE TYPE Message_Type; (ISA, (*Erster Zyklus nach Start*) IRE, (*RESET-Knopf wurde betätigt*) IFO, (*Forcen im RUN aktiv*) REC, (*Rest-Zyklus nach Wiederanlauf wird gefahren*) ICS, (*Steuerung wurde kaltgestartet*) NKD_1, (*Neue Daten an SBI 1*) NKD_2, (*Neue Daten an SBI 2*) NKD_3, (*Neue Daten an SBI 3*) ) := ISA; END_TYPE

  9. Interrupt – Verarbeitung (1) max. 3KHz FB_Alarme: I1 I0 .0 .1 .0 .1 .2 FB Counter Alarm Sub Routine Sys I Q (FB) max. 5 ms Edge Alarm Ereignis Cycle Alarm + 1 Timer Alarm Q0 .0 .1 .2 .3 .4 .5

  10. Interrupt – Verarbeitung (2) CounterAlarm EnableDisable Freigabe-Signal BOOL Number Hardware-Kanal USINT Predivide Vorteiler UINT Error USINT SetpointValue UINT CountValue UINT SubRoutine ANY_FUNKTION_BLOCK UINT CallUpNumber ERROR 0 => o.K. SetpointValue Alarm-Routine 1 => Soll = 0 max. 5 ms = ca.1000 2 => Predivide = 0 n = 1...65535 Awl-Anweisungen n = Soll VAR_EXTERNAL Anwender FB ... BOOL_EXP END_VAR Anwender FB

  11. Bereichseingrenzungen VAR Eingangswert AT%IB0.0.0.0 : USINT; für Eingangswerte Sollwert : USINT (50..150); END_VAR LD Eingangswert AWL: ST Sollwert VAR Ana_Out AT%QAW0.0.0.0 : UINT(100..200); für Ausgangswerte END_VAR

More Related