Skip to content

Commit

Permalink
AFM: Do not call analysis function MID_SWEEP if fifopos is zero
Browse files Browse the repository at this point in the history
- there is no data to analyse yet
  • Loading branch information
MichaelHuth authored and t-b committed Feb 7, 2024
1 parent 4dc3c88 commit 02e4541
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Packages/MIES/MIES_AnalysisFunctionManagement.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ Function AFM_CallAnalysisFunctions(device, eventType)
WAVE/Z dataWave = $""
break
case MID_SWEEP_EVENT:
if(fifoPositionAD == 0)
// no data yet to analyse
return 0
endif
sweepNo = DAG_GetNumericalValue(device, "SetVar_Sweep")
WAVE/Z/WAVE scaledDataWave = GetScaledDataWave(device)
if(!WaveExists(scaledDataWave))
Expand Down

0 comments on commit 02e4541

Please sign in to comment.