38 lines
722 B
Plaintext
38 lines
722 B
Plaintext
FUNCTION "FC_ActionConvert" : String
|
|
{ S7_Optimized_Access := 'TRUE' }
|
|
VERSION : 0.1
|
|
VAR_INPUT
|
|
nInAktion : Int;
|
|
END_VAR
|
|
|
|
|
|
BEGIN
|
|
#"FC_ActionConvert" := '';
|
|
|
|
IF #nInAktion <= 0 THEN
|
|
RETURN;
|
|
END_IF;
|
|
|
|
CASE #nInAktion OF
|
|
1:
|
|
#FC_ActionConvert := '1'; //ShipLane1
|
|
2:
|
|
#FC_ActionConvert := '2'; //ShipLane2
|
|
3:
|
|
#FC_ActionConvert := '3'; //ShipLane3
|
|
4:
|
|
#FC_ActionConvert := '4'; //ShipLane4
|
|
|
|
3130: //Sensor Jam
|
|
#FC_ActionConvert := '1'; //Pickcontrol
|
|
|
|
3127: //Sensor Jam
|
|
#FC_ActionConvert := '-1'; //Vollpuffer
|
|
|
|
ELSE
|
|
#FC_ActionConvert := '-1'; //Default
|
|
END_CASE;
|
|
|
|
END_FUNCTION
|
|
|