PT1-Glied

delacasa

Level-1
Beiträge
48
Reaktionspunkte
0
Zuviel Werbung?
-> Hier kostenlos registrieren
Hallo zusammen,

für meine Applikation benötige ich ein PT1-Glied. Leider kann ich eine solche Funktion in der Standardbibliothek von Step 7 (V5.3) nicht finden. Kann mir da einer weiterhelfen. Wäre nett.

Danke!
delacasa
 
Du könntest das Folgende in einen FC packen, den du regelmäßig im OB13 aufrufst:

Speicher sei ein InOut vom Typ Real, Eingang und Zeit In vom Typ Real

L Eingang
L Speicher
-R
L Zeit
/R
L Speicher
+ R
T Speicher
 
Zuviel Werbung?
-> Hier kostenlos registrieren
Hi vielleicht hilft dir das weiter




Code:
[SIZE=3][FONT=Times New Roman]FUNCTION_BLOCK FB XX[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]VAR_INPUT[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]IN : REAL ;       //Analog Input [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]Kp : REAL ;     //Proportionalbeiwert [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]T_1 : REAL ;    //Verzögerungszeitkonstante [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]Ta : REAL ;      //Abtastzeit [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]Reset : BOOL;          //Reset PT 1 Glied[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]END_VAR[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]VAR_OUTPUT[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]OUT : REAL;     //Analog Out[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]END_VAR[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]VAR[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]HV_OUT : REAL;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]END_VAR[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]VAR_TEMP[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]HV : REAL;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]END_VAR[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]BEGIN[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]NETWORK[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]TITLE=[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          SET;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          SAVE;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          =   L  4.1;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          U   #Reset;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          SPBN  A7d0;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          L   0.0;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          T   #HV_OUT;[/FONT][/SIZE]
[FONT=Times New Roman][SIZE=3]A7d0:  L   #T_1;[/SIZE][/FONT]
[SIZE=3][FONT=Times New Roman]          L   #Ta;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          +R;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          L   1.0;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          TAK;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          /R;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          T   #HV;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          L   #Kp;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          L   #Ta;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          *R;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          L   #HV;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          *R;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          L   #IN;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          *R;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          L   #T_1;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          TAK;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          T   LD  6;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          TAK;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          L   #HV;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          *R;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          L   #HV_OUT;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          *R;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          L   LD  6;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          +R;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          T   #OUT;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          L   #OUT;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          T   #HV_OUT;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          CLR;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          U   L  4.1;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]          SAVE;[/FONT][/SIZE]
[FONT=Times New Roman][SIZE=3]END_FUNCTION_BLOCK[/SIZE][/FONT]
 
Zuletzt bearbeitet:
Zurück
Oben