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)
variable AI_GetMCCScale(variable clampMode, variable func)

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

Parameters:
  • clampMode – clamp mode (pass NaN for doesn’t matter)

  • func – MCC function, one of AI_SendToAmpConstants

variable AI_UpdateAmpModel(string device, string ctrl, variable headStage, variable value = defaultValue, variable sendToAll = defaultValue, variable checkBeforeWrite = defaultValue, variable selectAmp = defaultValue)

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

Additionally setting the GUI value if the given headstage is the selected one and a value has been passed.

Parameters:
  • device – device

  • ctrl – 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.

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)

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

static variable AI_UpdateAmpView(string device, variable headStage, string ctrl = defaultValue)

Synchronizes the AmpStorageWave to the amplifier GUI control.

Parameters:
  • device – device

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

  • ctrl – [optional, defaults to all controls] name of the control being updated

static string AI_AmpStorageControlToRowLabel(string ctrl)

Convert amplifier controls to row labels for AmpStorageWave

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

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_SendToAmp(string device, variable headStage, variable mode, variable func, variable value, variable checkBeforeWrite = defaultValue, variable usePrefixes = defaultValue, variable selectAmp = 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"
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"
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