File MIES_AmplifierInteraction.ipf

AI Interface with the Axon/MCC amplifiers

Functions

static variable AI_InitAxonTelegraphStruct(AxonTelegraph_DataStruct *tds)
static variable AI_GetAmpAxonSerial(string device, variable headStage)

Returns the serial number of the headstage compatible with Axon* functions,.

See also

GetChanAmpAssign

static string AI_GetAmpMCCSerial(string device, variable headStage)

Returns the serial number of the headstage compatible with MCC* functions,.

See also

GetChanAmpAssign

static variable AI_GetAmpChannel(string device, variable headStage)

Return the channel of the currently selected head stage.

static variable AI_IsValidSerialAndChannel(string mccSerial = defaultValue, variable axonSerial = defaultValue, variable channel = defaultValue)
static variable AI_AssertOnInvalidAccessType(variable accessType)
variable AI_GetMCCScale(variable clampMode, variable func, variable accessType)

Return the unit prefixes used by MIES in comparison to the MCC app.

Parameters:
static variable AI_UpdateAmpModel(string device, variable headStage, string ctrl = defaultValue, variable value = defaultValue, variable sendToAll = defaultValue, variable checkBeforeWrite = defaultValue, variable selectAmp = defaultValue, variable func = defaultValue, variable clampMode = defaultValue, variable GUIWrite = defaultValue)

Update the AmpStorageWave entry and send the value to the amplifier.

One of either ctrl or func plus clampMode is required.

