⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kiu00.ptp

📁 power test program for on & check, can be programed power supply
💻 PTP
📖 第 1 页 / 共 2 页
字号:
	
/*** Power Supply Programming Statements generated automatically
     by GR228X/TestStation software on Fri Dec 12 14:01:12 2008.
     Template Ver: 5.8.0
***/
		
		
/*** Subroutines needed for Power Programming ***/

DECLARE SYSTEM CNTRL_C(CSTRING CONTROL(8));
DECLARE DISCHARGE_POWER();		/** Power Discharge Subroutine */
DECLARE PWRUP();			/** Power-up Subroutine **/
DECLARE PWRDN();			/** Power-down Subroutine **/

/*** LOAD Subroutine and LOAD Variables for Power Programming ***/

DECLARE LOAD PROGRAM_INITIALIZATION();	/** Executed at RTS Init **/
DECLARE LOAD CSTRING GR_TARGET(8);	/** Contains Target Tester **/
DECLARE LOAD POWER_TYPE;		/** Test for Alliance **/

/*** Global String variables for Power Programming ***/

DECLARE GLOBAL CSTRING CONTROL(8);	   /** For CNTRL_C Sys Sub **/
DECLARE GLOBAL CSTRING SUPPLY_SETTING(15); /** Voltage Setting **/
DECLARE GLOBAL CSTRING SUPPLY_NAME(15);    /** Power Supply Name **/
DECLARE GLOBAL CSTRING UUT_POWER_STATUS(3) = 'OFF';

/*** Declarations needed for BasicSCAN Diagnostics ***/

DECLARE BASSCAN_FAILBIT;		/** BASICSCAN fail bit **/
DECLARE BASSCAN_FAILCNT;		/** BASICSCAN fail count **/
DECLARE CSTRING PINNAME(5);             /** Alpha-numeric pin name **/

/*** Translates PINORDER number to Alphanumeric pin name ***/
DECLARE SYSTEM GET_PINNAME(FLOAT PINORDER, CSTRING PINSTRING(5));  
DECLARE BSTRING FAIL(1100);
ENDDEC:

ON ABORT CALL PWRDN();

/*********************************************************/
/** Call UUT Power-Up Subroutine.			**/
/*********************************************************/

CALL PWRUP();

IF FAIL(6) THEN BRANCH DDONE;    /* if power up fails
                                    skip digital tests */

/** Default ASSIGN LOGIC Statement - Modify as needed     **/
/** or use ATG Merge option to include Assign Lgc Program **/

ASSIGN LGC VCDH=3.5 VCDL=.2 VCST=1.5 VTT=1.5
           VIHA=3.5 VILA=0.1 VOHA=2.4 VOLA=0.8 LVLA(1-3840);

END_DIGINIT:


DDONE:		CALL PWRDN();
		END;
		
SUBROUTINE PROGRAM_INITIALIZATION();

/** This Load Subroutine is executed once during program
    initialization. It is used to determine and store system 
    hardware configuration information in system variables 
    that can then be accessed during UUT Power-up and 
    Power-down sections... **/

/*********************  NOTE *****************************/
/** The PROGRAM_INITIALIZATION(), PWRUP(), PWRDN(), and **/
/** DISCHARGE_POWER() Subroutines contain Test Language **/
/** Statements that control the Alliance GR228X and     **/
/** TestStation power supplies.                         **/
/** The PROGRAM_INITIALIZATION() Subroutine determines  **/
/** the target tester capabilities at Run-Time          **/
/** initialization and executes the appropriate         **/
/** Programming statements based on the target tester   **/
/** configuration.                                      **/
/*********************************************************/

/********************* WARNING!! *************************/
/** "Alliance" PS Power supplies cannot be programmed   **/
/** to negative voltages. Negative voltages are         **/
/** obtained by reversing the polarity of the leads in  **/
/** the test fixture.                                   **/
/*********************************************************/

