hldvdzyyjm * localDW ) { localDW -> agffdh025d = false ; } void cqabclhqip ( SimStruct * const S , boolean_T etkm24oeau , real_T didof4byc4 , fzgld4ioxx * localB , hldvdzyyjm * localDW , nneyi35s1a * localP , jppzrcodeg * localX , mgleimd2gn * localXdis ) { real_T hdawcmvty5 ; if ( ssIsSampleHit ( S , 1 , 0 ) && ssIsMajorTimeStep ( S ) ) { if ( etkm24oeau ) { if ( ! localDW -> agffdh025d ) { if ( ssGetTaskTime ( S , 1 ) != ssGetTStart ( S ) ) { ssSetSolverNeedsReset ( S ) ; } localXdis -> g4hwiaob0z = 0 ; localDW -> agffdh025d = true ; } } else { if ( localDW -> agffdh025d ) { ssSetSolverNeedsReset ( S ) ; localXdis -> g4hwiaob0z = 1 ; gjooyfv3bl ( localDW ) ; } } } if ( localDW -> agffdh025d ) { hdawcmvty5 = ssGetT ( S ) ; localB -> piz2wxjgln = localX -> g4hwiaob0z ; { real_T * * uBuffer = ( real_T * * ) & localDW -> mapbuxhz55 . TUbufferPtrs [ 0 ] ; real_T * * tBuffer = ( real_T * * ) & localDW -> mapbuxhz55 . TUbufferPtrs [ 1 ] ; real_T simTime = ssGetT ( S ) ; real_T tMinusDelay = simTime - localP -> P_2 ; localB -> c1a15sku2w = Deadbeat_CUK_acc_rt_TDelayInterpolate ( tMinusDelay , 0.0 , * tBuffer , * uBuffer , localDW -> phyjdg23m0 . CircularBufSize , & localDW -> phyjdg23m0 . Last , localDW -> phyjdg23m0 . Tail , localDW -> phyjdg23m0 . Head , localP -> P_3 , 0 , ( boolean_T ) ( ssIsMinorTimeStep ( S ) && ( ssGetTimeOfLastOutput ( S ) == ssGetT ( S ) ) ) ) ; } if ( ssIsSampleHit ( S , 1 , 0 ) ) { localB -> cs4dg4krvc = localP -> P_4 ; localB -> lbagd2xbpx = localDW -> maqntnbpoj ; } if ( hdawcmvty5 >= localB -> cs4dg4krvc ) { localB -> a51b5puwm1 = localB -> piz2wxjgln - localB -> c1a15sku2w ; localB -> ekk3k2wrwu = localP -> P_0 * localB -> a51b5puwm1 ; localB -> f3hneacniz = localB -> ekk3k2wrwu ; } else { localB -> f3hneacniz = localB -> lbagd2xbpx ; } localB -> ndc0pt2kls = didof4byc4 * didof4byc4 ; if ( ssIsMajorTimeStep ( S ) ) { localDW -> psx5wvplz4 = localB -> f3hneacniz >= localP -> P_6 ? 1 : localB -> f3hneacniz > localP -> P_7 ? 0 : - 1 ; srUpdateBC ( localDW -> igwl1d5vuc ) ; } } } void hdynn0hvxj ( SimStruct * const S , fzgld4ioxx *
localDW ) { localDW -> nej2n2fr4t = false ; } void bemu4fk2sq ( SimStruct * const S , boolean_T fuz4opuchm , real_T nkqzvcukuv , bkp1n1bm33 * localB , mdhkgmfpbe * localDW , mvw1gbh0c1 * localP , pfdaqg4dlv * localXdis ) { if ( ssIsSampleHit ( S , 1 , 0 ) && ssIsMajorTimeStep ( S ) ) { if ( fuz4opuchm ) { if ( ! localDW -> nej2n2fr4t ) { if ( ssGetTaskTime ( S , 1 ) != ssGetTStart ( S ) ) { ssSetSolverNeedsReset ( S ) ; } ( void ) memset ( & ( localXdis -> fq23fwubtb ) , 0 , 2 * sizeof ( boolean_T ) ) ; localDW -> nej2n2fr4t = true ; } } else { if ( localDW -> nej2n2fr4t ) { ssSetSolverNeedsReset ( S ) ; ( void ) memset ( & ( localXdis -> fq23fwubtb ) , 1 , 2 * sizeof ( boolean_T ) ) ; mctqnytrkq ( localDW ) ; } } } if ( localDW -> nej2n2fr4t ) { localB -> obmjfhqv1x = ( muDoubleScalarSin ( localP -> P_4 * ssGetTaskTime ( S , 0 ) + localP -> P_5 ) * localP -> P_2 + localP -> P_3 ) * nkqzvcukuv ; localB -> n024o4o5og = ( muDoubleScalarSin ( localP -> P_8 * ssGetTaskTime ( S , 0 ) + localP -> P_9 ) * localP -> P_6 + localP -> P_7 ) * nkqzvcukuv ; if ( ssIsMajorTimeStep ( S ) ) { srUpdateBC ( localDW -> mdukihclqs ) ; } } } void jreinmfd0u ( bkp1n1bm33 * localB , mdhkgmfpbe *
/* Model output function */ void RA4_student_output(void) { /* Reset subsysRan breadcrumbs */ srClearBC(RA4_student_DW.Controller_SubsysRanBC); /* UnitDelay: '<Root>/Unit Delay2' */ RA4_student_B.UnitDelay2[0] = RA4_student_DW.UnitDelay2_DSTATE[0]; RA4_student_B.UnitDelay2[1] = RA4_student_DW.UnitDelay2_DSTATE[1]; RA4_student_B.UnitDelay2[2] = RA4_student_DW.UnitDelay2_DSTATE[2]; /* UnitDelay: '<Root>/Unit Delay1' */ RA4_student_B.UnitDelay1 = RA4_student_DW.UnitDelay1_DSTATE; /* RTW Generated Level2 S-Function Block: '<S2>/Robot Arm_sfcn' (Robot_sf) */ { SimStruct *rts = RA4_student_M->childSfunctions[1]; sfcnOutputs(rts, 0); } /* Outputs for Enabled SubSystem: '<Root>/Controller' incorporates: * EnablePort: '<S1>/Enable' */ if (RA4_student_B.RobotArm_sfcn_o1 > 0.0) { if (!RA4_student_DW.Controller_MODE) { RA4_student_DW.Controller_MODE = true; } } else { if (RA4_student_DW.Controller_MODE) { RA4_student_DW.Controller_MODE = false; } } if (RA4_student_DW.Controller_MODE) { /* Sum: '<S1>/Sum4' incorporates: * Constant: '<S1>/Feedforward R' * Constant: '<S1>/Reference R' * Gain: '<S3>/Gain' * Sum: '<S1>/Sum2' */ RA4_student_B.Sum4 = (RA4_student_P.ReferenceR_Value - RA4_student_B.RobotArm_sfcn_o2[0]) * RA4_student_P.Gain_Gain + RA4_student_P.FeedforwardR_Value; /* Sum: '<S1>/Sum5' incorporates: * Constant: '<S1>/Feedforward X' * Constant: '<S1>/Reference X' * Gain: '<S4>/Gain' * Sum: '<S1>/Sum1' */ RA4_student_B.Sum5 = (RA4_student_P.ReferenceX_Value - RA4_student_B.RobotArm_sfcn_o2[1]) * RA4_student_P.Gain_Gain_e + RA4_student_P.FeedforwardX_Value; /* Sum: '<S1>/Sum6' incorporates: * Constant: '<S1>/Feedforward Z' * Constant: '<S1>/Reference Z' * Gain: '<S5>/Gain' * Sum: '<S1>/Sum3' */ RA4_student_B.Sum6 = (RA4_student_P.ReferenceZ_Value - RA4_student_B.RobotArm_sfcn_o2[2]) * RA4_student_P.Gain_Gain_l + RA4_student_P.FeedforwardZ_Value; /* Constant: '<S1>/Reference Solenoid' */ RA4_student_B.ReferenceSolenoid = RA4_student_P.ReferenceSolenoid_Value; /* Level2 S-Function Block: '<S6>/S-Function' (sf_rt_scope) */ { SimStruct *rts = RA4_student_M->childSfunctions[0]; sfcnOutputs(rts, 0); } srUpdateBC(RA4_student_DW.Controller_SubsysRanBC); } /* End of Outputs for SubSystem: '<Root>/Controller' */ }
void ) { } static void mdlOutputs ( SimStruct * S , int_T tid ) { real_T jzxguy1xyo ; ZCEventType zcEvent ; boolean_T is1galx1wr ; real_T iden3vpls2 ; real_T kewj0jjgdw ; real_T c3hti1p3uf ; int8_T rtPrevAction ; int8_T rtAction ; nmsgyp54ig * _rtB ; bbqvqz25ov * _rtP ; n2g2llwf21 * _rtX ; aa2ep02qn5 * _rtZCE ; pklu3vjy1t * _rtDW ; _rtDW = ( ( pklu3vjy1t * ) ssGetRootDWork ( S ) ) ; _rtZCE = ( ( aa2ep02qn5 * ) _ssGetPrevZCSigState ( S ) ) ; _rtX = ( ( n2g2llwf21 * ) ssGetContStates ( S ) ) ; _rtP = ( ( bbqvqz25ov * ) ssGetModelRtp ( S ) ) ; _rtB = ( ( nmsgyp54ig * ) _ssGetModelBlockIO ( S ) ) ; if ( ssIsSampleHit ( S , 4 , 0 ) ) { _rtB -> jbbkv4upvi = _rtDW -> idaicj53o4 ; } if ( ssIsSampleHit ( S , 1 , 0 ) ) { is1galx1wr = ( _rtB -> jbbkv4upvi != c22ngqieus ( S ) -> pactsh03am ) ; } jzxguy1xyo = ssGetT ( S ) ; if ( ssIsSampleHit ( S , 1 , 0 ) ) { _rtB -> oojsaunz11 = _rtP -> P_5 ; _rtB -> fmra2cutsa = _rtP -> P_6 ; } _rtB -> fs1ofsmvy2 = muDoubleScalarRem ( jzxguy1xyo + _rtB -> oojsaunz11 , _rtB -> fmra2cutsa ) * _rtP -> P_7 ; _rtB -> kdd430tca4 = ( ( 2.0 * _rtB -> fs1ofsmvy2 - 1.0 ) + 1.0 ) * 0.5 ; if ( ssIsSampleHit ( S , 1 , 0 ) ) { if ( ssIsMajorTimeStep ( S ) ) { _rtDW -> fiaf5yjt4n = ( _rtB -> jbbkv4upvi >= _rtB -> kdd430tca4 ) ; } _rtB -> bonoh3t2uf = ( is1galx1wr && _rtDW -> fiaf5yjt4n ) ; } _rtB -> puvw0myvhu [ 0 ] = _rtB -> bonoh3t2uf ; _rtB -> puvw0myvhu [ 1 ] = 0.0 ; _rtB -> puvw0myvhu [ 2 ] = 0.0 ; _rtDW -> lhiprm3wjz [ 0 ] = ! ( _rtB -> puvw0myvhu [ 0 ] == _rtDW -> lhiprm3wjz [ 1 ] ) ; _rtDW -> lhiprm3wjz [ 1 ] = _rtB -> puvw0myvhu [ 0 ] ; _rtB -> puvw0myvhu [ 3 ] = _rtDW -> lhiprm3wjz [ 0 ] ; if ( ssIsSampleHit ( S , 2 , 0 ) ) { ssCallAccelRunBlock ( S , 9 , 15 , SS_CALL_MDL_OUTPUTS ) ; ssCallAccelRunBlock ( S , 9 , 16 , SS_CALL_MDL_OUTPUTS ) ; } if ( ssIsSampleHit ( S , 4 , 0 ) ) { _rtB -> ni0skqgprw = _rtB -> mgrpxotnda [ 2 ] ; } if ( ssIsSampleHit ( S , 2 , 0 ) ) { ssCallAccelRunBlock ( S , 9 , 20 , SS_CALL_MDL_OUTPUTS ) ; } if ( ssIsSampleHit ( S , 1 , 0 ) ) { zcEvent = rt_ZCFcn ( ANY_ZERO_CROSSING , & _rtZCE -> mpe2yble25 , ( _rtB -> fs1ofsmvy2 - _rtP -> P_11 ) ) ; if ( _rtDW -> oosqu0tl1h == 0 ) { if ( zcEvent != NO_ZCEVENT ) { _rtB -> dgvfzxjzqp = ! ( _rtB -> dgvfzxjzqp != 0.0 ) ; _rtDW -> oosqu0tl1h = 1 ; } else if ( _rtB -> dgvfzxjzqp == 1.0 ) { if ( _rtB -> fs1ofsmvy2 != _rtP -> P_11 ) { _rtB -> dgvfzxjzqp = 0.0 ; } } else { if ( _rtB -> fs1ofsmvy2 == _rtP -> P_11 ) { _rtB -> dgvfzxjzqp = 1.0 ; } } } else { if ( _rtB -> fs1ofsmvy2 != _rtP -> P_11 ) { _rtB -> dgvfzxjzqp = 0.0 ; } _rtDW -> oosqu0tl1h = 0 ; } } if ( ssIsSampleHit ( S , 2 , 0 ) ) { ssCallAccelRunBlock ( S , 9 , 23 , SS_CALL_MDL_OUTPUTS ) ; ssCallAccelRunBlock ( S , 9 , 33 , SS_CALL_MDL_OUTPUTS ) ; iden3vpls2 = _rtP -> P_13 * _rtB -> mgrpxotnda [ 8 ] ; } if ( ssIsSampleHit ( S , 4 , 0 ) ) { _rtB -> gp5orjzg5t = _rtB -> mgrpxotnda [ 2 ] ; } if ( ssIsSampleHit ( S , 2 , 0 ) ) { kewj0jjgdw = ( iden3vpls2 - _rtB -> gp5orjzg5t ) * _rtB -> nzunlww04y ; } if ( ssIsSampleHit ( S , 4 , 0 ) ) { _rtB -> jw2hkpsksy = _rtB -> gp5orjzg5t * _rtB -> dvca5kgoqr ; _rtB -> elobzetbdp = _rtB -> mgrpxotnda [ 8 ] ; } if ( ssIsSampleHit ( S , 2 , 0 ) ) { c3hti1p3uf = ( kewj0jjgdw + _rtB -> jw2hkpsksy ) - _rtB -> elobzetbdp ; if ( ssIsSampleHit ( S , 4 , 0 ) ) { _rtB -> bc5lqmbcwx = _rtB -> mgrpxotnda [ 9 ] ; } } if ( ssIsSampleHit ( S , 4 , 0 ) ) { _rtB -> bpiny53cki = _rtB -> elobzetbdp + _rtB -> bc5lqmbcwx ; } if ( ssIsSampleHit ( S , 2 , 0 ) ) { iden3vpls2 = c3hti1p3uf / _rtB -> bpiny53cki + _rtB -> idha0n310x ; if ( iden3vpls2 > _rtP -> P_16 ) { _rtB -> ccrq35nhp3 = _rtP -> P_16 ; } else if ( iden3vpls2 < _rtP -> P_17 ) { _rtB -> ccrq35nhp3 = _rtP -> P_17 ; } else { _rtB -> ccrq35nhp3 = iden3vpls2 ; } } if ( ssIsSampleHit ( S , 4 , 0 ) ) { _rtB -> pvzuuxenvc = _rtB -> ccrq35nhp3 ; } if ( ssIsSampleHit ( S , 2 , 0 ) ) { _rtB -> ii04l1a0ic = ( _rtB -> mgrpxotnda [ 9 ] + _rtB -> mgrpxotnda [ 8 ] ) - _rtB -> mgrpxotnda [ 6 ] ; ssCallAccelRunBlock ( S , 9 , 51 , SS_CALL_MDL_OUTPUTS ) ; rtPrevAction = _rtDW -> dcumqbbyun ; if ( ssIsMajorTimeStep ( S ) ) { if ( _rtB -> mgrpxotnda [ 9 ] < 90.199999999999989 ) { rtAction = 0 ; } else { rtAction = 1 ; } _rtDW -> dcumqbbyun = rtAction ; } else { rtAction = _rtDW -> dcumqbbyun ; } if ( rtPrevAction != rtAction ) { switch ( rtPrevAction ) { case 0 : ssSetSolverNeedsReset ( S ) ; break ; case 1 : ssSetSolverNeedsReset ( S ) ; break ; case 2 : ssSetSolverNeedsReset ( S ) ; break ; } } switch ( rtAction ) { case 0 : if ( rtAction != rtPrevAction ) { if ( ssGetTaskTime ( S , 2 ) != ssGetTStart ( S ) ) { ssSetSolverNeedsReset ( S ) ; } } _rtB -> kx5rgsvmx3 = _rtP -> P_0 * _rtB -> mgrpxotnda [ 8 ] ; if ( ssIsMajorTimeStep ( S ) ) { srUpdateBC ( _rtDW -> o5k0zwtbn4 ) ; } break ; case 1 : if ( rtAction != rtPrevAction ) { if ( ssGetTaskTime ( S , 2 ) != ssGetTStart ( S ) ) { ssSetSolverNeedsReset ( S ) ; } } _rtB -> kx5rgsvmx3 = _rtP -> P_1 ; if ( ssIsMajorTimeStep ( S ) ) { srUpdateBC ( _rtDW -> ihoovge3z4 ) ; } break ; case 2 : if ( rtAction != rtPrevAction ) { if ( ssGetTaskTime ( S , 2 ) != ssGetTStart ( S ) ) { ssSetSolverNeedsReset ( S ) ; } } _rtB -> pvzuuxenvc = _rtP -> P_2 ; if ( ssIsMajorTimeStep ( S ) ) { srUpdateBC ( _rtDW -> gunoszsdaf ) ; } break ; } } bemu4fk2sq ( S , _rtB -> kwjevd5eqt , 0.0 , & _rtB -> bemu4fk2sq4 , & _rtDW -> bemu4fk2sq4 , ( mvw1gbh0c1 * ) & _rtP -> bemu4fk2sq4 , & ( ( npjij2cecc * ) ssGetContStateDisabled ( S ) ) -> bemu4fk2sq4 ) ; cqabclhqip ( S , _rtB -> donhz1jhkq , 0.0 , & _rtB -> cqabclhqip4 , & _rtDW -> cqabclhqip4 , ( nneyi35s1a * ) & _rtP -> cqabclhqip4 , & _rtX -> cqabclhqip4 , & ( ( npjij2cecc * ) ssGetContStateDisabled ( S ) ) -> cqabclhqip4 ) ; bemu4fk2sq ( S , _rtB -> jwapqatga5 , 0.0 , & _rtB -> n1qdzssqu3 , & _rtDW -> n1qdzssqu3 , ( mvw1gbh0c1 * ) & _rtP -> n1qdzssqu3 , & ( ( npjij2cecc * ) ssGetContStateDisabled ( S ) ) -> n1qdzssqu3 ) ; cqabclhqip ( S , _rtB -> p5ierutvgv , 0.0 , & _rtB -> nfugx5ih43 , & _rtDW -> nfugx5ih43 , ( nneyi35s1a * ) & _rtP -> nfugx5ih43 , & _rtX -> nfugx5ih43 , & ( ( npjij2cecc * ) ssGetContStateDisabled ( S ) ) -> nfugx5ih43 ) ; UNUSED_PARAMETER ( tid ) ; } static void mdlOutputsTID5 ( SimStruct * S ,
/* Model output function */ void udpRead_output(void) { char_T *sErr; int32_T samplesRead; boolean_T rtb_Compare; int32_T s5_iter; real_T tmp; int32_T exitg1; int32_T exitg2; /* Reset subsysRan breadcrumbs */ srClearBC(udpRead_DW.ForIteratorSubsystem_SubsysRanB); /* Reset subsysRan breadcrumbs */ srClearBC(udpRead_DW.ForIteratorSubsystem1_SubsysRan); /* Reset subsysRan breadcrumbs */ srClearBC(udpRead_DW.EnabledSubsystem_SubsysRanBC); /* S-Function (sdspFromNetwork): '<Root>/UDP Receive' */ sErr = GetErrorBuffer(&udpRead_DW.UDPReceive_NetworkLib[0U]); samplesRead = 31; LibOutputs_Network(&udpRead_DW.UDPReceive_NetworkLib[0U], &udpRead_B.UDPReceive_o1[0U], &samplesRead); if (*sErr != 0) { rtmSetErrorStatus(udpRead_M, sErr); rtmSetStopRequested(udpRead_M, 1); } udpRead_B.UDPReceive_o2 = (uint16_T)samplesRead; /* End of S-Function (sdspFromNetwork): '<Root>/UDP Receive' */ /* RelationalOperator: '<S1>/Compare' incorporates: * Constant: '<S1>/Constant' */ rtb_Compare = (udpRead_B.UDPReceive_o2 > udpRead_P.Constant_Value_p); /* Outputs for Enabled SubSystem: '<Root>/Enabled Subsystem' incorporates: * EnablePort: '<S2>/Enable' */ if (rtb_Compare) { if (!udpRead_DW.EnabledSubsystem_MODE) { udpRead_DW.EnabledSubsystem_MODE = true; } /* Outputs for Iterator SubSystem: '<S2>/For Iterator Subsystem1' incorporates: * ForIterator: '<S5>/For Iterator' */ /* Selector: '<S5>/Selector' incorporates: * Selector: '<S5>/Selector1' * Selector: '<S5>/Selector2' */ s5_iter = 24; do { exitg2 = 0; if (udpRead_P.Constant1_Value < 0.0) { tmp = ceil(udpRead_P.Constant1_Value); } else { tmp = floor(udpRead_P.Constant1_Value); } if (rtIsNaN(tmp) || rtIsInf(tmp)) { tmp = 0.0; } else { tmp = fmod(tmp, 4.294967296E+9); } if (s5_iter - 23 <= (tmp < 0.0 ? -(int32_T)(uint32_T)-tmp : (int32_T) (uint32_T)tmp)) { udpRead_B.Selector = udpRead_B.UDPReceive_o1[s5_iter]; udpRead_B.Selector1 = udpRead_B.UDPReceive_o1[s5_iter + 2]; udpRead_B.Selector2 = udpRead_B.UDPReceive_o1[s5_iter + 4]; srUpdateBC(udpRead_DW.ForIteratorSubsystem1_SubsysRan); s5_iter++; } else { exitg2 = 1; } } while (exitg2 == 0); /* End of Outputs for SubSystem: '<S2>/For Iterator Subsystem1' */ /* Outputs for Iterator SubSystem: '<S2>/For Iterator Subsystem' incorporates: * ForIterator: '<S4>/For Iterator' */ s5_iter = 1; do { exitg1 = 0; if (udpRead_P.Constant_Value < 0.0) { tmp = ceil(udpRead_P.Constant_Value); } else { tmp = floor(udpRead_P.Constant_Value); } if (rtIsNaN(tmp) || rtIsInf(tmp)) { tmp = 0.0; } else { tmp = fmod(tmp, 4.294967296E+9); } if (s5_iter <= (tmp < 0.0 ? -(int32_T)(uint32_T)-tmp : (int32_T)(uint32_T) tmp)) { udpRead_B.Selector_d = udpRead_B.UDPReceive_o1[s5_iter - 1]; udpRead_B.Selector1_f = udpRead_B.UDPReceive_o1[s5_iter + 3]; udpRead_B.Selector2_f = udpRead_B.UDPReceive_o1[s5_iter + 7]; udpRead_B.Compare = (s5_iter == udpRead_P.CompareToConstant_const); udpRead_B.Selector3 = udpRead_B.UDPReceive_o1[s5_iter + 11]; udpRead_B.Selector4 = udpRead_B.UDPReceive_o1[s5_iter + 15]; udpRead_B.Selector5 = udpRead_B.UDPReceive_o1[s5_iter + 19]; srUpdateBC(udpRead_DW.ForIteratorSubsystem_SubsysRanB); s5_iter++; } else { exitg1 = 1; } } while (exitg1 == 0); /* End of Outputs for SubSystem: '<S2>/For Iterator Subsystem' */ srUpdateBC(udpRead_DW.EnabledSubsystem_SubsysRanBC); } else { if (udpRead_DW.EnabledSubsystem_MODE) { udpRead_DW.EnabledSubsystem_MODE = false; } } /* End of Outputs for SubSystem: '<Root>/Enabled Subsystem' */ /* Switch: '<S3>/Init' incorporates: * Constant: '<S3>/Initial Condition' * Logic: '<S3>/FixPt Logical Operator' * UnitDelay: '<S3>/FixPt Unit Delay1' * UnitDelay: '<S3>/FixPt Unit Delay2' */ if (rtb_Compare || (udpRead_DW.FixPtUnitDelay2_DSTATE != 0)) { udpRead_B.Init = udpRead_P.UnitDelayResettable_vinit; } else { udpRead_B.Init = udpRead_DW.FixPtUnitDelay1_DSTATE; } /* End of Switch: '<S3>/Init' */ /* Switch: '<S3>/Reset' incorporates: * Constant: '<S3>/Initial Condition' * DataTypeConversion: '<Root>/Data Type Conversion' * Sum: '<Root>/Sum' */ if (rtb_Compare) { udpRead_B.Xnew = udpRead_P.UnitDelayResettable_vinit; } else { udpRead_B.Xnew = 1.0F + udpRead_B.Init; } /* End of Switch: '<S3>/Reset' */ }