www.pudn.com > crestroncontrol.rar > DataCheck.usp, change:2007-01-16,size:19814b


/******************************************************************************************* 
  SIMPL+ Module Information 
  (Fill in comments below) 
*******************************************************************************************/ 
/* 
Dealer Name: 
System Name: 
System Number: 
Programmer: 
Comments: 
*/ 
 
/******************************************************************************************* 
  Compiler Directives 
  (Uncomment and declare compiler directives as needed) 
*******************************************************************************************/ 
// #SYMBOL_NAME "" 
// #HINT "" 
// #DEFINE_CONSTANT 
// #CATEGORY ""  
// #DEFAULT_VOLATILE 
#DEFAULT_NONVOLATILE 
#ENABLE_STACK_CHECKING 
/* 
#HELP_BEGIN 
   (add additional lines of help lines) 
#HELP_END 
*/ 
 
/******************************************************************************************* 
  Include Libraries 
  (Uncomment and include additional librarys as needed) 
*******************************************************************************************/ 
// #CRESTRON_LIBRARY "" 
// #USER_LIBRARY "" 
 
/******************************************************************************************* 
  DIGITAL, ANALOG and SERIAL INPUTS and OUTPUTS 
  (Uncomment and declare inputs and outputs as needed) 
*******************************************************************************************/ 
// DIGITAL_INPUT  
// ANALOG_INPUT  
// STRING_INPUT  
// BUFFER_INPUT  
Buffer_input CmdData[50]; 
// DIGITAL_OUTPUT  
// ANALOG_OUTPUT  
// STRING_OUTPUT  
digital_output ProjectOpen,ProjectClose,ProjectCamp,ProjectDVD,ProjectJVC,Project1VA,Project2VA; 
digital_output ProjectSECPC,ProjectReportPC,ProjectSourcePC,ProjectDelPC1, ProjectDelPC2,ProjectDelPC3,ProjectDelPC4,ProjectDelPC5,ProjectDelPC6,ProjectDelPC7,ProjectDelPC8; 
digital_output ProjectDelPC9,ProjectDelPC10,ProjectDelPC11,ProjectDelPC12,ProjectDelPC13,ProjectDelPC14,ProjectDelPC15,ProjectDelPC16,ProjectDelPC17, ProjectDelPC18,ProjectDelPC19,ProjectDelPC20,ProjectDelPC21; 
digital_output ScreenCamp,ScreenDVD,ScreenJVC,Screen1VA,Screen2VA; 
digital_output ScreenSECPC,ScreenReportPC,ScreenSourcePC,ScreenDelPC1, ScreenDelPC2,ScreenDelPC3,ScreenDelPC4,ScreenDelPC5,ScreenDelPC6,ScreenDelPC7,ScreenDelPC8; 
digital_output ScreenDelPC9,ScreenDelPC10,ScreenDelPC11,ScreenDelPC12,ScreenDelPC13,ScreenDelPC14,ScreenDelPC15,ScreenDelPC16,ScreenDelPC17, ScreenDelPC18,ScreenDelPC19,ScreenDelPC20,ScreenDelPC21; 
digital_output DVDPower,DVDOpenClose,DVDVoice,DVD1,DVD2,DVD3,DVD4,DVD5,DVD6,DVD7,DVD8,DVD9,DVD0,DVDQuickPrev,DVDQuickNext,DVDPrev,DVDNext; 
digital_output DVDStop,DVDPause,DVDPlay,DVDArow,DVDTop,DVDLeft,DVDMenu,DVDRight,DVDReturn,DVDBottom,DVDEnter; 
digital_output JVCPower,JVCVideo,JVCVoice,JVC1,JVC2,JVC3,JVC4,JVC5,JVC6,JVC7,JVC8,JVC9,JVC0,JVCQuickPrev,JVCQuickNext,JVCPrev,JVCNext; 
digital_output JVCStop,JVCPause,JVCPlay,JVCRecord,JVCTop,JVCLeft,JVCMenu,JVCRight,JVCTemp,JVCBottom,JVCEnter; 
digital_output ReportPCVoice,SECPCVoice,PC1Voice,PC2Voice,PC3Voice,PC4Voice,PC5Voice,PC6Voice,PC7Voice,PC8Voice,PC9Voice,PC10Voice,PC11Voice,PC12Voice,PC13Voice,PC14Voice,PC15Voice,PC16Voice,PC17Voice,PC18Voice,PC19Voice,PC20Voice,PC21Voice,VoiceBeiYong; 
digital_output ScreenUp,ScreenDown,ScreenStop,ScreenPrev,ScreenBack,ScreenHBXUp,ScreenHBXDown,VideoScreenBY1,VideoScreenBY2,VideoProjectBY1,VideoProjectBY2; 
digital_output power[8]; 
STRING_OUTPUT send; 
/******************************************************************************************* 
  Structure Definitions 
  (Uncomment and define structure definitions as needed) 
  Note:  Be sure to initialize all declared STRING variables as needed 
         For example, in Function Main: struct.myString = ""; 
*******************************************************************************************/ 
// STRUCTURE MyStruct1 
// { 
// }; 
 
