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

📄 testplan

📁 HP3070的主板ICT测试主程序,是用BT-basic写的.
💻
📖 第 1 页 / 共 5 页
字号:
!!!!    4    0    1 1211944529   0000                                         
! Testplan for p651  Wed Apr 16 14:51:29 2008

! 600-10651-0000-200
dim BoardSet_boards_1_to_2(1:2)

!   AGILENT 3070 STANDARD TESTMAIN      Revision: "3070 05.20pa 0502(panel)"
!   PANELIZATION VERSION
!##############################################################################
!   This "main" program sequences execution of testplan subroutines and
!   assumes that the current working directory is already set to the
!   appropriate board directory.
!   This testmain has included the code to support the following optional
!   features:
!        Data Logging for PushButton QSTATS, QSTATS-II and ART
!        Chek-Point (pin tests)
!        Boundary Scan: Interconnect Plus & ScanWorks     Version_Label$
!        Panelized Boards
!   Once the testplan is working, you may selectively enable
!   any combination of the features by changing the 'flag' variables
!   in the subroutine "Set_Custom_Options".  Use the following command:
!         find  "!   Other"&" parameters"  ! takes you to option settings
!
!   Turn learn on and run the testplan on a known good board.  After the
!   learning run is successfully completed, the testplan is ready for
!   customization, debug and production testing.
!   Analog limits are logged by standard testmain if and only if the
!   learn flag is on.  Limits must be logged once each time they change
!   in order for PushButton Q-STATS or Q-STATS II to produce histograms.
!
!   If flash is to be programmed on this board, the testplan needs to have the
!   locations marked !flash! modified or reviewed.  Please review the flash
!   manual for full explanation. Key elements include:
!
!   full disabling of buses and upstream control lines is required for safety
!   use ID check for digital test subroutine to ensure proper part placement
!   Cycle power if required to three-state upstream devices
!=================================================
dim Ident$(0:24)[24]
dim VER_Map$(1:16,1:2)
dim OUI_Map$(1:16,1:2)
dim MAC$(0:256)
dim MAC_Swap(0:47)
dim MAC_Addr(0:47)
dim MAC_Addr_BS(0:47)
dim ReFlash(1:16)
dim FailedSerial$(0:256)
dim SerialNumber$(0:256)
!=================================================
dim InvOn$[5], InvOff$[4]
dim Testmain_Revision$[70]
dim Batch$[12], Oper$[25], Testplan$[14], Testrev$[4], Status(0:256)
dim Board$(0:256)[14], Board_Rev$(0:256)[14], Known_Good$[1], Serial$(0:256)
dim Proc_Step$[5], Log_Path$[80], BoardSet(0:256), Log_File$(0:256)
dim BoardSet_flash(0:256)
! The following is used in the power-supply setup routine for parallel
! power supplies.  It holds masks for comparison.
dim Psgroup(1:16)
option bit 32     ! Prevents range error when comparing Psgroup with MSB set

!       INITIALIZE BREAK AND ERROR TRAPPING

on break recover Break_Trap
on error recover Error_Trap

!       INITIALIZE VARIABLES

call Initializations

!       SET UP FAILURE ACKNOWLEDGMENT
acknowledge all failures

!       MAIN LOOP FOR REPEATEDLY TESTING A BOARD
!          (executed only once if "learning")

Wait_For_Start:

Dateandtime$ = datetime$
Pass_Fail_Reported = False
Logging_Started = False
Tests_On_This_Panel = 0
print | print Place_Board_Prompt$

Start_Time = msec
A = msec


Read_Serial_Label:

 BoardSet(1)=True
 BoardSet(2)=True

if Serializing then
     Known_Good$ = fn Serialize_Boards_On_Panel$
!    print "------"
     Retesting = fn Setup_Retest_Boards_On_Panel
!     print "------"
end if

!wait for start
!if Serializing then
!  print using "@"
!  Panel_Serial$ = fn Get_Serial_Num$(Serial_Prompt$)
!  Known_Good$ = "n"
!  if Panel_Serial$ = Known_Good_Board$ then Known_Good$ = "y"
!  call Map_Panel_to_Boards   ! Map panel serial number to indiv. boards
!end if
if Using_Multiple_Versions and Version_Prompting = Per_Board then
  call Get_Version_Label
  if nrun = 1 or Version_Inits_Needed then
    call Do_Version_Inits
  end if
end if

wait for start
Start_Time = msec

! Get xout info for the panel.  If learning, all boards on the panel
! will be enabled.

!if not learning then select boards on panel BoardSet(*)
!faon
!wait 1
!faoff
!wait 1
faon
wait 1
faoff
wait 1


!       RE-TEST AFTER PIN-TEST FAILURE

ChekPoint_Retry:

print using "@,/"
if Serializing then print Put$; Panel_Serial$
Tests_On_This_Panel = Tests_On_This_Panel + 1
if Tests_On_This_Panel > 1 then
  print Rep_Test$
  Count = 0
  for I = 1 to Number_Boards_On_Panel
    if BoardSet(I) then
      if Count mod 16 = 0 and Count <> 0 then print
      print using "4d,#"; I
      Count = Count + 1
    end if
  next I
  print
end if

!       START LOGGING FOR THIS PANEL, AND EACH BOARD

report is Report_Printer$
if Logging then call Start_Logging
Logging_Started = True  ! Also used as reporting flag

! Initialize Status array and panel flags

if Tests_On_This_Panel = 1 then
  All_Boards_Xed_Out = True