Parameters:
  • device – device

  • ctrl – [optional] name of the amplifier control

  • headStage – MIES headstage number, must be in the range [0, NUM_HEADSTAGES[

  • value – [optional: defaults to the controls value] value to set. values is in MIES units, see AI_SendToAmp() and there the description of usePrefixes.

  • sendToAll – [optional: defaults to the state of the checkbox] should the value be send to all active headstages (true) or just to the given one (false)

  • checkBeforeWrite – [optional, defaults to false] (ignored for getter functions) check the current value and do nothing if it is equal within some tolerance to the one written

  • selectAmp – [optional, defaults to true] Select the amplifier before use, some callers might save time in doing that once themselves.

  • func – [optional] Function to call, see AI_SendToAmpConstants

  • clampMode – [optional] One of V_CLAMP_MODE, I_CLAMP_MODE or I_EQUAL_ZERO_MODE

  • GUIWrite – [optional, defaults to false] Should the amplifier control, if available, be updated with the value

Returns:

0 on success, 1 otherwise

variable AI_SyncAmpStorageToGUI(string device, variable headstage)

Convenience wrapper for AI_UpdateAmpView.

Disallows setting single controls for outside callers as AI_UpdateAmpModel should be used for that.

variable AI_SyncGUIToAmpStorageAndMCCApp(string device, variable headStage, variable clampMode, variable force = defaultValue)

Sync the settings from the GUI to the amp storage wave and the MCC application.

static variable AI_UpdateAmpView(string device, variable headStage, variable func = defaultValue, variable clampMode = defaultValue)

Synchronizes the AmpStorageWave to the amplifier GUI control.

Parameters:
variable AI_SetMIESHeadstage(string device, variable headstage = defaultValue, variable increment = defaultValue)
variable AI_ZeroAmps(string device, variable headStage = defaultValue)

Executes MCC auto zero command if the baseline current exceeds ZERO_TOLERANCE.

Parameters:
  • device – device

  • headStage – [optional: defaults to all active headstages]

static variable AI_MIESAutoPipetteOffset(string device, variable headStage)

Auto pipette zeroing Quicker than MCC auto pipette offset.

Parameters:
  • device – device

  • headStage – MIES headstage number, must be in the range [0, NUM_HEADSTAGES]

variable AI_QueryGainsUnitsForClampMode(string device, variable headstage, variable clampMode, variable *DAGain, variable *ADGain, string *DAUnit, string *ADUnit)

Query the MCC application for the gains and units of the given clamp mode.

Assumes that the correct amplifier is already selected!

variable AI_UpdateChanAmpAssign(string device, variable headStage, variable clampMode, variable DAGain, variable ADGain, string DAUnit, string ADUnit)

Update the ChanAmpAssign and ChanAmpAssignUnit waves according to the passed clamp mode with the gains and units.

variable AI_AssertOnInvalidClampMode(variable clampMode)

Assert on invalid clamp modes, does nothing otherwise.

variable AI_IsValidClampMode(variable clampMode)

Return true if the given clamp mode is valid.

variable AI_OpenMCCs(string ampSerialNumList, string ampTitleList = defaultValue)

Opens Multi-clamp commander software.

Parameters:
  • ampSerialNumList – A text list of amplifier serial numbers without leading zeroes Ex. “834001;435003;836059”, “0;” starts the MCC in Demo mode Duplicate serial numbers are ignored as well as amplifier titles for the duplicates. For each unique serial number one MCC is opened.

  • ampTitleList – [optional, defaults to blank] MCC gui window title

Returns:

1 if all unique MCCs specified in ampSerialNumList were opened, 0 if one or more MCCs specified in ampSerialNumList were not able to be opened

static wave AI_GetMCCSerialNumbers()

Gets the serial numbers of all open MCCs.

Returns:

a 1D FREE wave containing amplifier serial numbers without leading zeroes

static string AI_GetMCCWinFilePath()

Return a path to the MCC.

Hardcoded as Igor does not allow to query that information.

Distinguishes between i386 and x64 Igor versions

std::tuple<variable, variable> AI_MapControlNameToFunctionConstant(string ctrl)

Map from amplifier control names to AI_SendToAmpConstants constants and clamp mode.

string AI_MapFunctionConstantToControl(variable func, variable clampMode)

Map from AI_SendToAmpConstants constants and clamp mode to control names.

string AI_MapFunctionConstantToName(variable func, variable clampMode)

Map constants from AI_SendToAmpConstants to human readable names.

variable AI_IsControlFromClampMode(string ctrl, variable clampMode)

Return the truthness that the ctrl belongs to the clamp mode.

static string AI_AmpStorageControlToRowLabel(string ctrl)

Convert amplifier controls to row labels for AmpStorageWave

string AI_GetUnitForFunctionConstant(variable func, variable clampMode)

Return the unit with prefix of the given function constant and clampMode.

This uses the MIES internal units i.e. with prefixes.

wave AI_GetFunctionConstantForClampMode(variable clampMode)

Return a wave with all function constants for the given clamp mode.

variable AI_GetHoldingCommand(string device, variable headstage)
variable AI_GetMode(string device, variable headstage)
static variable AI_RetrieveGains(string device, variable headstage, variable clampMode, variable *ADGain, variable *DAGain)
static variable AI_SwitchAxonAmpMode()
variable AI_SelectMultiClamp(string device, variable headStage)
variable AI_SetClampMode(string device, variable headStage, variable mode, variable zeroStep = defaultValue)
variable AI_ReadFromAmplifier(string device, variable headStage, variable mode, variable func, variable checkBeforeWrite = defaultValue, variable usePrefixes = defaultValue, variable selectAmp = defaultValue)
variable AI_WriteToAmplifier(string device, variable headStage, variable mode, variable func, variable value, variable sendToAll = defaultValue, variable checkBeforeWrite = defaultValue, variable selectAmp = defaultValue, variable GUIWrite = defaultValue)
static variable AI_SendToAmp(string device, variable headStage, variable mode, variable func, variable accessType, variable checkBeforeWrite = defaultValue, variable usePrefixes = defaultValue, variable selectAmp = defaultValue, variable value = defaultValue)
variable AI_EnsureCorrectMode(string device, variable headStage, variable selectAmp = defaultValue)
variable AI_FillAndSendAmpliferSettings(string device, variable sweepNo)
variable AI_QueryGainsFromMCC(string device)
variable AI_FindConnectedAmps()
std::tuple<AxonTelegraph_DataStruct> AI_GetTelegraphStruct(variable axonSerial, variable channel)

Variables

static const double ZERO_TOLERANCE = 100
static const string AMPLIFIER_CONTROLS_VC = "setvar_DataAcq_Hold_VC;check_DataAcq_Amp_Chain;check_DatAcq_HoldEnableVC;setvar_DataAcq_WCC;setvar_DataAcq_WCR;check_DatAcq_WholeCellEnable;setvar_DataAcq_RsCorr;setvar_DataAcq_RsPred;check_DataAcq_Amp_Chain;check_DatAcq_RsCompEnable;setvar_DataAcq_PipetteOffset_VC;button_DataAcq_FastComp_VC;button_DataAcq_SlowComp_VC;button_DataAcq_AutoPipOffset_VC;button_DataAcq_WCAuto"
static const string AMPLIFIER_CONTROLS_IC = "setvar_DataAcq_Hold_IC;check_DatAcq_HoldEnable;setvar_DataAcq_BB;check_DatAcq_BBEnable;setvar_DataAcq_CN;check_DatAcq_CNEnable;setvar_DataAcq_AutoBiasV;setvar_DataAcq_AutoBiasVrange;setvar_DataAcq_IbiasMax;check_DataAcq_AutoBias;setvar_DataAcq_PipetteOffset_IC;button_DataAcq_AutoBridgeBal_IC;button_DataAcq_AutoBridgeBal_IC;button_DataAcq_AutoPipOffset_IC"
static const double MAX_PIPETTEOFFSET = 150
static const double MIN_PIPETTEOFFSET = -150
static const double NUM_TRIES_AXON_TELEGRAPH = 10
struct AxonTelegraph_DataStruct

Public Members

uint32 Version

Structure version. Value should always be 13.

uint32 SerialNum
uint32 ChannelID
uint32 ComPortID
uint32 AxoBusID
uint32 OperatingMode
string OperatingModeString
uint32 ScaledOutSignal
string ScaledOutSignalString
double Alpha
double ScaleFactor
uint32 ScaleFactorUnits
string ScaleFactorUnitsString
double LPFCutoff
double MembraneCap
double ExtCmdSens
uint32 RawOutSignal
string RawOutSignalString
double RawScaleFactor
uint32 RawScaleFactorUnits
string RawScaleFactorUnitsString
uint32 HardwareType
string HardwareTypeString
double SecondaryAlpha
double SecondaryLPFCutoff
double SeriesResistance