// MyStruct1 struct; 
 
/******************************************************************************************* 
  Global Variables 
  (Uncomment and declare global variables as needed) 
  Note:  Be sure to initialize all declared STRING variables as needed 
         For example, in Function Main: myString = ""; 
*******************************************************************************************/ 
// INTEGER 
// STRING 
 
/******************************************************************************************* 
  Functions 
  (Add any additional functions here) 
  Note:  Functions must be physically placed before the location in 
         the code that calls them. 
*******************************************************************************************/ 
/* 
Function MyFunction1() 
{ 
    // TODO:  Add local variable declarations here 
 
    // TODO:  Add code here 
} 
*/ 
 
/* 
Integer_Function MyIntFunction1() 
{ 
    // TODO:  Add local variable declarations here 
 
    // TODO:  Add code here 
 
    Return (0); 
} 
*/ 
 
/* 
String_Function MyStrFunction1() 
{ 
    // TODO:  Add local variable declarations here 
 
    // TODO:  Add code here 
 
    Return (""); 
} 
*/ 
  
Function Analyse(integer cmd) 
{ 
	switch(cmd) 
	{ 
		case (1): 
		{//打开电源 
			power[5] = 1; 
			Delay(5);  
			power[6] = 1;  
			Delay(5); 
			power[7] = 1; 
			Delay(5);  
			power[8] = 1; 
		}  
		case (2): 
		{//关闭电源  
			power[1] = 0; 
			Delay(5);  
			power[2] = 0;  
			Delay(5);  
			power[3] = 0;  
			Delay(5); 
			power[4] = 0; 
			Delay(5);  
			power[5] = 0; 
			Delay(5);  
			power[6] = 0;  
			Delay(5);  
			power[7] = 0;  
			Delay(5); 
//			Delay(30000);  
			power[8] = 0; 
		} 
		case (3): 
		{//打开投影机 
			ProjectOpen = 1;  
			ProjectOpen = 0; 
		} 
		case (4): 
		{//关闭投影机 
			ProjectClose = 1;   
			ProjectClose = 0; 
		} 
		case (5): 
		{//投影机整屏显示模式  
		}  
		case (6): 
		{//投影机四分屏显示模式 
		}  
		case (7): 
		{//投影机切摄像机信号   
			ProjectCamp = 1;  
			ProjectCamp = 0; 
		} 
    	case (8): 
		{//投影机切DVD信号  
			ProjectDVD = 1; 
			ProjectDVD = 0; 
		} 
		case (9): 
		{//投影机切录像机信号   
			ProjectJVC = 1;   
			ProjectJVC = 0; 
		} 
		case (10): 
		{//投影机切中心机房1信号  
			Project1VA = 1; 
			Project1VA = 0; 
		} 
		case (11): 
		{//投影机切中心机房2信号  
			Project2VA = 1;  
			Project2VA = 0; 
		} 
		case (12): 
		{//投影机切秘书PC信号  
			ProjectSECPC = 1;   
			ProjectSECPC = 0; 
		} 
		case (13): 
		{//投影机切汇报席PC信号  
			ProjectReportPC = 1;  
			ProjectReportPC = 0; 
		} 
		case (14): 
		{//投影机切信息源信号   
			ProjectSourcePC = 1; 
			ProjectSourcePC = 0; 
		} 
		case (15): 
		{//投影机切代表PC1信号  
			ProjectDelPC1 = 1;  
			ProjectDelPC1 = 0; 
		} 
		case (16): 
		{//投影机切代表PC2信号   
			ProjectDelPC2 = 1;  
			ProjectDelPC2 = 0; 
		} 
		case (17): 
		{//投影机切代表PC3信号  
			ProjectDelPC3 = 1;  
			ProjectDelPC3 = 0; 
		} 
		case (18): 
		{//投影机切代表PC4信号   
			ProjectDelPC4 = 1;  
			ProjectDelPC4 = 0; 
		} 
		case (19): 
		{//投影机切代表PC5信号  
			ProjectDelPC5 = 1;  
			ProjectDelPC5 = 0; 
		} 
		case (20): 
		{//投影机切代表PC6信号  
			ProjectDelPC6 = 1; 
			ProjectDelPC6 = 0; 
		} 
		case (21): 
		{//投影机切代表PC7信号  
			ProjectDelPC7 = 1;  
			ProjectDelPC7 = 0; 
		} 
		case (22): 
		{//投影机切代表PC8信号  
			ProjectDelPC8 = 1;  
			ProjectDelPC8 = 0; 
		} 
		case (23): 
		{//投影机切代表PC9信号  
			ProjectDelPC9 = 1;   
			ProjectDelPC9 = 0; 
		} 
		case (24): 
		{//投影机切代表PC10信号  
			ProjectDelPC10 = 1;  
			ProjectDelPC10 = 0; 
		}  
		case (25): 
		{//投影机切代表PC11信号  
			ProjectDelPC11 = 1;  
			ProjectDelPC11 = 0; 
		} 
		case (26): 
		{//投影机切代表PC12信号  
			ProjectDelPC12 = 1;  
			ProjectDelPC12 = 0; 
		} 
		case (27): 
		{//投影机切代表PC13信号  
			ProjectDelPC13 = 1;  
			ProjectDelPC13 = 0; 
		} 
		case (28): 
		{//投影机切代表PC14信号 
			ProjectDelPC14 = 1;  
			ProjectDelPC14 = 0; 
		} 
		case (29): 
		{//投影机切代表PC15信号 
			ProjectDelPC15 = 1;  
			ProjectDelPC15 = 0; 
		} 
		case (30): 
		{//投影机切代表PC16信号  
			ProjectDelPC16 = 1;  
			ProjectDelPC16 = 0; 
		} 
		case (31): 
		{//投影机切代表PC17信号 
			ProjectDelPC17 = 1;   
			ProjectDelPC17 = 0; 
		} 
		case (32): 
		{//投影机切代表PC18信号 
			ProjectDelPC18 = 1;  
			ProjectDelPC18 = 0; 
		} 
		case (33): 
		{//投影机切代表PC19信号 
			ProjectDelPC19 = 1;  
			ProjectDelPC19 = 0; 
		} 
		case (34): 
		{//投影机切代表PC20信号 
			ProjectDelPC20 = 1;  
			ProjectDelPC20 = 0; 
		} 
		case (35): 
		{//投影机切代表PC21信号 
			ProjectDelPC21 = 1;  
			ProjectDelPC21 = 0; 
		} 
    	case (36): 
		{//升降屏切摄像机信号  
			ScreenCamp = 1;  
			ScreenCamp = 0;  
		} 
    	case (37): 
		{//升降屏切DVD信号   
			ScreenDVD = 1; 
			ScreenDVD = 0; 
		} 
		case (38): 
		{//升降屏切录像机信号  
			ScreenJVC = 1;  
			ScreenJVC = 0; 
		} 
		case (39): 
		{//升降屏切中心机房1信号  
			Screen1VA = 1;  
			Screen1VA = 0; 
		} 
		case (40): 
		{//升降屏切中心机房2信号  
			Screen2VA = 1;   
			Screen2VA = 0; 
		} 
		case (41): 
		{//升降屏切秘书PC信号  
			ScreenSECPC = 1;  
			ScreenSECPC = 0; 
		} 
		case (42): 
		{//升降屏切汇报席PC信号 
			ScreenReportPC = 1; 
			ScreenReportPC = 0; 
		} 
		case (43): 
		{//升降屏切信息源信号  
			ScreenSourcePC = 1;  
			ScreenSourcePC = 0; 
		} 
		case (44): 
		{//升降屏切代表PC1信号 
			ScreenDelPC1 = 1;   
			ScreenDelPC1 = 0; 
		} 
		case (45): 
		{//升降屏切代表PC2信号   
			ScreenDelPC2 = 1;   
			ScreenDelPC2 = 0; 
		} 
		case (46): 
		{//升降屏切代表PC3信号  
			ScreenDelPC3 = 1;  
			ScreenDelPC3 = 0; 
		} 
		case (47): 
		{//升降屏切代表PC4信号 
			ScreenDelPC4 = 1;  
			ScreenDelPC4 = 0; 
		} 
		case (48): 
		{//升降屏切代表PC5信号  
			ScreenDelPC5 = 1;  
			ScreenDelPC5 = 0; 
		} 
		case (49): 
		{//升降屏切代表PC6信号   
			ScreenDelPC6 = 1;   
			ScreenDelPC6 = 0; 
		} 
		case (50): 
		{//升降屏切代表PC7信号    
			ScreenDelPC7 = 1;   
			ScreenDelPC7 = 0; 
		} 
		case (51): 
		{//升降屏切代表PC8信号   
			ScreenDelPC8 = 1;  
			ScreenDelPC8 = 0; 
		} 
		case (52): 
		{//升降屏切代表PC9信号  
			ScreenDelPC9 = 1;  
			ScreenDelPC9 = 0; 
		} 
		case (53): 
		{//升降屏切代表PC10信号   
			ScreenDelPC10 = 1;   
			ScreenDelPC10 = 0; 
		}  
		case (54): 
		{//升降屏切代表PC11信号  
			ScreenDelPC11 = 1;  
			ScreenDelPC11 = 0; 
		} 
		case (55): 
		{//升降屏切代表PC12信号  
			ScreenDelPC12 = 1;   
			ScreenDelPC12 = 0; 
		} 
		case (56): 
		{//升降屏切代表PC13信号  
			ScreenDelPC13 = 1; 
			ScreenDelPC13 = 0; 
		} 
		case (57): 
		{//升降屏切代表PC14信号   
			ScreenDelPC14 = 1;  
			ScreenDelPC14 = 0; 
		} 
		case (58): 
		{//升降屏切代表PC15信号  
			ScreenDelPC15 = 1;  
			ScreenDelPC15 = 0; 
		} 
		case (59): 
		{//升降屏切代表PC16信号  
			ScreenDelPC16 = 1;  
			ScreenDelPC16 = 0; 
		} 
		case (60): 
		{//升降屏切代表PC17信号  
			ScreenDelPC17 = 1;  
			ScreenDelPC17 = 0; 
		} 
		case (61): 
		{//升降屏切代表PC18信号  
			ScreenDelPC18 = 1;  
			ScreenDelPC18 = 0; 
		} 
		case (62): 
		{//升降屏切代表PC19信号  
			ScreenDelPC19 = 1;  
			ScreenDelPC19 = 0; 
		} 
		case (63): 
		{//升降屏切代表PC20信号  
			ScreenDelPC20 = 1;  
			ScreenDelPC20 = 0; 
		} 
		case (64): 
		{//升降屏切代表PC21信号 
			ScreenDelPC21 = 1;  
			ScreenDelPC21 = 0; 
		} 
		case (65): 
		{// 
			DVDPower = 1;  
			DVDPower = 0; 
		}  
		case (66): 
		{// 
			DVDOpenClose = 1; 
			DVDOpenClose = 0; 
		} 
		case (67): 
		{//  
			DVDVoice = 1;  
			DVDVoice = 0; 
		} 
		case (68): 
		{// 
			DVD1 = 1;  
			DVD1 = 0; 
		} 
		case (69): 
		{//  
			DVD2 = 1;  
			DVD2 = 0; 
		} 
		case (70): 
		{// 
			DVD3 = 1; 
			DVD3 = 0; 
		} 
		case (71): 
		{//   
			DVD4 = 1; 
			DVD4 = 0; 
		} 
		case (72): 
		{// 
			DVD5 = 1;  
			DVD5 = 0; 
		} 
		case (73): 
		{// 
			DVD6 = 1;  
			DVD6 = 0; 
		} 
		case (74): 
		{//  
			DVD7 = 1;  
			DVD7 = 0; 
		} 
		case (75): 
		{// 
			DVD8 = 1;  
			DVD8 = 0; 
		} 
		case (76): 
		{//  
			DVD9 = 1;  
			DVD9 = 0; 
		} 
		case (77): 
		{//  
			DVD0 = 1;  
			DVD0 = 0; 
		} 
		case (78): 
		{//  
			DVDQuickPrev = 1;  
			DVDQuickPrev = 0; 
		} 
		case (79): 
		{//  
			DVDQuickNext = 1;  
			DVDQuickNext = 0; 
		} 
		case (80): 
		{//  
			DVDPrev = 1;  
			DVDPrev = 0; 
		} 
		case (81): 
		{// 
			DVDNext = 1;  
			DVDNext = 0; 
		} 
		case (82): 
		{// 
			DVDStop = 1;  
			DVDStop = 0; 
		} 
		case (83): 
		{// 
			DVDPause = 1;  
			DVDPause = 0; 
		} 
		case (84): 
		{// 
			DVDPlay = 1;  
			DVDPlay = 0; 
		}  
		case (85): 
		{//  
			DVDArow = 1;  
			DVDArow = 0; 
		} 
		case (86): 
		{//  
			DVDTop = 1;   
			DVDTop = 0; 
		} 
		case (87): 
		{//  
			DVDLeft = 1;  
			DVDLeft = 0; 
		} 
		case (88): 
		{// 
			DVDMenu = 1;  
			DVDMenu = 0; 
		} 
		case (89): 
		{// 
			DVDRight = 1; 
			DVDRight = 0; 
		} 
		case (90): 
		{//  
			DVDReturn = 1;  
			DVDReturn = 0; 
		} 
		case (91): 
		{//  
			DVDBottom = 1;  
			DVDBottom = 0; 
		} 
		case (92): 
		{// 
			DVDEnter = 1; 
			DVDEnter = 0; 
		} 
		case (93): 
		{// 
			JVCPower = 1;  
			JVCPower = 0; 
		}  
		case (94): 
		{// 
			JVCVideo = 1;  
			JVCVideo = 0; 
		} 
		case (95): 
		{//  
			JVCVoice = 1;  
			JVCVoice = 0; 
		} 
		case (96): 
		{// 
			JVC1 = 1;   
			JVC1 = 0; 
		} 
		case (97): 
		{//  
			JVC2 = 1;   
			JVC2 = 0; 
		} 
		case (98): 
		{// 
			JVC3 = 1; 
			JVC3 = 0; 
		} 
		case (99): 
		{//   
			JVC4 = 1; 
			JVC4 = 0; 
		} 
		case (100): 
		{// 
			JVC5 = 1;  
			JVC5 = 0; 
		} 
		case (101): 
		{// 
			JVC6 = 1; 
			JVC6 = 0; 
		} 
		case (102): 
		{//  
			JVC7 = 1;  
			JVC7 = 0; 
		} 
		case (103): 
		{// 
			JVC8 = 1;   
			JVC8 = 0; 
		} 
		case (104): 
		{//  
			JVC9 = 1;  
			JVC9 = 0; 
		} 
		case (105): 
		{//  
			JVC0 = 1;   
			JVC0 = 0; 
		} 
		case (106): 
		{//  
			JVCQuickPrev = 1; 
			JVCQuickPrev = 0; 
		} 
		case (107): 
		{//  
			JVCQuickNext = 1;  
			JVCQuickNext = 0; 
		} 
		case (108): 
		{//  
			JVCPrev = 1; 
			JVCPrev = 0; 
		} 
		case (109): 
		{// 
			JVCNext = 1;  
			JVCNext = 0; 
		} 
		case (110): 
		{// 
			JVCStop = 1;  
			JVCStop = 0; 
		} 
		case (111): 
		{// 
			JVCPause = 1;  
			JVCPause = 0; 
		} 
		case (112): 
		{// 
			JVCPlay = 1;  
			JVCPlay = 0; 
		}  
		case (113): 
		{//  
			JVCRecord = 1;   
			JVCRecord = 0; 
		} 
		case (114): 
		{//  
			JVCTop = 1;  
			JVCTop = 0; 
		} 
		case (115): 
		{//  
			JVCLeft = 1; 
			JVCLeft = 0; 
		} 
		case (116): 
		{// 
			JVCMenu = 1;  
			JVCMenu = 0; 
		} 
		case (117): 
		{// 
			JVCRight = 1; 
			JVCRight = 0; 
		} 
		case (118): 
		{//  
			JVCTemp = 1;  
			JVCTemp = 0; 
		} 
		case (119): 
		{//  
			JVCBottom = 1;  
			JVCBottom = 0; 
		} 
		case (120): 
		{// 
			JVCEnter = 1;  
			JVCEnter = 0; 
		} 
		case (121): 
		{//切换扩展串口矩阵音频 
			PC1Voice = 1;  
			PC1Voice = 0; 
		} 
        case (122): 
		{// 
			PC2Voice = 1;  
			PC2Voice = 0; 
		} 
         case (123): 
		{// 
			PC3Voice = 1; 
			PC3Voice = 0; 
		} 
        case (124): 
		{// 
			PC4Voice = 1; 
			PC4Voice = 0; 
		} 
        case (125): 
		{// 
			PC5Voice = 1;  
			PC5Voice = 0; 
		} 
        case (126): 
		{// 
			PC6Voice = 1; 
			PC6Voice = 0; 
		} 
        case (127): 
		{// 
			PC7Voice = 1;  
			PC7Voice = 0; 
		} 
        case (128): 
		{// 
			PC8Voice = 1;  
			PC8Voice = 0; 
		} 
        case (129): 
		{// 
			PC9Voice = 1;  
			PC9Voice = 0; 
		} 
        case (130): 
		{// 
			PC10Voice = 1;  
			PC10Voice = 0; 
		} 
        case (131): 
		{// 
			PC11Voice = 1;   
			PC11Voice = 0; 
		} 
        case (132): 
		{// 
			PC12Voice = 1;  
			PC12Voice = 0; 
		} 
        case (133): 
		{// 
			PC13Voice = 1;  
			PC13Voice = 0; 
		} 
        case (134): 
		{// 
			PC14Voice = 1;  
			PC14Voice = 0; 
		} 
        case (135): 
		{// 
			PC15Voice = 1;  
			PC15Voice = 0; 
		} 
        case (136): 
		{// 
			PC16Voice = 1;  
			PC16Voice = 0; 
		} 
        case (137): 
		{// 
			PC17Voice = 1; 
			PC17Voice = 0; 
		} 
        case (138): 
		{// 
			PC18Voice = 1;  
			PC18Voice = 0; 
		} 
        case (139): 
		{// 
			PC19Voice = 1;  
			PC19Voice = 0; 
		} 
        case (140): 
		{// 
			PC20Voice = 1;   
			PC20Voice = 0; 
		} 
        case (141): 
		{// 
			PC21Voice = 1;  
			PC21Voice = 0; 
		} 
        case (142): 
		{// 
			ReportPCVoice = 1;  
			ReportPCVoice = 0; 
		} 
		case (143): 
		{// 
			SECPCVoice = 1;  
			SECPCVoice = 0; 
		} 
		case (144): 
		{ 
			ScreenUp = 1;  
			ScreenUp = 0; 
		} 
		case (145): 
		{ 
			ScreenDown = 1;  
			ScreenDown = 0; 
		} 
		case (146): 
		{ 
			ScreenStop = 1; 
			ScreenStop = 0; 
		} 
		case (147): 
		{ 
			ScreenPrev = 1;  
			ScreenPrev = 0; 
		}   
		case (148): 
		{ 
			ScreenBack = 1;  
			ScreenBack = 0; 
		} 
		case (149): 
		{ 
			ScreenHBXUp = 1; 
			ScreenHBXUp = 0; 
		} 
		case (150): 
		{ 
			ScreenHBXDown = 1; 
			ScreenHBXDown = 0; 
		} 
		case (151): 
		{   
			power[2] = 0; 
			power[1] = 1; 
		} 
		case (152): 
		{  
			power[1] = 0; 
			power[2] = 1; 
		} 
		case (153): 
		{  
			power[4] = 0; 
			power[3] = 1; 
		} 
		case (154): 
		{  
			power[3] = 0; 
			power[4] = 1; 
		}  
		case (155): 
		{  
			power[1] = 0; 
			power[2] = 0; 
		}  
		case (156): 
		{ 
			power[3] = 0; 
			power[4] = 0; 
		} 
		case (157): 
		{  
			VoiceBeiYong = 1; 
			VoiceBeiYong = 0; 
		}  
		case (158): 
		{ 
			VideoScreenBY1 = 1;  
			VideoScreenBY1 = 0; 
		} 
		case (159): 
		{ 
			VideoScreenBY2 = 1; 
			VideoScreenBY2 = 0; 
		} 
		case (160): 
		{ 
			VideoProjectBY1 = 1;  
			VideoProjectBY1 = 0; 
		}  
		case (161): 
		{ 
			VideoProjectBY2 = 1;  
			VideoProjectBY2 = 0; 
		} 
	}    
} 
/******************************************************************************************* 
  Event Handlers 
  (Uncomment and declare additional event handlers as needed) 
*******************************************************************************************/ 
/* 
PUSH input 
{ 
    // TODO:  Add code here 
} 
*/ 
 
