Page 1 of 1

About raising the range of the impedance check

Posted: Sun Oct 26, 2014 2:40 pm
by Usain
Hello everybody!
Recently I've been developing a new driver on OpenViBE.
The problem I encountered is that I cannot adjust the range of the impedance checking module.

The full range of impedance check seems to be 20k, and any value higher than 20k will be described as "too bad", .
Is there any way that I can raise the range of the impedance check? 20k is not high enough for me in my experiment.

Thanks a lot!
Usian

Re: About raising the range of the impedance check

Posted: Mon Oct 27, 2014 8:40 am
by jtlindgren
Hi Usain,

you'll find the following magic in the code

Code: Select all

//float64 l_dFraction=(f64Impedance*.001/20); With fixed impedance limit, 20kOhm max / 25%=5kOhm to be good
float64 l_dFraction=(f64Impedance / (m_rKernelContext.getConfigurationManager().expandAsFloat("${AcquisitionServer_DefaultImpedanceLimit}",5000) * 4));
if(l_dFraction>1) l_dFraction=1;

char l_sImpedance[1024];
char l_sStatus[1024];

// ... some code cut...

if(l_dFraction==1)
{
	::sprintf(l_sImpedance, "Too high !");
}
else
{
	::sprintf(l_sImpedance, "%.2f kOhm", f64Impedance*.001);
}

::sprintf(l_sStatus, "%s", l_dFraction<.25?"Good !":"Bad...");
This suggests that you may be able to change the limit by adding AcquisitionServer_DefaultImpedanceLimit token with a value something else than 5000 to openvibe-acquisition-server.conf (under $APPDATA/Roaming/openvibe/ on Win). Otherwise, you'll just have to modify the code above and recompile. Its in CAcquisitionServerGUI::setImpedance(...).


Hope this helps,
Jussi

Re: About raising the range of the impedance check

Posted: Fri Nov 07, 2014 3:21 pm
by Usain
Thank you so much, Jussi! This is exactly what I want to know!
But finally I solved the problem by editing the file "openvibe.conf" in \share\openvibe\kernel\
I think that this is also a configuration file for the OpenViBE platform, isn't it?

Usain

jtlindgren wrote:Hi Usain,

you'll find the following magic in the code

Code: Select all

//float64 l_dFraction=(f64Impedance*.001/20); With fixed impedance limit, 20kOhm max / 25%=5kOhm to be good
float64 l_dFraction=(f64Impedance / (m_rKernelContext.getConfigurationManager().expandAsFloat("${AcquisitionServer_DefaultImpedanceLimit}",5000) * 4));
if(l_dFraction>1) l_dFraction=1;

char l_sImpedance[1024];
char l_sStatus[1024];

// ... some code cut...

if(l_dFraction==1)
{
	::sprintf(l_sImpedance, "Too high !");
}
else
{
	::sprintf(l_sImpedance, "%.2f kOhm", f64Impedance*.001);
}

::sprintf(l_sStatus, "%s", l_dFraction<.25?"Good !":"Bad...");
This suggests that you may be able to change the limit by adding AcquisitionServer_DefaultImpedanceLimit token with a value something else than 5000 to openvibe-acquisition-server.conf (under $APPDATA/Roaming/openvibe/ on Win). Otherwise, you'll just have to modify the code above and recompile. Its in CAcquisitionServerGUI::setImpedance(...).


Hope this helps,
Jussi

Re: About raising the range of the impedance check

Posted: Fri Nov 07, 2014 3:51 pm
by jtlindgren
Several different config files are typically loaded in 'certain' order: the more specific override the more generic ones, if they have the same tokens in them.


Cheers,
Jussi