[r2]: / ecu_at135_v2r1_baloo / StandardPLC / Plc Logic / Application / 010.PSCU_Direction_Hydac / Consigne_Hydac_Direction / svnobj  Maximize  Restore  History

Download this file

21 lines (19 with data), 2.9 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
FUNCTION_BLOCK Consigne_Hydac_Direction
VAR_INPUT
	Consigne_volant:	REAL;
END_VAR
VAR_OUTPUT
	Consigne_braquage:	REAL;
	Signe_braquage:		BYTE;
VAR
	Consigne_braquage_interne: REAL;
IF (Consigne_volant < 0) THEN
		Signe_braquage := 2;
		Consigne_braquage_interne:= ABS(Consigne_volant);
		
	ELSIF (Consigne_volant > 0) THEN
		Signe_braquage := 1;
		Consigne_braquage_interne := ABS(Consigne_volant);
	ELSIF (Consigne_volant  > 0 ) OR (Consigne_volant  < 0 ) THEN
		Signe_braquage := 0;
END_IF
Consigne_braquage := Consigne_braquage_interne * 10;