Skip to content

Commit bdf8b52

Browse files
authored
Merge pull request #1400 from AllenInstitute/bugfix/1400-dont-allow-gain-zero
Output message for MCC bug with instructions
2 parents 48df3d4 + 4bdf497 commit bdf8b52

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Packages/MIES/MIES_DAEphys.ipf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2716,7 +2716,13 @@ static Function DAP_CheckHeadStage(device, headStage, mode)
27162716
needResetting = 1
27172717
endif
27182718

2719-
if((!CheckIfClose(DAGain, DAGainMCC, tol=1e-4) && clampMode != I_EQUAL_ZERO_MODE) || (clampMode == I_EQUAL_ZERO_MODE && !CheckIfSmall(DAGainMCC)))
2719+
if(clampMode == I_EQUAL_ZERO_MODE && !CheckIfSmall(DAGainMCC))
2720+
printf "(%s) The DA gain for the DA channel %d in I=0 clamp mode is expected to be zero but the configured gain is %g.\r", device, DACchannel, DAGainMCC
2721+
return 2
2722+
elseif(clampMode != I_EQUAL_ZERO_MODE && CheckIfSmall(DAGainMCC))
2723+
printf "(%s) The DA gain for the DA channel %d is zero, this is an MCC bug. Please reset the MultiClamp Commander to default settings and restart MIES.\r", device, DACchannel
2724+
return 2
2725+
elseif(clampMode != I_EQUAL_ZERO_MODE && !CheckIfClose(DAGain, DAGainMCC, tol=1e-4))
27202726
printf "(%s) The configured gain for the DA channel %d differs from the one in the \"DAC Channel and Device Associations\" menu (%g vs %g).\r", device, DACchannel, DAGain, DAGainMCC
27212727
needResetting = 1
27222728
endif

0 commit comments

Comments
 (0)