end if
for I = 1 to Number_Boards_On_Panel
  if BoardSet(I) then
    Status(I) = Passed
    if Tests_On_This_Panel = 1 then
      All_Boards_Xed_Out = False
    end if
  else
    if Tests_On_This_Panel = 1 then Status(I) = Xed_Out
  end if
next I
if All_Boards_Xed_Out then goto Cleanup

!       ACTIVATE VACUUM IN PREPARATION FOR TEST

if Tests_On_This_Panel = 1 then faon 2.0
! Warning: Reducing the value for 'faon' from the default value of 1.5
! can potentially cause testhead damage.

!       CHECK FIXTURE CONTACT, THEN
!       LEARN OR TEST (OR RE-TEST) BOARD

unpowered

! If doing Pin Test pre-test and it fails, mark those boards
! as not to be tested.

All_Failed = False
if (not learning) and Chek_Point_Mode = Pretest then
  if not fn Chek_Point_OK then
    call Update_Status (Failed_Pin_Test, All_Failed)
  end if
end if
if not All_Failed then call Test_Sections

!       IF ANY BOARD FAILED TEST, TRY TO FIX IT BY RUNNING PIN TEST

Cleanup:

Enable_Retest = False
for I = 1 to Number_Boards_On_Panel
  board number is I
   BoardSet(I) = False              ! Don't retest passing boards
!if boardfailed and Status(I)  then
   if boardfailed and Status(I) <> Failed_In_Preshorts then
     if Tests_On_This_Panel = 1 and Chek_Point_Mode = Failures then
       Enable_Retest = True
      BoardSet(I) = True
     end if
  end if
next I
if Enable_Retest then
  unpowered
  if fn Chek_Point_OK then goto ChekPoint_Retry
end if

!       REMOVE BOARD FROM TESTHEAD AND GENERATE PASS/FAIL MESSAGE
!       THEN TERMINATE LOGGING (IF ENABLED) AND REPORTING

faoff
Finish_Time = msec
if All_Boards_Xed_Out then
  print All_Xout$
  for I = 1 to Number_Boards_On_Panel
    board number is I
    fail device
    if Using_Graphics then
      board graphics highlight fail board I, Err
    else
      Err = True
    end if
    if Err then print "Board "; I; " failed"
    report All_Xout$
  next I
end if
if panelfailed then
  print "     **  ";Fail_Msg$;"  **"
  if not Using_Graphics then copy Fail_File$ over "/dev/tty"
else
  print "     **  ";Pass_Msg$;"  **"
  if not Using_Graphics then copy Pass_File$ over "/dev/tty"
end if
Pass_Fail_Reported = True
for I = 1 to Number_Boards_On_Panel
  board number is I
  if Status(I) <> Xed_Out then
    if boardfailed then
      if Using_Graphics then
        board graphics highlight fail board I, Err
      else
        Err = True
      end if
      if Err then print "Board "; I; " failed"
      if Status(I) = Failed_Pin_Test then
        print But$, I, " ** ";Pin_Msg$;" **"
      end if
      if learning then Status(I) = Failed_In_Learn
      if Serializing then report Serial_Nr$ & Serial$(I)
    else
      if Using_Graphics then
        board graphics highlight pass board I, Err
      end if
    end if
  end if
  if Logging and Logging_Started and Status(I) <> Xed_Out then
    ! Do 'log board end' on panel later
    log board end Status(I)
    log out Log_File$(I) & val$(I) & "-" & Dateandtime$ & System$ & th$; append
    log clear
  end if

  ! Log a test record into the panel log buffer showing which board failed
  ! (for PushButton QSTATS).
  if Logging and boardfailed and Status(I) <> Xed_Out then
    board number is Panel_Itself
    log "{@D-T|1||||Board_" & val$(I) & "}"
  end if
next I

! Now finish the log buffer for the panel
if Logging and not All_Boards_Xed_Out then
  board number is Panel_Itself
  if panelfailed then
    log board end Failed
  else
    log board end Passed
  end if
!  log out Log_File$(0) & Dateandtime$ & System$ & th$; append
  log clear
end if

Eject_Ticket: image 13/

!Finish_Time = msec


if panelfailed then
  if Using_Buffered_Reporting then
    for I = 1 to Number_Boards_On_Panel-1
      board number is I
      if boardfailed then report out
    next I
    board number is Number_Boards_On_Panel
    report using Eject_Ticket
    report out
  else
    report using Eject_Ticket
  end if
end if

!Test_Time = int((Finish_Time - Start_Time )/10+.5)/100
!print "Test time for previous pass: ";Test_Time;"seconds"


report is *
for I = Panel_Itself to Number_Boards_On_Panel
  board number is I
  report clear
  clear failures
next I
Logging_Started = False

!       END PROGRAM IF LEARNING. OTHERWISE RETURN TO MAIN LOOP

if learning then
   learn off
   print | print Learning_Off_Msg$ | print Stop_Msg$
   beep
   stop
end if

Test_Time = int((Finish_Time - Start_Time )/10+.5)/100
print "Test time for previous pass: ";Test_Time;"seconds"


goto Wait_For_Start

!       END OF MAIN LOOP
!       INTERRUPT HANDLING
! This is the normal entry for Break/Stop detection

Break_Trap:
off break
off error
print "     ";Break_Msg$
unpowered,Err
if Err then print errmlong$
if Logging and Logging_Started then
  for I = Panel_Itself to Number_Boards_On_Panel
    board number is I
    log board end Break_Code
    log out Log_File$(I) & val$(I) & "-" & Dateandtime$ & System$ & th$; append
    log clear
  next I
end if
faoff, Err
if Err then print errmlong$
goto Abort

⌨️ 快捷键说明

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