proc PASSQST_GEN
;s0 is for the cycle number
;s7 is for the QST file update
;s4 is for the serial number
;s3 is for part number and revision
;s6 is for Plexus ID
;s1 for QST fileName
string OutPutString
string TimeStampingQST = " "
integer iDay, iMonth, iYear, iHour, iMinute, iSecond
string FailID = " "
strset OutPutString 0 0 255
s1 = " "
ltimeints $LTIME iYear iMonth iDay iHour iMinute iSecond
strfmt TimeStampingQST "%d%02d%02d%02d%02d%02d" iYear iMonth iDay iHour iMinute iSecond
strfmt FailID "%02d" i2
strcat s1 "C:\QST\"
strcat s1 "FT00001_"
strcat s1 TimeStampingQST
strcat s1 ".qst"
;usermsg TimeStampingQST ; message.
;usermsg s1 ; message.
switch i7
case 0 ;Pass Case
strcat OutPutString "EV|"
strcat OutPutString "|"
strcat OutPutString s4
strcat OutPutString "|"
strcat OutPutString TimeStampingQST
strcat OutPutString "|||"
strcat OutPutString s0
strcat OutPutString "|TEST|FT00001|"
strcat OutPutString s6
strcat OutPutString "|||F1|N|PASS|NA|"
strcat OutPutString s3
strcat OutPutString "|ProCommTestScript|Prelim 1.0|FT00001|||||277|"
strcat OutPutString "|||00000|680|1||BOI_6802||"
s7 = OutPutString
call QSTFILE_GEN
endcase
endswitch
endproc
proc FAILQST_GEN
;s7 is for the QST file update
;s4 is for the serial number
;s3 is for part number and revision
;s6 is for Plexus ID
;s1 for QST fileName
string OutPutString
string TimeStampingQST = " "
integer iDay, iMonth, iYear, iHour, iMinute, iSecond
string FailID = " "
strset OutPutString 0 0 255
s1 = " "
ltimeints $LTIME iYear iMonth iDay iHour iMinute iSecond
strfmt TimeStampingQST "%d%02d%02d%02d%02d%02d" iYear iMonth iDay iHour iMinute iSecond
strfmt FailID "%02d" i2
strcat s1 "C:\QST\"
strcat s1 "FT00001_"
strcat s1 TimeStampingQST
strcat s1 ".qst"
usermsg TimeStampingQST ; message.
usermsg s1 ; message.
;case 1 ;Fail Case
strcat OutPutString "EV|"
strcat OutPutString s3
strcat OutPutString "|"
strcat OutPutString s4
strcat OutPutString "|"
strcat OutPutString TimeStampingQST
strcat OutPutString "|||"
strcat OutPutString "|"
strcat OutPutString "TEST|FT00001|"
strcat OutPutString s6
strcat OutPutString "|||F1|N|FAIL|"
strcat OutPutString "FAILED"
strcat OutPutString "|"
strcat OutPutString "F1"
strcat OutPutString "|ProCommTestScript|1.0|FBT|||||277|"
strcat OutPutString S5
strcat OutPutString "|||00000|680|1||BOI_6802||"
s7 = OutPutString
usermsg s7 ; message.
call QSTFILE_GEN
endproc
proc QSTFILE_GEN
string Fname = "C:\QST\Fwrite.txt" ; Name of file to be created.
if fopen 0 Fname CREATE ; Create and open file.
fputs 0 s7 ; Write QST File.
fclose 0 ; Close the file.
if SUCCESS ; If the sendfile is successful, say so
call RENAME_FILE
endif
endif
endproc
proc RENAME_FILE
string Fname = "C:\QST\Fwrite.txt" ; Name of file to rename.
string NewFName = s1 ; New name for the file.
if not rename Fname NewFName ; Rename the file.
errormsg "Couldn't rename `"%s`" to `"%s`"." Fname NewFName
endif
endproc