@@ -196,92 +196,18 @@ Function IVS_runBaselineCheckQC()
196
196
PGC_SetAndActivateControl ( device, "DataAcquireButton" )
197
197
End
198
198
199
- /// @brief Run the initial access resistance check from the WSE
200
- ///
201
- /// This will check must be < 20MΩ or 15% of the R input.
202
- /// The EXTPBREAKN wave will also be run as a way of making sure the reading
203
- /// is recorded into the data set for post-experiment analysis
199
+ /// @brief Run the initial access resistance smoke from the WSE
204
200
Function IVS_runInitAccessResisQC ()
205
-
206
- string device
201
+ string device, ctrl
207
202
variable headstage
208
- variable baselineValue, instResistanceVal, ssResistanceVal
209
- variable qcResult, adChannel, tpBufferSetting
210
- string ctrl
211
203
212
204
device = IVS_DEFAULT_DEVICE
213
205
headstage = IVS_DEFAULT_HEADSTAGE
214
206
215
207
ctrl = GetPanelControl ( headstage, CHANNEL_TYPE_DAC, CHANNEL_CONTROL_WAVE)
216
208
PGC_SetAndActivateControl ( device, ctrl, str = "EXTPBREAKN*" )
217
209
218
- // save the current test pulse buffer setting
219
- tpBufferSetting = GetSetVariable ( device, "setvar_Settings_TPBuffer" )
220
-
221
- // set the test pulse buffer up to a higher value to account for noise...using 5 for now
222
- PGC_SetAndActivateControl ( device, "setvar_Settings_TPBuffer" , val = 5 )
223
-
224
- // Check to see if Test Pulse is already running...if not running, turn it on...
225
- if ( ! TP_CheckIfTestpulseIsRunning ( device))
226
- PGC_SetAndActivateControl ( device, "StartTestPulseButton" )
227
- endif
228
-
229
- // Set up the QC Wave so the background task can get the information it needs
230
- Wave tempWave = GetIVSCCTemporaryWave ( device)
231
- tempWave[ % tpBuffer] = tpBufferSetting
232
-
233
- CtrlNamedBackground IVS_finishInitAccessQCCheck, period=2, proc= IVS_finishInitAccessQCCheck
234
- CtrlNamedBackground IVS_finishInitAccessQCCheck, start
235
- End
236
-
237
- /// @brief Complete the Baseline QC check in the background
238
- ///
239
- /// @ingroup BackgroundFunctions
240
- Function IVS_finishInitAccessQCCheck ( s)
241
- STRUCT WMBackgroundStruct & s
242
-
243
- string device
244
- variable headstage, cycles
245
- variable instResistanceVal, ssResistanceVal, tpBufferSetting
246
- variable qcResult
247
-
248
- device = IVS_DEFAULT_DEVICE
249
- headstage = IVS_DEFAULT_HEADSTAGE
250
-
251
- Wave tempWave = GetIVSCCTemporaryWave ( device)
252
- tpBufferSetting = tempWave[ % tpBuffer]
253
-
254
- cycles = 5 //define how many cycles the test pulse must run
255
- if ( TP_TestPulseHasCycled ( device, cycles))
256
- print "Enough Cycles passed..."
257
- else
258
- PUB_IVS_QCState ( qcResult, "Too few TP cycles" )
259
- return 0
260
- endif
261
-
262
- WAVE TPResults = GetTPResults ( device)
263
-
264
- instResistanceVal = TPResults[ % ResistanceInst][ headstage]
265
- ssResistanceVal = TPResults[ % ResistanceSteadyState][ headstage]
266
-
267
- printf "Initial Access Resistance: %g\r " , instResistanceVal
268
- printf "SS Resistance: %g\r " , ssResistanceVal
269
-
270
- // See if we pass the baseline QC
271
- if (( instResistanceVal < 20.0 ) && ( instResistanceVal < ( 0.15 * ssResistanceVal)))
272
- qcResult = instResistanceVal
273
- PUB_IVS_QCState ( qcResult, "Resistance check" )
274
- endif
275
-
276
- // and now run the EXTPBREAKN wave so that things are saved into the data record
277
210
PGC_SetAndActivateControl ( device, "DataAcquireButton" )
278
-
279
- PUB_IVS_QCState ( qcResult, "Result before finishing" )
280
-
281
- // set the test pulse buffer back to 1
282
- PGC_SetAndActivateControl ( device, "setvar_Settings_TPBuffer" , val = tpBufferSetting)
283
-
284
- return 1
285
211
End
286
212
287
213
/// @brief Run PSQ_SealEvaluation()
0 commit comments