Skip to content

Commit 2dfcc5c

Browse files
committed
DC: Dont add TP on Acquisition if TP on unassoc checkbox is unchecked
1 parent f71ad3d commit 2dfcc5c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Packages/MIES/MIES_DataConfigurator.ipf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,7 +1190,7 @@ End
11901190

11911191
static Function DC_FillDAQDataWaveForDAQ(string device, STRUCT DataConfigurationResult &s)
11921192
variable i, tpAmp, cutOff, channel, headstage, DAScale, singleSetLength, stimsetCol, startOffset
1193-
variable lastValidRow
1193+
variable lastValidRow, isUnAssociated
11941194

11951195
WAVE config = GetDAQConfigWave(device)
11961196

@@ -1236,6 +1236,7 @@ static Function DC_FillDAQDataWaveForDAQ(string device, STRUCT DataConfiguration
12361236
singleSetLength = s.setLength[i]
12371237
stimsetCol = s.setColumn[i]
12381238
startOffset = s.insertStart[i]
1239+
isUnAssociated = IsNaN(headstage)
12391240

12401241
switch(s.hardwareType)
12411242
case HARDWARE_ITC_DAC:
@@ -1245,7 +1246,7 @@ static Function DC_FillDAQDataWaveForDAQ(string device, STRUCT DataConfiguration
12451246
SIGNED_INT_16BIT_MIN, \
12461247
SIGNED_INT_16BIT_MAX); AbortOnRTE
12471248

1248-
if(s.globalTPInsert)
1249+
if(s.globalTPInsert && !(isUnAssociated && !s.doTPonUnassocDA))
12491250
// space in ITCDataWave for the testpulse is allocated via an automatic increase
12501251
// of the onset delay
12511252
MultiThread ITCDataWave[0, s.testPulseLength - 1][i] = \
@@ -1269,7 +1270,7 @@ static Function DC_FillDAQDataWaveForDAQ(string device, STRUCT DataConfiguration
12691270
NI_DAC_MIN, \
12701271
NI_DAC_MAX); AbortOnRTE
12711272

1272-
if(s.globalTPInsert)
1273+
if(s.globalTPInsert && !(isUnAssociated && !s.doTPonUnassocDA))
12731274
// space in ITCDataWave for the testpulse is allocated via an automatic increase
12741275
// of the onset delay
12751276
MultiThread NIChannel[0, s.testPulseLength - 1] = \

0 commit comments

Comments
 (0)