diff --git a/acceleration.ui b/acceleration.ui
index 90138e4..10182ec 100644
--- a/acceleration.ui
+++ b/acceleration.ui
@@ -483,11 +483,36 @@
25
+ -
+
+ g
+
+
+ -
+
+ m/s**2
+
+
+ -
+
+ mm/s
+
+
+ -
+
+ inch/s
+
+
-
um
+ -
+
+ mm
+
+
@@ -720,6 +745,9 @@
+
+ false
+
220
@@ -730,6 +758,9 @@
+
+ false
+
150
@@ -740,6 +771,9 @@
+
+ false
+
80
@@ -750,6 +784,9 @@
+
+ false
+
220
@@ -760,6 +797,9 @@
+
+ false
+
80
@@ -770,6 +810,9 @@
+
+ false
+
150
@@ -806,6 +849,9 @@
+
+ false
+
290
@@ -819,6 +865,9 @@
+
+ false
+
290
@@ -845,6 +894,9 @@
+
+ false
+
350
@@ -871,6 +923,9 @@
+
+ false
+
350
diff --git a/config_mgr.cpp b/config_mgr.cpp
index d00abe2..27a309d 100644
--- a/config_mgr.cpp
+++ b/config_mgr.cpp
@@ -41,13 +41,13 @@ void ConfigMgr::Save(QString & file_path) {
card_type_[i] != kCardRelaySingleNOK) {
continue;
}
- qDebug() << "i" << i ;
// process slot
QJsonObject slot_item;
if (card_type_[i] != kCardRelaySingle &&
card_type_[i] != kCardRelayTMRPrimary &&
card_type_[i] != kCardRelaySingleNOK &&
card_type_[i] != kCardRelayTMRBackup) {
+ QJsonObject dc_output;
for (int cid = 0; cid < CHANNEL_COUNT; ++cid) {
QJsonObject channel_item;
if (card_type_[i] == kCardVibSingle ||
@@ -75,8 +75,14 @@ void ConfigMgr::Save(QString & file_path) {
voltage_range.append(ptr->base_config_[cid].normal_voltage_low);
voltage_range.append(ptr->base_config_[cid].normal_voltage_high);
channel_item["normal_voltage_range"] = voltage_range;
- QJsonObject dc_output;
- QJsonArray dc_output_array;
+ // output channel
+ QJsonObject dc_output_item;
+ if(ptr->dc_output[cid].output_channel != -1){
+ dc_output_item["output_channel"] = ptr->dc_output[cid].output_channel;
+ dc_output_item["minmum"] = ptr->dc_output[cid].minmum;
+ dc_output_item["maxmum"] = ptr->dc_output[cid].maxmum;
+ dc_output[QString::number(cid + 1)] = dc_output_item;
+ }
if(ptr->base_config_[cid].channel_type == kVibRadial || ptr->base_config_[cid].channel_type == kVibThrust ||
ptr->base_config_[cid].channel_type == kVibAcc || ptr->base_config_[cid].channel_type == kVibVelocity ){
if(ptr->base_config_[cid].channel_type != kVibThrust){
@@ -85,16 +91,6 @@ void ConfigMgr::Save(QString & file_path) {
channel_item["keyphase_ch"] = ptr->base_config_[cid].keyphase_ch;
}
}
- for(int var = 0 ; var < CHANNEL_COUNT; ++ var ){
- if(ptr->dc_output[cid][var].output_channel > 0){
- dc_output["output_channel"] = ptr->dc_output[cid][var].output_channel;
- dc_output["minmum"] = ptr->dc_output[cid][var].minmum;
- dc_output["maxmum"] = ptr->dc_output[cid][var].maxmum;
- dc_output_array.append(dc_output);
- }
-
- }
- channel_item["dc_output"] = dc_output_array;
// if(ptr->base_config_[cid].channel_type == kVibPressurePulsation){
// setpoint_data["low_upper"] = qRound(ptr->alert_danger_press[cid].low_upper * 10)/10.0;
// setpoint_data["low_enable"] = ptr->alert_danger_press[cid].low_enable;
@@ -152,16 +148,16 @@ void ConfigMgr::Save(QString & file_path) {
alarm["alert_high_delay"] = radial_ptr->alert_high.delay;
alarm["alert_high_enable"] = radial_ptr->alert_high.enable;
alarm["alert_high_latch"] = radial_ptr->alert_high.latch;
- alarm["danger_low_level"] = radial_ptr->danger_low.level;
- alarm["danger_low_hysteresis"] = radial_ptr->danger_low.hysteresis;
- alarm["danger_low_delay"] = radial_ptr->danger_low.delay;
- alarm["danger_low_enable"] = radial_ptr->danger_low.enable;
- alarm["danger_low_latch"] = radial_ptr->danger_low.latch;
- alarm["alert_low_level"] = radial_ptr->alert_low.level;
- alarm["alert_low_hysteresis"] = radial_ptr->alert_low.hysteresis;
- alarm["alert_low_delay"] = radial_ptr->alert_low.delay;
- alarm["alert_low_enable"] = radial_ptr->alert_low.enable;
- alarm["alert_low_latch"] = radial_ptr->alert_low.latch;
+// alarm["danger_low_level"] = radial_ptr->danger_low.level;
+// alarm["danger_low_hysteresis"] = radial_ptr->danger_low.hysteresis;
+// alarm["danger_low_delay"] = radial_ptr->danger_low.delay;
+// alarm["danger_low_enable"] = radial_ptr->danger_low.enable;
+// alarm["danger_low_latch"] = radial_ptr->danger_low.latch;
+// alarm["alert_low_level"] = radial_ptr->alert_low.level;
+// alarm["alert_low_hysteresis"] = radial_ptr->alert_low.hysteresis;
+// alarm["alert_low_delay"] = radial_ptr->alert_low.delay;
+// alarm["alert_low_enable"] = radial_ptr->alert_low.enable;
+// alarm["alert_low_latch"] = radial_ptr->alert_low.latch;
measurement["general"] = general;
measurement["alarm"] = alarm;
variables["measurement"] = measurement;
@@ -181,16 +177,16 @@ void ConfigMgr::Save(QString & file_path) {
gap_alarm["alert_high_delay"] = radial_ptr->gap_alert_high.delay;
gap_alarm["alert_high_enable"] = radial_ptr->gap_alert_high.enable;
gap_alarm["alert_high_latch"] = radial_ptr->gap_alert_high.latch;
- gap_alarm["danger_low_level"] = radial_ptr->gap_danger_low.level;
- gap_alarm["danger_low_hysteresis"] = radial_ptr->gap_danger_low.hysteresis;
- gap_alarm["danger_low_delay"] = radial_ptr->gap_danger_low.delay;
- gap_alarm["danger_low_enable"] = radial_ptr->gap_danger_low.enable;
- gap_alarm["danger_low_latch"] = radial_ptr->gap_danger_low.latch;
- gap_alarm["alert_low_level"] = radial_ptr->gap_alert_low.level;
- gap_alarm["alert_low_hysteresis"] = radial_ptr->gap_alert_low.hysteresis;
- gap_alarm["alert_low_delay"] = radial_ptr->gap_alert_low.delay;
- gap_alarm["alert_low_enable"] = radial_ptr->gap_alert_low.enable;
- gap_alarm["alert_low_latch"] = radial_ptr->gap_alert_low.latch;
+// gap_alarm["danger_low_level"] = radial_ptr->gap_danger_low.level;
+// gap_alarm["danger_low_hysteresis"] = radial_ptr->gap_danger_low.hysteresis;
+// gap_alarm["danger_low_delay"] = radial_ptr->gap_danger_low.delay;
+// gap_alarm["danger_low_enable"] = radial_ptr->gap_danger_low.enable;
+// gap_alarm["danger_low_latch"] = radial_ptr->gap_danger_low.latch;
+// gap_alarm["alert_low_level"] = radial_ptr->gap_alert_low.level;
+// gap_alarm["alert_low_hysteresis"] = radial_ptr->gap_alert_low.hysteresis;
+// gap_alarm["alert_low_delay"] = radial_ptr->gap_alert_low.delay;
+// gap_alarm["alert_low_enable"] = radial_ptr->gap_alert_low.enable;
+// gap_alarm["alert_low_latch"] = radial_ptr->gap_alert_low.latch;
gap["general"] = gap_general;
gap["alarm"] = gap_alarm;
variables["gap"] = gap;
@@ -285,7 +281,9 @@ void ConfigMgr::Save(QString & file_path) {
scaling["scale_max"] = pressure_ptr->scale_max;
variables["sampling"] = sampling;
variables["scaling"] = scaling;
-
+ QJsonObject general;
+ general["engieneering_unit"] = pressure_ptr->general.engineering_unit;
+ variables["general"] = general;
QJsonObject freband_output,number;
for (int var = 0; var < 10; ++var) {
if(pressure_ptr->freband_output[var].start != 0 || pressure_ptr->freband_output[var].end != 0){
@@ -293,7 +291,6 @@ void ConfigMgr::Save(QString & file_path) {
freband_output["start"] = pressure_ptr->freband_output[var].start;
freband_output["end"] = pressure_ptr->freband_output[var].end;
number[QString::number(var + 1)] = freband_output;
- //freband_output_array.append(freband_output);
}
}
variables["freband_output"] = number;
@@ -337,20 +334,19 @@ void ConfigMgr::Save(QString & file_path) {
alarm["alert_high_delay"] = av_ptr->alert_high.delay;
alarm["alert_high_enable"] = av_ptr->alert_high.enable;
alarm["alert_high_latch"] = av_ptr->alert_high.latch;
- alarm["danger_low_level"] = av_ptr->danger_low.level;
- alarm["danger_low_hysteresis"] = av_ptr->danger_low.hysteresis;
- alarm["danger_low_delay"] = av_ptr->danger_low.delay;
- alarm["danger_low_enable"] = av_ptr->danger_low.enable;
- alarm["danger_low_latch"] = av_ptr->danger_low.latch;
- alarm["alert_low_level"] = av_ptr->alert_low.level;
- alarm["alert_low_hysteresis"] = av_ptr->alert_low.hysteresis;
- alarm["alert_low_delay"] = av_ptr->alert_low.delay;
- alarm["alert_low_enable"] = av_ptr->alert_low.enable;
- alarm["alert_low_latch"] = av_ptr->alert_low.latch;
+// alarm["danger_low_level"] = av_ptr->danger_low.level;
+// alarm["danger_low_hysteresis"] = av_ptr->danger_low.hysteresis;
+// alarm["danger_low_delay"] = av_ptr->danger_low.delay;
+// alarm["danger_low_enable"] = av_ptr->danger_low.enable;
+// alarm["danger_low_latch"] = av_ptr->danger_low.latch;
+// alarm["alert_low_level"] = av_ptr->alert_low.level;
+// alarm["alert_low_hysteresis"] = av_ptr->alert_low.hysteresis;
+// alarm["alert_low_delay"] = av_ptr->alert_low.delay;
+// alarm["alert_low_enable"] = av_ptr->alert_low.enable;
+// alarm["alert_low_latch"] = av_ptr->alert_low.latch;
processed_output["general"] = general;
processed_output["alarm"] = alarm;
variables["processed_output"] = processed_output;
- //QJsonArray freband_output_array;
QJsonObject freband_output,number;
for (int var = 0; var < 10; ++var) {
if(av_ptr->freband_output[var].start != 0 || av_ptr->freband_output[var].end != 0){
@@ -358,7 +354,6 @@ void ConfigMgr::Save(QString & file_path) {
freband_output["start"] = av_ptr->freband_output[var].start;
freband_output["end"] = av_ptr->freband_output[var].end;
number[QString::number(var + 1)] = freband_output;
- //freband_output_array.append(freband_output);
}
}
variables["freband_output"] = number;
@@ -402,16 +397,16 @@ void ConfigMgr::Save(QString & file_path) {
alarm["alert_high_delay"] = vel_ptr->alert_high.delay;
alarm["alert_high_enable"] = vel_ptr->alert_high.enable;
alarm["alert_high_latch"] = vel_ptr->alert_high.latch;
- alarm["danger_low_level"] = vel_ptr->danger_low.level;
- alarm["danger_low_hysteresis"] = vel_ptr->danger_low.hysteresis;
- alarm["danger_low_delay"] = vel_ptr->danger_low.delay;
- alarm["danger_low_enable"] = vel_ptr->danger_low.enable;
- alarm["danger_low_latch"] = vel_ptr->danger_low.latch;
- alarm["alert_low_level"] = vel_ptr->alert_low.level;
- alarm["alert_low_hysteresis"] = vel_ptr->alert_low.hysteresis;
- alarm["alert_low_delay"] = vel_ptr->alert_low.delay;
- alarm["alert_low_enable"] = vel_ptr->alert_low.enable;
- alarm["alert_low_latch"] = vel_ptr->alert_low.latch;
+// alarm["danger_low_level"] = vel_ptr->danger_low.level;
+// alarm["danger_low_hysteresis"] = vel_ptr->danger_low.hysteresis;
+// alarm["danger_low_delay"] = vel_ptr->danger_low.delay;
+// alarm["danger_low_enable"] = vel_ptr->danger_low.enable;
+// alarm["danger_low_latch"] = vel_ptr->danger_low.latch;
+// alarm["alert_low_level"] = vel_ptr->alert_low.level;
+// alarm["alert_low_hysteresis"] = vel_ptr->alert_low.hysteresis;
+// alarm["alert_low_delay"] = vel_ptr->alert_low.delay;
+// alarm["alert_low_enable"] = vel_ptr->alert_low.enable;
+// alarm["alert_low_latch"] = vel_ptr->alert_low.latch;
processed_output["general"] = general;
processed_output["alarm"] = alarm;
variables["processed_output"] = processed_output;
@@ -465,6 +460,7 @@ void ConfigMgr::Save(QString & file_path) {
channel_item.insert("automatic_threshold",ptr->variables_[cid].automatic_threshold);
}
slot_item[QString::number(cid + 1)] = channel_item;
+ slot_item["dc_output"] = dc_output;
}
slot_item["version"] = 1;
}else{
@@ -549,6 +545,20 @@ void ConfigMgr::Load(QString filename) {
vib_data->version_ = temp_obj["version"].toInt();
vib_data->card_type_ = static_cast(card_type_[i]);
vib_data->slot_ = slot;
+ // dc_output
+ QJsonObject dc_output_obj = temp_obj["dc_output"].toObject();
+ if(!dc_output_obj.isEmpty()){
+ QJsonObject output_obj;
+ for (int var = 0; var < CHANNEL_COUNT; ++var) {
+ output_obj = dc_output_obj[QString::number(var + 1)].toObject();
+ if(output_obj.isEmpty())
+ continue;
+ vib_data->dc_output[var].output_channel = output_obj["output_channel"].toInt();
+ vib_data->dc_output[var].minmum = output_obj["minmum"].toDouble();
+ vib_data->dc_output[var].maxmum = output_obj["maxmum"].toDouble();
+ }
+
+ }
for (int j = 0; j < CHANNEL_COUNT; ++j) {
std::shared_ptr base_channel_ptr = vib_data->GetChannelPtr(j + 1);
channel = temp_obj[QString::number(j + 1)].toObject();
@@ -582,16 +592,7 @@ void ConfigMgr::Load(QString filename) {
vib_data->base_config_[j].keyphase_slot = channel["keyphase_slot"].toInt();
vib_data->base_config_[j].keyphase_ch = channel["keyphase_ch"].toInt();
}
- // dc_output
- QJsonArray dc_output_array = channel["dc_output"].toArray();
- if(!dc_output_array.isEmpty()){
- for(int var = 0 ; var < CHANNEL_COUNT; ++var){
- QJsonObject dc_output_obj = dc_output_array[var].toObject();
- vib_data->dc_output[j][var].output_channel = dc_output_obj["output_channel"].toInt();
- vib_data->dc_output[j][var].minmum = dc_output_obj["minmum"].toInt();
- vib_data->dc_output[j][var].maxmum = dc_output_obj["maxmum"].toInt();
- }
- }
+
// if(vib_data->base_config_[j].channel_type == kVibPressurePulsation){
// vib_data->alert_danger_press[j].low_upper = setpoint_data["low_upper"].toDouble();
// vib_data->alert_danger_press[j].low_enable = setpoint_data["low_enable"].toBool();
@@ -637,16 +638,16 @@ void ConfigMgr::Load(QString filename) {
variable->alert_high.delay = m_alarm["alert_high_delay"].toInt();
variable->alert_high.enable = m_alarm["alert_high_enable"].toBool();
variable->alert_high.latch = m_alarm["alert_high_latch"].toBool();
- variable->danger_low.level = m_alarm["danger_low_level"].toDouble();
- variable->danger_low.hysteresis = m_alarm["danger_low_hysteresis"].toDouble();
- variable->danger_low.delay = m_alarm["danger_low_delay"].toInt();
- variable->danger_low.enable = m_alarm["danger_low_enable"].toBool();
- variable->danger_low.latch = m_alarm["danger_low_latch"].toBool();
- variable->alert_low.level = m_alarm["alert_low_level"].toDouble();
- variable->alert_low.hysteresis = m_alarm["alert_low_hysteresis"].toDouble();
- variable->alert_low.delay = m_alarm["alert_low_delay"].toInt();
- variable->alert_low.enable = m_alarm["alert_low_enable"].toBool();
- variable->alert_low.latch = m_alarm["alert_low_latch"].toBool();
+// variable->danger_low.level = m_alarm["danger_low_level"].toDouble();
+// variable->danger_low.hysteresis = m_alarm["danger_low_hysteresis"].toDouble();
+// variable->danger_low.delay = m_alarm["danger_low_delay"].toInt();
+// variable->danger_low.enable = m_alarm["danger_low_enable"].toBool();
+// variable->danger_low.latch = m_alarm["danger_low_latch"].toBool();
+// variable->alert_low.level = m_alarm["alert_low_level"].toDouble();
+// variable->alert_low.hysteresis = m_alarm["alert_low_hysteresis"].toDouble();
+// variable->alert_low.delay = m_alarm["alert_low_delay"].toInt();
+// variable->alert_low.enable = m_alarm["alert_low_enable"].toBool();
+// variable->alert_low.latch = m_alarm["alert_low_latch"].toBool();
variable->gap_general.output_used = g_general["output_used"].toBool();
variable->gap_general.engineering_unit = g_general["engieneering_unit"].toInt();
@@ -661,16 +662,16 @@ void ConfigMgr::Load(QString filename) {
variable->gap_alert_high.delay = g_alarm["alert_high_delay"].toInt();
variable->gap_alert_high.enable = g_alarm["alert_high_enable"].toBool();
variable->gap_alert_high.latch = g_alarm["alert_high_latch"].toBool();
- variable->gap_danger_low.level = g_alarm["danger_low_level"].toDouble();
- variable->gap_danger_low.hysteresis = g_alarm["danger_low_hysteresis"].toDouble();
- variable->gap_danger_low.delay = g_alarm["danger_low_delay"].toInt();
- variable->gap_danger_low.enable = g_alarm["danger_low_enable"].toBool();
- variable->gap_danger_low.latch = g_alarm["danger_low_latch"].toBool();
- variable->gap_alert_low.level = g_alarm["alert_low_level"].toDouble();
- variable->gap_alert_low.hysteresis = g_alarm["alert_low_hysteresis"].toDouble();
- variable->gap_alert_low.delay = g_alarm["alert_low_delay"].toInt();
- variable->gap_alert_low.enable = g_alarm["alert_low_enable"].toBool();
- variable->gap_alert_low.latch = g_alarm["alert_low_latch"].toBool();
+// variable->gap_danger_low.level = g_alarm["danger_low_level"].toDouble();
+// variable->gap_danger_low.hysteresis = g_alarm["danger_low_hysteresis"].toDouble();
+// variable->gap_danger_low.delay = g_alarm["danger_low_delay"].toInt();
+// variable->gap_danger_low.enable = g_alarm["danger_low_enable"].toBool();
+// variable->gap_danger_low.latch = g_alarm["danger_low_latch"].toBool();
+// variable->gap_alert_low.level = g_alarm["alert_low_level"].toDouble();
+// variable->gap_alert_low.hysteresis = g_alarm["alert_low_hysteresis"].toDouble();
+// variable->gap_alert_low.delay = g_alarm["alert_low_delay"].toInt();
+// variable->gap_alert_low.enable = g_alarm["alert_low_enable"].toBool();
+// variable->gap_alert_low.latch = g_alarm["alert_low_latch"].toBool();
vib_data->variables_.push_back(variable);
break;
@@ -728,17 +729,33 @@ void ConfigMgr::Load(QString filename) {
variable->filter_[k].checked = filter_ele["checked"].toBool();
}
variable->id_ = j + 1;
- QJsonObject sampling,scaling;
- sampling = tmp_variable["sampling"].toObject();
- scaling = tmp_variable["scaling"].toObject();
- variable->fixed = sampling["fixed"].toBool();
- variable->sample_rate = sampling["sample_rate"].toInt();
- variable->bandwidth = sampling["band_width"].toInt();
- variable->fft_points = sampling["fft_points"].toInt();
- variable->measuring_min = scaling["measuring_min"].toInt();
- variable->measuring_max = scaling["measuring_max"].toInt();
- variable->scale_min = scaling["scale_min"].toInt();
- variable->scale_max = scaling["scale_max"].toInt();
+ QJsonObject processed_output, general, alarm;
+ processed_output = tmp_variable["processed_output"].toObject();
+ general = processed_output["general"].toObject();
+ alarm = processed_output["alarm"].toObject();
+ variable->general.output_used = general["output_used"].toBool();
+ variable->general.engineering_unit = general["engieneering_unit"].toInt();
+ variable->general.rectifier_function = general["rectifier_function"].toInt();
+ variable->danger_high.level = alarm["danger_high_level"].toDouble();
+ variable->danger_high.hysteresis = alarm["danger_high_hysteresis"].toDouble();
+ variable->danger_high.delay = alarm["danger_high_delay"].toInt();
+ variable->danger_high.enable = alarm["danger_high_enable"].toBool();
+ variable->danger_high.latch = alarm["danger_high_latch"].toBool();
+ variable->alert_high.level = alarm["alert_high_level"].toDouble();
+ variable->alert_high.hysteresis = alarm["alert_high_hysteresis"].toDouble();
+ variable->alert_high.delay = alarm["alert_high_delay"].toInt();
+ variable->alert_high.enable = alarm["alert_high_enable"].toBool();
+ variable->alert_high.latch = alarm["alert_high_latch"].toBool();
+// variable->danger_low.level = alarm["danger_low_level"].toDouble();
+// variable->danger_low.hysteresis = alarm["danger_low_hysteresis"].toDouble();
+// variable->danger_low.delay = alarm["danger_low_delay"].toInt();
+// variable->danger_low.enable = alarm["danger_low_enable"].toBool();
+// variable->danger_low.latch = alarm["danger_low_latch"].toBool();
+// variable->alert_low.level = alarm["alert_low_level"].toDouble();
+// variable->alert_low.hysteresis = alarm["alert_low_hysteresis"].toDouble();
+// variable->alert_low.delay = alarm["alert_low_delay"].toInt();
+// variable->alert_low.enable = alarm["alert_low_enable"].toBool();
+// variable->alert_low.latch = alarm["alert_low_latch"].toBool();
QJsonObject freband_output_obj = tmp_variable["freband_output"].toObject();
QJsonObject number_obj;
for (int k = 0; k < 10; ++k) {
@@ -782,16 +799,16 @@ void ConfigMgr::Load(QString filename) {
variable->alert_high.delay = alarm["alert_high_delay"].toInt();
variable->alert_high.enable = alarm["alert_high_enable"].toBool();
variable->alert_high.latch = alarm["alert_high_latch"].toBool();
- variable->danger_low.level = alarm["danger_low_level"].toDouble();
- variable->danger_low.hysteresis = alarm["danger_low_hysteresis"].toDouble();
- variable->danger_low.delay = alarm["danger_low_delay"].toInt();
- variable->danger_low.enable = alarm["danger_low_enable"].toBool();
- variable->danger_low.latch = alarm["danger_low_latch"].toBool();
- variable->alert_low.level = alarm["alert_low_level"].toDouble();
- variable->alert_low.hysteresis = alarm["alert_low_hysteresis"].toDouble();
- variable->alert_low.delay = alarm["alert_low_delay"].toInt();
- variable->alert_low.enable = alarm["alert_low_enable"].toBool();
- variable->alert_low.latch = alarm["alert_low_latch"].toBool();
+// variable->danger_low.level = alarm["danger_low_level"].toDouble();
+// variable->danger_low.hysteresis = alarm["danger_low_hysteresis"].toDouble();
+// variable->danger_low.delay = alarm["danger_low_delay"].toInt();
+// variable->danger_low.enable = alarm["danger_low_enable"].toBool();
+// variable->danger_low.latch = alarm["danger_low_latch"].toBool();
+// variable->alert_low.level = alarm["alert_low_level"].toDouble();
+// variable->alert_low.hysteresis = alarm["alert_low_hysteresis"].toDouble();
+// variable->alert_low.delay = alarm["alert_low_delay"].toInt();
+// variable->alert_low.enable = alarm["alert_low_enable"].toBool();
+// variable->alert_low.latch = alarm["alert_low_latch"].toBool();
vib_data->variables_.push_back(variable);
break;
}
@@ -823,16 +840,16 @@ void ConfigMgr::Load(QString filename) {
variable->alert_high.delay = alarm["alert_high_delay"].toInt();
variable->alert_high.enable = alarm["alert_high_enable"].toBool();
variable->alert_high.latch = alarm["alert_high_latch"].toBool();
- variable->danger_low.level = alarm["danger_low_level"].toDouble();
- variable->danger_low.hysteresis = alarm["danger_low_hysteresis"].toDouble();
- variable->danger_low.delay = alarm["danger_low_delay"].toInt();
- variable->danger_low.enable = alarm["danger_low_enable"].toBool();
- variable->danger_low.latch = alarm["danger_low_latch"].toBool();
- variable->alert_low.level = alarm["alert_low_level"].toDouble();
- variable->alert_low.hysteresis = alarm["alert_low_hysteresis"].toDouble();
- variable->alert_low.delay = alarm["alert_low_delay"].toInt();
- variable->alert_low.enable = alarm["alert_low_enable"].toBool();
- variable->alert_low.latch = alarm["alert_low_latch"].toBool();
+// variable->danger_low.level = alarm["danger_low_level"].toDouble();
+// variable->danger_low.hysteresis = alarm["danger_low_hysteresis"].toDouble();
+// variable->danger_low.delay = alarm["danger_low_delay"].toInt();
+// variable->danger_low.enable = alarm["danger_low_enable"].toBool();
+// variable->danger_low.latch = alarm["danger_low_latch"].toBool();
+// variable->alert_low.level = alarm["alert_low_level"].toDouble();
+// variable->alert_low.hysteresis = alarm["alert_low_hysteresis"].toDouble();
+// variable->alert_low.delay = alarm["alert_low_delay"].toInt();
+// variable->alert_low.enable = alarm["alert_low_enable"].toBool();
+// variable->alert_low.latch = alarm["alert_low_latch"].toBool();
QJsonObject freband_output_obj = tmp_variable["freband_output"].toObject();
QJsonObject number_obj;
for (int k = 0; k < 10; ++k) {
@@ -894,8 +911,10 @@ void ConfigMgr::Load(QString filename) {
channel = temp_obj[QString::number(j + 1)].toObject();
keyphase_data->variables_[j].active = channel["active"].toBool();
QJsonArray voltage_range_array = channel["normal_voltage_range"].toArray();
- keyphase_data->variables_[j].normal_voltage_high = voltage_range_array[1].toDouble();
- keyphase_data->variables_[j].normal_voltage_low = voltage_range_array[0].toDouble();
+ if(voltage_range_array.size() > 0){
+ keyphase_data->variables_[j].normal_voltage_high = voltage_range_array[1].toDouble();
+ keyphase_data->variables_[j].normal_voltage_low = voltage_range_array[0].toDouble();
+ }
keyphase_data->variables_[j].threshold = channel["threshold"].toDouble();
keyphase_data->variables_[j].hysteresis = channel["hysteresis"].toDouble();
keyphase_data->variables_[j].events_per_revolution = channel["events_per_revolution"].toInt();
diff --git a/data_config.h b/data_config.h
index be4489e..654c441 100644
--- a/data_config.h
+++ b/data_config.h
@@ -10,11 +10,12 @@ typedef unsigned short uint16_t;
typedef struct {
bool used[4]; // 是否已配置
+ int channel;
}ChannelUsed;
extern QString g_strServerIp; // 服务端IP
extern QString g_version;
-extern ChannelUsed ch_used;
+extern ChannelUsed ch_used[22];
#define SLOT_NUM 15
#define CHANNEL_COUNT 4
#define RELAY_COUNT 16
@@ -273,7 +274,7 @@ typedef struct DCOutput_{
float minmum;
float maxmum;
DCOutput_(){
- output_channel = 0;
+ output_channel = -1;
minmum = 0;
maxmum = 0;
}
diff --git a/dc_output_channel.cpp b/dc_output_channel.cpp
index acd163f..7ecc3bd 100644
--- a/dc_output_channel.cpp
+++ b/dc_output_channel.cpp
@@ -2,24 +2,39 @@
#include "ui_dc_output_channel.h"
#include
#include "data_config.h"
+#include
-
-DC_Output_Channel::DC_Output_Channel(QString unit_str_,QWidget *parent) :
+DC_Output_Channel::DC_Output_Channel(QString unit_str_,int current_index_,QWidget *parent) :
QWidget(parent),
ui(new Ui::DC_Output_Channel)
{
ui->setupUi(this);
unit_str = unit_str_;
+ current_index = current_index_;
ui->label_min_unit->setText(unit_str);
ui->label_max_unit->setText(unit_str);
radiobtn[0] = ui->radioButton;
radiobtn[1] = ui->radioButton_2;
radiobtn[2] = ui->radioButton_3;
radiobtn[3] = ui->radioButton_4;
- for (int i = 0; i < 4; i++) {
- if(ch_used.used[i])
- radiobtn[i]->setEnabled(false);
+ radiobtn[4] = ui->radioButton_5;
+ int not_used = 0;
+ for (int i = 0; i < 22; i++) {
+ for (int j = 0; j < 4; j++){
+ if(ch_used[i].used[j] && current_index == i){
+ radiobtn[j]->setEnabled(true);
+ radiobtn[j]->setChecked(true);
+ first_used = j;
+ }else if(ch_used[i].used[j] && current_index != i){
+ radiobtn[j]->setEnabled(false);
+ }else if(!ch_used[i].used[j] && current_index == i){
+ not_used ++;
+ }
+ }
+ }
+ if(not_used == 4){
+ ui->radioButton_5->setChecked(true);
}
}
@@ -31,8 +46,8 @@ DC_Output_Channel::~DC_Output_Channel()
void DC_Output_Channel::on_pushButton_confirm_clicked()
{
int channel = 0;
- if((ui->lineEdit_minmum->text().toFloat() >= ui->lineEdit_maxmum->text().toFloat()) ||
- (ui->lineEdit_minmum->text().toFloat() == 0 && ui->lineEdit_maxmum->text().toFloat() == 0)){
+ if(!ui->radioButton_5->isChecked() && ((ui->lineEdit_minmum->text().toFloat() >= ui->lineEdit_maxmum->text().toFloat()) ||
+ (ui->lineEdit_minmum->text().toFloat() == 0 && ui->lineEdit_maxmum->text().toFloat() == 0))){
QMessageBox::information(this, QStringLiteral("提示"), "请填写正确的最小值和最大值");
return;
}
@@ -44,11 +59,14 @@ void DC_Output_Channel::on_pushButton_confirm_clicked()
channel = 3;
}else if(ui->radioButton_4->isChecked()){
channel = 4;
+ }else if(ui->radioButton_5->isChecked()){
+ ch_used[current_index].used[first_used] = false;
+ channel = 5;
}else {
QMessageBox::information(this, QStringLiteral("提示"), "请选择正确的通道");
return;
}
- emit output_channel_data_sg(channel,ui->lineEdit_minmum->text().toFloat(),ui->lineEdit_maxmum->text().toFloat());
+ emit output_channel_data_sg(channel,ui->lineEdit_minmum->text().toFloat(),ui->lineEdit_maxmum->text().toFloat(),first_used);
this->close();
}
diff --git a/dc_output_channel.h b/dc_output_channel.h
index 5a24dfa..89098e0 100644
--- a/dc_output_channel.h
+++ b/dc_output_channel.h
@@ -13,10 +13,10 @@ class DC_Output_Channel : public QWidget
Q_OBJECT
public:
- explicit DC_Output_Channel(QString unit_str_,QWidget *parent = nullptr);
+ explicit DC_Output_Channel(QString unit_str_,int current_index_,QWidget *parent = nullptr);
~DC_Output_Channel();
signals:
- void output_channel_data_sg(int channel,float minmun,float maxmum);
+ void output_channel_data_sg(int channel,float minmun,float maxmum,int not_used);
private slots:
void on_pushButton_confirm_clicked();
@@ -25,8 +25,9 @@ private slots:
private:
Ui::DC_Output_Channel *ui;
QString unit_str;
- QRadioButton *radiobtn[4];
- bool channel_used[4] = {false,false,false,false};
+ int current_index;
+ int first_used;
+ QRadioButton *radiobtn[5];
};
#endif // DC_OUTPUT_CHANNEL_H
diff --git a/dc_output_channel.ui b/dc_output_channel.ui
index 404219a..cc9b19a 100644
--- a/dc_output_channel.ui
+++ b/dc_output_channel.ui
@@ -89,6 +89,22 @@
buttonGroup
+
+
+
+ 40
+ 150
+ 89
+ 16
+
+
+
+ 不使用
+
+
+ buttonGroup
+
+
diff --git a/dc_outputs.cpp b/dc_outputs.cpp
index 61cf5c8..7459b0e 100644
--- a/dc_outputs.cpp
+++ b/dc_outputs.cpp
@@ -7,7 +7,7 @@
#include "data_config.h"
#include "vibrationdata.h"
-ChannelUsed ch_used;
+ChannelUsed ch_used[22];
DC_Outputs::DC_Outputs(int slot_no_,int cardtype,QWidget *parent) :
QWidget(parent),
@@ -19,6 +19,30 @@ DC_Outputs::DC_Outputs(int slot_no_,int cardtype,QWidget *parent) :
car_type = static_cast(cardtype);
unit = "";
current_index = ui->comboBox_ch_output->currentIndex();
+ label_ch1[0] = ui->label_ch_1;
+ label_ch1[1] = ui->label_ch_1_min;
+ label_ch1[2] = ui->label_ch_1_min_unit;
+ label_ch1[3] = ui->label_ch_1_max;
+ label_ch1[4] = ui->label_ch_1_max_unit;
+
+ label_ch2[0] = ui->label_ch_2;
+ label_ch2[1] = ui->label_ch_2_min;
+ label_ch2[2] = ui->label_ch_2_min_unit;
+ label_ch2[3] = ui->label_ch_2_max;
+ label_ch2[4] = ui->label_ch_2_max_unit;
+
+ label_ch3[0] = ui->label_ch_3;
+ label_ch3[1] = ui->label_ch_3_min;
+ label_ch3[2] = ui->label_ch_3_min_unit;
+ label_ch3[3] = ui->label_ch_3_max;
+ label_ch3[4] = ui->label_ch_3_max_unit;
+
+ label_ch4[0] = ui->label_ch_4;
+ label_ch4[1] = ui->label_ch_4_min;
+ label_ch4[2] = ui->label_ch_4_min_unit;
+ label_ch4[3] = ui->label_ch_4_max;
+ label_ch4[4] = ui->label_ch_4_max_unit;
+
Init();
}
@@ -30,62 +54,98 @@ DC_Outputs::~DC_Outputs()
void DC_Outputs::Init(){
std::shared_ptr base_ptr = ConfigMgr::Instance()->GetSlotPtr(slot_no);
if (base_ptr == nullptr) {
- qCritical() << "[DC_Outputs"
-"::Init] should not be here";
+ qCritical() << "[DC_Outputs::Init] should not be here";
return;
}
vib_dc_output_ptr = std::dynamic_pointer_cast(base_ptr);
- QString unit_str = GetUnit();
- if(vib_dc_output_ptr->dc_output[current_index][0].output_channel == 1){
- ui->label_ch_1->setText("通道1");
- ui->label_ch_1_min->setText(QString::number(vib_dc_output_ptr->dc_output[current_index][0].minmum));
- ui->label_ch_1_max->setText(QString::number(vib_dc_output_ptr->dc_output[current_index][0].maxmum));
- ch_used.used[0] = true;
- }
- if(vib_dc_output_ptr->dc_output[current_index][1].output_channel == 2){
- ui->label_ch_2->setText("通道2");
- ui->label_ch_2_min->setText(QString::number(vib_dc_output_ptr->dc_output[current_index][1].minmum));
- ui->label_ch_2_max->setText(QString::number(vib_dc_output_ptr->dc_output[current_index][1].maxmum));
- ch_used.used[1] = true;
- }
- if(vib_dc_output_ptr->dc_output[current_index][2].output_channel == 3){
- ui->label_ch_3->setText("通道3");
- ui->label_ch_3_min->setText(QString::number(vib_dc_output_ptr->dc_output[current_index][2].minmum));
- ui->label_ch_3_max->setText(QString::number(vib_dc_output_ptr->dc_output[current_index][2].maxmum));
- ch_used.used[2] = true;
- }
- if(vib_dc_output_ptr->dc_output[current_index][3].output_channel == 4){
- ui->label_ch_4->setText("通道4");
- ui->label_ch_4_min->setText(QString::number(vib_dc_output_ptr->dc_output[current_index][3].minmum));
- ui->label_ch_4_max->setText(QString::number(vib_dc_output_ptr->dc_output[current_index][3].maxmum));
- ch_used.used[3] = true;
- }
+ QString unit_str = "";
+
+ if(vib_dc_output_ptr->dc_output[0].output_channel != -1){
+ unit_str = GetUnit(vib_dc_output_ptr->dc_output[0].output_channel);
+ ui->label_ch_1->setText(ui->comboBox_ch_output->itemText(vib_dc_output_ptr->dc_output[0].output_channel));
+ ui->label_ch_1_min->setText(QString::number(vib_dc_output_ptr->dc_output[0].minmum));
+ ui->label_ch_1_max->setText(QString::number(vib_dc_output_ptr->dc_output[0].maxmum));
+ ui->label_ch_1_min_unit->setText(unit_str);
+ ui->label_ch_1_max_unit->setText(unit_str);
+ ch_used[vib_dc_output_ptr->dc_output[0].output_channel].used[0] = true;
+ }
+ if(vib_dc_output_ptr->dc_output[1].output_channel != -1){
+ unit_str = GetUnit(vib_dc_output_ptr->dc_output[1].output_channel);
+ ui->label_ch_2->setText(ui->comboBox_ch_output->itemText(vib_dc_output_ptr->dc_output[1].output_channel));
+ ui->label_ch_2_min->setText(QString::number(vib_dc_output_ptr->dc_output[1].minmum));
+ ui->label_ch_2_max->setText(QString::number(vib_dc_output_ptr->dc_output[1].maxmum));
+ ui->label_ch_2_min_unit->setText(unit_str);
+ ui->label_ch_2_max_unit->setText(unit_str);
+ ch_used[vib_dc_output_ptr->dc_output[1].output_channel].used[1] = true;
+ }
+ if(vib_dc_output_ptr->dc_output[2].output_channel != -1){
+ unit_str = GetUnit(vib_dc_output_ptr->dc_output[2].output_channel);
+ ui->label_ch_3->setText(ui->comboBox_ch_output->itemText(vib_dc_output_ptr->dc_output[2].output_channel));
+ ui->label_ch_3_min->setText(QString::number(vib_dc_output_ptr->dc_output[2].minmum));
+ ui->label_ch_3_max->setText(QString::number(vib_dc_output_ptr->dc_output[2].maxmum));
+ ui->label_ch_3_min_unit->setText(unit_str);
+ ui->label_ch_3_max_unit->setText(unit_str);
+ ch_used[vib_dc_output_ptr->dc_output[2].output_channel].used[2] = true;
+ }
+ if(vib_dc_output_ptr->dc_output[3].output_channel != -1){
+ unit_str = GetUnit(vib_dc_output_ptr->dc_output[3].output_channel);
+ ui->label_ch_4->setText(ui->comboBox_ch_output->itemText(vib_dc_output_ptr->dc_output[3].output_channel));
+ ui->label_ch_4_min->setText(QString::number(vib_dc_output_ptr->dc_output[3].minmum));
+ ui->label_ch_4_max->setText(QString::number(vib_dc_output_ptr->dc_output[3].maxmum));
+ ui->label_ch_4_min_unit->setText(unit_str);
+ ui->label_ch_4_max_unit->setText(unit_str);
+ ch_used[vib_dc_output_ptr->dc_output[3].output_channel].used[3] = true;
+ }
+
}
-QString DC_Outputs::GetUnit(){
- int unit_num = -1;
+QString DC_Outputs::GetUnit(int com_index){
+ int unit_num = -1,channel_num = 0;
QString unit_str = "";
- std::shared_ptr variable_base = vib_dc_output_ptr->GetChannelPtr(current_index + 1);
- if (vib_dc_output_ptr->base_config_[current_index].channel_type == kVibRadial) {
+ channel_num = com_index;
+ if(com_index > 5 && com_index < 9){
+ channel_num = 0;
+ }
+ if(com_index > 9 && com_index < 13){
+ channel_num = 1;
+ }
+ if(com_index > 13 && com_index < 17){
+ channel_num = 2;
+ }
+ if(com_index > 17 && com_index < 21){
+ channel_num = 3;
+ }
+ if(com_index == 4) {
+ channel_num = 0;
+ }else if(com_index == 5){
+ channel_num = 2;
+ }
+ std::shared_ptr variable_base = vib_dc_output_ptr->GetChannelPtr(channel_num + 1);
+ if (vib_dc_output_ptr->base_config_[channel_num].channel_type == kVibRadial) {
std::shared_ptr variable_ptr = std::dynamic_pointer_cast(variable_base);
unit_num = variable_ptr->general.engineering_unit;
+ qDebug() << "unit_num1" << unit_num ;
}
- if (vib_dc_output_ptr->base_config_[current_index].channel_type == kVibAcc) {
+ if (vib_dc_output_ptr->base_config_[channel_num].channel_type == kVibAcc) {
std::shared_ptr variable_ptr = std::dynamic_pointer_cast(variable_base);
unit_num = variable_ptr->general.engineering_unit;
+ qDebug() << "unit_num2" << unit_num ;
}
- if (vib_dc_output_ptr->base_config_[current_index].channel_type == kVibVelocity) {
+ if (vib_dc_output_ptr->base_config_[channel_num].channel_type == kVibVelocity) {
std::shared_ptr variable_ptr = std::dynamic_pointer_cast(variable_base);
unit_num = variable_ptr->general.engineering_unit;
+ qDebug() << "unit_num3" << unit_num ;
}
- if (vib_dc_output_ptr->base_config_[current_index].channel_type == kVibThrust) {
+ if (vib_dc_output_ptr->base_config_[channel_num].channel_type == kVibThrust) {
std::shared_ptr variable_ptr = std::dynamic_pointer_cast(variable_base);
unit_num = variable_ptr->general.engineering_unit;
+ qDebug() << "unit_num4" << unit_num ;
}
- if (vib_dc_output_ptr->base_config_[current_index].channel_type == kVibPressurePulsation) {
+ if (vib_dc_output_ptr->base_config_[channel_num].channel_type == kVibPressurePulsation) {
std::shared_ptr variable_ptr = std::dynamic_pointer_cast(variable_base);
unit_num = variable_ptr->general.engineering_unit;
+ qDebug() << "unit_num5" << unit_num ;
}
switch (unit_num) {
case kUnit1:{
@@ -142,62 +202,121 @@ QString DC_Outputs::GetUnit(){
void DC_Outputs::on_comboBox_ch_output_activated(int index)
{
current_index = index;
- QString unit_str = GetUnit();
- DC_Output_Channel *dc_output_channel = new DC_Output_Channel(unit_str);
+ QString unit_str = GetUnit(current_index);
+ DC_Output_Channel *dc_output_channel = new DC_Output_Channel(unit_str,current_index);
dc_output_channel->setWindowModality(Qt::ApplicationModal);
- connect(dc_output_channel,SIGNAL(output_channel_data_sg(int,float,float)),this,SLOT(output_channel_data(int,float,float)));
+ connect(dc_output_channel,SIGNAL(output_channel_data_sg(int,float,float,int)),this,SLOT(output_channel_data(int,float,float,int)));
dc_output_channel->show();
}
-void DC_Outputs::output_channel_data(int channel,float minmun,float maxmum){
+void DC_Outputs::output_channel_data(int channel,float minmun,float maxmum,int not_used){
qDebug() << channel << minmun << maxmum ;
- QString unit_str = GetUnit();
+ QString unit_str = GetUnit(current_index);
+
if(channel == 1){
- ui->label_ch_1->setText("通道1");
+ ui->label_ch_1->setText(ui->comboBox_ch_output->currentText());
ui->label_ch_1_min->setText(QString::number(minmun));
ui->label_ch_1_max->setText(QString::number(maxmum));
- ch_used.used[0] = true;
+ ui->label_ch_1_min_unit->setText(unit_str);
+ ui->label_ch_1_max_unit->setText(unit_str);
+ ch_used[ui->comboBox_ch_output->currentIndex()].used[0] = true;
+ vib_dc_output_ptr->dc_output[0].output_channel = current_index;
+ vib_dc_output_ptr->dc_output[0].minmum = ui->label_ch_1_min->text().toFloat();
+ vib_dc_output_ptr->dc_output[0].maxmum = ui->label_ch_1_max->text().toFloat();
}else if(channel == 2){
- ui->label_ch_2->setText("通道2");
+ ui->label_ch_2->setText(ui->comboBox_ch_output->currentText());
ui->label_ch_2_min->setText(QString::number(minmun));
ui->label_ch_2_max->setText(QString::number(maxmum));
- ch_used.used[1] = true;
+ ui->label_ch_2_min_unit->setText(unit_str);
+ ui->label_ch_2_max_unit->setText(unit_str);
+ ch_used[ui->comboBox_ch_output->currentIndex()].used[1] = true;
+ vib_dc_output_ptr->dc_output[1].output_channel = current_index;
+ vib_dc_output_ptr->dc_output[1].minmum = ui->label_ch_2_min->text().toFloat();
+ vib_dc_output_ptr->dc_output[1].maxmum = ui->label_ch_2_max->text().toFloat();
}else if(channel == 3){
- ui->label_ch_3->setText("通道3");
+ ui->label_ch_3->setText(ui->comboBox_ch_output->currentText());
ui->label_ch_3_min->setText(QString::number(minmun));
ui->label_ch_3_max->setText(QString::number(maxmum));
- ch_used.used[2] = true;
+ ui->label_ch_3_min_unit->setText(unit_str);
+ ui->label_ch_3_max_unit->setText(unit_str);
+ ch_used[ui->comboBox_ch_output->currentIndex()].used[2] = true;
+ vib_dc_output_ptr->dc_output[2].output_channel = current_index;
+ vib_dc_output_ptr->dc_output[2].minmum = ui->label_ch_3_min->text().toFloat();
+ vib_dc_output_ptr->dc_output[2].maxmum = ui->label_ch_3_max->text().toFloat();
}else if(channel == 4){
- ui->label_ch_4->setText("通道4");
+ ui->label_ch_4->setText(ui->comboBox_ch_output->currentText());
ui->label_ch_4_min->setText(QString::number(minmun));
ui->label_ch_4_max->setText(QString::number(maxmum));
- ch_used.used[3] = true;
+ ui->label_ch_4_min_unit->setText(unit_str);
+ ui->label_ch_4_max_unit->setText(unit_str);
+ ch_used[ui->comboBox_ch_output->currentIndex()].used[3] = true;
+ vib_dc_output_ptr->dc_output[3].output_channel = current_index;
+ vib_dc_output_ptr->dc_output[3].minmum = ui->label_ch_4_min->text().toFloat();
+ vib_dc_output_ptr->dc_output[3].maxmum = ui->label_ch_4_max->text().toFloat();
+ }else if(channel == 5){
+ if(not_used == 0){
+ label_ch1[0]->setText("未使用");
+ label_ch1[1]->setText("-----");
+ label_ch1[2]->setText("-----");
+ label_ch1[3]->setText("-----");
+ label_ch1[4]->setText("-----");
+ ch_used[ui->comboBox_ch_output->currentIndex()].used[0] = false;
+ vib_dc_output_ptr->dc_output[0].output_channel = -1;
+ }else if(not_used == 1){
+ label_ch1[0]->setText("未使用");
+ label_ch1[1]->setText("-----");
+ label_ch1[2]->setText("-----");
+ label_ch1[3]->setText("-----");
+ label_ch1[4]->setText("-----");
+ ch_used[ui->comboBox_ch_output->currentIndex()].used[1] = false;
+ vib_dc_output_ptr->dc_output[1].output_channel = -1;
+ }else if(not_used == 2){
+ label_ch1[0]->setText("未使用");
+ label_ch1[1]->setText("-----");
+ label_ch1[2]->setText("-----");
+ label_ch1[3]->setText("-----");
+ label_ch1[4]->setText("-----");
+ ch_used[ui->comboBox_ch_output->currentIndex()].used[2] = false;
+ vib_dc_output_ptr->dc_output[2].output_channel = -1;
+ }else if(not_used == 3){
+ label_ch1[0]->setText("未使用");
+ label_ch1[1]->setText("-----");
+ label_ch1[2]->setText("-----");
+ label_ch1[3]->setText("-----");
+ label_ch1[4]->setText("-----");
+ ch_used[ui->comboBox_ch_output->currentIndex()].used[3] = false;
+ vib_dc_output_ptr->dc_output[3].output_channel = -1;
+ }
}
}
void DC_Outputs::on_pushButton_confirm_clicked()
{
- if(ui->label_ch_1->text() != "未使用"){
- vib_dc_output_ptr->dc_output[current_index][0].output_channel = 1;
- vib_dc_output_ptr->dc_output[current_index][0].minmum = ui->label_ch_1_min->text().toFloat();
- vib_dc_output_ptr->dc_output[current_index][0].maxmum = ui->label_ch_1_max->text().toFloat();
- }
- if(ui->label_ch_2->text() != "未使用"){
- vib_dc_output_ptr->dc_output[current_index][1].output_channel = 2;
- vib_dc_output_ptr->dc_output[current_index][1].minmum = ui->label_ch_2_min->text().toFloat();
- vib_dc_output_ptr->dc_output[current_index][1].maxmum = ui->label_ch_2_max->text().toFloat();
- }
- if(ui->label_ch_3->text() != "未使用"){
- vib_dc_output_ptr->dc_output[current_index][2].output_channel = 3;
- vib_dc_output_ptr->dc_output[current_index][2].minmum = ui->label_ch_3_min->text().toFloat();
- vib_dc_output_ptr->dc_output[current_index][2].maxmum = ui->label_ch_3_max->text().toFloat();
- }
- if(ui->label_ch_4->text() != "未使用"){
- vib_dc_output_ptr->dc_output[current_index][3].output_channel = 4;
- vib_dc_output_ptr->dc_output[current_index][3].minmum = ui->label_ch_4_min->text().toFloat();
- vib_dc_output_ptr->dc_output[current_index][3].maxmum = ui->label_ch_4_max->text().toFloat();
- }
+// if(ui->label_ch_1->text() != "未使用" && current_index){
+// vib_dc_output_ptr->dc_output[0].output_channel = current_index;
+// vib_dc_output_ptr->dc_output[0].dc_output_channel = 1;
+// vib_dc_output_ptr->dc_output[0].minmum = ui->label_ch_1_min->text().toFloat();
+// vib_dc_output_ptr->dc_output[0].maxmum = ui->label_ch_1_max->text().toFloat();
+// }
+// if(ui->label_ch_2->text() != "未使用"){
+// vib_dc_output_ptr->dc_output[1].output_channel = current_index;
+// vib_dc_output_ptr->dc_output[1].dc_output_channel = 2;
+// vib_dc_output_ptr->dc_output[1].minmum = ui->label_ch_2_min->text().toFloat();
+// vib_dc_output_ptr->dc_output[1].maxmum = ui->label_ch_2_max->text().toFloat();
+// }
+// if(ui->label_ch_3->text() != "未使用"){
+// vib_dc_output_ptr->dc_output[2].output_channel = current_index;
+// vib_dc_output_ptr->dc_output[2].dc_output_channel = 3;
+// vib_dc_output_ptr->dc_output[2].minmum = ui->label_ch_3_min->text().toFloat();
+// vib_dc_output_ptr->dc_output[2].maxmum = ui->label_ch_3_max->text().toFloat();
+// }
+// if(ui->label_ch_4->text() != "未使用"){
+// vib_dc_output_ptr->dc_output[3].output_channel = current_index;
+// vib_dc_output_ptr->dc_output[3].dc_output_channel = 4;
+// vib_dc_output_ptr->dc_output[3].minmum = ui->label_ch_4_min->text().toFloat();
+// vib_dc_output_ptr->dc_output[3].maxmum = ui->label_ch_4_max->text().toFloat();
+// }
this->close();
}
@@ -211,31 +330,57 @@ void DC_Outputs::on_pushButton_cancel_clicked()
void DC_Outputs::on_comboBox_ch_output_currentIndexChanged(int index)
{
- current_index = index;
- QString unit_str = GetUnit();
- if(vib_dc_output_ptr->dc_output[current_index][0].output_channel == 1){
- ui->label_ch_1->setText("通道1");
- ui->label_ch_1_min->setText(QString::number(vib_dc_output_ptr->dc_output[current_index][0].minmum));
- ui->label_ch_1_max->setText(QString::number(vib_dc_output_ptr->dc_output[current_index][0].maxmum));
- ch_used.used[0] = true;
- }
- if(vib_dc_output_ptr->dc_output[current_index][1].output_channel == 2){
- ui->label_ch_2->setText("通道2");
- ui->label_ch_2_min->setText(QString::number(vib_dc_output_ptr->dc_output[current_index][1].minmum));
- ui->label_ch_2_max->setText(QString::number(vib_dc_output_ptr->dc_output[current_index][1].maxmum));
- ch_used.used[1] = true;
- }
- if(vib_dc_output_ptr->dc_output[current_index][2].output_channel == 3){
- ui->label_ch_3->setText("通道3");
- ui->label_ch_3_min->setText(QString::number(vib_dc_output_ptr->dc_output[current_index][2].minmum));
- ui->label_ch_3_max->setText(QString::number(vib_dc_output_ptr->dc_output[current_index][2].maxmum));
- ch_used.used[2] = true;
- }
- if(vib_dc_output_ptr->dc_output[current_index][3].output_channel == 4){
- ui->label_ch_4->setText("通道4");
- ui->label_ch_4_min->setText(QString::number(vib_dc_output_ptr->dc_output[current_index][3].minmum));
- ui->label_ch_4_max->setText(QString::number(vib_dc_output_ptr->dc_output[current_index][3].maxmum));
- ch_used.used[3] = true;
- }
+ qDebug() << "on_comboBox_ch_output_currentIndexChanged" ;
+// if(ui->label_ch_1->text() != "未使用"){
+// vib_dc_output_ptr->dc_output[0].output_channel = current_index;
+// vib_dc_output_ptr->dc_output[0].dc_output_channel = 1;
+// vib_dc_output_ptr->dc_output[0].minmum = ui->label_ch_1_min->text().toFloat();
+// vib_dc_output_ptr->dc_output[0].maxmum = ui->label_ch_1_max->text().toFloat();
+// }
+// if(ui->label_ch_2->text() != "未使用"){
+// vib_dc_output_ptr->dc_output[1].output_channel = current_index;
+// vib_dc_output_ptr->dc_output[1].dc_output_channel = 2;
+// vib_dc_output_ptr->dc_output[1].minmum = ui->label_ch_2_min->text().toFloat();
+// vib_dc_output_ptr->dc_output[1].maxmum = ui->label_ch_2_max->text().toFloat();
+// }
+// if(ui->label_ch_3->text() != "未使用"){
+// vib_dc_output_ptr->dc_output[2].output_channel = current_index;
+// vib_dc_output_ptr->dc_output[2].dc_output_channel = 3;
+// vib_dc_output_ptr->dc_output[2].minmum = ui->label_ch_3_min->text().toFloat();
+// vib_dc_output_ptr->dc_output[2].maxmum = ui->label_ch_3_max->text().toFloat();
+// }
+// if(ui->label_ch_4->text() != "未使用"){
+// vib_dc_output_ptr->dc_output[3].output_channel = current_index;
+// vib_dc_output_ptr->dc_output[3].dc_output_channel = 4;
+// vib_dc_output_ptr->dc_output[3].minmum = ui->label_ch_4_min->text().toFloat();
+// vib_dc_output_ptr->dc_output[3].maxmum = ui->label_ch_4_max->text().toFloat();
+// }
+
+// current_index = index;
+// QString unit_str = GetUnit();
+// if(vib_dc_output_ptr->dc_output[0].dc_output_channel == 1 && current_index == vib_dc_output_ptr->dc_output[0].output_channel){
+// ui->label_ch_1->setText(ui->comboBox_ch_output->itemText(vib_dc_output_ptr->dc_output[0].output_channel));
+// ui->label_ch_1_min->setText(QString::number(vib_dc_output_ptr->dc_output[0].minmum));
+// ui->label_ch_1_max->setText(QString::number(vib_dc_output_ptr->dc_output[0].maxmum));
+// ch_used[current_index].used[0] = true;
+// }
+// if(vib_dc_output_ptr->dc_output[1].dc_output_channel == 2 && current_index == vib_dc_output_ptr->dc_output[1].output_channel){
+// ui->label_ch_2->setText(ui->comboBox_ch_output->itemText(vib_dc_output_ptr->dc_output[1].output_channel));
+// ui->label_ch_2_min->setText(QString::number(vib_dc_output_ptr->dc_output[1].minmum));
+// ui->label_ch_2_max->setText(QString::number(vib_dc_output_ptr->dc_output[1].maxmum));
+// ch_used[current_index].used[1] = true;
+// }
+// if(vib_dc_output_ptr->dc_output[2].dc_output_channel == 3 && current_index == vib_dc_output_ptr->dc_output[2].output_channel){
+// ui->label_ch_3->setText(ui->comboBox_ch_output->itemText(vib_dc_output_ptr->dc_output[2].output_channel));
+// ui->label_ch_3_min->setText(QString::number(vib_dc_output_ptr->dc_output[2].minmum));
+// ui->label_ch_3_max->setText(QString::number(vib_dc_output_ptr->dc_output[2].maxmum));
+// ch_used[current_index].used[2] = true;
+// }
+// if(vib_dc_output_ptr->dc_output[3].dc_output_channel == 4 && current_index == vib_dc_output_ptr->dc_output[3].output_channel){
+// ui->label_ch_4->setText(ui->comboBox_ch_output->itemText(vib_dc_output_ptr->dc_output[3].output_channel));
+// ui->label_ch_4_min->setText(QString::number(vib_dc_output_ptr->dc_output[3].minmum));
+// ui->label_ch_4_max->setText(QString::number(vib_dc_output_ptr->dc_output[3].maxmum));
+// ch_used[current_index].used[3] = true;
+// }
}
diff --git a/dc_outputs.h b/dc_outputs.h
index ef64ce3..e502964 100644
--- a/dc_outputs.h
+++ b/dc_outputs.h
@@ -25,7 +25,7 @@ private slots:
void on_pushButton_cancel_clicked();
- void output_channel_data(int channel,float minmun,float maxmum);
+ void output_channel_data(int channel,float minmun,float maxmum,int not_used);
void on_comboBox_ch_output_currentIndexChanged(int index);
@@ -33,8 +33,11 @@ private:
Ui::DC_Outputs *ui;
std::shared_ptr vib_dc_output_ptr = nullptr;
void Init();
- QString GetUnit();
-
+ QString GetUnit(int com_index);
+ QLabel *label_ch1[5];
+ QLabel *label_ch2[5];
+ QLabel *label_ch3[5];
+ QLabel *label_ch4[5];
int current_index;
QString unit;
};
diff --git a/dc_outputs.ui b/dc_outputs.ui
index 4d30069..61b8ec5 100644
--- a/dc_outputs.ui
+++ b/dc_outputs.ui
@@ -64,6 +64,86 @@
通道3 & 通道4
+ -
+
+ 通道1 分频段1
+
+
+ -
+
+ 通道1 分频段2
+
+
+ -
+
+ 通道1 分频段3
+
+
+ -
+
+ 通道1 分频段4
+
+
+ -
+
+ 通道2 分频段1
+
+
+ -
+
+ 通道2 分频段2
+
+
+ -
+
+ 通道2 分频段3
+
+
+ -
+
+ 通道2 分频段4
+
+
+ -
+
+ 通道3 分频段1
+
+
+ -
+
+ 通道3 分频段2
+
+
+ -
+
+ 通道3 分频段3
+
+
+ -
+
+ 通道3 分频段4
+
+
+ -
+
+ 通道4 分频段1
+
+
+ -
+
+ 通道4 分频段2
+
+
+ -
+
+ 通道4 分频段3
+
+
+ -
+
+ 通道4 分频段4
+
+
diff --git a/pressure_pulsation.cpp b/pressure_pulsation.cpp
index 5ede225..0a24df8 100644
--- a/pressure_pulsation.cpp
+++ b/pressure_pulsation.cpp
@@ -58,15 +58,40 @@ void PressurePulsation::Init() {
ui->checkBox_band_pass->setChecked(variable_ptr->filter_[2].checked);
ui->spinBox_band_pass_low->setValue(variable_ptr->filter_[2].low);
ui->spinBox_band_pass_high->setValue(variable_ptr->filter_[2].high);
- ui->radioButton_fixed->setChecked(variable_ptr->fixed);
- ui->lineEdit_sample_rate->setText(QString::number(variable_ptr->sample_rate));
- ui->lineEdit_bandwidth->setText(QString::number(variable_ptr->bandwidth));
- ui->comboBox_fft_points->setCurrentText(QString::number(variable_ptr->fft_points));
- ui->lineEdit_measuring_value_min->setText(QString::number(variable_ptr->measuring_min));
- ui->lineEdit_measuring_value_max->setText(QString::number(variable_ptr->measuring_max));
- ui->lineEdit_scale_value_min->setText(QString::number(variable_ptr->scale_min));
- ui->lineEdit_scale_value_max->setText(QString::number(variable_ptr->scale_max));
+ // processed output
+ // -general
+ if(variable_ptr->general.output_used)
+ ui->comboBox_output_used->setCurrentIndex(0);
+ else
+ ui->comboBox_output_used->setCurrentIndex(1);
+ ui->comboBox_engineering_unit->setCurrentIndex(variable_ptr->general.engineering_unit);
+ ui->comboBox_rectifier_funtion->setCurrentIndex(variable_ptr->general.rectifier_function);
+ // -alarm
+ ui->lineEdit_danger_high_level->setText(QString::number(variable_ptr->danger_high.level));
+ ui->lineEdit_danger_high_hysteresis->setText(QString::number(variable_ptr->danger_high.hysteresis));
+ ui->lineEdit_danger_high_delay->setText(QString::number(variable_ptr->danger_high.delay));
+ ui->checkBox_danger_high_enable->setChecked(variable_ptr->danger_high.enable);
+ ui->checkBox_danger_high_latch->setChecked(variable_ptr->danger_high.latch);
+ ui->lineEdit_alert_high_level->setText(QString::number(variable_ptr->alert_high.level));
+ ui->lineEdit_alert_high_hysteresis->setText(QString::number(variable_ptr->alert_high.hysteresis));
+ ui->lineEdit_alert_high_delay->setText(QString::number(variable_ptr->alert_high.delay));
+ ui->checkBox_alert_high_enable->setChecked(variable_ptr->alert_high.enable);
+ ui->checkBox_alert_high_latch->setChecked(variable_ptr->alert_high.latch);
+
+ ui->lineEdit_danger_low_level->setText(QString::number(variable_ptr->danger_low.level));
+ ui->lineEdit_danger_low_hysteresis->setText(QString::number(variable_ptr->danger_low.hysteresis));
+ ui->lineEdit_danger_low_delay->setText(QString::number(variable_ptr->danger_low.delay));
+ ui->checkBox_danger_low_enable->setChecked(variable_ptr->danger_low.enable);
+ ui->checkBox_danger_low_latch->setChecked(variable_ptr->danger_low.latch);
+
+ ui->lineEdit_alert_low_level->setText(QString::number(variable_ptr->alert_low.level));
+ ui->lineEdit_alert_low_hysteresis->setText(QString::number(variable_ptr->alert_low.hysteresis));
+ ui->lineEdit_alert_low_delay->setText(QString::number(variable_ptr->alert_low.delay));
+ ui->checkBox_alert_low_enable->setChecked(variable_ptr->alert_low.enable);
+ ui->checkBox_alert_low_latch->setChecked(variable_ptr->alert_low.latch);
+
+ //
ui->checkBox_enable->setChecked(variable_ptr->freband_output[0].enable);
ui->lineEdit_start->setText(QString::number(variable_ptr->freband_output[0].start));
ui->lineEdit_end->setText(QString::number(variable_ptr->freband_output[0].end));
@@ -97,6 +122,7 @@ void PressurePulsation::Init() {
ui->checkBox_enable_10->setChecked(variable_ptr->freband_output[9].enable);
ui->lineEdit_start_10->setText(QString::number(variable_ptr->freband_output[9].start));
ui->lineEdit_end_10->setText(QString::number(variable_ptr->freband_output[9].end));
+
}
void PressurePulsation::on_pushButton_confirm_clicked()
{
@@ -126,14 +152,35 @@ void PressurePulsation::on_pushButton_confirm_clicked()
variable->filter_[2].checked = ui->checkBox_band_pass->checkState();
variable->filter_[2].low = ui->spinBox_band_pass_low->value();
variable->filter_[2].high = ui->spinBox_band_pass_high->value();
- variable->fixed = ui->radioButton_fixed->isChecked();
- variable->sample_rate = ui->lineEdit_sample_rate->text().toUInt();
- variable->bandwidth = ui->lineEdit_bandwidth->text().toInt();
- variable->fft_points = ui->comboBox_fft_points->currentText().toInt();
- variable->measuring_min = ui->lineEdit_measuring_value_min->text().toInt();
- variable->measuring_max = ui->lineEdit_measuring_value_max->text().toInt();
- variable->scale_min = ui->lineEdit_scale_value_min->text().toInt();
- variable->scale_max = ui->lineEdit_scale_value_max->text().toInt();
+ // processed output
+ // -general
+ if(ui->comboBox_output_used->currentIndex() == 0)
+ variable->general.output_used = true;
+ else
+ variable->general.output_used = false;
+ variable->general.engineering_unit = ui->comboBox_engineering_unit->currentIndex();
+ variable->general.rectifier_function = ui->comboBox_rectifier_funtion->currentIndex();
+ // -alarm
+ variable->danger_high.level = ui->lineEdit_danger_high_level->text().toDouble();
+ variable->danger_high.hysteresis = ui->lineEdit_danger_high_hysteresis->text().toDouble();
+ variable->danger_high.delay = ui->lineEdit_danger_high_delay->text().toDouble();
+ variable->danger_high.enable = ui->checkBox_danger_high_enable->isChecked();
+ variable->danger_high.latch = ui->checkBox_danger_high_latch->isChecked();
+ variable->alert_high.level = ui->lineEdit_alert_high_level->text().toDouble();
+ variable->alert_high.hysteresis = ui->lineEdit_alert_high_hysteresis->text().toDouble();
+ variable->alert_high.delay = ui->lineEdit_alert_high_delay->text().toDouble();
+ variable->alert_high.enable = ui->checkBox_alert_high_enable->isChecked();
+ variable->alert_high.latch = ui->checkBox_alert_high_latch->isChecked();
+ variable->danger_low.level = ui->lineEdit_danger_low_level->text().toDouble();
+ variable->danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis->text().toDouble();
+ variable->danger_low.delay = ui->lineEdit_danger_low_delay->text().toDouble();
+ variable->danger_low.enable = ui->checkBox_danger_low_enable->isChecked();
+ variable->danger_low.latch = ui->checkBox_danger_low_latch->isChecked();
+ variable->alert_low.level = ui->lineEdit_alert_low_level->text().toDouble();
+ variable->alert_low.hysteresis = ui->lineEdit_alert_low_hysteresis->text().toDouble();
+ variable->alert_low.delay = ui->lineEdit_alert_low_delay->text().toDouble();
+ variable->alert_low.enable = ui->checkBox_alert_low_enable->isChecked();
+ variable->alert_low.latch = ui->checkBox_alert_low_latch->isChecked();
// -freband output
variable->freband_output[0].enable = ui->checkBox_enable->isChecked();
variable->freband_output[0].start = ui->lineEdit_start->text().toDouble();
@@ -180,15 +227,35 @@ void PressurePulsation::on_pushButton_confirm_clicked()
variable->filter_[2].checked = ui->checkBox_band_pass->checkState();
variable->filter_[2].low = ui->spinBox_band_pass_low->value();
variable->filter_[2].high = ui->spinBox_band_pass_high->value();
- variable->fixed = ui->radioButton_fixed->isChecked();
- variable->sample_rate = ui->lineEdit_sample_rate->text().toUInt();
- variable->bandwidth = ui->lineEdit_bandwidth->text().toInt();
- variable->fft_points = ui->comboBox_fft_points->currentText().toInt();
- variable->measuring_min = ui->lineEdit_measuring_value_min->text().toInt();
- variable->measuring_max = ui->lineEdit_measuring_value_max->text().toInt();
- variable->scale_min = ui->lineEdit_scale_value_min->text().toInt();
- variable->scale_max = ui->lineEdit_scale_value_max->text().toInt();
-
+ // processed output
+ // -general
+ if(ui->comboBox_output_used->currentIndex() == 0)
+ variable->general.output_used = true;
+ else
+ variable->general.output_used = false;
+ variable->general.engineering_unit = ui->comboBox_engineering_unit->currentIndex();
+ variable->general.rectifier_function = ui->comboBox_rectifier_funtion->currentIndex();
+ // -alarm
+ variable->danger_high.level = ui->lineEdit_danger_high_level->text().toDouble();
+ variable->danger_high.hysteresis = ui->lineEdit_danger_high_hysteresis->text().toDouble();
+ variable->danger_high.delay = ui->lineEdit_danger_high_delay->text().toDouble();
+ variable->danger_high.enable = ui->checkBox_danger_high_enable->isChecked();
+ variable->danger_high.latch = ui->checkBox_danger_high_latch->isChecked();
+ variable->alert_high.level = ui->lineEdit_alert_high_level->text().toDouble();
+ variable->alert_high.hysteresis = ui->lineEdit_alert_high_hysteresis->text().toDouble();
+ variable->alert_high.delay = ui->lineEdit_alert_high_delay->text().toDouble();
+ variable->alert_high.enable = ui->checkBox_alert_high_enable->isChecked();
+ variable->alert_high.latch = ui->checkBox_alert_high_latch->isChecked();
+ variable->danger_low.level = ui->lineEdit_danger_low_level->text().toDouble();
+ variable->danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis->text().toDouble();
+ variable->danger_low.delay = ui->lineEdit_danger_low_delay->text().toDouble();
+ variable->danger_low.enable = ui->checkBox_danger_low_enable->isChecked();
+ variable->danger_low.latch = ui->checkBox_danger_low_latch->isChecked();
+ variable->alert_low.level = ui->lineEdit_alert_low_level->text().toDouble();
+ variable->alert_low.hysteresis = ui->lineEdit_alert_low_hysteresis->text().toDouble();
+ variable->alert_low.delay = ui->lineEdit_alert_low_delay->text().toDouble();
+ variable->alert_low.enable = ui->checkBox_alert_low_enable->isChecked();
+ variable->alert_low.latch = ui->checkBox_alert_low_latch->isChecked();
// -freband output
variable->freband_output[0].enable = ui->checkBox_enable->isChecked();
variable->freband_output[0].start = ui->lineEdit_start->text().toDouble();
diff --git a/pressure_pulsation.ui b/pressure_pulsation.ui
index 0a008a4..3b64234 100644
--- a/pressure_pulsation.ui
+++ b/pressure_pulsation.ui
@@ -161,628 +161,856 @@
- 20
- 60
- 651
- 421
+ 10
+ 50
+ 667
+ 434
- 2
+ 1
-
-
- 传感器和滤波配置
-
-
-
-
- 10
- 30
- 353
- 116
-
-
-
- 滤波
-
-
- -
-
-
-
-
-
- 高通:
-
-
-
- -
-
-
-
- 60
- 0
-
-
-
-
- 60
- 16777215
-
-
-
- 3
-
-
- 3000
-
-
-
- -
-
-
- -
-
-
-
- -
-
-
-
- 60
- 0
-
-
-
-
- 60
- 16777215
-
-
-
- 3
-
-
- 3000
-
-
- 3000
-
-
-
- -
-
-
- 3 - 3000Hz
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
-
- -
-
-
-
-
-
- 低通:
-
-
-
- -
-
-
-
- 60
- 0
-
-
-
-
- 60
- 16777215
-
-
-
-
- -
-
-
- -
-
-
-
- -
-
-
-
- 60
- 0
-
-
-
-
- 60
- 16777215
-
-
-
-
- -
-
-
- 30 - 30000Hz
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
-
- -
-
-
-
-
-
- 带通:
-
-
-
- -
-
-
-
- 60
- 0
-
-
-
- 3
-
-
- 3000
-
-
-
- -
-
-
- -
-
-
-
- -
-
-
-
- 60
- 0
-
-
-
- 3
-
-
- 3000
-
-
- 3000
-
-
-
- -
-
-
- 3 - 3000Hz
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
-
-
-
-
-
-
- 特征值和警报配置
-
-
-
-
- 10
- 10
- 471
- 191
-
-
-
- 采样频率
-
-
-
-
- 20
- 30
- 397
- 24
-
-
-
- -
-
-
- 固定
-
-
-
- -
-
-
-
-
-
- 采样率:
-
-
-
- -
-
-
-
- 100
- 20
-
-
-
-
- -
-
-
- Hz
-
-
-
-
-
- -
-
-
-
-
-
- 带宽:
-
-
-
- -
-
-
-
- 100
- 20
-
-
-
-
- -
-
-
- Hz
-
-
-
-
-
-
-
-
-
-
- 20
- 70
- 121
- 23
-
-
-
- -
-
-
- FFT 点数:
-
-
-
- -
-
-
-
-
- 8192
-
-
-
-
-
-
-
-
-
- 20
- 100
- 122
- 17
-
-
-
- -
-
-
- 频率范围:
-
-
-
- -
-
-
- 5000 Hz
-
-
-
-
-
-
-
-
- 20
- 130
- 92
- 17
-
-
-
- -
-
-
- 线数:
-
-
-
- -
-
-
- 1250 Hz
-
-
-
-
-
-
-
-
- 20
- 160
- 106
- 17
-
-
-
- -
-
-
- 频率分辨率:
-
-
-
- -
-
-
- 4 Hz
-
-
-
-
-
-
-
-
-
- 10
- 219
- 471
- 121
-
-
-
- 测量
-
-
-
-
- 20
- 40
- 54
- 12
-
-
-
- 最小:
-
-
-
-
-
- 20
- 80
- 54
- 12
-
-
-
- 最大:
-
-
-
-
-
- 90
- 20
- 54
- 12
-
-
-
- 测量值
-
-
-
-
-
- 230
- 20
- 54
- 12
-
-
-
- 对应值
-
-
-
-
-
- 70
- 40
- 81
- 20
-
-
-
-
-
-
- 210
- 40
- 81
- 20
-
-
-
-
-
-
- 70
- 80
- 81
- 20
-
-
-
-
-
-
- 210
- 80
- 81
- 20
-
-
-
-
-
-
- 310
- 40
- 54
- 12
-
-
-
- mbar
-
-
-
-
-
- 310
- 80
- 54
- 12
-
-
-
- mbar
-
-
-
-
-
- 160
- 40
- 31
- 16
-
-
-
- mV
-
-
-
-
-
- 160
- 80
- 31
- 16
-
-
-
- mV
-
-
-
-
+
+ 滤波
+
+
+ -
+
+
+ 滤波
+
+
+
-
+
+
-
+
+
-
+
+
+ 高通:
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+ 3
+
+
+ 3000
+
+
+
+ -
+
+
+ -
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+ 3
+
+
+ 3000
+
+
+ 3000
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+ 3 - 3000Hz
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
+
-
+
+
+ 低通:
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+ -
+
+
+ -
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+
+ -
+
+
+ 30 - 30000Hz
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
+
-
+
+
+ 带通:
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+ 3
+
+
+ 3000
+
+
+
+ -
+
+
+ -
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+ 3
+
+
+ 3000
+
+
+ 3000
+
+
+
+ -
+
+
+ 3 - 3000Hz
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 248
+
+
+
+
+
+
+
+
+
+
+
+ 处理后输出
+
+
+
+
+ 530
+ 320
+ 54
+ 12
+
+
+
+ %
+
+
+
+
+
+ 10
+ 40
+ 621
+ 321
+
+
+
+ 0
+
+
+
+ 常规
+
+
+
+
+ 170
+ 150
+ 54
+ 12
+
+
+
+ 整流器
+
+
+
+
+
+ 10
+ 140
+ 125
+ 25
+
+
+
+
+ 125
+ 25
+
+
+
+
+ 125
+ 25
+
+
+ -
+
+ RMS
+
+
+
+
+
+
+ 170
+ 50
+ 54
+ 12
+
+
+
+ 输出使用
+
+
+
+
+
+ 10
+ 90
+ 125
+ 25
+
+
+
+
+ 125
+ 25
+
+
+
+
+ 125
+ 25
+
+
+ -
+
+ g
+
+
+ -
+
+ m/s**2
+
+
+ -
+
+ mm/s
+
+
+ -
+
+ inch/s
+
+
+ -
+
+ um
+
+
+ -
+
+ mm
+
+
+
+
+
+
+ 170
+ 100
+ 54
+ 12
+
+
+
+ 工程单位
+
+
+
+
+
+ 10
+ 40
+ 125
+ 25
+
+
+
+
+ 125
+ 25
+
+
+
+
+ 125
+ 25
+
+
+ -
+
+ 是
+
+
+ -
+
+ 否
+
+
+
+
+
+
+ 警报
+
+
+
+
+ 10
+ 60
+ 71
+ 16
+
+
+
+ 危险 + 高
+
+
+
+
+
+ 10
+ 100
+ 71
+ 16
+
+
+
+ 警报 + 高
+
+
+
+
+
+ 10
+ 140
+ 71
+ 16
+
+
+
+ 警报 + 低
+
+
+
+
+
+ 10
+ 180
+ 71
+ 16
+
+
+
+ 危险 + 低
+
+
+
+
+
+ 90
+ 30
+ 31
+ 31
+
+
+
+ 等级
+ (um)
+
+
+
+
+
+ 170
+ 30
+ 31
+ 31
+
+
+
+ 回差
+(um)
+
+
+
+
+
+ 230
+ 30
+ 31
+ 31
+
+
+
+ 延时
+(um)
+
+
+
+
+
+ 280
+ 40
+ 31
+ 16
+
+
+
+ 使能
+
+
+
+
+
+ 340
+ 40
+ 31
+ 16
+
+
+
+ 锁存
+
+
+
+
+
+ 80
+ 60
+ 51
+ 20
+
+
+
+
+
+
+ 150
+ 60
+ 51
+ 20
+
+
+
+
+
+
+ 220
+ 60
+ 51
+ 20
+
+
+
+
+
+
+ 220
+ 100
+ 51
+ 20
+
+
+
+
+
+
+ 80
+ 100
+ 51
+ 20
+
+
+
+
+
+
+ 150
+ 100
+ 51
+ 20
+
+
+
+
+
+ false
+
+
+
+ 220
+ 140
+ 51
+ 20
+
+
+
+
+
+ false
+
+
+
+ 150
+ 180
+ 51
+ 20
+
+
+
+
+
+ false
+
+
+
+ 80
+ 140
+ 51
+ 20
+
+
+
+
+
+ false
+
+
+
+ 220
+ 180
+ 51
+ 20
+
+
+
+
+
+ false
+
+
+
+ 80
+ 180
+ 51
+ 20
+
+
+
+
+
+ false
+
+
+
+ 150
+ 140
+ 51
+ 20
+
+
+
+
+
+
+ 290
+ 60
+ 16
+ 16
+
+
+
+
+
+
+
+
+
+ 290
+ 100
+ 16
+ 16
+
+
+
+
+
+
+
+
+ false
+
+
+
+ 290
+ 140
+ 16
+ 16
+
+
+
+
+
+
+
+
+ false
+
+
+
+ 290
+ 180
+ 16
+ 16
+
+
+
+
+
+
+
+
+
+ 350
+ 100
+ 16
+ 16
+
+
+
+
+
+
+
+
+ false
+
+
+
+ 350
+ 180
+ 16
+ 16
+
+
+
+
+
+
+
+
+
+ 350
+ 60
+ 16
+ 16
+
+
+
+
+
+
+
+
+ false
+
+
+
+ 350
+ 140
+ 16
+ 16
+
+
+
+
+
+
+
+
+
+
分频段选择
-
+
- 40
- 230
+ 50
+ 90
71
16
@@ -791,87 +1019,11 @@
使能
-
+
- 140
- 80
- 113
- 20
-
-
-
-
-
-
- 40
- 170
- 71
- 16
-
-
-
- 使能
-
-
-
-
-
- 140
- 110
- 113
- 20
-
-
-
-
-
-
- 40
- 140
- 71
- 16
-
-
-
- 使能
-
-
-
-
-
- 140
- 170
- 113
- 20
-
-
-
-
-
-
- 290
- 140
- 113
- 20
-
-
-
-
-
-
- 290
- 200
- 113
- 20
-
-
-
-
-
-
- 160
- 40
+ 170
+ 50
91
16
@@ -880,54 +1032,54 @@
频率开始(Hz)
-
+
- 290
- 230
- 113
- 20
-
-
-
-
-
-
- 40
- 80
- 71
+ 320
+ 50
+ 91
16
- 使能
+ 频率结束(Hz)
-
+
- 140
- 140
+ 150
+ 90
113
20
-
+
- 140
- 200
+ 300
+ 90
113
20
-
+
- 40
- 200
+ 150
+ 120
+ 113
+ 20
+
+
+
+
+
+
+ 50
+ 120
71
16
@@ -939,41 +1091,18 @@
- 290
- 110
+ 300
+ 120
113
20
-
+
- 310
- 40
- 91
- 16
-
-
-
- 频率结束(Hz)
-
-
-
-
-
- 140
- 230
- 113
- 20
-
-
-
-
-
-
- 40
- 110
+ 50
+ 150
71
16
@@ -982,31 +1111,64 @@
使能
-
+
- 290
- 80
+ 300
+ 150
113
20
+
+
+
+ 150
+ 150
+ 113
+ 20
+
+
+
+
+
+
+ 50
+ 180
+ 71
+ 16
+
+
+
+ 使能
+
+
- 290
- 170
+ 300
+ 180
113
20
-
+
- 40
- 350
+ 150
+ 180
+ 113
+ 20
+
+
+
+
+
+
+ 50
+ 210
71
16
@@ -1015,21 +1177,31 @@
使能
-
+
- 140
- 320
+ 300
+ 210
113
20
-
+
- 40
- 290
+ 150
+ 210
+ 113
+ 20
+
+
+
+
+
+
+ 50
+ 240
71
16
@@ -1038,21 +1210,21 @@
使能
-
+
- 140
- 350
+ 300
+ 240
113
20
-
+
- 290
- 320
+ 150
+ 240
113
20
@@ -1061,8 +1233,8 @@
- 40
- 260
+ 50
+ 270
71
16
@@ -1074,28 +1246,8 @@
- 290
- 260
- 113
- 20
-
-
-
-
-
-
- 140
- 290
- 113
- 20
-
-
-
-
-
-
- 290
- 290
+ 300
+ 270
113
20
@@ -1104,8 +1256,41 @@
- 140
- 260
+ 150
+ 270
+ 113
+ 20
+
+
+
+
+
+
+ 50
+ 300
+ 71
+ 16
+
+
+
+ 使能
+
+
+
+
+
+ 300
+ 300
+ 113
+ 20
+
+
+
+
+
+
+ 150
+ 300
113
20
@@ -1114,8 +1299,41 @@
- 40
- 320
+ 50
+ 330
+ 71
+ 16
+
+
+
+ 使能
+
+
+
+
+
+ 300
+ 330
+ 113
+ 20
+
+
+
+
+
+
+ 150
+ 330
+ 113
+ 20
+
+
+
+
+
+
+ 50
+ 360
71
16
@@ -1127,8 +1345,18 @@
- 290
- 350
+ 300
+ 360
+ 113
+ 20
+
+
+
+
+
+
+ 150
+ 360
113
20
diff --git a/radial_vibration.cpp b/radial_vibration.cpp
index 8181658..3f5d8c2 100644
--- a/radial_vibration.cpp
+++ b/radial_vibration.cpp
@@ -183,16 +183,16 @@ void Radial::on_pushButton_confirm_clicked() {
variable->alert_high.delay = ui->lineEdit_alert_high_delay->text().toDouble();
variable->alert_high.enable = ui->checkBox_alert_high_enable->isChecked();
variable->alert_high.latch = ui->checkBox_alert_high_latch->isChecked();
- variable->danger_low.level = ui->lineEdit_danger_low_level->text().toDouble();
- variable->danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis->text().toDouble();
- variable->danger_low.delay = ui->lineEdit_danger_low_delay->text().toDouble();
- variable->danger_low.enable = ui->checkBox_danger_low_enable->isChecked();
- variable->danger_low.latch = ui->checkBox_danger_low_latch->isChecked();
- variable->alert_low.level = ui->lineEdit_alert_low_level->text().toDouble();
- variable->alert_low.hysteresis = ui->lineEdit_alert_low_hysteresis->text().toDouble();
- variable->alert_low.delay = ui->lineEdit_alert_low_delay->text().toDouble();
- variable->alert_low.enable = ui->checkBox_alert_low_enable->isChecked();
- variable->alert_low.latch = ui->checkBox_alert_low_latch->isChecked();
+// variable->danger_low.level = ui->lineEdit_danger_low_level->text().toDouble();
+// variable->danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis->text().toDouble();
+// variable->danger_low.delay = ui->lineEdit_danger_low_delay->text().toDouble();
+// variable->danger_low.enable = ui->checkBox_danger_low_enable->isChecked();
+// variable->danger_low.latch = ui->checkBox_danger_low_latch->isChecked();
+// variable->alert_low.level = ui->lineEdit_alert_low_level->text().toDouble();
+// variable->alert_low.hysteresis = ui->lineEdit_alert_low_hysteresis->text().toDouble();
+// variable->alert_low.delay = ui->lineEdit_alert_low_delay->text().toDouble();
+// variable->alert_low.enable = ui->checkBox_alert_low_enable->isChecked();
+// variable->alert_low.latch = ui->checkBox_alert_low_latch->isChecked();
// Gap
// -general
if(ui->comboBox_output_used_2->currentIndex() == 0)
@@ -212,16 +212,16 @@ void Radial::on_pushButton_confirm_clicked() {
variable->gap_alert_high.delay = ui->lineEdit_alert_high_delay_2->text().toDouble();
variable->gap_alert_high.enable = ui->checkBox_alert_high_enable_2->isChecked();
variable->gap_alert_high.latch = ui->checkBox_alert_high_latch_2->isChecked();
- variable->gap_danger_low.level = ui->lineEdit_danger_low_level_2->text().toDouble();
- variable->gap_danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis_2->text().toDouble();
- variable->gap_danger_low.delay = ui->lineEdit_danger_low_delay_2->text().toDouble();
- variable->gap_danger_low.enable = ui->checkBox_danger_low_enable_2->isChecked();
- variable->gap_danger_low.latch = ui->checkBox_danger_low_latch_2->isChecked();
- variable->gap_alert_low.level = ui->lineEdit_alert_low_level_2->text().toDouble();
- variable->gap_alert_low.hysteresis = ui->lineEdit_alert_low_hysteresis_2->text().toDouble();
- variable->gap_alert_low.delay = ui->lineEdit_alert_low_delay_2->text().toDouble();
- variable->gap_alert_low.enable = ui->checkBox_alert_low_enable_2->isChecked();
- variable->gap_alert_low.latch = ui->checkBox_alert_low_latch_2->isChecked();
+// variable->gap_danger_low.level = ui->lineEdit_danger_low_level_2->text().toDouble();
+// variable->gap_danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis_2->text().toDouble();
+// variable->gap_danger_low.delay = ui->lineEdit_danger_low_delay_2->text().toDouble();
+// variable->gap_danger_low.enable = ui->checkBox_danger_low_enable_2->isChecked();
+// variable->gap_danger_low.latch = ui->checkBox_danger_low_latch_2->isChecked();
+// variable->gap_alert_low.level = ui->lineEdit_alert_low_level_2->text().toDouble();
+// variable->gap_alert_low.hysteresis = ui->lineEdit_alert_low_hysteresis_2->text().toDouble();
+// variable->gap_alert_low.delay = ui->lineEdit_alert_low_delay_2->text().toDouble();
+// variable->gap_alert_low.enable = ui->checkBox_alert_low_enable_2->isChecked();
+// variable->gap_alert_low.latch = ui->checkBox_alert_low_latch_2->isChecked();
// add to ptr
ptr->variables_.push_back(variable);
this->close();
@@ -256,16 +256,16 @@ void Radial::on_pushButton_confirm_clicked() {
variable->alert_high.delay = ui->lineEdit_alert_high_delay->text().toDouble();
variable->alert_high.enable = ui->checkBox_alert_high_enable->isChecked();
variable->alert_high.latch = ui->checkBox_alert_high_latch->isChecked();
- variable->danger_low.level = ui->lineEdit_danger_low_level->text().toDouble();
- variable->danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis->text().toDouble();
- variable->danger_low.delay = ui->lineEdit_danger_low_delay->text().toDouble();
- variable->danger_low.enable = ui->checkBox_danger_low_enable->isChecked();
- variable->danger_low.latch = ui->checkBox_danger_low_latch->isChecked();
- variable->alert_low.level = ui->lineEdit_alert_low_level->text().toDouble();
- variable->alert_low.hysteresis = ui->lineEdit_alert_low_hysteresis->text().toDouble();
- variable->alert_low.delay = ui->lineEdit_alert_low_delay->text().toDouble();
- variable->alert_low.enable = ui->checkBox_alert_low_enable->isChecked();
- variable->alert_low.latch = ui->checkBox_alert_low_latch->isChecked();
+// variable->danger_low.level = ui->lineEdit_danger_low_level->text().toDouble();
+// variable->danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis->text().toDouble();
+// variable->danger_low.delay = ui->lineEdit_danger_low_delay->text().toDouble();
+// variable->danger_low.enable = ui->checkBox_danger_low_enable->isChecked();
+// variable->danger_low.latch = ui->checkBox_danger_low_latch->isChecked();
+// variable->alert_low.level = ui->lineEdit_alert_low_level->text().toDouble();
+// variable->alert_low.hysteresis = ui->lineEdit_alert_low_hysteresis->text().toDouble();
+// variable->alert_low.delay = ui->lineEdit_alert_low_delay->text().toDouble();
+// variable->alert_low.enable = ui->checkBox_alert_low_enable->isChecked();
+// variable->alert_low.latch = ui->checkBox_alert_low_latch->isChecked();
// Gap
// -general
if(ui->comboBox_output_used_2->currentIndex() == 0)
@@ -285,16 +285,16 @@ void Radial::on_pushButton_confirm_clicked() {
variable->gap_alert_high.delay = ui->lineEdit_alert_high_delay_2->text().toDouble();
variable->gap_alert_high.enable = ui->checkBox_alert_high_enable_2->isChecked();
variable->gap_alert_high.latch = ui->checkBox_alert_high_latch_2->isChecked();
- variable->gap_danger_low.level = ui->lineEdit_danger_low_level_2->text().toDouble();
- variable->gap_danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis_2->text().toDouble();
- variable->gap_danger_low.delay = ui->lineEdit_danger_low_delay_2->text().toDouble();
- variable->gap_danger_low.enable = ui->checkBox_danger_low_enable_2->isChecked();
- variable->gap_danger_low.latch = ui->checkBox_danger_low_latch_2->isChecked();
- variable->gap_alert_low.level = ui->lineEdit_alert_low_level_2->text().toDouble();
- variable->gap_alert_low.hysteresis = ui->lineEdit_alert_low_hysteresis_2->text().toDouble();
- variable->gap_alert_low.delay = ui->lineEdit_alert_low_delay_2->text().toDouble();
- variable->gap_alert_low.enable = ui->checkBox_alert_low_enable_2->isChecked();
- variable->gap_alert_low.latch = ui->checkBox_alert_low_latch_2->isChecked();
+// variable->gap_danger_low.level = ui->lineEdit_danger_low_level_2->text().toDouble();
+// variable->gap_danger_low.hysteresis = ui->lineEdit_danger_low_hysteresis_2->text().toDouble();
+// variable->gap_danger_low.delay = ui->lineEdit_danger_low_delay_2->text().toDouble();
+// variable->gap_danger_low.enable = ui->checkBox_danger_low_enable_2->isChecked();
+// variable->gap_danger_low.latch = ui->checkBox_danger_low_latch_2->isChecked();
+// variable->gap_alert_low.level = ui->lineEdit_alert_low_level_2->text().toDouble();
+// variable->gap_alert_low.hysteresis = ui->lineEdit_alert_low_hysteresis_2->text().toDouble();
+// variable->gap_alert_low.delay = ui->lineEdit_alert_low_delay_2->text().toDouble();
+// variable->gap_alert_low.enable = ui->checkBox_alert_low_enable_2->isChecked();
+// variable->gap_alert_low.latch = ui->checkBox_alert_low_latch_2->isChecked();
this->close();
}
diff --git a/radial_vibration.ui b/radial_vibration.ui
index c305bbb..029ccaf 100644
--- a/radial_vibration.ui
+++ b/radial_vibration.ui
@@ -23,7 +23,7 @@
- 2
+ 1
@@ -300,7 +300,7 @@
- 1
+ 0
@@ -319,33 +319,6 @@
整流器
-
-
-
- 10
- 140
- 125
- 25
-
-
-
-
- 125
- 25
-
-
-
-
- 125
- 25
-
-
- -
-
- RMS
-
-
-
@@ -359,33 +332,6 @@
输出使用
-
-
-
- 10
- 90
- 125
- 25
-
-
-
-
- 125
- 25
-
-
-
-
- 125
- 25
-
-
- -
-
- um
-
-
-
@@ -431,6 +377,130 @@
+
+
+
+ 10
+ 90
+ 125
+ 25
+
+
+
+
+ 125
+ 25
+
+
+
+
+ 125
+ 25
+
+
+ -
+
+ g
+
+
+ -
+
+ m/s**2
+
+
+ -
+
+ mm/s
+
+
+ -
+
+ inch/s
+
+
+ -
+
+ um
+
+
+ -
+
+ mm
+
+
+ -
+
+ mils
+
+
+ -
+
+ inch/s**2
+
+
+ -
+
+
+
+
+
+
+
+
+ 10
+ 140
+ 125
+ 25
+
+
+
+
+ 125
+ 25
+
+
+
+
+ 125
+ 25
+
+
+ -
+
+ True Peak
+
+
+ -
+
+ True Peak-To-Peak
+
+
+ -
+
+ RMS Scaled Peak
+
+
+ -
+
+ RMS Scaled Peak-To-Peak
+
+
+ -
+
+ AVG
+
+
+ -
+
+ RMS Scaled AVG
+
+
+ -
+
+ RMS
+
+
+
@@ -617,6 +687,9 @@
+
+ false
+
220
@@ -627,6 +700,9 @@
+
+ false
+
150
@@ -637,6 +713,9 @@
+
+ false
+
80
@@ -647,6 +726,9 @@
+
+ false
+
220
@@ -657,6 +739,9 @@
+
+ false
+
80
@@ -667,6 +752,9 @@
+
+ false
+
150
@@ -703,6 +791,9 @@
+
+ false
+
290
@@ -716,6 +807,9 @@
+
+ false
+
290
@@ -742,6 +836,9 @@
+
+ false
+
350
@@ -768,6 +865,9 @@
+
+ false
+
350
@@ -816,33 +916,6 @@
整流器
-
-
-
- 10
- 140
- 125
- 25
-
-
-
-
- 125
- 25
-
-
-
-
- 125
- 25
-
-
- -
-
- RMS
-
-
-
@@ -856,33 +929,6 @@
输出使用
-
-
-
- 10
- 90
- 125
- 25
-
-
-
-
- 125
- 25
-
-
-
-
- 125
- 25
-
-
- -
-
- um
-
-
-
@@ -928,6 +974,130 @@
+
+
+
+ 10
+ 90
+ 125
+ 25
+
+
+
+
+ 125
+ 25
+
+
+
+
+ 125
+ 25
+
+
+ -
+
+ g
+
+
+ -
+
+ m/s**2
+
+
+ -
+
+ mm/s
+
+
+ -
+
+ inch/s
+
+
+ -
+
+ um
+
+
+ -
+
+ mm
+
+
+ -
+
+ mils
+
+
+ -
+
+ inch/s**2
+
+
+ -
+
+
+
+
+
+
+
+
+ 10
+ 140
+ 125
+ 25
+
+
+
+
+ 125
+ 25
+
+
+
+
+ 125
+ 25
+
+
+ -
+
+ True Peak
+
+
+ -
+
+ True Peak-To-Peak
+
+
+ -
+
+ RMS Scaled Peak
+
+
+ -
+
+ RMS Scaled Peak-To-Peak
+
+
+ -
+
+ AVG
+
+
+ -
+
+ RMS Scaled AVG
+
+
+ -
+
+ RMS
+
+
+
@@ -1114,6 +1284,9 @@
+
+ false
+
220
@@ -1124,6 +1297,9 @@
+
+ false
+
150
@@ -1134,6 +1310,9 @@
+
+ false
+
80
@@ -1144,6 +1323,9 @@
+
+ false
+
220
@@ -1154,6 +1336,9 @@
+
+ false
+
80
@@ -1164,6 +1349,9 @@
+
+ false
+
150
@@ -1200,6 +1388,9 @@
+
+ false
+
290
@@ -1213,6 +1404,9 @@
+
+ false
+
290
@@ -1239,6 +1433,9 @@
+
+ false
+
350
@@ -1265,6 +1462,9 @@
+
+ false
+
350
diff --git a/seismic_monitor.cpp b/seismic_monitor.cpp
index a2ac7a8..97b2115 100644
--- a/seismic_monitor.cpp
+++ b/seismic_monitor.cpp
@@ -71,6 +71,10 @@ void Seismic_monitor::Init() {
ui->doubleSpinBox_low_1->setValue(vib_data->base_config_[i].normal_voltage_low);
ui->doubleSpinBox_high_1->setValue(vib_data->base_config_[i].normal_voltage_high);
+ ui->checkBox_keyphase->setChecked(vib_data->base_config_[i].keyphase);
+ ui->comboBox_keyphase_ch->setCurrentIndex(vib_data->base_config_[i].keyphase_ch);
+ ui->comboBox_keyphase_slot->setCurrentIndex(vib_data->base_config_[i].keyphase_slot);
+
} else if (i + 1 == 2) {
ui->comboBox_chan_type_2->setCurrentIndex(vib_data->base_config_[i].channel_type);
ui->comboBox_sensitivity_unit_2->setCurrentIndex(vib_data->base_config_[i].sensitivity_unit);
@@ -80,12 +84,20 @@ void Seismic_monitor::Init() {
ui->doubleSpinBox_low_2->setValue(vib_data->base_config_[i].normal_voltage_low);
ui->doubleSpinBox_high_2->setValue(vib_data->base_config_[i].normal_voltage_high);
+ ui->checkBox_keyphase_2->setChecked(vib_data->base_config_[i].keyphase);
+ ui->comboBox_keyphase_ch_2->setCurrentIndex(vib_data->base_config_[i].keyphase_ch);
+ ui->comboBox_keyphase_slot_2->setCurrentIndex(vib_data->base_config_[i].keyphase_slot);
+
} else if (i + 1 == 3) {
ui->checkBox_standby_2->setChecked(vib_data->base_config_[i].standby);
ui->comboBox_chan_type_3->setCurrentIndex(vib_data->base_config_[i].channel_type);
ui->comboBox_sensitivity_unit_3->setCurrentIndex(vib_data->base_config_[i].sensitivity_unit);
ui->lineEdit_signal_sensitivity_3->setText(QString::number(vib_data->base_config_[i].signal_sensitivity));
+ ui->checkBox_keyphase_3->setChecked(vib_data->base_config_[i].keyphase);
+ ui->comboBox_keyphase_ch_3->setCurrentIndex(vib_data->base_config_[i].keyphase_ch);
+ ui->comboBox_keyphase_slot_3->setCurrentIndex(vib_data->base_config_[i].keyphase_slot);
+
ui->checkBox_enable_3->setChecked(vib_data->base_config_[i].active);
ui->doubleSpinBox_low_3->setValue(vib_data->base_config_[i].normal_voltage_low);
ui->doubleSpinBox_high_3->setValue(vib_data->base_config_[i].normal_voltage_high);
@@ -95,6 +107,10 @@ void Seismic_monitor::Init() {
ui->comboBox_sensitivity_unit_4->setCurrentIndex(vib_data->base_config_[i].sensitivity_unit);
ui->lineEdit_signal_sensitivity_4->setText(QString::number(vib_data->base_config_[i].signal_sensitivity));
+ ui->checkBox_keyphase_4->setChecked(vib_data->base_config_[i].keyphase);
+ ui->comboBox_keyphase_ch_4->setCurrentIndex(vib_data->base_config_[i].keyphase_ch);
+ ui->comboBox_keyphase_slot_4->setCurrentIndex(vib_data->base_config_[i].keyphase_slot);
+
ui->checkBox_enable_4->setChecked(vib_data->base_config_[i].active);
ui->doubleSpinBox_low_4->setValue(vib_data->base_config_[i].normal_voltage_low);
ui->doubleSpinBox_high_4->setValue(vib_data->base_config_[i].normal_voltage_high);
@@ -126,7 +142,6 @@ void Seismic_monitor::UpdateData(std::shared_ptr vib_data) {
vib_data->base_config_[var].channel_type = ui->comboBox_chan_type_2->currentIndex();
vib_data->base_config_[var].sensitivity_unit = ui->comboBox_sensitivity_unit_2->currentIndex();
vib_data->base_config_[var].signal_sensitivity = ui->lineEdit_signal_sensitivity_2->text().toFloat();
-
vib_data->base_config_[var].normal_voltage_low = ui->doubleSpinBox_low_2->value();
vib_data->base_config_[var].normal_voltage_high = ui->doubleSpinBox_high_2->value();
diff --git a/seismic_monitor.ui b/seismic_monitor.ui
index b5aa93b..f45ef62 100644
--- a/seismic_monitor.ui
+++ b/seismic_monitor.ui
@@ -501,6 +501,9 @@
16777215
+
+ 8
+
-
@@ -590,7 +593,7 @@
-100.000000000000000
- 25.000000000000000
+ 20.000000000000000
@@ -626,7 +629,7 @@
-100.000000000000000
- -25.000000000000000
+ -20.000000000000000
@@ -936,6 +939,9 @@
16777215
+
+ 8
+
-
@@ -1025,7 +1031,7 @@
-100.000000000000000
- 25.000000000000000
+ 20.000000000000000
@@ -1061,7 +1067,7 @@
-100.000000000000000
- -25.000000000000000
+ -20.000000000000000
@@ -1629,6 +1635,9 @@
16777215
+
+ 8
+
-
@@ -1718,7 +1727,7 @@
-100.000000000000000
- 25.000000000000000
+ 20.000000000000000
@@ -1754,7 +1763,7 @@
-100.000000000000000
- -25.000000000000000
+ -20.000000000000000
@@ -2064,6 +2073,9 @@
16777215
+
+ 8
+
-
@@ -2153,7 +2165,7 @@
-100.000000000000000
- 25.000000000000000
+ 20.000000000000000
@@ -2189,7 +2201,7 @@
-100.000000000000000
- -25.000000000000000
+ -20.000000000000000
diff --git a/trust.ui b/trust.ui
index fb7f077..e1193c4 100644
--- a/trust.ui
+++ b/trust.ui
@@ -306,33 +306,6 @@
输出使用
-
-
-
- 10
- 90
- 125
- 25
-
-
-
-
- 125
- 25
-
-
-
-
- 125
- 25
-
-
- -
-
- um
-
-
-
@@ -436,6 +409,73 @@
+
+
+
+ 10
+ 90
+ 125
+ 25
+
+
+
+
+ 125
+ 25
+
+
+
+
+ 125
+ 25
+
+
+ -
+
+ g
+
+
+ -
+
+ m/s**2
+
+
+ -
+
+ mm/s
+
+
+ -
+
+ inch/s
+
+
+ -
+
+ um
+
+
+ -
+
+ mm
+
+
+ -
+
+ mils
+
+
+ -
+
+ inch/s**2
+
+
+ -
+
+
+
+
+
diff --git a/velocity.ui b/velocity.ui
index 6e24a2b..69990df 100644
--- a/velocity.ui
+++ b/velocity.ui
@@ -340,6 +340,36 @@
25
+ -
+
+ True Peak
+
+
+ -
+
+ True Peak-To-Peak
+
+
+ -
+
+ RMS Scaled Peak
+
+
+ -
+
+ RMS Scaled Peak-To-Peak
+
+
+ -
+
+ AVG
+
+
+ -
+
+ RMS Scaled AVG
+
+
-
RMS
@@ -380,11 +410,51 @@
25
+
-
+
+ g
+
+
+ -
+
+ m/s**2
+
+
+ -
+
+ mm/s
+
+
+ -
+
+ inch/s
+
+
-
um
+ -
+
+ mm
+
+
+ -
+
+ mils
+
+
+ -
+
+ inch/s**2
+
+
+ -
+
+
+
+
@@ -617,6 +687,9 @@
+
+ false
+
220
@@ -627,6 +700,9 @@
+
+ false
+
150
@@ -637,6 +713,9 @@
+
+ false
+
80
@@ -647,6 +726,9 @@
+
+ false
+
220
@@ -657,6 +739,9 @@
+
+ false
+
80
@@ -667,6 +752,9 @@
+
+ false
+
150
@@ -703,6 +791,9 @@
+
+ false
+
290
@@ -716,6 +807,9 @@
+
+ false
+
290
@@ -742,6 +836,9 @@
+
+ false
+
350
@@ -768,6 +865,9 @@
+
+ false
+
350
diff --git a/vibrationdata.h b/vibrationdata.h
index 14ce487..f6724a6 100644
--- a/vibrationdata.h
+++ b/vibrationdata.h
@@ -14,7 +14,7 @@ class VibrationData : public CardBase {
std::vector> variables_;
VibAlertDanger alert_danger[CHANNEL_COUNT];
VibAlertDangerPress alert_danger_press[CHANNEL_COUNT];
- DCOutput dc_output[CHANNEL_COUNT][CHANNEL_COUNT];
+ DCOutput dc_output[CHANNEL_COUNT];
};
#endif // VIBRATIONDATA_H