/* 
RELEASE input 
{ 
    // TODO:  Add code here 
} 
*/ 
 
/* 
CHANGE input 
{ 
    // TODO:  Add code here 
} 
*/ 
 
/* 
EVENT 
{ 
    // TODO:  Add code here 
} 
*/ 
change CmdData 
{ 
	integer c1,c2,c3,c4,c5,icmd; 
	string strCmd[3],CmdTemp[5];//CmdTemp1[12],CmdRemove[12]; 
	 
//	CmdB = ""; 
//	cmdC = ""; 
	CmdTemp = CmdData; 
	c1 = GetC(CmdTemp); 
	c2 = GetC(CmdTemp); 
	c3 = GetC(CmdTemp); 
	c4 = GetC(CmdTemp); 
	c5 = GetC(CmdTemp); 	 
	if(c1 = '<') 
	{ 
		if(c5 = '>') 
		{ 
			makestring(strCmd,"%c%c%c",c2,c3,c4); 
			icmd = atoi(strCmd); 
			Analyse(icmd); 
			send = "OK"; 
		} 
	}  
/*	else 
	{   
		CmdTemp1 = CmdData;  
		c1 = Find("{",CmdData);  
		c2 = Find("}",CmdData); 
		c3 = Find(";",CmdData); 
		if((c1 > 0) && (c2 > 0) && (c1<c2)) 
		{ 
			if(c3 > 0) 
			{ 
				CmdRemove = Remove("{",cmdTemp1); 
				CmdB = Left(cmdTemp1,c3-c1-1) + "%";;  
				CmdRemove = Remove(";",cmdTemp1); 
				CmdC = Left(cmdTemp1,c2-c3-1) + "%";; 
			} 
			else  
			{ 
				CmdRemove = Remove("{",cmdTemp1);  
				CmdC = Left(CmdTemp1,c2-c1-1) + "%"; 
			} 
		}  
				 
	} */ 
	clearbuffer(CmdData); 
} 
 
/******************************************************************************************* 
  Main() 
  Uncomment and place one-time startup code here 
  (This code will get called when the system starts up) 
*******************************************************************************************/ 
/* 
Function Main() 
{ 
    // TODO:  Add code here 
    // Initialize declared global and local variables/arrays as needed. 
 
    // WaitForInitializationComplete(); 
    // If you are reading any Input or Output variables, uncomment 
    //   the WaitForInitializationComplete statement above and read 
    //   them afterwards.  Input/Output variables will not have 
    //   their correct values set until after the logic processor 
    //   runs and propagates the values to them. 
} 
*/ 
/*Function Main() 
{  
	auto = 1; 
}*/