/************************ NOTE *****************************
 This program uses the following 2 
 power supplies to power up the Unit-Under-Test:

 User Supply Type: PS(1)
 UUT Power: 1.80 volts, 1.00 amps
 Power Nodes: VCC_1_8V1, GND
 Power Nails: 4, 3

 User Supply Type: PS(2)
 UUT Power: 0.90 volts, 1.00 amps
 Power Nodes: VCC_PVRAM_VREFA1, GND
 Power Nails: 5, 3

*********************************************************/

  /** First, Declare local variables and System Subroutines **/
  DECLARE SYSTEM SYSTYPE(CSTRING TEMP_STRG(8));
  DECLARE SYSTEM CONFIG(CSTRING ARG1(8), ARG2, ARG3);

  /** Now, Make sure operator cannot ABORT this Subroutine **/
  CALL CNTRL_C(CONTROL='OFF'); /* disable control C processing */


  /** Get Target Tester Type **/
  GET_TARGET_TYPE:
  CALL SYSTYPE(TEMP_STRG=GR_TARGET);
  WRITE ID=MESFILE'Target Tester Type is %S%%NL%'GR_TARGET;

  /** Now find out if the tester has Alliance Supplies.**/
  /** The variable POWER_TYPE will be set to 0 if the  **/
  /** target tester has Alliance Supplies, otherwise   **/
  /** it will be set to the ID of the PS Controller.   **/

  CALL CONFIG(ARG1='PSC', ARG2=1, ARG3=POWER_TYPE);

  /** If the target tester does not have Alliance supplies,
      then skip the Alliance programming sequence...**/

  IF POWER_TYPE <> 0 THEN [
    WRITE ID=MESFILE 'Tester does not have Alliance User Supplies!%NL%';
    WRITE ID=MESFILE 'Skipping Alliance Power-Up Sequence!%NL%';
    BRANCH END_PS_INITIALIZE;
  ];
  
  LOAD_PS_SEQUENCES:

  /** This section will "load" sequences into the  
   ** Alliance Power Supply controller. Programming
   ** the Alliance Supplies using Sequences will
   ** produce the fastest UUT test throughput 
   ** because the test programming statements are loaded
   ** into the Alliance controller only once, at Run-time
   ** initialization.
   ** The purpose of each sequence is:
   **
   **   SET PS SEQUENCE = 1;    Power up the UUT
   **   SET PS SEQUENCE = 2;	Power down the UUT
   **   SET PS SEQUENCE = 3;	Disconnect PS Relays
   **/

     SEQUENCE1:
     /** Sequence #1 will TURN ON the power supplies.  Supplies 
         are turned on in the order they appear within the sequence.
         Remember, PS supplies cannot be programmed to negative 
         voltages.  Negative voltages are obtained by wiring 
         the HIGH output to the negative supply bus and the LOW
         output to the reference bus.
      **/

     SET PS START SEQUENCE = 1;

       SET PS(1)  V=1.8  I=1.00 ;
       SET PS(2)  V=0.9  I=1.00 ;

     SET PS END SEQUENCE = 1;

     SEQUENCE2:
     /** Sequence #2 TURNS OFF the power supplies. Supplies 
         are powered down in the opposite order in which they
	 were powered up.
      **/

     SET PS START SEQUENCE = 2;

       SET PS(2)  V=0.0  I=1.00;
       SET PS(1)  V=0.0  I=1.00;

     SET PS END SEQUENCE = 2;

     SEQUENCE3:
     /** Sequence #3 DISCONNECTS the power supply relays.  
         It must be preceded by a call to sequence 2 and a 
         call to DISCHARGE_POWER to ensure that the power nodes 
         are completely discharged prior to disconnecting 
         the relays. 
      **/

     SET PS START SEQUENCE = 3;

       SET PS(2)  DISCONNECT;
       SET PS(1)  DISCONNECT;

     SET PS END SEQUENCE = 3;


END_PS_INITIALIZE:


  /** Finished Initialization, enable control-C processing **/
  CALL CNTRL_C(CONTROL='ON');

END SUBROUTINE PROGRAM_INITIALIZATION;

SUBROUTINE PWRUP();

/** This Subroutine is called to Power-up the UUT **/

  DECLARE VVAL1;

  TEST_FOR_POWER:
  /* Do not execute this Subroutine if UUT is already powered up! */
  IF UUT_POWER_STATUS = 'ON' THEN RETURN;

  PWRON:  
  CALL CNTRL_C(CONTROL='OFF'); /* disable control C processing */
  WRITE 'POWER UP FOR DIGITAL TESTING%NL%';
  NOLOG; /* disable logging during power up */

  SET PIO(0) HRLY(CLOSE 3);	/* GROUND THE PCB */


  CHECK_ID:

  /** If the target tester does not have Alliance supplies,
      then skip the Alliance programming sequence...**/

  IF POWER_TYPE <> 0 THEN [
    WRITE ID=MESFILE 'Tester does not have Alliance User Supplies!%NL%';
    WRITE ID=MESFILE 'Skipping Alliance Power-Up Code!%NL%';
    BRANCH TEST_POWER;
  ];
  
  ALLIANCE_POWER_UP:
  /* This section calls the Alliance Power Supply
     Sequence that will turn on the PS Supplies.
     To understand what power supply commands are
     executed by each Sequence, refer to the 
     Sequence definitions in the PROGRAM
     INITIALIZATION Load Subroutine.
  */

  /*** POWER UP SEQUENCE ***/
  /* Turn on the Alliance power supplies...*/
  SET PS SEQUENCE = 1;

  TEST_POWER:

  /*** MEASURE OUTPUT VOLTAGE OF ALL POWER SUPPLIES AT THE UUT ***/

   SET MUX AT(CHA=DCMVHI:CHB=DCMVLO); /* Connects Voltage Meter */
   
     POWER1: SET SCAN AT(4:3); 
	  MEAS DCV INTO VVAL1 MAX=1.80 VAL=1.80 TOL=5 RDLY=2M FAIL(6)
	  [
	  LET SUPPLY_NAME='PS(1)';
	  LET SUPPLY_SETTING='1.80 VOLT';
	  BRANCH PWR_FAIL;
	  ];

     POWER2: SET SCAN AT(5:3); 
	  MEAS DCV INTO VVAL1 MAX=0.90 VAL=0.90 TOL=5 RDLY=2M FAIL(6)
	  [
	  LET SUPPLY_NAME='PS(2)';
	  LET SUPPLY_SETTING='0.90 VOLT';
	  BRANCH PWR_FAIL;
	  ];


  PWRUP_DONE:
  
  /* If program gets here, then power up is OK. */
  BRANCH PWROK;	

  /****************************************************/
  /** IF any power supply voltage measurement FAILs, **/
  /** generate diagnostic message and ABORT testing. **/
  /** If power is OK, Branch to PWROK.               **/
  /****************************************************/

  PWR_FAIL:
  WRITE ID=MESFILE'%NL% %NL%';
  WRITE ID=MESFILE  '%037%%S%%NL%%036%UUT %S% SUPPLY FAILED.%NL%'

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -