Commit ea610f37 authored by locatelli's avatar locatelli

Add properties for humidity chamber v4

parent ecdb271a
......@@ -47,6 +47,9 @@ HumidityChamberV4::HumidityChamberV4(const string& name) :
bathReservoirTemperature.setUnit("~degreeC");
bathSampleTemperature.init(this, SAVE | SPY, "actual_bath_sample_temperature", "wanted_bath_sample_temperature", "Bath sample");
bathSampleTemperature.setUnit("~degreeC");
wantedGonioTemperature.init(this, SAVE, "wanted_gonio_temperature");
wantedGonioTemperature.setUnit("~degreeC");
gonioHeater.init(this, SAVE, "gonio_heater");
sampleTopTemperature.init(this, NOSAVE, "sample_top_temperature");
sampleTopTemperature.setUnit("~degreeC");
......@@ -180,6 +183,8 @@ void HumidityChamberV4::start() {
else {
m_HumidityChamberV4Driver->wantedBathReservoirTemperature = bathReservoirTemperature.setpoint();
m_HumidityChamberV4Driver->wantedBathSampleTemperature = bathSampleTemperature.setpoint();
m_HumidityChamberV4Driver->wantedGonioTemperature = wantedGonioTemperature();
m_HumidityChamberV4Driver->gonioHeater = gonioHeater();
}
m_HumidityChamberV4Driver.setTimeout(driver::START_COMMAND, ltimeout);
m_HumidityChamberV4Driver.execute(driver::START_COMMAND, true);
......
......@@ -54,6 +54,8 @@ public:
Property<float64, SETPOINT> temperature;
Property<float64, SETPOINT> bathReservoirTemperature;
Property<float64, SETPOINT> bathSampleTemperature;
Property<float64> wantedGonioTemperature;
Property<int32> gonioHeater;
Property<float64> sampleTopTemperature;
Property<float64> sampleBottomTemperature;
......
......@@ -6,6 +6,10 @@ humidity_chamber_v4.wanted_humidityPrefix=Wanted humidity
humidity_chamber_v4.wanted_bath_reservoir_temperaturePrefix=Wanted reservoir temp.
humidity_chamber_v4.wanted_bath_sample_temperaturePrefix=Wanted sample temp.
humidity_chamber_v4.tolerancePrefix=Tolerance
humidity_chamber_v4.wanted_gonio_temperaturePrefix=Wanted Gonio Temp.
humidity_chamber_v4.gonio_heaterPrefix=Gonio Heater
humidity_chamber_v4.gonio_heaterCheckedValue=1
humidity_chamber_v4.gonio_heaterUncheckedValue=0
humidity_chamber_v4.timeoutPrefix=Time Out
humidity_chamber_v4.stabilisationPrefix=Stabilisation
......@@ -25,5 +29,5 @@ humidity_chamber_v4.sample_bottom_temperaturePrefix=Sample Bottom temperature
humidity_chamber_v4.reservoir_temperaturePrefix=Reservoir temperature
humidity_chamber_v4.calculated_humidityPrefix=Calculated humidity
humidity_chamber_v4.degreeC=~degreeC
humidity_chamber_v4.degreeCelsius=~degreeC
humidity_chamber_v4.percent=%
<plugin>
<controller type="humidity_chamber_v4" role="humidity_chamber_v41"/>
<number_of_lines nb_lines="2"/>
<number_of_lines nb_lines="3"/>
<property_switcher role="humidity_chamber_v41" property="automatic" switcher_key="humidity_chamber_v4.automaticSwitcher"/>
<property_switcher role="humidity_chamber_v41" property="use_timeout" switcher_key="humidity_chamber_v4.timeoutSwitcher"/>
......@@ -8,18 +8,25 @@
<check role="humidity_chamber_v41" property="automatic" prefix="humidity_chamber_v4.automaticPrefix" checkBoxValues="humidity_chamber_v4.automatic"/>
<switchable_composite switcher_key="humidity_chamber_v4.automaticSwitcher" switch_values="true">
<text role="humidity_chamber_v41" property="wanted_temperature" prefix="humidity_chamber_v4.wanted_temperaturePrefix" suffix="HumidityChamberV4Driver.degreeCelsius"/>
<text role="humidity_chamber_v41" property="wanted_humidity" prefix="humidity_chamber_v4.wanted_humidityPrefix" suffix="HumidityChamberV4Driver.percent"/>
<text role="humidity_chamber_v41" property="wanted_temperature" prefix="humidity_chamber_v4.wanted_temperaturePrefix" suffix="humidity_chamber_v4.degreeCelsius"/>
<text role="humidity_chamber_v41" property="wanted_humidity" prefix="humidity_chamber_v4.wanted_humidityPrefix" suffix="humidity_chamber_v4.percent"/>
</switchable_composite>
<switchable_composite switcher_key="humidity_chamber_v4.automaticSwitcher" switch_values="false">
<text role="humidity_chamber_v41" property="wanted_bath_reservoir_temperature" prefix="humidity_chamber_v4.wanted_bath_reservoir_temperaturePrefix" suffix="HumidityChamberV4Driver.degreeCelsius"/>
<text role="humidity_chamber_v41" property="wanted_bath_sample_temperature" prefix="humidity_chamber_v4.wanted_bath_sample_temperaturePrefix" suffix="HumidityChamberV4Driver.degreeCelsius"/>
<text role="humidity_chamber_v41" property="wanted_bath_reservoir_temperature" prefix="humidity_chamber_v4.wanted_bath_reservoir_temperaturePrefix" suffix="humidity_chamber_v4.degreeCelsius"/>
<text role="humidity_chamber_v41" property="wanted_bath_sample_temperature" prefix="humidity_chamber_v4.wanted_bath_sample_temperaturePrefix" suffix="humidity_chamber_v4.degreeCelsius"/>
</switchable_composite>
<text role="humidity_chamber_v41" property="tolerance" prefix="humidity_chamber_v4.tolerancePrefix" suffix="humidity_chamber_v4.percent"/>
<text role="humidity_chamber_v41" property="tolerance" prefix="humidity_chamber_v4.tolerancePrefix" suffix="humidity_chamber_v4.degreeCelsius"/>
<newLine/>
<switchable_composite switcher_key="humidity_chamber_v4.automaticSwitcher" switch_values="false">
<text role="humidity_chamber_v41" property="wanted_gonio_temperature" prefix="humidity_chamber_v4.wanted_gonio_temperaturePrefix" suffix="humidity_chamber_v4.degreeCelsius"/>
<check role="humidity_chamber_v41" property="gonio_heater" prefix="humidity_chamber_v4.gonio_heaterPrefix" checkBoxValues="humidity_chamber_v4.gonio_heater"/>
</switchable_composite>
<newLine/>
<check role="humidity_chamber_v41" property="use_timeout" prefix="humidity_chamber_v4.timeoutPrefix" checkBoxValues="humidity_chamber_v4.timeout"/>
<switchable_composite switcher_key="humidity_chamber_v4.timeoutSwitcher" switch_values="true">
<text role="humidity_chamber_v41" property="timeout" spaceBefore="false"/>
......
......@@ -37,6 +37,13 @@
<decimal_format nb_decimal_places="2"/>
</property>
<property name="wanted_gonio_temperature" type="float64" max_length="6">
<decimal_format nb_decimal_places="2"/>
</property>
<property name="gonio_heater" type="int32">
</property>
<property name="sample_top_temperature" type="float64" max_length="6">
<decimal_format nb_decimal_places="2"/>
</property>
......
......@@ -9,18 +9,22 @@
<check role="humidity_chamber_v41" property="automatic" prefix="humidity_chamber_v4.automaticPrefix" checkBoxValues="humidity_chamber_v4.automatic"/>
<newLine/>
<switchable_composite switcher_key="humidity_chamber_v4.automaticSwitcher" switch_values="true">
<text role="humidity_chamber_v41" property="wanted_temperature" prefix="humidity_chamber_v4.wanted_temperaturePrefix" suffix="HumidityChamberV4Driver.degreeCelsius"/>
<text role="humidity_chamber_v41" property="wanted_temperature" prefix="humidity_chamber_v4.wanted_temperaturePrefix" suffix="humidity_chamber_v4.degreeCelsius"/>
<newLine/>
<text role="humidity_chamber_v41" property="wanted_humidity" prefix="humidity_chamber_v4.wanted_humidityPrefix" suffix="HumidityChamberV4Driver.percent"/>
</switchable_composite>
<switchable_composite switcher_key="humidity_chamber_v4.automaticSwitcher" switch_values="false">
<text role="humidity_chamber_v41" property="wanted_bath_reservoir_temperature" prefix="humidity_chamber_v4.wanted_bath_reservoir_temperaturePrefix" suffix="HumidityChamberV4Driver.degreeCelsius"/>
<text role="humidity_chamber_v41" property="wanted_bath_reservoir_temperature" prefix="humidity_chamber_v4.wanted_bath_reservoir_temperaturePrefix" suffix="humidity_chamber_v4.degreeCelsius"/>
<newLine/>
<text role="humidity_chamber_v41" property="wanted_bath_sample_temperature" prefix="humidity_chamber_v4.wanted_bath_sample_temperaturePrefix" suffix="HumidityChamberV4Driver.degreeCelsius"/>
<text role="humidity_chamber_v41" property="wanted_bath_sample_temperature" prefix="humidity_chamber_v4.wanted_bath_sample_temperaturePrefix" suffix="humidity_chamber_v4.degreeCelsius"/>
<newLine/>
<text role="humidity_chamber_v41" property="wanted_gonio_temperature" prefix="humidity_chamber_v4.wanted_gonio_temperaturePrefix" suffix="humidity_chamber_v4.degreeCelsius"/>
<newLine/>
<check role="humidity_chamber_v41" property="gonio_heater" prefix="humidity_chamber_v4.gonio_heaterPrefix" checkBoxValues="humidity_chamber_v4.gonio_heater"/>
</switchable_composite>
<newLine/>
<text role="humidity_chamber_v41" property="tolerance" prefix="humidity_chamber_v4.tolerancePrefix" suffix="humidity_chamber_v4.percent"/>
<text role="humidity_chamber_v41" property="tolerance" prefix="humidity_chamber_v4.tolerancePrefix" suffix="humidity_chamber_v4.degreeCelsius"/>
<newLine/>
<check role="humidity_chamber_v41" property="use_timeout" prefix="humidity_chamber_v4.timeoutPrefix" checkBoxValues="humidity_chamber_v4.timeout"/>
......@@ -38,13 +42,13 @@
<summary>
<summary_content>
<label role="humidity_chamber_v41" property="reservoir_temperature" prefix="humidity_chamber_v4.reservoir_temperaturePrefix" suffix="HumidityChamberV4Driver.degreeCelsius"/>
<label role="humidity_chamber_v41" property="reservoir_temperature" prefix="humidity_chamber_v4.reservoir_temperaturePrefix" suffix="humidity_chamber_v4.degreeCelsius"/>
<newLine/>
<label role="humidity_chamber_v41" property="sample_top_temperature" prefix="humidity_chamber_v4.sample_top_temperaturePrefix" suffix="HumidityChamberV4Driver.degreeCelsius"/>
<label role="humidity_chamber_v41" property="sample_top_temperature" prefix="humidity_chamber_v4.sample_top_temperaturePrefix" suffix="humidity_chamber_v4.degreeCelsius"/>
<newLine/>
<label role="humidity_chamber_v41" property="sample_bottom_temperature" prefix="humidity_chamber_v4.sample_bottom_temperaturePrefix" suffix="HumidityChamberV4Driver.degreeCelsius"/>
<label role="humidity_chamber_v41" property="sample_bottom_temperature" prefix="humidity_chamber_v4.sample_bottom_temperaturePrefix" suffix="humidity_chamber_v4.degreeCelsius"/>
<newLine/>
<label role="humidity_chamber_v41" property="calculated_humidity" prefix="humidity_chamber_v4.calculated_humidityPrefix" suffix="HumidityChamberV4Driver.percent"/>
<label role="humidity_chamber_v41" property="calculated_humidity" prefix="humidity_chamber_v4.calculated_humidityPrefix" suffix="humidity_chamber_v4.percent"/>
<newLine/>
<status role="humidity_chamber_v41" property="commandStatus" valuesImagesAndLabels="commandStatusUnknown,commandStatusIdle,commandStatusRunning,commandStatusWarning,commandStatusError"/>
</summary_content>
......
......@@ -118,6 +118,9 @@ static const int32 PRESSURE_SENSOR_ZERO_OFFSET_06HCAL10_REGISTER = 242;
static const int32 HC_TYPE_REGISTER = 244;
static const int32 WANTED_GONIO_TEMPERATURE_REGISTER = 248;
static const int32 GONIO_HEATER_REGISTER = 250;
//static const int32 TYPE_04HC = 1;
//static const int32 TYPE_05HC = 2;
//static const int32 TYPE_06HC = 3;
......
......@@ -47,6 +47,8 @@ HumidityChamberV4Driver::HumidityChamberV4Driver(const std::string& name) :
bathSampleTemperatureSetpoint.init(this, NOSAVE, "bath_sample_temperature_setpoint");
wantedBathReservoirTemperature.init(this, SAVE, "wanted_bath_reservoir_temperature");
bathReservoirTemperatureSetpoint.init(this, NOSAVE, "bath_reservoir_temperature_setpoint");
wantedGonioTemperature.init(this, SAVE, "wanted_gonio_temperature");
gonioHeater.init(this, SAVE, "gonio_heater");
actualBathSampleTemperature.init(this, NOSAVE, "actual_bath_sample_temperature");
actualBathReservoirTemperature.init(this, NOSAVE, "actual_bath_reservoir_temperature");
......
......@@ -67,6 +67,8 @@ public:
Property<float64> bathSampleTemperatureSetpoint;
Property<float64> wantedBathReservoirTemperature;
Property<float64> bathReservoirTemperatureSetpoint;
Property<float64> wantedGonioTemperature;
Property<int32> gonioHeater;
Property<float64> actualBathSampleTemperature;
Property<float64> actualBathReservoirTemperature;
......@@ -77,6 +79,7 @@ public:
Property<float64> measuredHumidity;
Property<float64> calculatedHumidity;
Property<int32> typeHC;
Property<float64> humiditySlopeCoef04HCAL10;
Property<float64> humidityZeroOffsetCoef04HCAL10;
......
......@@ -63,29 +63,29 @@ void RealHumidityChamberV4Driver::readInfos() {
void RealHumidityChamberV4Driver::writeParam() {
float32 val32 = static_cast<float32>(owner()->humiditySlopeCoef04HCAL10());
owner()->writeMultipleRegister(HUMIDITY_SENSOR_SLOPE_04HCAL10_REGISTER, val32);
val32 = (int16) (owner()->humidityZeroOffsetCoef04HCAL10());
val32 = static_cast<float32>(owner()->humidityZeroOffsetCoef04HCAL10());
owner()->writeMultipleRegister(HUMIDITY_SENSOR_ZERO_OFFSET_04HCAL10_REGISTER, val32);
val32 = (int16) (owner()->pressureSlopeCoef04HCAL10());
val32 = static_cast<float32>(owner()->pressureSlopeCoef04HCAL10());
owner()->writeMultipleRegister(PRESSURE_SENSOR_SLOPE_04HCAL10_REGISTER, val32);
val32 = (int16) (owner()->pressureZeroOffsetCoef04HCAL10());
val32 = static_cast<float32>(owner()->pressureZeroOffsetCoef04HCAL10());
owner()->writeMultipleRegister(PRESSURE_SENSOR_ZERO_OFFSET_04HCAL10_REGISTER, val32);
val32 = static_cast<float32>(owner()->humiditySlopeCoef05HCAL10());
owner()->writeMultipleRegister(HUMIDITY_SENSOR_SLOPE_05HCAL10_REGISTER, val32);
val32 = (int16) (owner()->humidityZeroOffsetCoef05HCAL10());
val32 = static_cast<float32>(owner()->humidityZeroOffsetCoef05HCAL10());
owner()->writeMultipleRegister(HUMIDITY_SENSOR_ZERO_OFFSET_05HCAL10_REGISTER, val32);
val32 = (int16) (owner()->pressureSlopeCoef05HCAL10());
val32 = static_cast<float32>(owner()->pressureSlopeCoef05HCAL10());
owner()->writeMultipleRegister(PRESSURE_SENSOR_SLOPE_05HCAL10_REGISTER, val32);
val32 = (int16) (owner()->pressureZeroOffsetCoef05HCAL10());
val32 = static_cast<float32>(owner()->pressureZeroOffsetCoef05HCAL10());
owner()->writeMultipleRegister(PRESSURE_SENSOR_ZERO_OFFSET_05HCAL10_REGISTER, val32);
val32 = static_cast<float32>(owner()->humiditySlopeCoef06HCAL10());
owner()->writeMultipleRegister(HUMIDITY_SENSOR_SLOPE_06HCAL10_REGISTER, val32);
val32 = (int16) (owner()->humidityZeroOffsetCoef06HCAL10());
val32 = static_cast<float32>(owner()->humidityZeroOffsetCoef06HCAL10());
owner()->writeMultipleRegister(HUMIDITY_SENSOR_ZERO_OFFSET_06HCAL10_REGISTER, val32);
val32 = (int16) (owner()->pressureSlopeCoef06HCAL10());
val32 = static_cast<float32>(owner()->pressureSlopeCoef06HCAL10());
owner()->writeMultipleRegister(PRESSURE_SENSOR_SLOPE_06HCAL10_REGISTER, val32);
val32 = (int16) (owner()->pressureZeroOffsetCoef06HCAL10());
val32 = static_cast<float32>(owner()->pressureZeroOffsetCoef06HCAL10());
owner()->writeMultipleRegister(PRESSURE_SENSOR_ZERO_OFFSET_06HCAL10_REGISTER, val32);
}
......@@ -169,6 +169,10 @@ void RealHumidityChamberV4Driver::start() {
owner()->writeMultipleRegister(SAMPLE_TEMP_SETPOINT_REGISTER, val32);
val32 = static_cast<float32>(owner()->wantedBathReservoirTemperature());
owner()->writeMultipleRegister(RESERVOIR_TEMP_SETPOINT_REGISTER, val32);
val32 = static_cast<float32>(owner()->wantedGonioTemperature());
owner()->writeMultipleRegister(SAMPLE_TEMP_SETPOINT_REGISTER, val32);
val = static_cast<int16>(owner()->gonioHeater());
owner()->writeSingleRegister(WANTED_GONIO_TEMPERATURE_REGISTER, val);
}
}
......
......@@ -48,6 +48,10 @@ HumidityChamberV4Driver.wanted_temperaturePrefix=Wanted Temp.
HumidityChamberV4Driver.wanted_humidityPrefix=Wanted humidity
HumidityChamberV4Driver.wanted_bath_sample_temperaturePrefix=Wanted Bath sample Temp.
HumidityChamberV4Driver.wanted_bath_reservoir_temperaturePrefix=Wanted Bath reservoir Temp.
HumidityChamberV4Driver.wanted_gonio_temperaturePrefix=Wanted Gonio Temp.
HumidityChamberV4Driver.gonio_heaterPrefix=Gonio Heater
HumidityChamberV4Driver.gonio_heaterCheckedValue=1
HumidityChamberV4Driver.gonio_heaterUncheckedValue=0
HumidityChamberV4Driver.tolerancePrefix=Tolerance
HumidityChamberV4Driver.statusPrefix=Status
......
......@@ -53,6 +53,13 @@
<property name="actual_reservoir_temperature" type="float64" max_length="6">
<decimal_format nb_decimal_places="2"/>
</property>
<property name="wanted_gonio_temperature" type="float64" max_length="6">
<decimal_format nb_decimal_places="2"/>
</property>
<property name="gonio_heater" type="int32">
</property>
<property name="measured_humidity" type="float64" max_length="4">
<decimal_format nb_decimal_places="1"/>
......
......@@ -81,6 +81,10 @@
<text role="HumidityChamberV4Driver1" property="wanted_bath_sample_temperature" prefix="HumidityChamberV4Driver.wanted_bath_sample_temperaturePrefix" suffix="HumidityChamberV4Driver.degreeCelsius"/>
<newLine/>
<text role="HumidityChamberV4Driver1" property="wanted_bath_reservoir_temperature" prefix="HumidityChamberV4Driver.wanted_bath_reservoir_temperaturePrefix" suffix="HumidityChamberV4Driver.degreeCelsius"/>
<newLine/>
<text role="HumidityChamberV4Driver1" property="wanted_gonio_temperature" prefix="HumidityChamberV4Driver.wanted_gonio_temperaturePrefix" suffix="HumidityChamberV4Driver.degreeCelsius"/>
<newLine/>
<check role="HumidityChamberV4Driver1" property="gonio_heater" prefix="HumidityChamberV4Driver.gonio_heaterPrefix" checkBoxValues="HumidityChamberV4Driver.gonio_heater"/>
</switchable_composite>
<newLine/>
<text role="HumidityChamberV4Driver1" property="tolerance" prefix="HumidityChamberV4Driver.tolerancePrefix" suffix="HumidityChamberV4Driver.degreeCelsius"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment