[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]