www.pudn.com > crestroncontrol.rar > a.usp, change:2006-09-30,size:5406b


/******************************************************************************************* 
  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 "e" 
// #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  up_p,stop_p,down_p; 
ANALOG_INPUT i; 
 
// BUFFER_INPUT  
 
//DIGITAL_OUTPUT   
//ANALOG_OUTPUT  g ; 
STRING_OUTPUT command; 
string a[20]; 
integer x[4]; 
 
  push up_p 
  {  
    x[3]=0xfc^i^0xff^0x53&0x7f; 
  	x[1]=i; 
  	x[2]=0xff; 
  	x[4]=0x53; 
  	command=chr(0xfc)+chr(x[1])+chr(x[2])+chr(x[4])+chr(x[3])+chr(0xfb); 
    delay(100); 
  	 
  	x[3]=0xfc^i^0xff^0x60&0x7f; 
  	x[1]=i; 
  	x[2]=0xff; 
  	x[4]=0x60; 
  	command=chr(0xfc)+chr(x[1])+chr(x[2])+chr(x[4])+chr(x[3])+chr(0xfb); 
  	//g=i; 
  } 
  push down_p 
  { 
  	x[3]=0xfc^i^0xff^0x53&0x7f; 
  	x[1]=i; 
  	x[2]=0xff; 
  	x[4]=0x53; 
  	command=chr(0xfc)+chr(x[1])+chr(x[2])+chr(x[4])+chr(x[3])+chr(0xfb); 
    delay(100); 
  	 
  	x[3]=0xfc^i^0xff^0x61&0x7f; 
  	x[1]=i; 
  	x[2]=0xff; 
  	x[4]=0x61; 
  	command=chr(0xfc)+chr(x[1])+chr(x[2])+chr(x[4])+chr(x[3])+chr(0xfb); 
  } 
  push stop_p 
  { 
  	x[3]=0xfc^i^0xff^0x53&0x7f; 
  	x[1]=i; 
  	x[2]=0xff; 
  	x[4]=0x53; 
  	command=chr(0xfc)+chr(x[1])+chr(x[2])+chr(x[4])+chr(x[3])+chr(0xfb); 
  } 
/******************************************************************************************* 
  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 (""); 
} 
*/ 
 
/******************************************************************************************* 
  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 
} 
*/ 
 
/******************************************************************************************* 
  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. 
} 
*/