From ef3f1d2fdacd5a6426591cc97cb3a052517e5350 Mon Sep 17 00:00:00 2001 From: Michael Huth Date: Thu, 22 Aug 2024 13:19:55 +0200 Subject: [PATCH] Util: Add two conversion function for DA/AD unit string return Added GetADChannelUnit, GetDAChannelUnit that return the unit string depending on clamp mode. --- Packages/MIES/MIES_MiesUtilities_Conversion.ipf | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Packages/MIES/MIES_MiesUtilities_Conversion.ipf b/Packages/MIES/MIES_MiesUtilities_Conversion.ipf index 4640ef4839..cc9130a9bc 100644 --- a/Packages/MIES/MIES_MiesUtilities_Conversion.ipf +++ b/Packages/MIES/MIES_MiesUtilities_Conversion.ipf @@ -270,3 +270,15 @@ Function MapAnaFuncToConstant(anaFunc) #endif endswitch End + +/// @brief returns the unit string for the AD channel depending in clampmode +threadsafe Function/S GetADChannelUnit(variable clampMode) + + return SelectString(clampMode == V_CLAMP_MODE, "mV", "pA") +End + +/// @brief returns the unit string for the DA channel depending in clampmode +threadsafe Function/S GetDAChannelUnit(variable clampMode) + + return SelectString(clampMode == V_CLAMP_MODE, "pA", "mV") +End