Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
t-b committed Jul 15, 2024
1 parent bda07a8 commit 4db0a55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions Packages/MIES/MIES_AnalysisFunctions.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@ Function ReachTargetVoltage(string device, STRUCT AnalysisFunction_V3 &s)
retCheckDAScale = SetDAScale(device, i, s.sweepNo, absolute = amps)

if(retCheckDAScale)
ComplainOutOfRangeDAScale(device, s.sweepNo, s.headstage, INVALID_ANALYSIS_FUNCTION)
ComplainOutOfRangeDAScale(device, s.sweepNo, INVALID_ANALYSIS_FUNCTION)
break
endif
endfor
Expand Down Expand Up @@ -1293,7 +1293,7 @@ Function ReachTargetVoltage(string device, STRUCT AnalysisFunction_V3 &s)
endswitch
End

Function ComplainOutOfRangeDAScale(string device, variable sweepNo, variable headstage, variable anaFuncType)
Function ComplainOutOfRangeDAScale(string device, variable sweepNo, variable anaFuncType)

variable i
string key
Expand All @@ -1304,10 +1304,12 @@ Function ComplainOutOfRangeDAScale(string device, variable sweepNo, variable hea
printf "Please adjust the \"External Command Sensitivity\" in the MultiClamp Commander application and try again.\r"
ControlWindowToFront()

WAVE statusHS = DAG_GetChannelState(device, CHANNEL_TYPE_HEADSTAGE)

switch(anaFuncType)
case PSQ_CHIRP:
WAVE result = LBN_GetNumericWave()
result[headstage] = 1
result[0, NUM_HEADSTAGES - 1] = (statusHS[p] == 1)
key = CreateAnaFuncLBNKey(PSQ_CHIRP, PSQ_FMT_LBN_DASCALE_OOR)
ED_AddEntryToLabnotebook(device, key, result, overrideSweepNo = sweepNo, unit = LABNOTEBOOK_BINARY_UNIT)
break
Expand All @@ -1318,7 +1320,6 @@ Function ComplainOutOfRangeDAScale(string device, variable sweepNo, variable hea
ASSERT(0, "Unknown analysis function")
endswitch

WAVE statusHS = DAG_GetChannelState(device, CHANNEL_TYPE_HEADSTAGE)
for(i = 0; i < NUM_HEADSTAGES; i += 1)

if(!statusHS[i])
Expand Down
4 changes: 2 additions & 2 deletions Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -5994,7 +5994,7 @@ Function PSQ_Chirp(device, s)
retCheckDAScale = SetDAScaleModOp(device, s.headstage, s.sweepNo, daScaleModifier, daScaleOperator, roundTopA = 1)

if(retCheckDAScale)
ComplainOutOfRangeDAScale(device, s.sweepNo, s.headstage, PSQ_CHIRP)
ComplainOutOfRangeDAScale(device, s.sweepNo, PSQ_CHIRP)
endif

return ANALYSIS_FUNC_RET_EARLY_STOP
Expand Down Expand Up @@ -6022,7 +6022,7 @@ Function PSQ_Chirp(device, s)
retCheckDAScale = SetDAScale(device, s.headstage, s.sweepNo, relative = scalingFactorDAScale, roundTopA = 1)

if(retCheckDAScale)
ComplainOutOfRangeDAScale(device, s.sweepNo, s.headstage, PSQ_CHIRP)
ComplainOutOfRangeDAScale(device, s.sweepNo, PSQ_CHIRP)
return ANALYSIS_FUNC_RET_EARLY_STOP
endif
break
Expand Down

0 comments on commit 4db0a55

Please sign in to comment.