- FUNCTION Y_Go : INT
- VAR_TEMP
- // Temporary Variables
- Y_Current : INT;
- END_VAR
- VAR_INPUT
- Y1 : BOOL;
- Y2 : BOOL;
- Y3 : BOOL;
- Y4 : BOOL;
- Y_Wanted : INT;
- END_VAR
- VAR_OUTPUT
- Y_Up : BOOL;
- Y_Down : BOOL;
- Y_OK : BOOL;
- END_VAR
- IF Y1 THEN
- Y_Current := 1;
- END_IF;
- IF Y2 THEN
- Y_Current := 2;
- END_IF;
- IF Y3 THEN
- Y_Current := 3;
- END_IF;
- IF Y4 THEN
- Y_Current := 4;
- END_IF;
- IF Y_Wanted = Y_Current THEN
- Y_Up := False;
- Y_Down := False;
- Y_OK := True;
- ELSE IF Y_Wanted > Y_Current THEN
- Y_Up := False;
- Y_Down := True;
- Y_OK := False;
- ELSE IF Y_Wanted < Y_Current THEN
- Y_Up := True;
- Y_Down := False;
- Y_OK := False;
- END_IF;
- // Statement Section
- ;
- Y_Go := 100;
- END_FUNCTION
Undefined
By: Guest | Date: Nov 19 2010 13:04 | Format: None | Expires: never | Size: 973 B | Hits: 829
Latest pastes
1 hours ago
11 hours ago
1 days ago
2 days ago
2 days ago