Skip to content
Snippets Groups Projects
Commit 6561dcd2 authored by Claudio Scafuri's avatar Claudio Scafuri :speech_balloon:
Browse files

CEV correction and resonance strength

parent 83f12f30
No related branches found
No related tags found
No related merge requests found
...@@ -1356,6 +1356,20 @@ void E2Sextupole::write_CEVCorrectionStrength(Tango::WAttribute &attr) ...@@ -1356,6 +1356,20 @@ void E2Sextupole::write_CEVCorrectionStrength(Tango::WAttribute &attr)
/*----- PROTECTED REGION ID(E2Sextupole::write_CEVCorrectionStrength) ENABLED START -----*/ /*----- PROTECTED REGION ID(E2Sextupole::write_CEVCorrectionStrength) ENABLED START -----*/
/* clang-format on */ /* clang-format on */
// Add your own code // Add your own code
omni_mutex_lock guardio(iomutex);
Tango::DevDouble newStrength;
//resonanceAtt->get_write_value(_resStrength);
newStrength = w_val + wValCevResStrength + cev_design_strength;
std::vector<double> req_strength;
std::vector<double> curr_out;
req_strength.push_back(newStrength);
cev->compute_currents(magnet_rigidity, req_strength, curr_out);
Tango::DeviceAttribute watt("Current", curr_out[0]);
cev_current_dev->write_attribute(watt);
wValCevCorrStrength = w_val;
cev_set_strength[0] = newStrength;
cevStrengthAtt->set_write_value(cev_set_strength[0]);
/* clang-format off */ /* clang-format off */
/*----- PROTECTED REGION END -----*/ // E2Sextupole::write_CEVCorrectionStrength /*----- PROTECTED REGION END -----*/ // E2Sextupole::write_CEVCorrectionStrength
} }
...@@ -1408,7 +1422,7 @@ void E2Sextupole::write_CEVResonanceStrength(Tango::WAttribute &attr) ...@@ -1408,7 +1422,7 @@ void E2Sextupole::write_CEVResonanceStrength(Tango::WAttribute &attr)
wValCevResStrength = w_val; wValCevResStrength = w_val;
*attr_CEVResonanceStrength_read = w_val; *attr_CEVResonanceStrength_read = w_val;
cev_set_strength[0] = newStrength; cev_set_strength[0] = newStrength;
cevStrengthAtt->set_write_value(ceh_set_strength[0]); cevStrengthAtt->set_write_value(cev_set_strength[0]);
/* clang-format off */ /* clang-format off */
/*----- PROTECTED REGION END -----*/ // E2Sextupole::write_CEVResonanceStrength /*----- PROTECTED REGION END -----*/ // E2Sextupole::write_CEVResonanceStrength
} }
......
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