User`s guide

40
*/
rtb_Product.re = TwinDFTs_CCS_P.Gain_Gain_m * rtb_Angle;
rtb_Product.im = TwinDFTs_CCS_P.Gain_Gain_m * rtb_PhaseRelay;
/* ComplexToMagnitudeAngle: '<Root>/Complex to Magnitude-Angle1' */
rtb_RelayDFT2 = rt_hypot(rtb_Product.re, rtb_Product.im);
/* Relay: '<Root>/Relay DFT2'
*
* Regarding '<Root>/Relay DFT2':
* Input0 Data Type: Floating Point real_T
* Output0 Data Type: Floating Point real_T
* On Points Value parameter uses the same data type and scaling as Input0
* Off Points Value parameter uses the same data type and scaling as Input0
* On Output Value parameter uses the same data type and scaling as Output0
* Off Output Value parameter uses the same data type and scaling as Output0
*/
if (rtb_RelayDFT2 >= TwinDFTs_CCS_P.RelayDFT2_OnVal ) {
TwinDFTs_CCS_DWork.RelayDFT2_Mode = TRUE;
} else if (rtb_RelayDFT2 <= TwinDFTs_CCS_P.RelayDFT2_OffVal ) {
TwinDFTs_CCS_DWork.RelayDFT2_Mode = FALSE;
}
rtb_RelayDFT2 = TwinDFTs_CCS_DWork.RelayDFT2_Mode ?
TwinDFTs_CCS_P.RelayDFT2_YOn : TwinDFTs_CCS_P.RelayDFT2_YOff;
/* Math: '<Root>/Conjugat' */
/* Operator : conj */
rtb_Conjugat.re = rtb_Product.re;
rtb_Conjugat.im = -rtb_Product.im;
/* Gain: '<S6>/Gain' incorporates:
* ComplexToMagnitudeAngle: '<Root>/Angle'
* Product: '<Root>/Product'
*/
rtb_PhaseRelay = rt_atan2(rtb_Gain.re * rtb_Conjugat.im + rtb_Gain.im *
rtb_Conjugat.re, rtb_Gain.re * rtb_Conjugat.re - rtb_Gain.im *
rtb_Conjugat.im) * TwinDFTs_CCS_P.Gain_Gain_e;
/* Relay: '<Root>/Phase Relay'
*
* Regarding '<Root>/Phase Relay':
* Input0 Data Type: Floating Point real_T
* Output0 Data Type: Floating Point real_T
* On Points Value parameter uses the same data type and scaling as Input0
* Off Points Value parameter uses the same data type and scaling as Input0
* On Output Value parameter uses the same data type and scaling as Output0
* Off Output Value parameter uses the same data type and scaling as Output0
*/
if (rtb_PhaseRelay >= TwinDFTs_CCS_P.PhaseRelay_OnVal ) {
TwinDFTs_CCS_DWork.PhaseRelay_Mode = TRUE;
} else if (rtb_PhaseRelay <= TwinDFTs_CCS_P.PhaseRelay_OffVal ) {
TwinDFTs_CCS_DWork.PhaseRelay_Mode = FALSE;
}
rtb_PhaseRelay = TwinDFTs_CCS_DWork.PhaseRelay_Mode ?
TwinDFTs_CCS_P.PhaseRelay_YOn : TwinDFTs_CCS_P.PhaseRelay_YOff;
/* SignalConversion: '<Root>/TmpHiddenBufferAtDigital OutputInport1' */