📄 testplan
字号:
! This is the normal entry for errors occurring in Basic statements
Error_Trap:
off error
print errmlong$
beep
SaveErrn = errn
unpowered,Err
if Err then print errmlong$
! IF A BOARD IS PRESENT, FAIL IT
! THEN TERMINATE LOGGING (IF ENABLED) AND REPORTING
if Logging_Started and not Pass_Fail_Reported then
print " ** ";Fail_Msg$;" **"
if not Using_Graphics then copy Fail_File$ over "/dev/tty"
for I = 1 to Number_Boards_On_Panel
board number is I
if Status(I) <> Xed_Out then
fail device
report Board_Not_Tested$
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)
end if
next I
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
report is *, Err
for I = 1 to Number_Boards_On_Panel
board number is I
report clear
next I
end if
if Logging_Started and Logging then
for I = Panel_Itself to Number_Boards_On_Panel
board number is I
log using """{@RPT~80|"",80a,""}""" ; errm$(SaveErrn)
log board end Error_Code, SaveErrn
log out Log_File$(I) & val$(I) & "-" & Dateandtime$ & System$ & th$; append
log clear
next I
end if
! REMOVE THE BOARD FROM THE TESTHEAD
faoff, Err
if Err then print errmlong$
if learning or Err then goto Abort
on error recover Error_Trap
goto Wait_For_Start
! ABORT PROGRAM: UNRECOVERABLE ERROR, LEARN ERROR OR STOP KEY
Abort:
off break
off error
report is *, Err
log is *, Err
beep
if (nrun=1) and not Did_First_Run_Inits then
print No_Init_Warning$
clear nrun
else
if Version_Inits_Needed then
print No_Version_Init_Warning$
clear nrun
end if
end if
print " ";Stop_Msg$
beep
stop
end
! END OF ERROR TRAPS
! Test/Learn Sections (Subroutine)
! [ Assumes unpowered mode. ]
! Note concerning LEARN MODE: some sections are not truly "learned" but are
! run in learn mode for other reasons. For example, analog tests may be run
! in learn mode in order to log limits information used by Pushbutton QSTATS,
! and preshorts/shorts are run "just in case" -- to avoid bad learns & damage.
! To keep a section from being run in learn mode, place 'if not learning then'
! just before that section and place 'end if' just after it.
!##############################################################################
sub Test_Sections
global PreshortsMsg$, ShortsMsg$, PowerMsg$, DigitalMsg$, AnalogMsg$,Failed_In_FET_Test
global DigitalFuncMsg$, AnalogPoweredMsg$, BScanIncktMsg$, BScanIntconMsg$,FET_TestMsg$
global Status(*), Failed_In_Preshorts, Failed_In_Shorts, Failed_In_Functional
global Failed_In_Digital, Failed_In_Power_Supplies, Failed_In_Analog
global Logging, Number_Boards_On_Panel, True, False, BoardSet(*)
global Mode$, Failed_In_BScan, Xed_Out
global TestJetMsg$, Failed_In_TestJet
global PolarityMsg$, Failed_In_Polarity_Check
global BScanPShortsMsg$
global ConnectCheckMsg$, Failed_In_ConnectCheck
global Failed_In_Flash, FlashProgMsg$, Programming
global AnalogClusterMsg$, Failed_In_Analog_Cluster
global BScanSiNailsMsg$, Failed_In_BScan_SiNails
global SW_ScanPathVerifyMsg$, Failed_In_SW_Testing
global SW_DrVerifyMsg$, SW_IrVerifyMsg$
global SW_InterconnectMsg$, SW_MemInterconnectMsg$
global SW_ClusterMsg$, SW_MemBistMsg$
global SW_ProgrammingMsg$, Failed_In_SW_Programming
global SW_FlashMsg$, Failed_In_SW_Flash
global All_Failed
log level is all
A = msec
C = msec
call Pre_Shorts (Failed_In_Preshorts, Mode$ & PreshortsMsg$)
B = (msec-A)/1000
print B
A = msec
if All_Failed then subexit
!if boardfailed then subexit
call Shorts (Failed_In_Shorts, Mode$ & ShortsMsg$)
B = (msec-A)/1000
print B
A = msec
if All_Failed then subexit
!if boardfailed then subexit
if Logging or not learning then
call Analog_Tests (Failed_In_Analog, Mode$ & AnalogMsg$)
B = (msec-A)/1000
print B
A = msec
if All_Failed then subexit
end if
!call TestJet (Failed_In_TestJet, Mode$ & TestJetMsg$)
B = (msec-A)/1000
print B
A = msec
if All_Failed then subexit
!if boardfailed then subexit
call Polarity_Check (Failed_In_Polarity_Check, Mode$ & PolarityMsg$)
if All_Failed then subexit
call Connect_Check (Failed_In_ConnectCheck, Mode$ & ConnectCheckMsg$)
if All_Failed then subexit
call Analog_Cluster_Tests (Failed_In_Analog_Cluster, Mode$ & AnalogClusterMsg$)
if All_Failed then subexit
Power_On:
powered
call FET_Test (Failed_In_FET_Test, Mode$ & FET_TestMsg$)
!if boardfailed then subexit
B = (msec-A)/1000
print B
A = msec
if All_Failed then subexit
!if boardfailed then subexit
call Setup_Power_Supplies (Failed_In_Power_Supplies, PowerMsg$)
B = (msec-A)/1000
print B
A = msec
if All_Failed then subexit
call ScanWorks_Scan_Path_Verify_Tests (Failed_In_SW_Testing, Mode$ & SW_ScanPathVerifyMsg$)
if All_Failed then subexit
call ScanWorks_Pretest
if All_Failed then subexit
if All_Failed then subexit
call Analog_Functional_Tests (Failed_In_Functional, Mode$ & AnalogPoweredMsg$)
B = (msec-A)/1000
print B
A = msec
if All_Failed then subexit
call BScan_Powered_Shorts_Tests (Failed_In_Shorts, Mode$ & BScanPShortsMsg$)
B = (msec-A)/1000
print B
A = msec
if All_Failed then subexit
!call BScan_Interconnect_Tests (Failed_In_BScan, Mode$ & BScanIntconMsg$)
B = (msec-A)/1000
print B
A = msec
if All_Failed then subexit
call ScanWorks_Interconnect_Tests (Failed_In_SW_Testing, Mode$ & SW_InterconnectMsg$)
if All_Failed then subexit
call BScan_Incircuit_Tests (Failed_In_BScan, Mode$ & BScanIncktMsg$)
B = (msec-A)/1000
print B
A = msec
if All_Failed then subexit
!call BScan_Silicon_Nails_Tests (Failed_In_BScan_SiNails, Mode$ & BScanSiNailsMsg$)
B = (msec-A)/1000
print B
A = msec
if All_Failed then subexit
! If you are using Boundary-Scan and you want to cycle power,
! then uncomment the following call.
! call Reset_Board
call Digital_Tests (Failed_In_Digital, Mode$ & DigitalMsg$)
B = (msec-A)/1000
print B
A = msec
if All_Failed then subexit
call ScanWorks_Mem_Interconnect_Tests (Failed_In_SW_Testing, Mode$ & SW_MemInterconnectMsg$)
if All_Failed then subexit
call ScanWorks_Cluster_Tests (Failed_In_SW_Testing, Mode$ & SW_ClusterMsg$)
if All_Failed then subexit
call ScanWorks_Mem_BIST (Failed_In_SW_Testing, Mode$ & SW_MemBistMsg$)
if All_Failed then subexit
! If you are using Boundary-Scan and you want to cycle power,
! then uncomment the following call.
! call Reset_Board
call Functional_Tests (Failed_In_Functional, Mode$ & DigitalFuncMsg$)
B = (msec-A)/1000
print B
A = msec
!if All_Failed then subexit
!call Analog_Functional_Tests (Failed_In_Functional, Mode$ & AnalogPoweredMsg$)
!B = (msec-A)/1000
!! print B
! A = msec
!
!if All_Failed then subexit
if Programming then
if learning then subexit
!----------------------------------------------------------------------------
! Only add the following powersupply setup if it is necessary to cycle power.
! Perhaps to get FPGAs or other ASICs to a three-state condition.
!
! !flash! unpowered ! Only if volatile logic exists upstream
!
! !flash! put any required gprelays here
!
! !flash! powered ! if unpowered above, also use the following only if
! ! digital devices aren't interferring
! ! call Setup_Power_Supplies (Failed_In_Power_Supplies, PowerMsg$)
! ! if All_Failed then subexit
!----------------------------------------------------------------------------
! Add the device name to be tested in the call to the Program_Flash
! subroutine. If multiple devices are installed, duplicate the call line for
! each device. Pass an empty string as the Message$ parameter to supress
! printing messages for devices 2 through N.
!----------------------------------------------------------------------------
! call Program_Flash ("", Failed_In_Flash, FlashProgMsg$)
if All_Failed then subexit
call ScanWorks_Device_Programming (Failed_In_SW_Programming, SW_ProgrammingMsg$)
if All_Failed then subexit
call ScanWorks_Flash_Programming (Failed_In_SW_Flash, SW_FlashMsg$)
if All_Failed then subexit
end if
subend
!##############################################################################
sub Update_Status (Failure_Type, All_Failed)
global True, False, Number_Boards_On_Panel, BoardSet(*), Status(*)
global Failed_Board$, Xed_Out, Failed_In_BScan, Failed_In_Shorts
global Failed_In_SW_Testing
All_Failed = True
Fail_Count = 0
for I = 1 to Number_Boards_On_Panel
if BoardSet(I) then
board number is I
if boardfailed then
call Disconnect_Power_On_Board (I)
Status(I) = Failure_Type
BoardSet(I) = False
if Fail_Count = 0 then
print tab(8); Failed_Board$
else
if Fail_Count mod 16 = 0 then print
end if
if Fail_Count mod 16 = 0 then print using "6a,#"; " "
print using "4d,#"; I
Fail_Count = Fail_Count + 1
else
if Status(I) <> Xed_Out then All_Failed = False
end if
end if
next I
if Fail_Count <> 0 then print
subend
! Pin Test Subroutines
!##############################################################################
def fn Chek_Point_OK
! This is the subroutine for forcing the testing of pin contacts.
! If this routine is called before Test_sections (Chek_Point_Mode = Pretest),
! then the internal status will be set to Passed or Failed_Pin_Test for each
! board that is not being skipped. If this routine is called after test
! (Chek_Point_Mode = Failures), then the internal status is modified only
! if failures occur on each board that is not being skipped so as not to change
! the results of the component tests.
!
! The meaning of the function is slightly different when it is called before
! test versus after test. If called before test, the function returns True
! if, no matter how many times it was cycled, pin test did finally pass.
! If called after test, the function returns True if pin test failed but
! passed after retry.
!
! Note: fn Pinsfailed is external to testmain.
!
global Pin_Msg2$, Number_Boards_On_Panel, BoardSet(*), Panel_Itself, Passed
global Retry_PinTest$, Recycle_Vacuum$, Status(*), True, False
global Cycle_Vacuum$, Failed_Pin_Test, Max_Times_To_Fix_Contact
global Logging, Panel_Serial$, Serial$(*), Known_Good$
global Chek_Point_Mode, Pretest, Failures, Chek_Point_Msg$
if learning then return (False)
Attempts = 0
loop
Contact_Passed = not fn Pinsfailed (Chek_Point_Msg$)
Fail_Count = 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -