#include <GuiTab.au3>
#include "BinaryIntegerConvert.au3"
#include "EpochConvert.au3"
-$programversion = "0.99"
+$programversion = "0.99.1"
$excelLineBegin = "1100" ; Change this to the range of cells you want to be processed
$excelLineEnd = "4000"
Global $completelog = ""
-$CellRange = "A" & $excelLineBegin & ":P" & $excelLineEnd
+$CellRange = "A" & $excelLineBegin & ":Q" & $excelLineEnd
$cellSystem = 0
$cellDate = 1
$cellChipV = 3
-$calcmin = _DateDiff('s', $starttimetotal, _NowCalc()) ; n for minites, s for seconds
-$calcmin = Round($calcmin / 60, 2) ; Minutes
-$calchours= Round($calcmin / 3600, 2) ; Hoours
-$calcdays= Round($calcmin / 86400, 2) ; Days
+$calcsec = _DateDiff('s', $starttimetotal, _NowCalc()) ; n for minites, s for seconds
+$calcmin = Round($calcsec / 60, 2) ; Minutes
+$calchours= Round($calcsec / 3600, 2) ; Hoours
+$calcdays= Round($calcsec / 86400, 2) ; Days
RefreshGUISendNtfct("All runs (" & $totalrealruns & ") ended in " & $calcmin & " minutes (" & $calchours &" hours).")
;Run(@AutoItExe & ' /AutoIt3ExecuteScript "' & @ScriptDir & '\Functions\RefreshGUISendNtfct.au3" "' & $system & '" "All runs (' & $totalrealruns & ') ended in ' & $calcmin & ' minutes (' & $calchours &' hours)."')
Run(@AutoItExe & ' /AutoIt3ExecuteLine "MsgBox(0, ''Sucess!'', ''All runs (' & $totalrealruns & ') ended in ' & $calcmin & ' minutes (' & $calchours &' hours, ' & $calcdays & ' days).' & @CRLF & 'Please check the Excel sheet and the results for errors.'')"')
-
-$temperaturebefore = $currentline[$cellTemp][0]
$waitfortemp = $currentline[$cellTempWait][0]
If $waitfortemp == "" Then
- $waitfortemp = "0"
+ $waitfortemp = 0
$currentline[$cellTempWait][0] = "0"
EndIf
$clock = $currentline[$cellClock][0] ; save needed clock
If $eventnum == "" Then
$eventnum = 100000
$currentline[$cellEventsN][0] = "100000"
-EndIf
\ No newline at end of file
+EndIf
$currentline[$cellDate][0] = @MDAY & "." & @MON & "." & @YEAR
+If $currenttempchip == 100000 Then $currenttempchip = "?"
$currentline[$cellTChip][0] = $currenttempchip
$currentline[$cellVRef][0] = $vref
$calcsec = _DateDiff('s', $starttime, _NowCalc()) ; n for minites, s for seconds
Else
$tempcorrent = False
EndIf
-$tempwaiti = 0
+$tempwaiti = 0 ; set the 5 minutes wait counter to zero if it reaches 6 -> 30 minutes passed
While Not $tempcorrent
$currenttemp = GetTemperatureForSure($system)
If $currenttemp == 100000 Then
If ($currentline[$cellTemp][0] < $currenttemp + 0.5 And $currentline[$cellTemp][0] > $currenttemp - 0.5) Then
$tempcorrent = True
Else
- If $tempwaiti > 5 Then
+ If $tempwaiti > 5 Then ; after 30 minutes give up waiting
$currenttempchip = GetTemperatureForSure("Chip" & $system)
RefreshGUISendNtfct("Cooling could not reach needed temperature of " & $currentline[$cellTemp][0] & " °C within 30 minutes. Current cooling temperature is " & $currenttemp & ", chip temperature is " & $currenttempchip & ". Will proceed anyway.")
$tempcorrent = True
Run(@AutoItExe & ' /AutoIt3ExecuteScript "' & @ScriptDir & '\Functions\RefreshGUI.au3" "' & $completelog & '"')
$tempseti = 0
Do
- If $tempseti > 10 Then
+ If $tempseti > 10 Then ; after 10 failed attempts
$currenttempchip = GetTemperatureForSure("Chip" & $system)
RefreshGUISendNtfct("Could not set temperature to " & $currentline[$cellTemp][0] & ". Current cooling temperature is " & $currenttemp & " °C, chip temperature is " & $currenttempchip & ". Will proceed anyway.")
$tempcorrent = True
EndIf
$settemp = RunWait(@AutoItExe & ' /AutoIt3ExecuteScript "' & @ScriptDir & '\Functions\TemperatureControl.au3" "' & $system & '" "' & $currentline[$cellTemp][0] & '"', @ScriptDir)
$tempseti = $tempseti + 1
- Until $settemp == 0
+ Until $settemp == 0 ; until temperature could be set succesfully
$tempwaiti= $tempwaiti + 1
- Sleep(1000 * 60 * 5)
+ Sleep(1000 * 60 * 5) ; wait 5 minutes between checks and sets of temperature
EndIf
WEnd
Sleep($waitfortemp * 60 * 1000) ; wait for user specified minutes
$currenttempchip = GetTemperatureForSure("Chip" & $system) ; get chip temperature before measurement start
+$temperaturebefore = $currentline[$cellTemp][0] ; if next run has the same needed temperature as this run, dont check for cooling water temperature, see the first lines of this file for details
$totalrealruns = 0
$starttimetotal = _NowCalc()
For $run = 0 To $totallexcelines - 1
- $currentrange = "A" & $excelLineBegin + $run & ":P" & $excelLineBegin + $run
+ $currentrange = "A" & $excelLineBegin + $run & ":Q" & $excelLineBegin + $run
$oExcelDoc = ObjGet($FileName) ; if doc was closed and object destroyed -> reopen it. A possibility to check if object exists would come handy here....
$oDocument = $oExcelDoc.Worksheets(1) ; We use the 'Default' worksheet
$currentline = $oDocument.range($currentrange).value
If ($currentline[$cellChipN][0] == $chipinstalled And "Mi" & $currentline[$cellChipV][0] == $chipversion And $currentline[$cellRadSrc][0] == $radSource And $currentline[$cellRad][0] == $radiated And $currentline[$cellDate][0] == "" And $currentline[$cellSystem][0] == "PXI" And ($currentline[$cellClock][0] == "100" Or $currentline[$cellClock][0] == "")) Then
- #include "Functions\WaitForTemperature.au3"
#include "Functions\ReadAndSaveExcelParameters.au3"
+ #include "Functions\WaitForTemperature.au3"
SetMiParameter($matrix, $vref)
ProgramMi()
Sleep(200)
$totalrealruns = 0
$starttimetotal = _NowCalc()
For $run = 0 To $totallexcelines - 1
- $currentrange = "A" & $excelLineBegin + $run & ":P" & $excelLineBegin + $run
+ $currentrange = "A" & $excelLineBegin + $run & ":Q" & $excelLineBegin + $run
$oExcelDoc = ObjGet($FileName) ; if doc was closed and object destroyed -> reopen it. A possibility to check if object exists would come handy here....
$oDocument = $oExcelDoc.Worksheets(1) ; We use the 'Default' worksheet
$currentline = $oDocument.range($currentrange).value
If ($currentline[$cellChipN][0] == $chipinstalled And "Mi" & $currentline[$cellChipV][0] == $chipversion And $currentline[$cellRadSrc][0] == $radSource And $currentline[$cellRad][0] == $radiated And $currentline[$cellDate][0] == "" And $currentline[$cellSystem][0] == "USB") Then
- #include "Functions\WaitForTemperature.au3"
#include "Functions\ReadAndSaveExcelParameters.au3"
+ #include "Functions\WaitForTemperature.au3"
CheckWindowExist()
SelectBoard()
CheckIfBoardOK()
[experimental setup]
-ChipVersion = Mi34
-ChipInstalled = 4
+ChipVersion = Mi32Ter
+ChipInstalled = 5d
ExcelPath = H:\dennis doering\Arbeitsprogramme\Mimosa34\LaborbuchMi34 - Neu.xls
RadSource = none
Radiated = 0