Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Packages/MIES/MIES_TestPulse.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ static Function/WAVE TP_CreateOverrideResults(string device, variable type)

switch(type)
case TP_OVERRIDE_RESULTS_AUTO_TP:
numRows = MINIMUM_WAVE_SIZE
numRows = MINIMUM_WAVE_SIZE_LARGE
numCols = NUM_HEADSTAGES
numLayers = 3
labels = "Factor;Voltage;BaselineFitResult"
Expand Down
17 changes: 12 additions & 5 deletions Packages/tests/HardwareBasic/UTF_AutoTestpulse.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -299,31 +299,38 @@ End

static Function AutoTP_ClampModeChange_preAcq(string device)

WAVE overrideResults = MIES_TP#TP_CreateOverrideResults(device, TP_OVERRIDE_RESULTS_AUTO_TP)

// 2 HS in IC mode intially
overrideResults[][0, 1][%Factor] = TP_BASELINE_RATIO_OPT
overrideResults[][0, 1][%Voltage] = 1 // V
overrideResults[][0, 1][%BaselineFitResult] = TP_BASELINE_FIT_RESULT_OK

PGC_SetAndActivateControl(device, "check_DataAcq_AutoTP", val = 1)
End

// UTF_TD_GENERATOR DataGenerators#DeviceNameGeneratorMD1
// IUTF_RETRY_FAILED
static Function AutoTP_ClampModeChange([string str])

[STRUCT DAQSettings s] = AutoTP_GetDAQSettings(str)
AcquireData_NG(s, str)

CtrlNamedBackGround ChangeClampModeToVC, start=(ticks + 60), period=60, proc=ClampModeDuringTP_IGNORE
CtrlNamedBackGround StopTPAfterSomeTime, start=(ticks + 600), period=60, proc=StopTP_IGNORE
CtrlNamedBackGround StopTPAfterSomeTime, start=(ticks + 120), period=60, proc=StopTP_IGNORE
End

static Function AutoTP_ClampModeChange_REENTRY([string str])

WAVE/WAVE entries = GetLBNSingleEntry_IGNORE(str)

CHECK_EQUAL_WAVES(entries[%autoTPQC], {0, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN}, mode = WAVE_DATA)
CHECK_EQUAL_WAVES(entries[%autoTPQC], {NaN, 0, NaN, NaN, NaN, NaN, NaN, NaN, NaN}, mode = WAVE_DATA)

// AutoTP was enabled for both headstages before stopping the TP
CHECK_EQUAL_WAVES(entries[%autoTPEnable], {0, 0, NaN, NaN, NaN, NaN, NaN, NaN, NaN}, mode = WAVE_DATA)
// but now only HS1 is still in IC and trying
CHECK_EQUAL_WAVES(entries[%autoTPEnable], {1, 0, NaN, NaN, NaN, NaN, NaN, NaN, NaN}, mode = WAVE_DATA)

WAVE TPSettings = GetTPSettings(str)
WAVE autoTPEnable = LBN_GetNumericWave()
autoTPEnable[] = TPSettings[%autoTPEnable][p]
CHECK_EQUAL_WAVES(autoTPEnable, {0, 0, 1, 1, 1, 1, 1, 1, NaN}, mode = WAVE_DATA)
CHECK_EQUAL_WAVES(autoTPEnable, {1, 0, 1, 1, 1, 1, 1, 1, NaN}, mode = WAVE_DATA)
End