File MIES_ForeignFunctionInterface.ipf

FFI ACQ4/ZeroMQ accessible functions

Functions

wave FFI_ReturnTPValues()

Function to return Peak Resistance, Steady State Resistance to ACQ4 (Neurophysiology Acquisition and Analysis System. See http://acq4.org/ for more details)

The function will pull the values (PeakResistance, SteadyStateResistance, and TimeStamp) out of the TP storage wave and put them in a 3x8 wave, in a designated location where ACQ4 can then find them

wave FFI_GetAvailableMessageFilters()

Return a text wave with all available message filters for Publisher/Subscriber ZeroMQ sockets.

See also ZeroMQMessageFilters.

Description of all messages:

Name

Description

Publish function

:cpp:var:ZeroMQ_HEARTBEAT

Every 5s for alive check

None

:cpp:var:PRESSURE_STATE_FILTER

Every pressure method change

:cpp:func:PUB_PressureMethodChange

:cpp:var:PRESSURE_SEALED_FILTER

Pressure seal reached

:cpp:func:PUB_PressureSealedState

:cpp:var:PRESSURE_BREAKIN_FILTER

Pressure breakin

:cpp:func:PUB_PressureBreakin

:cpp:var:AUTO_TP_FILTER

Auto TP has finished

:cpp:func:PUB_AutoTPResult

:cpp:var:AMPLIFIER_CLAMP_MODE_FILTER

Clamp mode has changed

:cpp:func:PUB_ClampModeChange

:cpp:var:AMPLIFIER_AUTO_BRIDGE_BALANCE

Amplifier auto bridge balance was activated

:cpp:func:PUB_AutoBridgeBalance

:cpp:var:ANALYSIS_FUNCTION_PB

Pipette in bath analysis function has finished

:cpp:func:PUB_PipetteInBath

:cpp:var:ANALYSIS_FUNCTION_SE

Seal evaluation analysis function has finished

:cpp:func:PUB_SealEvaluation

:cpp:var:ANALYSIS_FUNCTION_VM

True resting memb. potential function is finished

:cpp:func:PUB_TrueRestingMembranePotential

:cpp:var:DAQ_TP_STATE_CHANGE_FILTER

Data acquisition/Test pulse started or stopped

:cpp:func:PUB_DAQStateChange

:cpp:var:ANALYSIS_FUNCTION_AR

Access resistance smoke ana. function has finished

:cpp:func:PUB_AccessResistanceSmoke

:cpp:var:ZMQ_FILTER_TPRESULT_NOW

TP evaluation result (all TPs)

:cpp:func:PUB_TPResult

:cpp:var:ZMQ_FILTER_TPRESULT_1s

TP evaluation result (every 1s)

:cpp:func:PUB_TPResult

:cpp:var:ZMQ_FILTER_TPRESULT_5s

TP evaluation result (every 5s)

:cpp:func:PUB_TPResult

:cpp:var:ZMQ_FILTER_TPRESULT_10s

TP evaluation result (every 10s)

:cpp:func:PUB_TPResult

:cpp:var:ZMQ_FILTER_TPRESULT_NOW_WITH_DATA

TP evaluation result with AD data (all TPs)

:cpp:func:PUB_TPResult

:cpp:var:CONFIG_FINISHED_FILTER

JSON configuration for panel has finished

:cpp:func:PUB_ConfigurationFinished

:cpp:var:AMPLIFIER_SET_VALUE

Amplifier setting was changed through MIES

:cpp:func:PUB_AmplifierSettingChange

:cpp:var:TESTPULSE_SET_VALUE_FILTER

Testpulse setting change

:cpp:func:PUB_TPSettingChange

variable FFI_SetCellElectrodeName(string device, variable headstage, string name)

Set the headstage/cell electrode name.

wave FFI_QueryLogbook(string device, variable logbookType, variable sweepNo, string setting, variable entrySourceType)

Query logbook entries from devices.

This allows to query labnotebook/results entries from associated channels.

Parameters:
Returns:

Numerical/Textual wave with LABNOTEBOOK_LAYER_COUNT rows or a null wave reference if nothing could be found

wave FFI_QueryLogbookUniqueSetting(string device, variable logbookType, string setting)

Return all unique logbook entries from devices.

Parameters:
  • device – Name of the hardware device panel,

  • logbookType – One of LBT_LABNOTEBOOK or LBT_RESULTS

  • setting – Name of the entry

Returns:

Numerical/Textual 1D wave or a null wave reference if nothing could be found

variable FFI_SaveDataFolderToHDF5(string filepath, string datafolder)

Save the given permanent Igor Pro datafolder in the HDF5 format into filepath

static variable FFI_SaveDataFolderToHDF5Impl(string filepath, WaveText datafolders)
wave FFI_GetSweepBrowserTitles()

Return the titles of all sweep browser windows.

variable FFI_SavePSXDataFolderToHDF5(string filepath, string winTitle)

Save the psx data of the sweepbrowser with title wintTitle in the HDF5 format into filepath

static variable FFI_TP_DeviceSelectable(string device)

Return 1 if the device can be selected (exists/available), 0 otherwise.

Parameters:

device – [in] Device title, e.g. “ITC1600_Dev_0”

Returns:

1 if selectable, 0 otherwise

std::tuple<variable, string> FFI_StartTestPulse(string device)

Start the test pulse for a device unless it is already running.

Parameters:

device – [in] Device title, e.g. “ITC1600_Dev_0”

Returns:

0 = started now, 1 = already running (ignored), -1 = device unavailable

std::tuple<variable, string> FFI_StopTestPulse(string device)

Stop the test pulse for a device unless it is already stopped.

Parameters:

device – [in] Device title, e.g. “ITC1600_Dev_0”

Returns:

0 = stopped now, 1 = already stopped (ignored), -1 = device unavailable

std::tuple<variable, string> FFI_TestPulseMD(string device, variable action)

Unified API entry point to start or stop the test pulse.

Parameters:
  • device – [in] Device title, e.g. “ITC1600_Dev_0”

  • action – [in] 1 to start, 0 to stop

Returns:

Pass-through of API_StartTestPulse()/API_StopTestPulse() return codes

variable FFI_TestPulseMDSingleResult(string device, variable action)
variable DoPressureManual(string device, variable headstage, variable manualOnOff = defaultValue, variable targetPressure = defaultValue, variable userAccessOnOff = defaultValue)
std::tuple<string, variable> FFI_GetWithOptionToSetPressure(string device, variable headstage, string requestedSource, variable requestedPressure)

FFI entry: set/rout pressure per ‘requestedSource’ and/or set regulator setpoint.

Parameters:
  • device – MIES device name

  • headstage – target headstage index

  • requestedSource – “atmosphere” | “regulator” | “user” | “default” | “”

  • requestedPressure – regulator setpoint (psi; <9.9, >-9.9) | NaN

Returns:

regulatorPressure, pipettePressure

std::tuple<string, variable> ReadPressureSourceAndPressure(string device, variable headstage)
variable FFI_WaitForIdle(string device, variable headstage)

Return 1 if idle, 0 if we timed out still busy.

variable SetPressureToBaseline()
variable readoutPressureSourceAndPressure()
variable SetRegulatorPressure()
variable SetRegulatorPressureAndSetREgulatorSource()
variable SetSourceToRegulator()
variable SetSourceToUserSetPressureToNeg2()
variable RunTests()
wave FFI_GetCurrentClampState(string device, variable headstage)

Returns the clamp state of a headstage of a locked device.

  • if the requested head stage is not active then a null wave is returned The clamp state wave is DP numeric wave:

For VC

Dimension Label

Value description

Units

HoldingPotential

mV

RSCompChaining

1 : On 0 : Off

On/Off

HoldingPotentialEnable

1 : On 0 : Off

On/Off

WholeCellCap

pF

WholeCellRes

MΩ

WholeCellEnable

1 : On 0 : Off

On/Off

Correction

%

Prediction

%

RsCompEnable

1 : On 0 : Off

On/Off

PipetteOffsetVC

mV

WholeCellCap

a.u.

ClampMode

0 : VC

For IC

Dimension Label

Value description

Units

BiasCurrent

pA

BiasCurrentEnable

1 : On 0 : Off

On/Off

BridgeBalance

MΩ

BridgeBalanceEnable

1 : On 0 : Off

On/Off

CapNeut

pF

CapNeutEnable

1 : On 0 : Off

On/Off

AutoBiasVcom

mV

AutoBiasVcomVariance

mV

AutoBiasIbiasmax

pA

AutoBiasEnable

1 : On 0 : Off

On/Off

PipetteOffsetIC

mV

ClampMode

1 : IC

For I=0

Dimension Label

Value description

Units

ClampMode

2 : I=0

Parameters:
  • device – [in] Device title, e.g. “Dev1”

  • headstage – [in] headstage number

Returns:

wave with clamp state, null wave for inactive headstage

wave FFI_GetClampState(string device, variable headstage)

Returns the full clamp state of a headstage of a locked device.

Dimension Label

Value description

Units

HoldingPotential

mV

HoldingPotentialEnable

1 : On, 0 : Off

WholeCellCap

pF

WholeCellRes

MΩ

WholeCellEnable

1 : On, 0 : Off

Correction

%

Prediction

%

RsCompEnable

1 : On, 0 : Off

PipetteOffsetVC

mV

FastCapacitanceComp

a.u.

SlowCapacitanceComp

a.u.

RSCompChaining

1 : On, 0 : Off

VClampPlaceHolder

reserved

VClampPlaceHolder

reserved

VClampPlaceHolder

reserved

VClampPlaceHolder

reserved

BiasCurrent

pA

BiasCurrentEnable

1 : On, 0 : Off

BridgeBalance

MΩ

BridgeBalanceEnable

1 : On, 0 : Off

CapNeut

pF

CapNeutEnable

1 : On, 0 : Off

AutoBiasVcom

mV

AutoBiasVcomVariance

mV

AutoBiasIbiasmax

pA

AutoBiasEnable

1 : On, 0 : Off

PipetteOffsetIC

mV

IclampPlaceHolder

reserved

IclampPlaceHolder

reserved

IclampPlaceHolder

reserved

IclampPlaceHolder

reserved

Parameters:
  • device – [in] Device title, e.g. “Dev1”

  • headstage – [in] headstage number

Returns:

wave with full clamp state, null wave for inactive headstage

variable FFI_TriggerAutoClampControl(string device, variable headstage, variable autoCtrl)

Triggers an auto clamp control.

Parameters:
  • device – [in] Device title, e.g. “Dev1”

  • headstage – [in] headstage number

  • autoCtrl – [in] auto control number FFI_AutoClampCtrls

variable FFI_SetClampMode(string device, variable headstage, variable clampMode)

Sets clamp mode.

Parameters:
  • device – [in] Device title, e.g. “Dev1”

  • headstage – [in] headstage number

  • clampMode – [in] clamp mode AmplifierClampModes

variable FFI_SetHoldingPotential(string device, variable headstage, variable potential, variable enable)

Sets Holding Potential.

Parameters:
  • device – [in] Device title, e.g. “Dev1”

  • headstage – [in] headstage number

  • potential – [in] holding potential in mV

  • enable – [in] when set to 1, enables Holding Potential after setting its value, when set to 0, disables Holding Potential before setting its values

variable FFI_SetBiasCurrent(string device, variable headstage, variable biasCurrent, variable enable)

Sets Bias Current.

Parameters:
  • device – [in] Device title, e.g. “Dev1”

  • headstage – [in] headstage number

  • biasCurrent – [in] bias current in pA

  • enable – [in] when set to 1, enables Holding Bias Current after setting its value, when set to 0, disables Holding Bias Current before setting its values

static variable FFI_SetHolding(string device, variable headstage, variable clampMode, variable value)
static variable FFI_CheckValidDeviceAndHeadstage(string device, variable headstage)
variable FFI_SetAutoBias(string device, variable headstage, variable potential, variable enable)

Sets Auto Bias.

Parameters:
  • device – [in] Device title, e.g. “Dev1”

  • headstage – [in] headstage number

  • potential – [in] Vm in mV in the range -99 mV to 99 mV

  • enable – [in] when set to 1 then auto bias gets enabled after setting its value, when set to 0 then auto bias gets disabled before setting its value

variable FFI_SetHeadstageActive(string device, variable headstage, variable enable)

Enables/Disables a headstage.

The headstage state can not be changed while a data acquisition is running

Parameters:
  • device – [in] Device title, e.g. “Dev1”

  • headstage – [in] headstage number

  • enable – [in] when set to 1 the headstage gets enabled, 0 disabled

Returns:

0 when successful

variable FFI_GetHeadstageActive(string device, variable headstage)

Enables/Disables a headstage.

The headstage state can not be changed while a data acquisition is running

Parameters:
  • device – [in] Device title, e.g. “Dev1”

  • headstage – [in] headstage number

Returns:

1 if the headstage is active, 0 otherwise

Variables

static const double kPressurePulseMaxMS = 300
static const double kPressureWaitSlackMS = 150