Hello,
Got a bit of a stumper on this. I'm thinking I have to look back in some earlier files to find it, but I have the following code. The specific issue I am having is the lack of definition for __PIO2. Any ideas or guidance where to look for this would be great. Thank you.
case 6: // calculate new params based on mean excursion and oscillation time of bangbang fNh =(float)(Nheat); fNc = (float)(Ncool); Eh = acc4/fNh; Ec =acc5/fNc; Th = fNh*Ts; Tc = fNc*Ts; Tosc = ((Th+Tc)*(Th+Tc) + 4. * Th*Tc) / (2.* (Th+Tc)); Ampl = (__PIO2)*(Eh - Ec); db_fpoke(&_Ti, 0.896 * Tosc); if (Ampl < 2.* h) { db_fpoke(&_Td, 1.1); // ensure within db limits db_fpoke(&_Prop_band, 2.6 * Ampl* bb_Tune_Stiffness); } else { db_fpoke(&_Td, 0.152 * Tosc); db_fpoke(&_Prop_band, 1.3 * Ampl* bb_Tune_Stiffness); } if(SPrr_tune != 0.) { y = SPrrfactor*Ampl*10./Tosc; //calc a controllable rate y = macro_max (y, min_SPrr); db_fpoke(&_SPrr_tune,y ); // always set this if poss to condition alarms } PID.OP = PID.OPlast = Th/(Th+Tc); // prepare for bumpless to OP mean clr_tune_fail; // assume successful db_fpoke(&_Tuned_at_addr, (float)this_zone_addr); // validate PID parameters tune_phase = 8; break;