![](/media/cache/profiles/altb_JGUSAOG.jpg.50x50_q85.jpg)
Mirror actuator for RT2 lab
Diff: ControllerLoop.cpp
- Revision:
- 15:9f32f64eee5b
- Parent:
- 11:d43f8b421d6d
diff -r d43f8b421d6d -r 9f32f64eee5b ControllerLoop.cpp --- a/ControllerLoop.cpp Wed Apr 28 12:51:02 2021 +0000 +++ b/ControllerLoop.cpp Sun May 02 08:17:06 2021 +0000 @@ -21,6 +21,7 @@ void ControllerLoop::loop(void){ float w01=2*3.1415927 * 8; float xy[2]; + float exc=0.0; // excitation GPA while(1) { ThisThread::flags_wait_any(threadFlag); @@ -42,21 +43,13 @@ } else { - // ------------------------ do the control first - - // calculate desired currents here, you can do "anything" here, - // if you like to refer to values e.g. from the gui or from the trafo, - // please use data.xxx values, they are calculated 30 lines below - - data.i_des[0] = data.i_des[1] =0.0; - // ------------------------ write outputs i_des1.write(i2u(data.i_des[0])); i_des2.write(i2u(data.i_des[1])); // GPA: if you want to use the GPA, uncomment and improve following line: // exc = myGPA(data.i_des[0],data.sens_Vphi[0]); - // now do trafos etc + // now do trafos etc, not needed at beginning of lab-course if(mk.external_control) // get desired values from external source (GUI) {