[r24]: / branches / VTEM_game1_1 / Main_Escape_PLC / Plc Logic / Application / Function Blocks / Puzzle / VtemStateMachine / svnobj  Maximize  Restore  History

Download this file

77 lines (76 with data), 56.8 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
IF NOT xInit THEN	
	UM				(		sName := 'Normal Operation', 
							dwAllowsLeavingFromStates := PACK_ML.State.Stopped OR PACK_ML.State.Aborted OR PACK_ML.State.Idle, 
		IF SysStrCmp(Client.sCommandToPLC, Client.LockCommands[0]) =  0 THEN		
			//First Lock Function
			xLockLoadConfig:=TRUE;
		ELSIF SysStrCmp(Client.sCommandToPLC, Client.LockCommands[1]) =  0 THEN		
			//Second Lock Function
			;	
		END_IF
	2 : 	//Key
			SendCommand(Command:= CommandType.Key,Value:=Client.KeyCommands[0]);
		END_IF	
	3 : 	//IO
	4 : 	//Media
	5 : 	//Hint
	6 : 	//State	
		IF SysStrCmp(Client.sCommandToPLC, 'SC') =  0 THEN		
			StateComplete();
		ELSIF SysStrCmp(Client.sCommandToPLC, 'Start') =  0 THEN		
			Start();
		ELSIF SysStrCmp(Client.sCommandToPLC, 'Stop') =  0 THEN		
			Stop();
		ELSIF SysStrCmp(Client.sCommandToPLC, 'Reset') =  0 THEN		
			Reset();
		ELSIF SysStrCmp(Client.sCommandToPLC, 'Abort') =  0 THEN		
			Abort();
		ELSIF SysStrCmp(Client.sCommandToPLC, 'Clear') =  0 THEN		
			Clear();
		ELSIF SysStrCmp(Client.sCommandToPLC, 'Hold') =  0 THEN		
			Hold();
		ELSIF SysStrCmp(Client.sCommandToPLC, 'UnHold') =  0 THEN		
			Unhold();	
		ELSIF SysStrCmp(Client.sCommandToPLC, 'Suspend') =  0 THEN		
			Suspend();
		1020:
				client.ActualStep:=1030;
			iVTEMComsRights:=4;
 		1040:
				client.ActualStep:=1100;
			xCheckConfiguration:=TRUE;
		1105:
				Client.ActualStep:=1110;
				Client.ActualStep:=1100;
			iVTEMComsRights:=1;
			bySetValveModeAll:= 61;
			bySetAppOptionAll:= 0;
			gxhideGo:=TRUE;
			gxhideStart:=TRUE;
			Client.ActualStep:=1120;
			bySetValveModeAll:= 3;
			bySetAppOptionAll:=0;
				StateComplete();
PACK_ML.State.Starting :
		0:
		Client.ActualStep:=5;
			client.ActualStep:=100;
				SendCommand(Command:= CommandType.Media,Value:= 'http://10.0.0.13/cgi-bin/vtem-welcome');
		5:
		SendCommand(Command:= CommandType.Media,Value:= 'http://10.0.0.10:8080/webvisu.htm');
		xUseGlobalSetpointValues := false;
		gxhideStart := TRUE;
		bySetValveModeAll :=3	;
		iTarBackLeft:=4000;
		iTarFrontRight:=2000;
		wait:=TRUE;
		Client.ActualStep:=10;
		IF waitTimer.Q THEN
			Client.ActualStep:=20;
		iTarBackLeft:=3000;
		iTarFrontRight:=3000;
		Client.ActualStep:=30;
			Client.ActualStep:=40;
		iTarBackLeft:=2000;
		Client.ActualStep:=50;
			Client.ActualStep:=60;