diff --git a/HVAC_model.c b/HVAC_model.c old mode 100644 new mode 100755 index 1f8cc8b..361e2cc --- a/HVAC_model.c +++ b/HVAC_model.c @@ -1,2246 +1,3850 @@ -/* - * File: HVAC_model.c - * - * Code generated for Simulink model 'HVAC_model'. - * - * Model version : 1.614 - * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 - * C/C++ source code generated on : Mon Feb 16 16:26:45 2026 - * - * Target selection: ert.tlc - * Embedded hardware selection: ARM Compatible->ARM Cortex-M - * Emulation hardware selection: - * Differs from embedded hardware (MATLAB Host) - * Code generation objectives: Unspecified - * Validation result: Not run - */ - -#include "HVAC_model.h" -#include -#include "HVAC_model_private.h" -#include "HVAC_model_types.h" -#include - -/* Exported block states */ -ActuatorCmdBus Actuator_Ch0_Command_Model;/* '/Data Store Memory15' */ -ActuatorCmdBus Actuator_Ch1_Command_Model;/* '/Data Store Memory15' */ -ActuatorCmdBus Actuator_Ch2_Command_Model;/* '/Data Store Memory15' */ -CmdBusStatus Status_Sensor_Model; /* '/Data Store Memory' */ -CmdBusError CCU_Errors_Model; /* '/Data Store Memory3' */ -CmdBusPWMGet PWM_Get; /* '/Data Store Memory1' */ - -/* Block signals (default storage) */ -B rtB; - -/* Block states (default storage) */ -DW rtDW; - -/* External outputs (root outports fed by signals with default storage) */ -ExtY rtY; - -/* Real-time model */ -static RT_MODEL rtM_; -RT_MODEL *const rtM = &rtM_; - -/* - * Output and update for action system: - * '/If Action Subsystem3' - * '/If Action Subsystem3' - * '/If Action Subsystem3' - * '/If Action Subsystem3' - * '/If Action Subsystem3' - * '/If Action Subsystem3' - * '/If Action Subsystem3' - */ -void IfActionSubsystem3(int8_t rtu_stepIn, int8_t *rty_step) -{ - int32_t i; - - /* BusCreator: '/Bus Creator' incorporates: - * DataStoreWrite: '/Data Store Write' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch0_Command_Model.POS[i] = 0U; - Actuator_Ch0_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch0_Command_Model.MODE[i] = 0U; - Actuator_Ch0_Command_Model.COM[i] = 0U; - Actuator_Ch0_Command_Model.Stall_SET[i] = 0U; - Actuator_Ch0_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch0_Command_Model.Autos_SET[i] = 0U; - Actuator_Ch0_Command_Model.Speed_SET[i] = 0U; - Actuator_Ch0_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* SignalConversion generated from: '/stepIn' */ - *rty_step = rtu_stepIn; -} - -/* - * Output and update for atomic system: - * '/Initial CPOS Min' - * '/Initial CPOS Min' - */ -void InitialCPOSMin(double rtu_LOGGER, int8_t rtu_step, int8_t *rty_y) -{ - *rty_y = rtu_step; - - /* : y = step; */ - /* : if(LOGGER) */ - if (rtu_LOGGER != 0.0) { - /* : fprintf('SIMULINK Initial CPOS Min - 6000\n'); */ - printf("SIMULINK Initial CPOS Min - 6000\n"); - fflush(stdout); - } -} - -/* - * Output and update for atomic system: - * '/Normal Mode' - * '/Normal Mode' - */ -void NormalMode(double rtu_LOGGER, int8_t rtu_step, int8_t *rty_y) -{ - *rty_y = rtu_step; - - /* : y = step; */ - /* : if(LOGGER) */ - if (rtu_LOGGER != 0.0) { - /* : fprintf('SIMULINK Normal Mode\n'); */ - printf("SIMULINK Normal Mode\n"); - fflush(stdout); - } -} - -/* - * Output and update for atomic system: - * '/Move to position Min' - * '/Move to position Min' - * '/Move to position Min' - */ -void MovetopositionMin(double rtu_LOGGER, int8_t rtu_step, int8_t *rty_y) -{ - *rty_y = rtu_step; - - /* : y = step; */ - /* : if(LOGGER) */ - if (rtu_LOGGER != 0.0) { - /* : fprintf('SIMULINK Move to position Min - 1\n'); */ - printf("SIMULINK Move to position Min - 1\n"); - fflush(stdout); - } -} - -/* - * Output and update for atomic system: - * '/MIN POSITION' - * '/MIN POSITION' - * '/MIN POSITION' - */ -void MINPOSITION(int16_t rty_y[9], double rtu_LOGGER) -{ - int32_t i; - - /* : y = step; */ - /* : if(LOGGER) */ - if (rtu_LOGGER != 0.0) { - /* : fprintf('SIMULINK Min_position_Ch0 '); */ - printf("SIMULINK Min_position_Ch0 "); - fflush(stdout); - - /* : for i = 1:numel(step) */ - for (i = 0; i < 9; i++) { - /* : fprintf('%d ', int16(step(i))); */ - printf("%d ", rty_y[i]); - fflush(stdout); - } - - /* : fprintf('\n'); */ - printf("\n"); - fflush(stdout); - } -} - -/* - * Output and update for atomic system: - * '/Initial CPOS Max' - * '/Initial CPOS Max' - * '/Initial CPOS Max' - */ -void InitialCPOSMax(double rtu_LOGGER, int8_t rtu_step, int8_t *rty_y) -{ - *rty_y = rtu_step; - - /* : y = step; */ - /* : if(LOGGER) */ - if (rtu_LOGGER != 0.0) { - /* : fprintf('SIMULINK Initial CPOS Max - 1\n'); */ - printf("SIMULINK Initial CPOS Max - 1\n"); - fflush(stdout); - } -} - -/* - * Output and update for atomic system: - * '/Move to position Max' - * '/Move to position Max' - * '/Move to position Max' - */ -void MovetopositionMax(int8_t rtu_step, double rtu_LOGGER, int8_t *rty_y) -{ - *rty_y = rtu_step; - - /* : y = step; */ - /* : if(LOGGER) */ - if (rtu_LOGGER != 0.0) { - /* : fprintf('SIMULINK Move to position Max - 6000\n'); */ - printf("SIMULINK Move to position Max - 6000\n"); - fflush(stdout); - } -} - -/* - * Output and update for atomic system: - * '/MIN POSITION' - * '/MIN POSITION' - * '/MIN POSITION' - */ -void MINPOSITION_g(int16_t rty_y[9], double rtu_LOGGER) -{ - int32_t i; - - /* : y = step; */ - /* : if(LOGGER) */ - if (rtu_LOGGER != 0.0) { - /* : fprintf('SIMULINK Max_position_Ch0 '); */ - printf("SIMULINK Max_position_Ch0 "); - fflush(stdout); - - /* : for i = 1:numel(step) */ - for (i = 0; i < 9; i++) { - /* : fprintf('%d ', int16(step(i))); */ - printf("%d ", rty_y[i]); - fflush(stdout); - } - - /* : fprintf('\n'); */ - printf("\n"); - fflush(stdout); - } -} - -/* - * Output and update for atomic system: - * '/Write Ignition' - * '/Write Ignition' - */ -void WriteIgnition(double rtu_LOGGER, int8_t rtu_step) -{ - /* : if(LOGGER) */ - if (rtu_LOGGER != 0.0) { - /* : fprintf('step = %d\n',step); */ - printf("step = %d\n", rtu_step); - fflush(stdout); - } -} - -/* - * Output and update for action system: - * '/If Action Subsystem3' - * '/If Action Subsystem3' - * '/If Action Subsystem3' - * '/If Action Subsystem3' - * '/If Action Subsystem3' - * '/If Action Subsystem3' - * '/If Action Subsystem3' - */ -void IfActionSubsystem3_m(int8_t rtu_stepIn, int8_t *rty_step) -{ - int32_t i; - - /* BusCreator: '/Bus Creator' incorporates: - * DataStoreWrite: '/Data Store Write' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch1_Command_Model.POS[i] = 0U; - Actuator_Ch1_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch1_Command_Model.MODE[i] = 0U; - Actuator_Ch1_Command_Model.COM[i] = 0U; - Actuator_Ch1_Command_Model.Stall_SET[i] = 0U; - Actuator_Ch1_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch1_Command_Model.Autos_SET[i] = 0U; - Actuator_Ch1_Command_Model.Speed_SET[i] = 0U; - Actuator_Ch1_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* SignalConversion generated from: '/stepIn' */ - *rty_step = rtu_stepIn; -} - -/* - * Output and update for action system: - * '/If Action Subsystem3' - * '/If Action Subsystem3' - * '/If Action Subsystem3' - * '/If Action Subsystem3' - * '/If Action Subsystem3' - * '/If Action Subsystem3' - * '/If Action Subsystem3' - */ -void IfActionSubsystem3_n(int8_t rtu_stepIn, int8_t *rty_step) -{ - int32_t i; - - /* BusCreator: '/Bus Creator' incorporates: - * DataStoreWrite: '/Data Store Write' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch2_Command_Model.POS[i] = 0U; - Actuator_Ch2_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch2_Command_Model.MODE[i] = 0U; - Actuator_Ch2_Command_Model.COM[i] = 0U; - Actuator_Ch2_Command_Model.Stall_SET[i] = 0U; - Actuator_Ch2_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch2_Command_Model.Autos_SET[i] = 0U; - Actuator_Ch2_Command_Model.Speed_SET[i] = 0U; - Actuator_Ch2_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* SignalConversion generated from: '/stepIn' */ - *rty_step = rtu_stepIn; -} - -/* Model step function */ -void HVAC_model_step(void) -{ - int32_t i; - int16_t rtb_y_ey[9]; - int8_t rtb_Switch; - int8_t rtb_y_fb; - bool rtb_RelationalOperator_j[9]; - bool tmp; - bool tmp_0; - - /* BusCreator: '/Bus Creator' incorporates: - * DataStoreWrite: '/Data Store Write' - */ - CCU_Errors_Model.CCU_IncarTempErrF_Stat = 0U; - CCU_Errors_Model.CCU_IncarTempErrR_Stat = 0U; - CCU_Errors_Model.CCU_DuctTempSenErrF_Stat = 0U; - CCU_Errors_Model.CCU_DuctTempSenErrR_Stat = 0U; - CCU_Errors_Model.CCU_EvaTempSenErrF_Stat = 0U; - CCU_Errors_Model.CCU_EvaTempSenErrR_Stat = 0U; - CCU_Errors_Model.CCU_DeflectorSwErrF_Stat = 0U; - CCU_Errors_Model.CCU_DeflectorSwErrR_Stat = 0U; - CCU_Errors_Model.CCU_PressSenErr_Stat = 0U; - CCU_Errors_Model.CCU_AmbienTemptSenErr_Stat = 0U; - CCU_Errors_Model.CCU_SealingValveErr_Stat = 0U; - CCU_Errors_Model.CCU_ETXVerr_Stat = 0U; - CCU_Errors_Model.CCU_HVACfanOrTXVerrF_Stat = 0U; - CCU_Errors_Model.CCU_HVACfanOrTXVerrR_Stat = 0U; - CCU_Errors_Model.CCU_ActuatorErrF_Stat = 0U; - CCU_Errors_Model.CCU_ActuatorErrR_Stat = 0U; - CCU_Errors_Model.CCU_UltravioletErr_Stat = 0U; - CCU_Errors_Model.CCU_VinRecordErr_Stat = 0U; - CCU_Errors_Model.CCU_AirQualSenErr_Stat = 0U; - CCU_Errors_Model.CCU_CommErr_Stat = 0U; - CCU_Errors_Model.CCU_TWVerr_Stat = 0U; - CCU_Errors_Model.CCU_IonizationErr_Stat = 0U; - CCU_Errors_Model.CCU_AromaErr_Stat = 0U; - - /* Switch: '/Switch' incorporates: - * Constant: '/Constant1' - * DataStoreRead: '/Data Store Read' - * DataStoreRead: '/Data Store Read2' - */ - if (rtDW.stepSig_private > 0) { - rtb_Switch = rtDW.stepSig_private; - } else { - rtb_Switch = 1; - } - - /* End of Switch: '/Switch' */ - - /* SwitchCase: '/Switch Case' */ - switch (rtb_Switch) { - case 1: - /* Outputs for IfAction SubSystem: '/Stop Mode' incorporates: - * ActionPort: '/Action Port' - */ - /* If: '/If1' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - */ - if ((rtDW.Actuator_Ch0_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch0_Status_Model.Error_Connect == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* BusCreator: '/Bus Creator' incorporates: - * DataStoreWrite: '/Data Store Write' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch0_Command_Model.POS[i] = 0U; - Actuator_Ch0_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch0_Command_Model.MODE[i] = 2U; - Actuator_Ch0_Command_Model.COM[i] = 1U; - Actuator_Ch0_Command_Model.Stall_SET[i] = 0U; - Actuator_Ch0_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch0_Command_Model.Autos_SET[i] = 0U; - Actuator_Ch0_Command_Model.Speed_SET[i] = 0U; - Actuator_Ch0_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * Sum: '/step inc' - */ - rtB.Merge = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - IfActionSubsystem3(rtb_Switch, &rtB.Merge); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If1' */ - /* End of Outputs for SubSystem: '/Stop Mode' */ - break; - - case 2: - /* Outputs for IfAction SubSystem: '/Initial CPOS Min' incorporates: - * ActionPort: '/Action Port' - */ - /* If: '/If' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - */ - if ((rtDW.Actuator_Ch0_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch0_Status_Model.Error_Connect == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem' incorporates: - * ActionPort: '/Action Port' - */ - /* BusCreator: '/Bus Creator' incorporates: - * DataStoreWrite: '/Data Store Write2' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch0_Command_Model.POS[i] = 6000U; - Actuator_Ch0_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch0_Command_Model.MODE[i] = 0U; - Actuator_Ch0_Command_Model.COM[i] = 2U; - Actuator_Ch0_Command_Model.Stall_SET[i] = 0U; - Actuator_Ch0_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch0_Command_Model.Autos_SET[i] = 0U; - Actuator_Ch0_Command_Model.Speed_SET[i] = 0U; - Actuator_Ch0_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* MATLAB Function: '/Initial CPOS Min' incorporates: - * Constant: '/Constant' - * DataStoreRead: '/Data Store Read3' - * Sum: '/step inc' - */ - InitialCPOSMin(rtDW.LOGGER_LIN, (int8_t)(rtb_Switch + 1), &rtb_y_fb); - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * Merge: '/Merge' - * SignalConversion generated from: '/step' - * Sum: '/step inc' - */ - rtB.Merge = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - /* BusCreator: '/Bus Creator' incorporates: - * DataStoreWrite: '/Data Store Write' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch0_Command_Model.POS[i] = 0U; - Actuator_Ch0_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch0_Command_Model.MODE[i] = 0U; - Actuator_Ch0_Command_Model.COM[i] = 0U; - Actuator_Ch0_Command_Model.Stall_SET[i] = 0U; - Actuator_Ch0_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch0_Command_Model.Autos_SET[i] = 0U; - Actuator_Ch0_Command_Model.Speed_SET[i] = 0U; - Actuator_Ch0_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* Merge: '/Merge' incorporates: - * Merge: '/Merge' - * SignalConversion generated from: '/stepIn1' - */ - rtB.Merge = rtb_Switch; - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If' */ - /* End of Outputs for SubSystem: '/Initial CPOS Min' */ - break; - - case 3: - /* Outputs for IfAction SubSystem: '/Normal Mode' incorporates: - * ActionPort: '/Action Port' - */ - /* If: '/If1' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - */ - if ((rtDW.Actuator_Ch0_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch0_Status_Model.Error_Connect == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* BusCreator: '/Bus Creator' incorporates: - * DataStoreWrite: '/Data Store Write1' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch0_Command_Model.POS[i] = 0U; - Actuator_Ch0_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch0_Command_Model.MODE[i] = 0U; - Actuator_Ch0_Command_Model.COM[i] = 1U; - Actuator_Ch0_Command_Model.Stall_SET[i] = 0U; - Actuator_Ch0_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch0_Command_Model.Autos_SET[i] = 0U; - Actuator_Ch0_Command_Model.Speed_SET[i] = 0U; - Actuator_Ch0_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* MATLAB Function: '/Normal Mode' incorporates: - * Constant: '/Constant' - * DataStoreRead: '/Data Store Read3' - * Sum: '/step inc' - */ - NormalMode(rtDW.LOGGER_LIN, (int8_t)(rtb_Switch + 1), &rtb_y_fb); - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * SignalConversion generated from: '/step' - * Sum: '/step inc' - */ - rtB.Merge = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - IfActionSubsystem3(rtb_Switch, &rtB.Merge); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If1' */ - /* End of Outputs for SubSystem: '/Normal Mode' */ - break; - - case 4: - /* Outputs for IfAction SubSystem: '/Move to position Min' incorporates: - * ActionPort: '/Action Port' - */ - /* If: '/If1' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - */ - if ((rtDW.Actuator_Ch0_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch0_Status_Model.Error_Connect == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* BusCreator: '/Bus Creator' incorporates: - * Constant: '/Constant1' - * Constant: '/Constant10' - * Constant: '/Constant11' - * Constant: '/Constant14' - * Constant: '/Constant2' - * Constant: '/Constant9' - * DataStoreWrite: '/Data Store Write7' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch0_Command_Model.POS[i] = 1U; - Actuator_Ch0_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch0_Command_Model.MODE[i] = 0U; - Actuator_Ch0_Command_Model.COM[i] = 3U; - Actuator_Ch0_Command_Model.Stall_SET[i] = 1U; - Actuator_Ch0_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch0_Command_Model.Autos_SET[i] = 1U; - Actuator_Ch0_Command_Model.Speed_SET[i] = 3U; - Actuator_Ch0_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* MATLAB Function: '/Move to position Min' incorporates: - * Constant: '/Constant' - * DataStoreRead: '/Data Store Read3' - * Sum: '/step inc' - */ - MovetopositionMin(rtDW.LOGGER_LIN, (int8_t)(rtb_Switch + 1), &rtb_y_fb); - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * SignalConversion generated from: '/step' - * Sum: '/step inc' - */ - rtB.Merge = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - IfActionSubsystem3(rtb_Switch, &rtB.Merge); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If1' */ - /* End of Outputs for SubSystem: '/Move to position Min' */ - break; - - case 5: - /* Outputs for IfAction SubSystem: '/Check Stall Min' incorporates: - * ActionPort: '/Action Port' - */ - /* RelationalOperator: '/Relational Operator1' incorporates: - * DataStoreRead: '/Data Store Read1' - * RelationalOperator: '/Relational Operator' - */ - for (i = 0; i < 9; i++) { - rtb_RelationalOperator_j[i] = - (rtDW.Actuator_Ch0_Status_Model.in_Act_Stall_Slave[i] == 1); - } - - /* End of RelationalOperator: '/Relational Operator1' */ - - /* Logic: '/Logical Operator2' incorporates: - * RelationalOperator: '/Relational Operator' - */ - tmp = rtb_RelationalOperator_j[0]; - for (i = 0; i < 8; i++) { - tmp = (tmp || rtb_RelationalOperator_j[i + 1]); - } - - /* RelationalOperator: '/Relational Operator' incorporates: - * DataStoreRead: '/Data Store Read1' - */ - for (i = 0; i < 9; i++) { - rtb_RelationalOperator_j[i] = - (rtDW.Actuator_Ch0_Status_Model.in_CPOS_ALL[i] == 1); - } - - /* End of RelationalOperator: '/Relational Operator' */ - - /* Logic: '/Logical Operator1' incorporates: - * RelationalOperator: '/Relational Operator' - */ - tmp_0 = rtb_RelationalOperator_j[0]; - for (i = 0; i < 8; i++) { - tmp_0 = (tmp_0 || rtb_RelationalOperator_j[i + 1]); - } - - /* If: '/If2' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - * DataTypeConversion: '/Data Type Conversion' - * DataTypeConversion: '/Data Type Conversion1' - * Logic: '/Logical Operator' - * Logic: '/Logical Operator1' - * Logic: '/Logical Operator2' - */ - if ((rtDW.Actuator_Ch0_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch0_Status_Model.Error_Connect == 0) && (tmp || tmp_0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * Sum: '/step inc' - */ - rtB.Merge = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - for (i = 0; i < 9; i++) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - rtb_y_ey[i] = rtDW.Actuator_Ch0_Status_Model.in_CPOS_ALL[i]; - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } - - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* MATLAB Function: '/MIN POSITION' incorporates: - * DataStoreRead: '/Data Store Read3' - */ - MINPOSITION(rtb_y_ey, rtDW.LOGGER_LIN); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - IfActionSubsystem3(rtb_Switch, &rtB.Merge); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If2' */ - /* End of Outputs for SubSystem: '/Check Stall Min' */ - break; - - case 6: - /* Outputs for IfAction SubSystem: '/Initial CPOS Max' incorporates: - * ActionPort: '/Action Port' - */ - /* If: '/If1' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - */ - if ((rtDW.Actuator_Ch0_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch0_Status_Model.Error_Connect == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* BusCreator: '/Bus Creator' incorporates: - * DataStoreWrite: '/Data Store Write2' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch0_Command_Model.POS[i] = 1U; - Actuator_Ch0_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch0_Command_Model.MODE[i] = 0U; - Actuator_Ch0_Command_Model.COM[i] = 2U; - Actuator_Ch0_Command_Model.Stall_SET[i] = 0U; - Actuator_Ch0_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch0_Command_Model.Autos_SET[i] = 0U; - Actuator_Ch0_Command_Model.Speed_SET[i] = 0U; - Actuator_Ch0_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* MATLAB Function: '/Initial CPOS Max' incorporates: - * Constant: '/Constant' - * DataStoreRead: '/Data Store Read3' - * Sum: '/step inc' - */ - InitialCPOSMax(rtDW.LOGGER_LIN, (int8_t)(rtb_Switch + 1), &rtb_y_fb); - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * SignalConversion generated from: '/step' - * Sum: '/step inc' - */ - rtB.Merge = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - IfActionSubsystem3(rtb_Switch, &rtB.Merge); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If1' */ - /* End of Outputs for SubSystem: '/Initial CPOS Max' */ - break; - - case 7: - /* Outputs for IfAction SubSystem: '/Move to position Max' incorporates: - * ActionPort: '/Action Port' - */ - /* If: '/If1' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - */ - if ((rtDW.Actuator_Ch0_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch0_Status_Model.Error_Connect == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* BusCreator: '/Bus Creator' incorporates: - * Constant: '/Constant1' - * Constant: '/Constant10' - * Constant: '/Constant11' - * Constant: '/Constant14' - * Constant: '/Constant2' - * Constant: '/Constant9' - * DataStoreWrite: '/Data Store Write7' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch0_Command_Model.POS[i] = 6000U; - Actuator_Ch0_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch0_Command_Model.MODE[i] = 0U; - Actuator_Ch0_Command_Model.COM[i] = 3U; - Actuator_Ch0_Command_Model.Stall_SET[i] = 1U; - Actuator_Ch0_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch0_Command_Model.Autos_SET[i] = 1U; - Actuator_Ch0_Command_Model.Speed_SET[i] = 3U; - Actuator_Ch0_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* MATLAB Function: '/Move to position Max' incorporates: - * Constant: '/Constant' - * DataStoreRead: '/Data Store Read3' - * Sum: '/step inc' - */ - MovetopositionMax((int8_t)(rtb_Switch + 1), rtDW.LOGGER_LIN, &rtb_y_fb); - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * SignalConversion generated from: '/step' - * Sum: '/step inc' - */ - rtB.Merge = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - IfActionSubsystem3(rtb_Switch, &rtB.Merge); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If1' */ - /* End of Outputs for SubSystem: '/Move to position Max' */ - break; - - case 8: - /* Outputs for IfAction SubSystem: '/Check Stall Max' incorporates: - * ActionPort: '/Action Port' - */ - /* RelationalOperator: '/Relational Operator1' incorporates: - * DataStoreRead: '/Data Store Read1' - * RelationalOperator: '/Relational Operator' - */ - for (i = 0; i < 9; i++) { - rtb_RelationalOperator_j[i] = - (rtDW.Actuator_Ch0_Status_Model.in_Act_Stall_Slave[i] == 1); - } - - /* End of RelationalOperator: '/Relational Operator1' */ - - /* Logic: '/Logical Operator2' incorporates: - * RelationalOperator: '/Relational Operator' - */ - tmp = rtb_RelationalOperator_j[0]; - for (i = 0; i < 8; i++) { - tmp = (tmp || rtb_RelationalOperator_j[i + 1]); - } - - /* RelationalOperator: '/Relational Operator' incorporates: - * DataStoreRead: '/Data Store Read1' - */ - for (i = 0; i < 9; i++) { - rtb_RelationalOperator_j[i] = - (rtDW.Actuator_Ch0_Status_Model.in_CPOS_ALL[i] == 6000); - } - - /* End of RelationalOperator: '/Relational Operator' */ - - /* Logic: '/Logical Operator1' incorporates: - * RelationalOperator: '/Relational Operator' - */ - tmp_0 = rtb_RelationalOperator_j[0]; - for (i = 0; i < 8; i++) { - tmp_0 = (tmp_0 || rtb_RelationalOperator_j[i + 1]); - } - - /* If: '/If2' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - * DataTypeConversion: '/Data Type Conversion' - * DataTypeConversion: '/Data Type Conversion1' - * Logic: '/Logical Operator' - * Logic: '/Logical Operator1' - * Logic: '/Logical Operator2' - */ - if ((rtDW.Actuator_Ch0_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch0_Status_Model.Error_Connect == 0) && (tmp || tmp_0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * Sum: '/step inc' - */ - rtB.Merge = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - for (i = 0; i < 9; i++) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - rtb_y_ey[i] = rtDW.Actuator_Ch0_Status_Model.in_CPOS_ALL[i]; - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } - - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* MATLAB Function: '/MIN POSITION' incorporates: - * DataStoreRead: '/Data Store Read3' - */ - MINPOSITION_g(rtb_y_ey, rtDW.LOGGER_LIN); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - IfActionSubsystem3(rtb_Switch, &rtB.Merge); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If2' */ - /* End of Outputs for SubSystem: '/Check Stall Max' */ - break; - - case 9: - break; - } - - /* End of SwitchCase: '/Switch Case' */ - - /* DataStoreWrite: '/Finish write stepSig' */ - rtDW.stepSig_private = rtB.Merge; - - /* MATLAB Function: '/Write Ignition' incorporates: - * DataStoreRead: '/Data Store Read3' - */ - WriteIgnition(rtDW.LOGGER_LIN, rtb_Switch); - - /* Switch: '/Switch' incorporates: - * Constant: '/Constant1' - * DataStoreRead: '/Data Store Read' - * DataStoreRead: '/Data Store Read2' - */ - if (rtDW.stepSig_private_c > 0) { - rtb_Switch = rtDW.stepSig_private_c; - } else { - rtb_Switch = 1; - } - - /* End of Switch: '/Switch' */ - - /* SwitchCase: '/Switch Case' */ - switch (rtb_Switch) { - case 1: - /* Outputs for IfAction SubSystem: '/Stop Mode' incorporates: - * ActionPort: '/Action Port' - */ - /* If: '/If1' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - */ - if ((rtDW.Actuator_Ch1_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch1_Status_Model.Error_Connect == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* BusCreator: '/Bus Creator' incorporates: - * DataStoreWrite: '/Data Store Write' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch1_Command_Model.POS[i] = 0U; - Actuator_Ch1_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch1_Command_Model.MODE[i] = 2U; - Actuator_Ch1_Command_Model.COM[i] = 1U; - Actuator_Ch1_Command_Model.Stall_SET[i] = 0U; - Actuator_Ch1_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch1_Command_Model.Autos_SET[i] = 0U; - Actuator_Ch1_Command_Model.Speed_SET[i] = 0U; - Actuator_Ch1_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * Sum: '/step inc' - */ - rtB.Merge_c = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - IfActionSubsystem3_m(rtb_Switch, &rtB.Merge_c); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If1' */ - /* End of Outputs for SubSystem: '/Stop Mode' */ - break; - - case 2: - /* Outputs for IfAction SubSystem: '/Initial CPOS Min' incorporates: - * ActionPort: '/Action Port' - */ - /* If: '/If' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - */ - if ((rtDW.Actuator_Ch1_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch1_Status_Model.Error_Connect == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem' incorporates: - * ActionPort: '/Action Port' - */ - /* BusCreator: '/Bus Creator' incorporates: - * DataStoreWrite: '/Data Store Write2' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch1_Command_Model.POS[i] = 6000U; - Actuator_Ch1_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch1_Command_Model.MODE[i] = 0U; - Actuator_Ch1_Command_Model.COM[i] = 2U; - Actuator_Ch1_Command_Model.Stall_SET[i] = 0U; - Actuator_Ch1_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch1_Command_Model.Autos_SET[i] = 0U; - Actuator_Ch1_Command_Model.Speed_SET[i] = 0U; - Actuator_Ch1_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* MATLAB Function: '/Initial CPOS Min' incorporates: - * Constant: '/Constant' - * DataStoreRead: '/Data Store Read3' - * Sum: '/step inc' - */ - InitialCPOSMin(rtDW.LOGGER_LIN, (int8_t)(rtb_Switch + 1), &rtb_y_fb); - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * Merge: '/Merge' - * SignalConversion generated from: '/step' - * Sum: '/step inc' - */ - rtB.Merge_c = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - /* BusCreator: '/Bus Creator' incorporates: - * DataStoreWrite: '/Data Store Write' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch1_Command_Model.POS[i] = 0U; - Actuator_Ch1_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch1_Command_Model.MODE[i] = 0U; - Actuator_Ch1_Command_Model.COM[i] = 0U; - Actuator_Ch1_Command_Model.Stall_SET[i] = 0U; - Actuator_Ch1_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch1_Command_Model.Autos_SET[i] = 0U; - Actuator_Ch1_Command_Model.Speed_SET[i] = 0U; - Actuator_Ch1_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* Merge: '/Merge' incorporates: - * Merge: '/Merge' - * SignalConversion generated from: '/stepIn1' - */ - rtB.Merge_c = rtb_Switch; - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If' */ - /* End of Outputs for SubSystem: '/Initial CPOS Min' */ - break; - - case 3: - /* Outputs for IfAction SubSystem: '/Normal Mode' incorporates: - * ActionPort: '/Action Port' - */ - /* If: '/If1' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - */ - if ((rtDW.Actuator_Ch1_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch1_Status_Model.Error_Connect == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* BusCreator: '/Bus Creator' incorporates: - * DataStoreWrite: '/Data Store Write1' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch1_Command_Model.POS[i] = 0U; - Actuator_Ch1_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch1_Command_Model.MODE[i] = 0U; - Actuator_Ch1_Command_Model.COM[i] = 1U; - Actuator_Ch1_Command_Model.Stall_SET[i] = 0U; - Actuator_Ch1_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch1_Command_Model.Autos_SET[i] = 0U; - Actuator_Ch1_Command_Model.Speed_SET[i] = 0U; - Actuator_Ch1_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* MATLAB Function: '/Normal Mode' incorporates: - * Constant: '/Constant' - * DataStoreRead: '/Data Store Read3' - * Sum: '/step inc' - */ - NormalMode(rtDW.LOGGER_LIN, (int8_t)(rtb_Switch + 1), &rtb_y_fb); - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * SignalConversion generated from: '/step' - * Sum: '/step inc' - */ - rtB.Merge_c = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - IfActionSubsystem3_m(rtb_Switch, &rtB.Merge_c); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If1' */ - /* End of Outputs for SubSystem: '/Normal Mode' */ - break; - - case 4: - /* Outputs for IfAction SubSystem: '/Move to position Min' incorporates: - * ActionPort: '/Action Port' - */ - /* If: '/If1' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - */ - if ((rtDW.Actuator_Ch1_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch1_Status_Model.Error_Connect == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* BusCreator: '/Bus Creator' incorporates: - * Constant: '/Constant1' - * Constant: '/Constant10' - * Constant: '/Constant11' - * Constant: '/Constant14' - * Constant: '/Constant2' - * Constant: '/Constant9' - * DataStoreWrite: '/Data Store Write7' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch1_Command_Model.POS[i] = 1U; - Actuator_Ch1_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch1_Command_Model.MODE[i] = 0U; - Actuator_Ch1_Command_Model.COM[i] = 3U; - Actuator_Ch1_Command_Model.Stall_SET[i] = 1U; - Actuator_Ch1_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch1_Command_Model.Autos_SET[i] = 1U; - Actuator_Ch1_Command_Model.Speed_SET[i] = 3U; - Actuator_Ch1_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* MATLAB Function: '/Move to position Min' incorporates: - * Constant: '/Constant' - * DataStoreRead: '/Data Store Read3' - * Sum: '/step inc' - */ - MovetopositionMin(rtDW.LOGGER_LIN, (int8_t)(rtb_Switch + 1), &rtb_y_fb); - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * SignalConversion generated from: '/step' - * Sum: '/step inc' - */ - rtB.Merge_c = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - IfActionSubsystem3_m(rtb_Switch, &rtB.Merge_c); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If1' */ - /* End of Outputs for SubSystem: '/Move to position Min' */ - break; - - case 5: - /* Outputs for IfAction SubSystem: '/Check Stall Min' incorporates: - * ActionPort: '/Action Port' - */ - /* RelationalOperator: '/Relational Operator1' incorporates: - * DataStoreRead: '/Data Store Read1' - * RelationalOperator: '/Relational Operator' - */ - for (i = 0; i < 9; i++) { - rtb_RelationalOperator_j[i] = - (rtDW.Actuator_Ch1_Status_Model.in_Act_Stall_Slave[i] == 1); - } - - /* End of RelationalOperator: '/Relational Operator1' */ - - /* Logic: '/Logical Operator2' incorporates: - * RelationalOperator: '/Relational Operator' - */ - tmp = rtb_RelationalOperator_j[0]; - for (i = 0; i < 8; i++) { - tmp = (tmp || rtb_RelationalOperator_j[i + 1]); - } - - /* RelationalOperator: '/Relational Operator' incorporates: - * DataStoreRead: '/Data Store Read1' - */ - for (i = 0; i < 9; i++) { - rtb_RelationalOperator_j[i] = - (rtDW.Actuator_Ch1_Status_Model.in_CPOS_ALL[i] == 1); - } - - /* End of RelationalOperator: '/Relational Operator' */ - - /* Logic: '/Logical Operator1' incorporates: - * RelationalOperator: '/Relational Operator' - */ - tmp_0 = rtb_RelationalOperator_j[0]; - for (i = 0; i < 8; i++) { - tmp_0 = (tmp_0 || rtb_RelationalOperator_j[i + 1]); - } - - /* If: '/If2' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - * DataTypeConversion: '/Data Type Conversion' - * DataTypeConversion: '/Data Type Conversion1' - * Logic: '/Logical Operator' - * Logic: '/Logical Operator1' - * Logic: '/Logical Operator2' - */ - if ((rtDW.Actuator_Ch1_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch1_Status_Model.Error_Connect == 0) && (tmp || tmp_0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * Sum: '/step inc' - */ - rtB.Merge_c = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - for (i = 0; i < 9; i++) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - rtb_y_ey[i] = rtDW.Actuator_Ch1_Status_Model.in_CPOS_ALL[i]; - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } - - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* MATLAB Function: '/MIN POSITION' incorporates: - * DataStoreRead: '/Data Store Read3' - */ - MINPOSITION(rtb_y_ey, rtDW.LOGGER_LIN); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - IfActionSubsystem3_m(rtb_Switch, &rtB.Merge_c); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If2' */ - /* End of Outputs for SubSystem: '/Check Stall Min' */ - break; - - case 6: - /* Outputs for IfAction SubSystem: '/Initial CPOS Max' incorporates: - * ActionPort: '/Action Port' - */ - /* If: '/If1' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - */ - if ((rtDW.Actuator_Ch1_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch1_Status_Model.Error_Connect == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* BusCreator: '/Bus Creator' incorporates: - * DataStoreWrite: '/Data Store Write2' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch1_Command_Model.POS[i] = 1U; - Actuator_Ch1_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch1_Command_Model.MODE[i] = 0U; - Actuator_Ch1_Command_Model.COM[i] = 2U; - Actuator_Ch1_Command_Model.Stall_SET[i] = 0U; - Actuator_Ch1_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch1_Command_Model.Autos_SET[i] = 0U; - Actuator_Ch1_Command_Model.Speed_SET[i] = 0U; - Actuator_Ch1_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* MATLAB Function: '/Initial CPOS Max' incorporates: - * Constant: '/Constant' - * DataStoreRead: '/Data Store Read3' - * Sum: '/step inc' - */ - InitialCPOSMax(rtDW.LOGGER_LIN, (int8_t)(rtb_Switch + 1), &rtb_y_fb); - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * SignalConversion generated from: '/step' - * Sum: '/step inc' - */ - rtB.Merge_c = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - IfActionSubsystem3_m(rtb_Switch, &rtB.Merge_c); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If1' */ - /* End of Outputs for SubSystem: '/Initial CPOS Max' */ - break; - - case 7: - /* Outputs for IfAction SubSystem: '/Move to position Max' incorporates: - * ActionPort: '/Action Port' - */ - /* If: '/If1' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - */ - if ((rtDW.Actuator_Ch1_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch1_Status_Model.Error_Connect == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* BusCreator: '/Bus Creator' incorporates: - * Constant: '/Constant1' - * Constant: '/Constant10' - * Constant: '/Constant11' - * Constant: '/Constant14' - * Constant: '/Constant2' - * Constant: '/Constant9' - * DataStoreWrite: '/Data Store Write7' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch1_Command_Model.POS[i] = 6000U; - Actuator_Ch1_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch1_Command_Model.MODE[i] = 0U; - Actuator_Ch1_Command_Model.COM[i] = 3U; - Actuator_Ch1_Command_Model.Stall_SET[i] = 1U; - Actuator_Ch1_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch1_Command_Model.Autos_SET[i] = 1U; - Actuator_Ch1_Command_Model.Speed_SET[i] = 3U; - Actuator_Ch1_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* MATLAB Function: '/Move to position Max' incorporates: - * Constant: '/Constant' - * DataStoreRead: '/Data Store Read3' - * Sum: '/step inc' - */ - MovetopositionMax((int8_t)(rtb_Switch + 1), rtDW.LOGGER_LIN, &rtb_y_fb); - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * SignalConversion generated from: '/step' - * Sum: '/step inc' - */ - rtB.Merge_c = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - IfActionSubsystem3_m(rtb_Switch, &rtB.Merge_c); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If1' */ - /* End of Outputs for SubSystem: '/Move to position Max' */ - break; - - case 8: - /* Outputs for IfAction SubSystem: '/Check Stall Max' incorporates: - * ActionPort: '/Action Port' - */ - /* RelationalOperator: '/Relational Operator1' incorporates: - * DataStoreRead: '/Data Store Read1' - * RelationalOperator: '/Relational Operator' - */ - for (i = 0; i < 9; i++) { - rtb_RelationalOperator_j[i] = - (rtDW.Actuator_Ch1_Status_Model.in_Act_Stall_Slave[i] == 1); - } - - /* End of RelationalOperator: '/Relational Operator1' */ - - /* Logic: '/Logical Operator2' incorporates: - * RelationalOperator: '/Relational Operator' - */ - tmp = rtb_RelationalOperator_j[0]; - for (i = 0; i < 8; i++) { - tmp = (tmp || rtb_RelationalOperator_j[i + 1]); - } - - /* RelationalOperator: '/Relational Operator' incorporates: - * DataStoreRead: '/Data Store Read1' - */ - for (i = 0; i < 9; i++) { - rtb_RelationalOperator_j[i] = - (rtDW.Actuator_Ch1_Status_Model.in_CPOS_ALL[i] == 6000); - } - - /* End of RelationalOperator: '/Relational Operator' */ - - /* Logic: '/Logical Operator1' incorporates: - * RelationalOperator: '/Relational Operator' - */ - tmp_0 = rtb_RelationalOperator_j[0]; - for (i = 0; i < 8; i++) { - tmp_0 = (tmp_0 || rtb_RelationalOperator_j[i + 1]); - } - - /* If: '/If2' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - * DataTypeConversion: '/Data Type Conversion' - * DataTypeConversion: '/Data Type Conversion1' - * Logic: '/Logical Operator' - * Logic: '/Logical Operator1' - * Logic: '/Logical Operator2' - */ - if ((rtDW.Actuator_Ch1_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch1_Status_Model.Error_Connect == 0) && (tmp || tmp_0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * Sum: '/step inc' - */ - rtB.Merge_c = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - for (i = 0; i < 9; i++) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - rtb_y_ey[i] = rtDW.Actuator_Ch1_Status_Model.in_CPOS_ALL[i]; - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } - - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* MATLAB Function: '/MIN POSITION' incorporates: - * DataStoreRead: '/Data Store Read3' - */ - MINPOSITION_g(rtb_y_ey, rtDW.LOGGER_LIN); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - IfActionSubsystem3_m(rtb_Switch, &rtB.Merge_c); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If2' */ - /* End of Outputs for SubSystem: '/Check Stall Max' */ - break; - - case 9: - break; - } - - /* End of SwitchCase: '/Switch Case' */ - - /* DataStoreWrite: '/Finish write stepSig' */ - rtDW.stepSig_private_c = rtB.Merge_c; - - /* MATLAB Function: '/Write Ignition' incorporates: - * DataStoreRead: '/Data Store Read3' - */ - WriteIgnition(rtDW.LOGGER_LIN, rtb_Switch); - - /* Switch: '/Switch' incorporates: - * Constant: '/Constant1' - * DataStoreRead: '/Data Store Read' - * DataStoreRead: '/Data Store Read2' - */ - if (rtDW.stepSig_private_p > 0) { - rtb_Switch = rtDW.stepSig_private_p; - } else { - rtb_Switch = 1; - } - - /* End of Switch: '/Switch' */ - - /* SwitchCase: '/Switch Case' */ - switch (rtb_Switch) { - case 1: - /* Outputs for IfAction SubSystem: '/Stop Mode' incorporates: - * ActionPort: '/Action Port' - */ - /* If: '/If1' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - */ - if ((rtDW.Actuator_Ch2_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch2_Status_Model.Error_Connect == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* BusCreator: '/Bus Creator' incorporates: - * DataStoreWrite: '/Data Store Write' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch2_Command_Model.POS[i] = 0U; - Actuator_Ch2_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch2_Command_Model.MODE[i] = 2U; - Actuator_Ch2_Command_Model.COM[i] = 1U; - Actuator_Ch2_Command_Model.Stall_SET[i] = 0U; - Actuator_Ch2_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch2_Command_Model.Autos_SET[i] = 0U; - Actuator_Ch2_Command_Model.Speed_SET[i] = 0U; - Actuator_Ch2_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * Sum: '/step inc' - */ - rtB.Merge_cs = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - IfActionSubsystem3_n(rtb_Switch, &rtB.Merge_cs); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If1' */ - /* End of Outputs for SubSystem: '/Stop Mode' */ - break; - - case 2: - /* Outputs for IfAction SubSystem: '/Initial CPOS Min' incorporates: - * ActionPort: '/Action Port' - */ - /* MATLAB Function: '/Write Ignition' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreRead: '/Data Store Read3' - * DataStoreWrite: '/Data Store Write' - */ - /* : if(LOGGER) */ - if (rtDW.LOGGER_LIN != 0.0) { - /* : fprintf('LIN 3 busy = %u\n',step); */ - printf("LIN 3 busy = %u\n", rtDW.Actuator_Ch2_Status_Model.Busy); - fflush(stdout); - } - - /* End of MATLAB Function: '/Write Ignition' */ - - /* MATLAB Function: '/Write Ignition1' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreRead: '/Data Store Read2' - * DataStoreWrite: '/Data Store Write1' - */ - /* : if(LOGGER) */ - if (rtDW.LOGGER_LIN != 0.0) { - /* : fprintf('LIN 3 Error_Connect = %u\n',step); */ - printf("LIN 3 Error_Connect = %u\n", - rtDW.Actuator_Ch2_Status_Model.Error_Connect); - fflush(stdout); - } - - /* End of MATLAB Function: '/Write Ignition1' */ - - /* If: '/If' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - */ - if ((rtDW.Actuator_Ch2_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch2_Status_Model.Error_Connect == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem' incorporates: - * ActionPort: '/Action Port' - */ - /* BusCreator: '/Bus Creator' incorporates: - * DataStoreWrite: '/Data Store Write2' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch2_Command_Model.POS[i] = 6000U; - Actuator_Ch2_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch2_Command_Model.MODE[i] = 0U; - Actuator_Ch2_Command_Model.COM[i] = 2U; - Actuator_Ch2_Command_Model.Stall_SET[i] = 0U; - Actuator_Ch2_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch2_Command_Model.Autos_SET[i] = 0U; - Actuator_Ch2_Command_Model.Speed_SET[i] = 0U; - Actuator_Ch2_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* MATLAB Function: '/Initial CPOS Min' incorporates: - * DataStoreRead: '/Data Store Read3' - */ - /* : y = step; */ - /* : if(LOGGER) */ - if (rtDW.LOGGER_LIN != 0.0) { - /* : fprintf('LIN 3 SIMULINK Initial CPOS Min - 6000\n'); */ - printf("LIN 3 SIMULINK Initial CPOS Min - 6000\n"); - fflush(stdout); - } - - /* End of MATLAB Function: '/Initial CPOS Min' */ - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * Merge: '/Merge' - * SignalConversion generated from: '/step' - * Sum: '/step inc' - */ - rtB.Merge_cs = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - /* BusCreator: '/Bus Creator' incorporates: - * DataStoreWrite: '/Data Store Write' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch2_Command_Model.POS[i] = 0U; - Actuator_Ch2_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch2_Command_Model.MODE[i] = 0U; - Actuator_Ch2_Command_Model.COM[i] = 0U; - Actuator_Ch2_Command_Model.Stall_SET[i] = 0U; - Actuator_Ch2_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch2_Command_Model.Autos_SET[i] = 0U; - Actuator_Ch2_Command_Model.Speed_SET[i] = 0U; - Actuator_Ch2_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* Merge: '/Merge' incorporates: - * Merge: '/Merge' - * SignalConversion generated from: '/stepIn1' - */ - rtB.Merge_cs = rtb_Switch; - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If' */ - /* End of Outputs for SubSystem: '/Initial CPOS Min' */ - break; - - case 3: - /* Outputs for IfAction SubSystem: '/Normal Mode' incorporates: - * ActionPort: '/Action Port' - */ - /* If: '/If1' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - */ - if ((rtDW.Actuator_Ch2_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch2_Status_Model.Error_Connect == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* BusCreator: '/Bus Creator' incorporates: - * DataStoreWrite: '/Data Store Write1' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch2_Command_Model.POS[i] = 0U; - Actuator_Ch2_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch2_Command_Model.MODE[i] = 0U; - Actuator_Ch2_Command_Model.COM[i] = 1U; - Actuator_Ch2_Command_Model.Stall_SET[i] = 0U; - Actuator_Ch2_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch2_Command_Model.Autos_SET[i] = 0U; - Actuator_Ch2_Command_Model.Speed_SET[i] = 0U; - Actuator_Ch2_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* MATLAB Function: '/Normal Mode' incorporates: - * DataStoreRead: '/Data Store Read3' - */ - /* : y = step; */ - /* : if(LOGGER) */ - if (rtDW.LOGGER_LIN != 0.0) { - /* : fprintf('LIN 3 SIMULINK Normal Mode\n'); */ - printf("LIN 3 SIMULINK Normal Mode\n"); - fflush(stdout); - } - - /* End of MATLAB Function: '/Normal Mode' */ - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * SignalConversion generated from: '/step' - * Sum: '/step inc' - */ - rtB.Merge_cs = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - IfActionSubsystem3_n(rtb_Switch, &rtB.Merge_cs); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If1' */ - /* End of Outputs for SubSystem: '/Normal Mode' */ - break; - - case 4: - /* Outputs for IfAction SubSystem: '/Move to position Min' incorporates: - * ActionPort: '/Action Port' - */ - /* If: '/If1' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - */ - if ((rtDW.Actuator_Ch2_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch2_Status_Model.Error_Connect == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* BusCreator: '/Bus Creator' incorporates: - * Constant: '/Constant1' - * Constant: '/Constant10' - * Constant: '/Constant11' - * Constant: '/Constant14' - * Constant: '/Constant2' - * Constant: '/Constant9' - * DataStoreWrite: '/Data Store Write7' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch2_Command_Model.POS[i] = 1U; - Actuator_Ch2_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch2_Command_Model.MODE[i] = 0U; - Actuator_Ch2_Command_Model.COM[i] = 3U; - Actuator_Ch2_Command_Model.Stall_SET[i] = 1U; - Actuator_Ch2_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch2_Command_Model.Autos_SET[i] = 1U; - Actuator_Ch2_Command_Model.Speed_SET[i] = 3U; - Actuator_Ch2_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* MATLAB Function: '/Move to position Min' incorporates: - * Constant: '/Constant' - * DataStoreRead: '/Data Store Read3' - * Sum: '/step inc' - */ - MovetopositionMin(rtDW.LOGGER_LIN, (int8_t)(rtb_Switch + 1), &rtb_y_fb); - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * SignalConversion generated from: '/step' - * Sum: '/step inc' - */ - rtB.Merge_cs = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - IfActionSubsystem3_n(rtb_Switch, &rtB.Merge_cs); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If1' */ - /* End of Outputs for SubSystem: '/Move to position Min' */ - break; - - case 5: - /* Outputs for IfAction SubSystem: '/Check Stall Min' incorporates: - * ActionPort: '/Action Port' - */ - /* RelationalOperator: '/Relational Operator1' incorporates: - * DataStoreRead: '/Data Store Read1' - * RelationalOperator: '/Relational Operator' - */ - for (i = 0; i < 9; i++) { - rtb_RelationalOperator_j[i] = - (rtDW.Actuator_Ch2_Status_Model.in_Act_Stall_Slave[i] == 1); - } - - /* End of RelationalOperator: '/Relational Operator1' */ - - /* Logic: '/Logical Operator2' incorporates: - * RelationalOperator: '/Relational Operator' - */ - tmp = rtb_RelationalOperator_j[0]; - for (i = 0; i < 8; i++) { - tmp = (tmp || rtb_RelationalOperator_j[i + 1]); - } - - /* RelationalOperator: '/Relational Operator' incorporates: - * DataStoreRead: '/Data Store Read1' - */ - for (i = 0; i < 9; i++) { - rtb_RelationalOperator_j[i] = - (rtDW.Actuator_Ch2_Status_Model.in_CPOS_ALL[i] == 1); - } - - /* End of RelationalOperator: '/Relational Operator' */ - - /* Logic: '/Logical Operator1' incorporates: - * RelationalOperator: '/Relational Operator' - */ - tmp_0 = rtb_RelationalOperator_j[0]; - for (i = 0; i < 8; i++) { - tmp_0 = (tmp_0 || rtb_RelationalOperator_j[i + 1]); - } - - /* If: '/If2' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - * DataTypeConversion: '/Data Type Conversion' - * DataTypeConversion: '/Data Type Conversion1' - * Logic: '/Logical Operator' - * Logic: '/Logical Operator1' - * Logic: '/Logical Operator2' - */ - if ((rtDW.Actuator_Ch2_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch2_Status_Model.Error_Connect == 0) && (tmp || tmp_0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * Sum: '/step inc' - */ - rtB.Merge_cs = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - for (i = 0; i < 9; i++) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - rtb_y_ey[i] = rtDW.Actuator_Ch2_Status_Model.in_CPOS_ALL[i]; - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } - - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* MATLAB Function: '/MIN POSITION' incorporates: - * DataStoreRead: '/Data Store Read3' - */ - MINPOSITION(rtb_y_ey, rtDW.LOGGER_LIN); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - IfActionSubsystem3_n(rtb_Switch, &rtB.Merge_cs); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If2' */ - /* End of Outputs for SubSystem: '/Check Stall Min' */ - break; - - case 6: - /* Outputs for IfAction SubSystem: '/Initial CPOS Max' incorporates: - * ActionPort: '/Action Port' - */ - /* If: '/If1' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - */ - if ((rtDW.Actuator_Ch2_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch2_Status_Model.Error_Connect == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* BusCreator: '/Bus Creator' incorporates: - * DataStoreWrite: '/Data Store Write2' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch2_Command_Model.POS[i] = 1U; - Actuator_Ch2_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch2_Command_Model.MODE[i] = 0U; - Actuator_Ch2_Command_Model.COM[i] = 2U; - Actuator_Ch2_Command_Model.Stall_SET[i] = 0U; - Actuator_Ch2_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch2_Command_Model.Autos_SET[i] = 0U; - Actuator_Ch2_Command_Model.Speed_SET[i] = 0U; - Actuator_Ch2_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* MATLAB Function: '/Initial CPOS Max' incorporates: - * Constant: '/Constant' - * DataStoreRead: '/Data Store Read3' - * Sum: '/step inc' - */ - InitialCPOSMax(rtDW.LOGGER_LIN, (int8_t)(rtb_Switch + 1), &rtb_y_fb); - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * SignalConversion generated from: '/step' - * Sum: '/step inc' - */ - rtB.Merge_cs = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - IfActionSubsystem3_n(rtb_Switch, &rtB.Merge_cs); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If1' */ - /* End of Outputs for SubSystem: '/Initial CPOS Max' */ - break; - - case 7: - /* Outputs for IfAction SubSystem: '/Move to position Max' incorporates: - * ActionPort: '/Action Port' - */ - /* If: '/If1' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - */ - if ((rtDW.Actuator_Ch2_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch2_Status_Model.Error_Connect == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* BusCreator: '/Bus Creator' incorporates: - * Constant: '/Constant1' - * Constant: '/Constant10' - * Constant: '/Constant11' - * Constant: '/Constant14' - * Constant: '/Constant2' - * Constant: '/Constant9' - * DataStoreWrite: '/Data Store Write7' - * SignalConversion generated from: '/Bus Creator' - * */ - for (i = 0; i < 9; i++) { - Actuator_Ch2_Command_Model.POS[i] = 6000U; - Actuator_Ch2_Command_Model.BUS_ADR[i] = 0U; - Actuator_Ch2_Command_Model.MODE[i] = 0U; - Actuator_Ch2_Command_Model.COM[i] = 3U; - Actuator_Ch2_Command_Model.Stall_SET[i] = 1U; - Actuator_Ch2_Command_Model.Lnoise_SET[i] = 0U; - Actuator_Ch2_Command_Model.Autos_SET[i] = 1U; - Actuator_Ch2_Command_Model.Speed_SET[i] = 3U; - Actuator_Ch2_Command_Model.Coils_Stop_SET[i] = 0U; - } - - /* End of BusCreator: '/Bus Creator' */ - - /* MATLAB Function: '/Move to position Max' incorporates: - * Constant: '/Constant' - * DataStoreRead: '/Data Store Read3' - * Sum: '/step inc' - */ - MovetopositionMax((int8_t)(rtb_Switch + 1), rtDW.LOGGER_LIN, &rtb_y_fb); - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * SignalConversion generated from: '/step' - * Sum: '/step inc' - */ - rtB.Merge_cs = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - IfActionSubsystem3_n(rtb_Switch, &rtB.Merge_cs); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If1' */ - /* End of Outputs for SubSystem: '/Move to position Max' */ - break; - - case 8: - /* Outputs for IfAction SubSystem: '/Check Stall Max' incorporates: - * ActionPort: '/Action Port' - */ - /* RelationalOperator: '/Relational Operator1' incorporates: - * DataStoreRead: '/Data Store Read1' - * RelationalOperator: '/Relational Operator' - */ - for (i = 0; i < 9; i++) { - rtb_RelationalOperator_j[i] = - (rtDW.Actuator_Ch2_Status_Model.in_Act_Stall_Slave[i] == 1); - } - - /* End of RelationalOperator: '/Relational Operator1' */ - - /* Logic: '/Logical Operator2' incorporates: - * RelationalOperator: '/Relational Operator' - */ - tmp = rtb_RelationalOperator_j[0]; - for (i = 0; i < 8; i++) { - tmp = (tmp || rtb_RelationalOperator_j[i + 1]); - } - - /* RelationalOperator: '/Relational Operator' incorporates: - * DataStoreRead: '/Data Store Read1' - */ - for (i = 0; i < 9; i++) { - rtb_RelationalOperator_j[i] = - (rtDW.Actuator_Ch2_Status_Model.in_CPOS_ALL[i] == 6000); - } - - /* End of RelationalOperator: '/Relational Operator' */ - - /* Logic: '/Logical Operator1' incorporates: - * RelationalOperator: '/Relational Operator' - */ - tmp_0 = rtb_RelationalOperator_j[0]; - for (i = 0; i < 8; i++) { - tmp_0 = (tmp_0 || rtb_RelationalOperator_j[i + 1]); - } - - /* If: '/If2' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreWrite: '/Data Store Write' - * DataStoreWrite: '/Data Store Write1' - * DataTypeConversion: '/Data Type Conversion' - * DataTypeConversion: '/Data Type Conversion1' - * Logic: '/Logical Operator' - * Logic: '/Logical Operator1' - * Logic: '/Logical Operator2' - */ - if ((rtDW.Actuator_Ch2_Status_Model.Busy == 0) && - (rtDW.Actuator_Ch2_Status_Model.Error_Connect == 0) && (tmp || tmp_0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * Sum: '/step inc' - */ - rtB.Merge_cs = (int8_t)(rtb_Switch + 1); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - for (i = 0; i < 9; i++) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - rtb_y_ey[i] = rtDW.Actuator_Ch2_Status_Model.in_CPOS_ALL[i]; - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } - - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* MATLAB Function: '/MIN POSITION' incorporates: - * DataStoreRead: '/Data Store Read3' - */ - MINPOSITION_g(rtb_y_ey, rtDW.LOGGER_LIN); - - /* End of Outputs for SubSystem: '/If Action Subsystem2' */ - } else { - /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' - */ - IfActionSubsystem3_n(rtb_Switch, &rtB.Merge_cs); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If2' */ - /* End of Outputs for SubSystem: '/Check Stall Max' */ - break; - - case 9: - break; - } - - /* End of SwitchCase: '/Switch Case' */ - - /* Outport: '/Out1' incorporates: - * DataStoreRead: '/Data Store Read10' - */ - rtY.Out1 = CCU_Errors_Model; - - /* DataStoreWrite: '/Finish write stepSig' */ - rtDW.stepSig_private_p = rtB.Merge_cs; - - /* MATLAB Function: '/Write Ignition' incorporates: - * DataStoreRead: '/Data Store Read3' - */ - /* : if(LOGGER) */ - if (rtDW.LOGGER_LIN != 0.0) { - /* : fprintf('LIN 3 step = %d\n',step); */ - printf("LIN 3 step = %d\n", rtb_Switch); - fflush(stdout); - } - - /* End of MATLAB Function: '/Write Ignition' */ - - /* DataStoreWrite: '/Data Store Write' incorporates: - * Constant: '/Constant' - */ - rtDW.LOGGER_LIN = 1.0; -} - -/* Model initialize function */ -void HVAC_model_initialize(void) -{ - /* (no initialization code required) */ -} - -/* Model terminate function */ -void HVAC_model_terminate(void) -{ - /* (no terminate code required) */ -} - -/* - * File trailer for generated code. - * - * [EOF] - */ +/* + * File: HVAC_model.c + * + * Code generated for Simulink model 'HVAC_model'. + * + * Model version : 1.625 + * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 + * C/C++ source code generated on : Tue Feb 17 18:15:10 2026 + * + * Target selection: ert.tlc + * Embedded hardware selection: ARM Compatible->ARM Cortex-M + * Emulation hardware selection: + * Differs from embedded hardware (MATLAB Host) + * Code generation objectives: Unspecified + * Validation result: Not run + */ + +#include "HVAC_model.h" +#include +#include "HVAC_model_private.h" +#include "HVAC_model_types.h" +#include + +/* Exported block states */ +ActuatorCmdBus Actuator_Ch0_Command_Model;/* '/Data Store Memory15' */ +ActuatorCmdBus Actuator_Ch1_Command_Model;/* '/Data Store Memory15' */ +ActuatorCmdBus Actuator_Ch2_Command_Model;/* '/Data Store Memory15' */ +CmdBusStatus Status_Sensor_Model; /* '/Data Store Memory' */ +CmdBusError CCU_Errors_Model; /* '/Data Store Memory3' */ +CmdBusPWMGet PWM_Get; /* '/Data Store Memory1' */ + +/* Block signals (default storage) */ +B rtB; + +/* Block states (default storage) */ +DW rtDW; + +/* External outputs (root outports fed by signals with default storage) */ +ExtY rtY; + +/* Real-time model */ +static RT_MODEL rtM_; +RT_MODEL *const rtM = &rtM_; +int16_t look1_iu16tdIs16_binlcs(uint16_t u0, const uint16_t bp0[], const double + table[], uint32_t maxIndex) +{ + double frac; + double yL_0d0; + int32_t tmp_1; + uint32_t iLeft; + int16_t tmp; + int16_t tmp_0; + + /* Column-major Lookup 1-D + Search method: 'binary' + Use previous index: 'off' + Interpolation method: 'Linear point-slope' + Extrapolation method: 'Clip' + Use last breakpoint for index at or above upper limit: 'off' + Remove protection against out-of-range input in generated code: 'off' + */ + /* Prelookup - Index and Fraction + Index Search method: 'binary' + Extrapolation method: 'Clip' + Use previous index: 'off' + Use last breakpoint for index at or above upper limit: 'off' + Remove protection against out-of-range input in generated code: 'off' + */ + if (u0 <= bp0[0U]) { + iLeft = 0U; + frac = 0.0; + } else if (u0 < bp0[maxIndex]) { + uint32_t bpIdx; + uint32_t iRght; + + /* Binary Search */ + bpIdx = maxIndex >> 1U; + iLeft = 0U; + iRght = maxIndex; + while (iRght - iLeft > 1U) { + if (u0 < bp0[bpIdx]) { + iRght = bpIdx; + } else { + iLeft = bpIdx; + } + + bpIdx = (iRght + iLeft) >> 1U; + } + + uint16_t bpLeftVar; + bpLeftVar = bp0[iLeft]; + frac = (double)((uint32_t)u0 - bpLeftVar) / (double)((uint32_t)bp0[iLeft + + 1U] - bpLeftVar); + } else { + iLeft = maxIndex - 1U; + frac = 1.0; + } + + /* Column-major Interpolation 1-D + Interpolation method: 'Linear point-slope' + Use last breakpoint for index at or above upper limit: 'off' + Overflow mode: 'saturate' + */ + yL_0d0 = table[iLeft]; + if (yL_0d0 < 32768.0) { + if (yL_0d0 >= -32768.0) { + tmp = (int16_t)yL_0d0; + } else { + tmp = INT16_MIN; + } + } else { + tmp = INT16_MAX; + } + + frac *= table[iLeft + 1U] - yL_0d0; + if (frac < 32768.0) { + if (frac >= -32768.0) { + tmp_0 = (int16_t)frac; + } else { + tmp_0 = INT16_MIN; + } + } else { + tmp_0 = INT16_MAX; + } + + tmp_1 = tmp + tmp_0; + if (tmp_1 > 32767) { + tmp_1 = 32767; + } else if (tmp_1 < -32768) { + tmp_1 = -32768; + } + + return (int16_t)tmp_1; +} + +/* + * Output and update for action system: + * '/If Action Subsystem3' + * '/If Action Subsystem3' + * '/If Action Subsystem3' + * '/If Action Subsystem3' + * '/If Action Subsystem3' + * '/If Action Subsystem3' + * '/If Action Subsystem3' + */ +void IfActionSubsystem3(int8_t rtu_stepIn, int8_t *rty_step) +{ + int32_t i; + + /* BusCreator: '/Bus Creator' incorporates: + * DataStoreWrite: '/Data Store Write' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch0_Command_Model.POS[i] = 0U; + Actuator_Ch0_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch0_Command_Model.MODE[i] = 0U; + Actuator_Ch0_Command_Model.COM[i] = 0U; + Actuator_Ch0_Command_Model.Stall_SET[i] = 0U; + Actuator_Ch0_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch0_Command_Model.Autos_SET[i] = 0U; + Actuator_Ch0_Command_Model.Speed_SET[i] = 0U; + Actuator_Ch0_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* SignalConversion generated from: '/stepIn' */ + *rty_step = rtu_stepIn; +} + +/* + * Output and update for atomic system: + * '/Initial CPOS Min' + * '/Initial CPOS Min' + */ +void InitialCPOSMin(double rtu_LOGGER, int8_t rtu_step, int8_t *rty_y) +{ + *rty_y = rtu_step; + + /* : y = step; */ + /* : if(LOGGER) */ + if (rtu_LOGGER != 0.0) { + /* : fprintf('SIMULINK Initial CPOS Min - 6000\n'); */ + printf("SIMULINK Initial CPOS Min - 6000\n"); + fflush(stdout); + } +} + +/* + * Output and update for atomic system: + * '/Normal Mode' + * '/Normal Mode' + */ +void NormalMode(double rtu_LOGGER, int8_t rtu_step, int8_t *rty_y) +{ + *rty_y = rtu_step; + + /* : y = step; */ + /* : if(LOGGER) */ + if (rtu_LOGGER != 0.0) { + /* : fprintf('SIMULINK Normal Mode\n'); */ + printf("SIMULINK Normal Mode\n"); + fflush(stdout); + } +} + +/* + * Output and update for atomic system: + * '/Move to position Min' + * '/Move to position Min' + * '/Move to position Min' + */ +void MovetopositionMin(double rtu_LOGGER, int8_t rtu_step, int8_t *rty_y) +{ + *rty_y = rtu_step; + + /* : y = step; */ + /* : if(LOGGER) */ + if (rtu_LOGGER != 0.0) { + /* : fprintf('SIMULINK Move to position Min - 1\n'); */ + printf("SIMULINK Move to position Min - 1\n"); + fflush(stdout); + } +} + +/* + * Output and update for atomic system: + * '/MIN POSITION' + * '/MIN POSITION' + * '/MIN POSITION' + */ +void MINPOSITION(int16_t rty_y[9], double rtu_LOGGER) +{ + int32_t i; + + /* : y = step; */ + /* : if(LOGGER) */ + if (rtu_LOGGER != 0.0) { + /* : fprintf('SIMULINK Min_position_Ch0 '); */ + printf("SIMULINK Min_position_Ch0 "); + fflush(stdout); + + /* : for i = 1:numel(step) */ + for (i = 0; i < 9; i++) { + /* : fprintf('%d ', int16(step(i))); */ + printf("%d ", rty_y[i]); + fflush(stdout); + } + + /* : fprintf('\n'); */ + printf("\n"); + fflush(stdout); + } +} + +/* + * Output and update for atomic system: + * '/Initial CPOS Max' + * '/Initial CPOS Max' + * '/Initial CPOS Max' + */ +void InitialCPOSMax(double rtu_LOGGER, int8_t rtu_step, int8_t *rty_y) +{ + *rty_y = rtu_step; + + /* : y = step; */ + /* : if(LOGGER) */ + if (rtu_LOGGER != 0.0) { + /* : fprintf('SIMULINK Initial CPOS Max - 1\n'); */ + printf("SIMULINK Initial CPOS Max - 1\n"); + fflush(stdout); + } +} + +/* + * Output and update for atomic system: + * '/Move to position Max' + * '/Move to position Max' + * '/Move to position Max' + */ +void MovetopositionMax(int8_t rtu_step, double rtu_LOGGER, int8_t *rty_y) +{ + *rty_y = rtu_step; + + /* : y = step; */ + /* : if(LOGGER) */ + if (rtu_LOGGER != 0.0) { + /* : fprintf('SIMULINK Move to position Max - 6000\n'); */ + printf("SIMULINK Move to position Max - 6000\n"); + fflush(stdout); + } +} + +/* + * Output and update for atomic system: + * '/MIN POSITION' + * '/MIN POSITION' + * '/MIN POSITION' + */ +void MINPOSITION_g(int16_t rty_y[9], double rtu_LOGGER) +{ + int32_t i; + + /* : y = step; */ + /* : if(LOGGER) */ + if (rtu_LOGGER != 0.0) { + /* : fprintf('SIMULINK Max_position_Ch0 '); */ + printf("SIMULINK Max_position_Ch0 "); + fflush(stdout); + + /* : for i = 1:numel(step) */ + for (i = 0; i < 9; i++) { + /* : fprintf('%d ', int16(step(i))); */ + printf("%d ", rty_y[i]); + fflush(stdout); + } + + /* : fprintf('\n'); */ + printf("\n"); + fflush(stdout); + } +} + +/* + * Output and update for atomic system: + * '/Write Ignition' + * '/Write Ignition' + */ +void WriteIgnition(double rtu_LOGGER, int8_t rtu_step) +{ + /* : if(LOGGER) */ + if (rtu_LOGGER != 0.0) { + /* : fprintf('step = %d\n',step); */ + printf("step = %d\n", rtu_step); + fflush(stdout); + } +} + +/* + * Output and update for action system: + * '/If Action Subsystem3' + * '/If Action Subsystem3' + * '/If Action Subsystem3' + * '/If Action Subsystem3' + * '/If Action Subsystem3' + * '/If Action Subsystem3' + * '/If Action Subsystem3' + */ +void IfActionSubsystem3_m(int8_t rtu_stepIn, int8_t *rty_step) +{ + int32_t i; + + /* BusCreator: '/Bus Creator' incorporates: + * DataStoreWrite: '/Data Store Write' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch1_Command_Model.POS[i] = 0U; + Actuator_Ch1_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch1_Command_Model.MODE[i] = 0U; + Actuator_Ch1_Command_Model.COM[i] = 0U; + Actuator_Ch1_Command_Model.Stall_SET[i] = 0U; + Actuator_Ch1_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch1_Command_Model.Autos_SET[i] = 0U; + Actuator_Ch1_Command_Model.Speed_SET[i] = 0U; + Actuator_Ch1_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* SignalConversion generated from: '/stepIn' */ + *rty_step = rtu_stepIn; +} + +/* + * Output and update for action system: + * '/If Action Subsystem3' + * '/If Action Subsystem3' + * '/If Action Subsystem3' + * '/If Action Subsystem3' + * '/If Action Subsystem3' + * '/If Action Subsystem3' + * '/If Action Subsystem3' + */ +void IfActionSubsystem3_n(int8_t rtu_stepIn, int8_t *rty_step) +{ + int32_t i; + + /* BusCreator: '/Bus Creator' incorporates: + * DataStoreWrite: '/Data Store Write' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch2_Command_Model.POS[i] = 0U; + Actuator_Ch2_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch2_Command_Model.MODE[i] = 0U; + Actuator_Ch2_Command_Model.COM[i] = 0U; + Actuator_Ch2_Command_Model.Stall_SET[i] = 0U; + Actuator_Ch2_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch2_Command_Model.Autos_SET[i] = 0U; + Actuator_Ch2_Command_Model.Speed_SET[i] = 0U; + Actuator_Ch2_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* SignalConversion generated from: '/stepIn' */ + *rty_step = rtu_stepIn; +} + +/* Model step function */ +void HVAC_model_step(void) +{ + double rtb_Divide1; + double rtb_Divide3; + int32_t i; + int16_t rtb_y_ey[9]; + int16_t rtb_Switch1; + int16_t rtb_Switch1_d; + int16_t rtb_Switch_d; + int16_t rtb_Switch_f; + int16_t rtb_Switch_jd; + int16_t rtb_Switch_jv; + int16_t rtb_Switch_ku; + int16_t rtb_Switch_m; + int8_t rtb_Switch_l5; + int8_t rtb_y_fb; + bool rtb_RelationalOperator_j[9]; + bool rtb_FailCond; + bool rtb_FailCond_a; + bool rtb_FailCond_b; + bool rtb_FailCond_e; + bool rtb_FailCond_f; + bool rtb_FailCond_g; + bool rtb_FailCond_l; + bool rtb_FailCond_mg; + bool rtb_LogicalOperator1; + bool rtb_LogicalOperator1_ca; + bool rtb_LogicalOperator1_f; + bool rtb_LogicalOperator1_k; + bool rtb_LogicalOperator1_lc; + bool rtb_LogicalOperator1_lk; + bool rtb_LogicalOperator3_f3; + bool rtb_LogicalOperator3_oi; + + /* Product: '/Divide1' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide' + */ + rtb_Divide1 = (double)rtDW.ADC_Data_Model.Sensor_Ambient_Temp / 4095.0 * 5.0; + + /* Logic: '/Logical Operator' incorporates: + * Constant: '/Constant' + * Constant: '/Constant' + * RelationalOperator: '/Compare' + * RelationalOperator: '/Compare' + */ + rtb_FailCond = ((rtb_Divide1 < 0.1) || (rtb_Divide1 > 4.9)); + + /* Logic: '/Logical Operator1' incorporates: + * Constant: '/Constant' + * DataStoreRead: '/Data Store Read4' + * RelationalOperator: '/Compare' + * Sum: '/Subtract' + * UnitDelay: '/t_start_delay_private ' + */ + rtb_LogicalOperator1 = (rtb_FailCond && (rtDW.t_now - + rtDW.t_start_delay_private_DSTATE >= 3000U)); + + /* Switch: '/Switch' incorporates: + * Constant: '/Constant2' + * DataStoreRead: '/Data Store Read1' + * Lookup_n-D: '/1-D Lookup Table' + */ + if (rtb_LogicalOperator1) { + rtb_Switch_f = 100; + } else { + rtb_Switch_f = look1_iu16tdIs16_binlcs + (rtDW.ADC_Data_Model.Sensor_Ambient_Temp, rtConstP.pooled23, + rtConstP.uDLookupTable_tableData, 1023U); + } + + /* End of Switch: '/Switch' */ + + /* MATLAB Function: '/Write Ambient' incorporates: + * DataStoreRead: '/Data Store Read' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('Ambient = %d * 0.1 C\n',Ambient); */ + printf("Ambient = %d * 0.1 C\n", rtb_Switch_f); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write Ambient' */ + + /* MATLAB Function: '/Write ERROR' incorporates: + * DataStoreRead: '/Data Store Read' + */ + /* : if(LOGGER) */ + if ((rtDW.LOGGER_ACP != 0.0) && rtb_LogicalOperator1) { + /* : if(AmbientErr) */ + /* : fprintf('CCU_Body_Err.CCU_AmbienTemptSenErr_Stat = 0x1 (Failure), Sensor_Ambient_Temp = %f V\n',Sensor_Ambient_Temp); */ + printf("CCU_Body_Err.CCU_AmbienTemptSenErr_Stat = 0x1 (Failure), Sensor_Ambient_Temp = %f V\n", + rtb_Divide1); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write ERROR' */ + + /* Switch: '/Switch' incorporates: + * DataStoreRead: '/Data Store Read4' + * Logic: '/Logical Operator3' + * Logic: '/Logical Operator4' + * UnitDelay: '/Cond_prev_private ' + * UnitDelay: '/t_start_delay_private ' + */ + if (rtb_FailCond && (!rtDW.Cond_prev_private_DSTATE)) { + rtDW.t_start_delay_private_DSTATE = rtDW.t_now; + } + + /* End of Switch: '/Switch' */ + + /* Product: '/Divide1' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide' + */ + rtb_Divide1 = (double)rtDW.ADC_Data_Model.Sensor_Evap_Temp / 4095.0 * 5.0; + + /* Logic: '/Logical Operator' incorporates: + * Constant: '/Constant' + * Constant: '/Constant' + * RelationalOperator: '/Compare' + * RelationalOperator: '/Compare' + */ + rtb_FailCond_f = ((rtb_Divide1 < 0.1) || (rtb_Divide1 > 4.9)); + + /* Logic: '/Logical Operator1' incorporates: + * Constant: '/Constant' + * DataStoreRead: '/Data Store Read4' + * RelationalOperator: '/Compare' + * Sum: '/Subtract' + * UnitDelay: '/t_start_delay_private ' + */ + rtb_LogicalOperator1_f = (rtb_FailCond_f && (rtDW.t_now - + rtDW.t_start_delay_private_DSTATE_p >= 3000U)); + + /* MATLAB Function: '/Write ERROR' incorporates: + * DataStoreRead: '/Data Store Read' + */ + /* : if(LOGGER) */ + if ((rtDW.LOGGER_ACP != 0.0) && rtb_LogicalOperator1_f) { + /* : if(EvapFErr) */ + /* : fprintf('CCU_Body_Err.CCU_EvaTempSenErrF_Stat = 0x1 (Failure), Sensor_Evap_Temp = %f V\n',Sensor_Evap_Temp); */ + printf("CCU_Body_Err.CCU_EvaTempSenErrF_Stat = 0x1 (Failure), Sensor_Evap_Temp = %f V\n", + rtb_Divide1); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write ERROR' */ + + /* Switch: '/Switch' incorporates: + * Constant: '/Constant2' + * DataStoreRead: '/Data Store Read1' + * Lookup_n-D: '/1-D Lookup Table' + */ + if (rtb_LogicalOperator1_f) { + rtb_Switch_ku = -100; + } else { + rtb_Switch_ku = look1_iu16tdIs16_binlcs(rtDW.ADC_Data_Model.Sensor_Evap_Temp, + rtConstP.pooled23, rtConstP.pooled3, 1023U); + } + + /* End of Switch: '/Switch' */ + + /* MATLAB Function: '/Write Eva_F' incorporates: + * DataStoreRead: '/Data Store Read' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('Eva_F = %d * 0.1 C\n',Eva_F); */ + printf("Eva_F = %d * 0.1 C\n", rtb_Switch_ku); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write Eva_F' */ + + /* Switch: '/Switch' incorporates: + * DataStoreRead: '/Data Store Read4' + * Logic: '/Logical Operator3' + * Logic: '/Logical Operator4' + * UnitDelay: '/Cond_prev_private ' + * UnitDelay: '/t_start_delay_private ' + */ + if (rtb_FailCond_f && (!rtDW.Cond_prev_private_DSTATE_h)) { + rtDW.t_start_delay_private_DSTATE_p = rtDW.t_now; + } + + /* End of Switch: '/Switch' */ + + /* Product: '/Divide1' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide' + */ + rtb_Divide1 = (double)rtDW.ADC_Data_Model.Sensor_Rear_Evap_Temp / 4095.0 * 5.0; + + /* Logic: '/Logical Operator' incorporates: + * Constant: '/Constant' + * Constant: '/Constant' + * RelationalOperator: '/Compare' + * RelationalOperator: '/Compare' + */ + rtb_FailCond_g = ((rtb_Divide1 < 0.1) || (rtb_Divide1 > 4.9)); + + /* Logic: '/Logical Operator1' incorporates: + * Constant: '/Constant' + * DataStoreRead: '/Data Store Read4' + * RelationalOperator: '/Compare' + * Sum: '/Subtract' + * UnitDelay: '/t_start_delay_private ' + */ + rtb_LogicalOperator1_k = (rtb_FailCond_g && (rtDW.t_now - + rtDW.t_start_delay_private_DSTATE_pk >= 3000U)); + + /* MATLAB Function: '/Write ERROR' incorporates: + * DataStoreRead: '/Data Store Read' + */ + /* : if(LOGGER) */ + if ((rtDW.LOGGER_ACP != 0.0) && rtb_LogicalOperator1_k) { + /* : if(EvapRErr) */ + /* : fprintf('CCU_Body_Err.CCU_EvaTempSenErrR_Stat = 0x1 (Failure), Sensor_Rear_Evap_Temp = %f V\n',Sensor_Rear_Evap_Temp); */ + printf("CCU_Body_Err.CCU_EvaTempSenErrR_Stat = 0x1 (Failure), Sensor_Rear_Evap_Temp = %f V\n", + rtb_Divide1); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write ERROR' */ + + /* Switch: '/Switch' incorporates: + * Constant: '/Constant2' + * DataStoreRead: '/Data Store Read1' + * Lookup_n-D: '/1-D Lookup Table' + */ + if (rtb_LogicalOperator1_k) { + rtb_Switch_jd = -100; + } else { + rtb_Switch_jd = look1_iu16tdIs16_binlcs + (rtDW.ADC_Data_Model.Sensor_Rear_Evap_Temp, rtConstP.pooled23, + rtConstP.pooled3, 1023U); + } + + /* End of Switch: '/Switch' */ + + /* MATLAB Function: '/Write Eva_F' incorporates: + * DataStoreRead: '/Data Store Read' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('Eva_R = %d * 0.1 C\n',Eva_R); */ + printf("Eva_R = %d * 0.1 C\n", rtb_Switch_jd); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write Eva_F' */ + + /* Switch: '/Switch' incorporates: + * DataStoreRead: '/Data Store Read4' + * Logic: '/Logical Operator3' + * Logic: '/Logical Operator4' + * UnitDelay: '/Cond_prev_private ' + * UnitDelay: '/t_start_delay_private ' + */ + if (rtb_FailCond_g && (!rtDW.Cond_prev_private_DSTATE_i)) { + rtDW.t_start_delay_private_DSTATE_pk = rtDW.t_now; + } + + /* End of Switch: '/Switch' */ + + /* Product: '/Divide1' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide' + */ + rtb_Divide1 = (double)rtDW.ADC_Data_Model.Sensor_AC_Pressure / 4095.0 * 5.0; + + /* Logic: '/Logical Operator' incorporates: + * Constant: '/Constant' + * Constant: '/Constant' + * RelationalOperator: '/Compare' + * RelationalOperator: '/Compare' + */ + rtb_FailCond_mg = ((rtb_Divide1 < 0.1) || (rtb_Divide1 > 4.9)); + + /* Logic: '/Logical Operator1' incorporates: + * Constant: '/Constant' + * DataStoreRead: '/Data Store Read4' + * RelationalOperator: '/Compare' + * Sum: '/Subtract' + * UnitDelay: '/t_start_delay_private ' + */ + rtb_LogicalOperator1_lk = (rtb_FailCond_mg && (rtDW.t_now - + rtDW.t_start_delay_private_DSTATE_e >= 3000U)); + + /* Switch: '/Switch' incorporates: + * Constant: '/Constant2' + * DataStoreRead: '/Data Store Read1' + * Lookup_n-D: '/1-D Lookup Table' + */ + if (rtb_LogicalOperator1_lk) { + rtb_Switch_jv = 32; + } else { + rtb_Switch_jv = look1_iu16tdIs16_binlcs + (rtDW.ADC_Data_Model.Sensor_AC_Pressure, rtConstP.pooled23, + rtConstP.uDLookupTable_tableData_f, 1023U); + } + + /* End of Switch: '/Switch' */ + + /* MATLAB Function: '/Write' incorporates: + * DataStoreRead: '/Data Store Read' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('AC_Pressure = %d * ATM\n',AC_Pressure); */ + printf("AC_Pressure = %d * ATM\n", rtb_Switch_jv); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write ERROR' incorporates: + * DataStoreRead: '/Data Store Read' + */ + /* : if(LOGGER) */ + if ((rtDW.LOGGER_ACP != 0.0) && rtb_LogicalOperator1_lk) { + /* : if(AC_PressureErr) */ + /* : fprintf('CCU_Body_Err.CCU_PressSenErr_Stat = 0x1 (Failure), Sensor_AC_Pressure = %f V\n',Sensor_AC_Pressure); */ + printf("CCU_Body_Err.CCU_PressSenErr_Stat = 0x1 (Failure), Sensor_AC_Pressure = %f V\n", + rtb_Divide1); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write ERROR' */ + + /* Switch: '/Switch' incorporates: + * DataStoreRead: '/Data Store Read4' + * Logic: '/Logical Operator3' + * Logic: '/Logical Operator4' + * UnitDelay: '/Cond_prev_private ' + * UnitDelay: '/t_start_delay_private ' + */ + if (rtb_FailCond_mg && (!rtDW.Cond_prev_private_DSTATE_e)) { + rtDW.t_start_delay_private_DSTATE_e = rtDW.t_now; + } + + /* End of Switch: '/Switch' */ + + /* Product: '/Divide1' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide' + */ + rtb_Divide1 = (double)rtDW.ADC_Data_Model.Sensor_Incar_Temp_FL / 4095.0 * 5.0; + + /* Logic: '/Logical Operator' incorporates: + * Constant: '/Constant' + * Constant: '/Constant' + * RelationalOperator: '/Compare' + * RelationalOperator: '/Compare' + */ + rtb_FailCond_e = ((rtb_Divide1 < 0.15) || (rtb_Divide1 > 4.9)); + + /* Logic: '/Logical Operator1' incorporates: + * Constant: '/Constant' + * DataStoreRead: '/Data Store Read4' + * RelationalOperator: '/Compare' + * Sum: '/Subtract' + * UnitDelay: '/t_start_delay_private ' + */ + rtb_LogicalOperator1_ca = (rtb_FailCond_e && (rtDW.t_now - + rtDW.t_start_delay_private_DSTATE_b >= 3000U)); + + /* Product: '/Divide3' incorporates: + * Constant: '/Constant3' + * Constant: '/Constant4' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide2' + */ + rtb_Divide3 = (double)rtDW.ADC_Data_Model.Sensor_Incar_Temp_RL / 4095.0 * 5.0; + + /* Logic: '/Logical Operator2' incorporates: + * Constant: '/Constant' + * Constant: '/Constant' + * RelationalOperator: '/Compare' + * RelationalOperator: '/Compare' + */ + rtb_FailCond_a = ((rtb_Divide3 < 0.15) || (rtb_Divide3 > 4.9)); + + /* Logic: '/Logical Operator3' incorporates: + * Constant: '/Constant' + * DataStoreRead: '/Data Store Read4' + * RelationalOperator: '/Compare' + * Sum: '/Subtract' + * UnitDelay: '/t_start_delay_private ' + */ + rtb_LogicalOperator3_f3 = (rtb_FailCond_a && (rtDW.t_now - + rtDW.t_start_delay_private_DSTATE_j >= 3000U)); + + /* MATLAB Function: '/Write ERROR' incorporates: + * DataStoreRead: '/Data Store Read' + */ + /* : if(LOGGER) */ + if ((rtDW.LOGGER_ACP != 0.0) && rtb_LogicalOperator1_ca) { + /* : if(IncarFLErr) */ + /* : fprintf('CCU_Body_Err.CCU_IncarTempErrF_Stat = 0x1 (Failure), Sensor_Incar_Temp_FL = %f V\n',Sensor_Incar_Temp_FL); */ + printf("CCU_Body_Err.CCU_IncarTempErrF_Stat = 0x1 (Failure), Sensor_Incar_Temp_FL = %f V\n", + rtb_Divide1); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write ERROR' */ + + /* MATLAB Function: '/Write ERROR1' incorporates: + * DataStoreRead: '/Data Store Read1' + */ + /* : if(LOGGER) */ + if ((rtDW.LOGGER_ACP != 0.0) && rtb_LogicalOperator3_f3) { + /* : if(IncarRLErr) */ + /* : fprintf('CCU_Body_Err.CCU_IncarTempErrF_Stat = 0x1 (Failure), Sensor_Incar_Temp_RL = %f V\n',Sensor_Incar_Temp_RL); */ + printf("CCU_Body_Err.CCU_IncarTempErrF_Stat = 0x1 (Failure), Sensor_Incar_Temp_RL = %f V\n", + rtb_Divide3); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write ERROR1' */ + + /* Switch: '/Switch' incorporates: + * Constant: '/Constant2' + * DataStoreRead: '/Data Store Read1' + * Lookup_n-D: '/1-D Lookup Table' + */ + if (rtb_LogicalOperator1_ca) { + rtb_Switch_d = 200; + } else { + rtb_Switch_d = look1_iu16tdIs16_binlcs + (rtDW.ADC_Data_Model.Sensor_Incar_Temp_FL, rtConstP.pooled23, + rtConstP.pooled4, 1023U); + } + + /* End of Switch: '/Switch' */ + + /* MATLAB Function: '/Write IncarFL' incorporates: + * DataStoreRead: '/Data Store Read' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('IncarFL = %d * 0.1 C\n',IncarFL); */ + printf("IncarFL = %d * 0.1 C\n", rtb_Switch_d); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write IncarFL' */ + + /* Switch: '/Switch1' incorporates: + * Constant: '/Constant5' + * DataStoreRead: '/Data Store Read1' + * Lookup_n-D: '/1-D Lookup Table1' + */ + if (rtb_LogicalOperator3_f3) { + rtb_Switch1 = 200; + } else { + rtb_Switch1 = look1_iu16tdIs16_binlcs + (rtDW.ADC_Data_Model.Sensor_Incar_Temp_RL, rtConstP.pooled23, + rtConstP.pooled4, 1023U); + } + + /* End of Switch: '/Switch1' */ + + /* MATLAB Function: '/Write IncarRL' incorporates: + * DataStoreRead: '/Data Store Read1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('IncarRL = %d * 0.1 C\n',IncarRL); */ + printf("IncarRL = %d * 0.1 C\n", rtb_Switch1); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write IncarRL' */ + + /* Switch: '/Switch' incorporates: + * DataStoreRead: '/Data Store Read4' + * Logic: '/Logical Operator3' + * Logic: '/Logical Operator4' + * UnitDelay: '/Cond_prev_private ' + * UnitDelay: '/t_start_delay_private ' + */ + if (rtb_FailCond_e && (!rtDW.Cond_prev_private_DSTATE_c)) { + rtDW.t_start_delay_private_DSTATE_b = rtDW.t_now; + } + + /* End of Switch: '/Switch' */ + + /* Switch: '/Switch' incorporates: + * DataStoreRead: '/Data Store Read4' + * Logic: '/Logical Operator3' + * Logic: '/Logical Operator4' + * UnitDelay: '/Cond_prev_private ' + * UnitDelay: '/t_start_delay_private ' + */ + if (rtb_FailCond_a && (!rtDW.Cond_prev_private_DSTATE_b)) { + rtDW.t_start_delay_private_DSTATE_j = rtDW.t_now; + } + + /* End of Switch: '/Switch' */ + + /* Product: '/Divide1' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide' + */ + rtb_Divide1 = (double)rtDW.ADC_Data_Model.Sensor_Incar_Temp_FR / 4095.0 * 5.0; + + /* Logic: '/Logical Operator' incorporates: + * Constant: '/Constant' + * Constant: '/Constant' + * RelationalOperator: '/Compare' + * RelationalOperator: '/Compare' + */ + rtb_FailCond_l = ((rtb_Divide1 < 0.15) || (rtb_Divide1 > 4.9)); + + /* Logic: '/Logical Operator1' incorporates: + * Constant: '/Constant' + * DataStoreRead: '/Data Store Read4' + * RelationalOperator: '/Compare' + * Sum: '/Subtract' + * UnitDelay: '/t_start_delay_private ' + */ + rtb_LogicalOperator1_lc = (rtb_FailCond_l && (rtDW.t_now - + rtDW.t_start_delay_private_DSTATE_bh >= 3000U)); + + /* Product: '/Divide3' incorporates: + * Constant: '/Constant3' + * Constant: '/Constant4' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide2' + */ + rtb_Divide3 = (double)rtDW.ADC_Data_Model.Sensor_Incar_Temp_RR / 4095.0 * 5.0; + + /* Logic: '/Logical Operator2' incorporates: + * Constant: '/Constant' + * Constant: '/Constant' + * RelationalOperator: '/Compare' + * RelationalOperator: '/Compare' + */ + rtb_FailCond_b = ((rtb_Divide3 < 0.15) || (rtb_Divide3 > 4.9)); + + /* Logic: '/Logical Operator3' incorporates: + * Constant: '/Constant' + * DataStoreRead: '/Data Store Read4' + * RelationalOperator: '/Compare' + * Sum: '/Subtract' + * UnitDelay: '/t_start_delay_private ' + */ + rtb_LogicalOperator3_oi = (rtb_FailCond_b && (rtDW.t_now - + rtDW.t_start_delay_private_DSTATE_bx >= 3000U)); + + /* MATLAB Function: '/Write ERROR' incorporates: + * DataStoreRead: '/Data Store Read' + */ + /* : if(LOGGER) */ + if ((rtDW.LOGGER_ACP != 0.0) && rtb_LogicalOperator1_lc) { + /* : if(IncarRLErr) */ + /* : fprintf('CCU_Body_Err.CCU_IncarTempErrR_Stat = 0x1 (Failure), Sensor_Incar_Temp_FR = %f V\n',Sensor_Incar_Temp_FR); */ + printf("CCU_Body_Err.CCU_IncarTempErrR_Stat = 0x1 (Failure), Sensor_Incar_Temp_FR = %f V\n", + rtb_Divide1); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write ERROR' */ + + /* MATLAB Function: '/Write ERROR1' incorporates: + * DataStoreRead: '/Data Store Read1' + */ + /* : if(LOGGER) */ + if ((rtDW.LOGGER_ACP != 0.0) && rtb_LogicalOperator3_oi) { + /* : if(IncarRLErr) */ + /* : fprintf('CCU_Body_Err.CCU_IncarTempErrR_Stat = 0x1 (Failure), Sensor_Incar_Temp_RR = %f V\n',Sensor_Incar_Temp_RR); */ + printf("CCU_Body_Err.CCU_IncarTempErrR_Stat = 0x1 (Failure), Sensor_Incar_Temp_RR = %f V\n", + rtb_Divide3); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write ERROR1' */ + + /* Switch: '/Switch' incorporates: + * Constant: '/Constant2' + * DataStoreRead: '/Data Store Read1' + * Lookup_n-D: '/1-D Lookup Table' + */ + if (rtb_LogicalOperator1_lc) { + rtb_Switch_m = 200; + } else { + rtb_Switch_m = look1_iu16tdIs16_binlcs + (rtDW.ADC_Data_Model.Sensor_Incar_Temp_FR, rtConstP.pooled23, + rtConstP.pooled4, 1023U); + } + + /* End of Switch: '/Switch' */ + + /* MATLAB Function: '/Write IncarFR' incorporates: + * DataStoreRead: '/Data Store Read' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('IncarFR = %d * 0.1 C\n',IncarFR); */ + printf("IncarFR = %d * 0.1 C\n", rtb_Switch_m); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write IncarFR' */ + + /* Switch: '/Switch1' incorporates: + * Constant: '/Constant5' + * DataStoreRead: '/Data Store Read1' + * Lookup_n-D: '/1-D Lookup Table1' + */ + if (rtb_LogicalOperator3_oi) { + rtb_Switch1_d = 200; + } else { + rtb_Switch1_d = look1_iu16tdIs16_binlcs + (rtDW.ADC_Data_Model.Sensor_Incar_Temp_RR, rtConstP.pooled23, + rtConstP.pooled4, 1023U); + } + + /* End of Switch: '/Switch1' */ + + /* MATLAB Function: '/Write IncarRR' incorporates: + * DataStoreRead: '/Data Store Read1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('IncarRR = %d * 0.1 C\n',IncarRR); */ + printf("IncarRR = %d * 0.1 C\n", rtb_Switch1_d); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write IncarRR' */ + + /* Switch: '/Switch' incorporates: + * DataStoreRead: '/Data Store Read4' + * Logic: '/Logical Operator3' + * Logic: '/Logical Operator4' + * UnitDelay: '/Cond_prev_private ' + * UnitDelay: '/t_start_delay_private ' + */ + if (rtb_FailCond_l && (!rtDW.Cond_prev_private_DSTATE_j)) { + rtDW.t_start_delay_private_DSTATE_bh = rtDW.t_now; + } + + /* End of Switch: '/Switch' */ + + /* Switch: '/Switch' incorporates: + * DataStoreRead: '/Data Store Read4' + * Logic: '/Logical Operator3' + * Logic: '/Logical Operator4' + * UnitDelay: '/Cond_prev_private ' + * UnitDelay: '/t_start_delay_private ' + */ + if (rtb_FailCond_b && (!rtDW.Cond_prev_private_DSTATE_f)) { + rtDW.t_start_delay_private_DSTATE_bx = rtDW.t_now; + } + + /* End of Switch: '/Switch' */ + + /* BusCreator: '/Bus Creator' incorporates: + * DataStoreWrite: '/Data Store Write2' + */ + Status_Sensor_Model.Battery = 0; + Status_Sensor_Model.AMB = rtb_Switch_f; + Status_Sensor_Model.Incar_FL = rtb_Switch_d; + Status_Sensor_Model.Incar_FR = rtb_Switch_m; + Status_Sensor_Model.Incar_RL = rtb_Switch1; + Status_Sensor_Model.Incar_RR = rtb_Switch1_d; + Status_Sensor_Model.Eva_F = rtb_Switch_ku; + Status_Sensor_Model.Eva_R = rtb_Switch_jd; + Status_Sensor_Model.Pressure = rtb_Switch_jv; + Status_Sensor_Model.Duct_FL_Upper = 0; + Status_Sensor_Model.Duct_FL_Lower = 0; + Status_Sensor_Model.Duct_FR_Upper = 0; + Status_Sensor_Model.Duct_FR_Lower = 0; + Status_Sensor_Model.Duct_RL = 0; + Status_Sensor_Model.Duct_RR = 0; + Status_Sensor_Model.Duct_Side_FL = 0; + Status_Sensor_Model.Duct_Side_FR = 0; + Status_Sensor_Model.Duct_Side_RL = 0; + Status_Sensor_Model.Duct_Side_RR = 0; + Status_Sensor_Model.AQS = 0; + + /* DataStoreWrite: '/Data Store Write' incorporates: + * Constant: '/Constant' + */ + rtDW.LOGGER_ACP = 1.0; + + /* Product: '/Divide1' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide' + */ + rtb_Divide1 = (double)rtDW.ADC_Data_Model.BTS5120_2EKA_ShutoffValvePowerTXV1 / + 4095.0 * 5.0; + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant2' + * Constant: '/Constant3' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide2' + * Product: '/Divide3' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('BTS5120_2EKA_ShutoffValvePowerTXV1 V = %f Iout = %f\n',U,I); */ + printf("BTS5120_2EKA_ShutoffValvePowerTXV1 V = %f Iout = %f\n", rtb_Divide1, + rtb_Divide1 / 1200.0 * 550.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* Product: '/Divide1' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide' + */ + rtb_Divide1 = (double)rtDW.ADC_Data_Model.BTS5120_2EKA_ShutoffValvePowerTXV2 / + 4095.0 * 5.0; + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant2' + * Constant: '/Constant3' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide2' + * Product: '/Divide3' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('BTS5120_2EKA_ShutoffValvePowerTXV2 V = %f Iout = %f\n',U,I); */ + printf("BTS5120_2EKA_ShutoffValvePowerTXV2 V = %f Iout = %f\n", rtb_Divide1, + rtb_Divide1 / 1200.0 * 550.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* Product: '/Divide1' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide' + */ + rtb_Divide1 = (double)rtDW.ADC_Data_Model.BTS5180_2EKA_ChannelPTCPower1 / + 4095.0 * 5.0; + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant2' + * Constant: '/Constant3' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide2' + * Product: '/Divide3' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('BTS5180_2EKA_ChannelPTCPower1 V = %f Iout = %f\n',U,I); */ + printf("BTS5180_2EKA_ChannelPTCPower1 V = %f Iout = %f\n", rtb_Divide1, + rtb_Divide1 / 1200.0 * 550.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* Product: '/Divide1' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide' + */ + rtb_Divide1 = (double)rtDW.ADC_Data_Model.BTS5180_2EKA_ChannelPTCPower2 / + 4095.0 * 5.0; + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant2' + * Constant: '/Constant3' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide2' + * Product: '/Divide3' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('BTS5180_2EKA_ChannelPTCPower2 V = %f Iout = %f\n',U,I); */ + printf("BTS5180_2EKA_ChannelPTCPower2 V = %f Iout = %f\n", rtb_Divide1, + rtb_Divide1 / 1200.0 * 550.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* Product: '/Divide1' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide' + */ + rtb_Divide1 = (double)rtDW.ADC_Data_Model.BTS5180_2EKA_FrontIncarMotor / + 4095.0 * 5.0; + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant2' + * Constant: '/Constant3' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide2' + * Product: '/Divide3' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('BTS5180_2EKA_FrontIncarMotor V = %f Iout = %f\n',U,I); */ + printf("BTS5180_2EKA_FrontIncarMotor V = %f Iout = %f\n", rtb_Divide1, + rtb_Divide1 / 1200.0 * 550.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* Product: '/Divide1' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide' + */ + rtb_Divide1 = (double)rtDW.ADC_Data_Model.BTS5180_2EKA_RearIncarMotor / 4095.0 + * 5.0; + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant2' + * Constant: '/Constant3' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide2' + * Product: '/Divide3' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('BTS5180_2EKA_RearIncarMotor V = %f Iout = %f\n',U,I); */ + printf("BTS5180_2EKA_RearIncarMotor V = %f Iout = %f\n", rtb_Divide1, + rtb_Divide1 / 1200.0 * 550.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* Product: '/Divide1' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide' + */ + rtb_Divide1 = (double)rtDW.ADC_Data_Model.BTS5180_2EKA_ReservePowerSupply / + 4095.0 * 5.0; + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant2' + * Constant: '/Constant3' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide2' + * Product: '/Divide3' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('BTS5180_2EKA_ReservePowerSupply V = %f Iout = %f\n',U,I); */ + printf("BTS5180_2EKA_ReservePowerSupply V = %f Iout = %f\n", rtb_Divide1, + rtb_Divide1 / 1200.0 * 550.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* Product: '/Divide1' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide' + */ + rtb_Divide1 = (double)rtDW.ADC_Data_Model.BTS5180_2EKA_ShutOFFValveFront / + 4095.0 * 5.0; + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant2' + * Constant: '/Constant3' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide2' + * Product: '/Divide3' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('BTS5180_2EKA_ShutOFFValveFront V = %f Iout = %f\n',U,I); */ + printf("BTS5180_2EKA_ShutOFFValveFront V = %f Iout = %f\n", rtb_Divide1, + rtb_Divide1 / 1200.0 * 550.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* Product: '/Divide1' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide' + */ + rtb_Divide1 = (double)rtDW.ADC_Data_Model.BTS5180_2EKA_ShutOFFValveRear / + 4095.0 * 5.0; + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant2' + * Constant: '/Constant3' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide2' + * Product: '/Divide3' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('BTS5180_2EKA_ShutOFFValveRear V = %f Iout = %f\n',U,I); */ + printf("BTS5180_2EKA_ShutOFFValveRear V = %f Iout = %f\n", rtb_Divide1, + rtb_Divide1 / 1200.0 * 550.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* Product: '/Divide1' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide' + */ + rtb_Divide1 = (double)rtDW.ADC_Data_Model.BTS5180_2EKA_TwoWayValve / 4095.0 * + 5.0; + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant2' + * Constant: '/Constant3' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide2' + * Product: '/Divide3' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('BTS5180_2EKA_TwoWayValve V = %f Iout = %f\n',U,I); */ + printf("BTS5180_2EKA_TwoWayValve V = %f Iout = %f\n", rtb_Divide1, + rtb_Divide1 / 1200.0 * 550.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide' + * Product: '/Divide1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('IGN_ANS = %f V\n',data); */ + printf("IGN_ANS = %f V\n", (double)rtDW.ADC_Data_Model.IGN_ANS / 4095.0 * + 27.75); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide' + * Product: '/Divide1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('PBATT_CHECK V = %f\n',U); */ + printf("PBATT_CHECK V = %f\n", (double)rtDW.ADC_Data_Model.PBATT_CHECK / + 4095.0 * 33.4375); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide' + * Product: '/Divide1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('Pressure_DIAG V = %f\n',U); */ + printf("Pressure_DIAG V = %f\n", (double)rtDW.ADC_Data_Model.Pressure_DIAG / + 4095.0 * 6.0638); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide' + * Product: '/Divide1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('Reserve_Sensor_Duct_Temp_1 V = %f\n',U); */ + printf("Reserve_Sensor_Duct_Temp_1 V = %f\n", (double) + rtDW.ADC_Data_Model.Reserve_Sensor_Duct_Temp_1 / 4095.0 * 5.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide' + * Product: '/Divide1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('Reserve_Sensor_Duct_Temp_2 V = %f\n',U); */ + printf("Reserve_Sensor_Duct_Temp_2 V = %f\n", (double) + rtDW.ADC_Data_Model.Reserve_Sensor_Duct_Temp_2 / 4095.0 * 5.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide' + * Product: '/Divide1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('Sensor_Front_Duct1 V = %f\n',U); */ + printf("Sensor_Front_Duct1 V = %f\n", (double) + rtDW.ADC_Data_Model.Sensor_Front_Duct1 / 4095.0 * 5.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide' + * Product: '/Divide1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('Sensor_Front_Duct2 V = %f\n',U); */ + printf("Sensor_Front_Duct2 V = %f\n", (double) + rtDW.ADC_Data_Model.Sensor_Front_Duct2 / 4095.0 * 5.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide' + * Product: '/Divide1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('Sensor_Front_Duct3 V = %f\n',U); */ + printf("Sensor_Front_Duct3 V = %f\n", (double) + rtDW.ADC_Data_Model.Sensor_Front_Duct3 / 4095.0 * 5.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide' + * Product: '/Divide1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('Sensor_Front_Duct4 V = %f\n',U); */ + printf("Sensor_Front_Duct4 V = %f\n", (double) + rtDW.ADC_Data_Model.Sensor_Front_Duct4 / 4095.0 * 5.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide' + * Product: '/Divide1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('Sensor_Front_Duct5 V = %f\n',U); */ + printf("Sensor_Front_Duct5 V = %f\n", (double) + rtDW.ADC_Data_Model.Sensor_Front_Duct5 / 4095.0 * 5.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide' + * Product: '/Divide1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('Sensor_Front_Duct V = %f\n',U); */ + printf("Sensor_Front_Duct V = %f\n", (double) + rtDW.ADC_Data_Model.Sensor_Front_Duct6 / 4095.0 * 5.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide' + * Product: '/Divide1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('Sensor_Rear_Duct1 V = %f\n',U); */ + printf("Sensor_Rear_Duct1 V = %f\n", (double) + rtDW.ADC_Data_Model.Sensor_Rear_Duct1 / 4095.0 * 5.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide' + * Product: '/Divide1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('Sensor_Rear_Duct2 V = %f\n',U); */ + printf("Sensor_Rear_Duct2 V = %f\n", (double) + rtDW.ADC_Data_Model.Sensor_Rear_Duct2 / 4095.0 * 5.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide' + * Product: '/Divide1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('Sensor_Rear_Duct3 V = %f\n',U); */ + printf("Sensor_Rear_Duct3 V = %f\n", (double) + rtDW.ADC_Data_Model.Sensor_Rear_Duct3 / 4095.0 * 5.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide' + * Product: '/Divide1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('Sensor_Rear_Duct4 V = %f\n',U); */ + printf("Sensor_Rear_Duct4 V = %f\n", (double) + rtDW.ADC_Data_Model.Sensor_Rear_Duct4 / 4095.0 * 5.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide' + * Product: '/Divide1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('Sensor_Rear_Duct5 V = %f\n',U); */ + printf("Sensor_Rear_Duct5 V = %f\n", (double) + rtDW.ADC_Data_Model.Sensor_Rear_Duct5 / 4095.0 * 5.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide' + * Product: '/Divide1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('Sensor_Rear_Duct6 V = %f\n',U); */ + printf("Sensor_Rear_Duct6 V = %f\n", (double) + rtDW.ADC_Data_Model.Sensor_Rear_Duct6 / 4095.0 * 5.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide' + * Product: '/Divide1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('VN7008AJ_DIAG_FrontLINActuatorPowerDriverAB V = %f\n',U); */ + printf("VN7008AJ_DIAG_FrontLINActuatorPowerDriverAB V = %f\n", (double) + rtDW.ADC_Data_Model.VN7008AJ_DIAG_FrontLINActuatorPowerDriverAB / + 4095.0 * 17.5); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide' + * Product: '/Divide1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('VN7008AJ_DIAG_RearLINActuatorPowerDriverC V = %f\n',U); */ + printf("VN7008AJ_DIAG_RearLINActuatorPowerDriverC V = %f\n", (double) + rtDW.ADC_Data_Model.VN7008AJ_DIAG_RearLINActuatorPowerDriverC / + 4095.0 * 17.5); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* Product: '/Divide1' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide' + */ + rtb_Divide1 = (double) + rtDW.ADC_Data_Model.VN7008AJ_FrontLINActuatorPowerDriverAB / 4095.0 * 5.0; + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant2' + * Constant: '/Constant3' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide2' + * Product: '/Divide3' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('VN7008AJ_FrontLINActuatorPowerDriverAB V = %f Iout = %f\n',U,I); */ + printf("VN7008AJ_FrontLINActuatorPowerDriverAB V = %f Iout = %f\n", + rtb_Divide1, rtb_Divide1 / 2490.0 * 5890.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* Product: '/Divide1' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read1' + * Product: '/Divide' + */ + rtb_Divide1 = (double)rtDW.ADC_Data_Model.VN7008AJ_RearLINActuatorPowerDriverC + / 4095.0 * 5.0; + + /* MATLAB Function: '/Write' incorporates: + * Constant: '/Constant2' + * Constant: '/Constant3' + * DataStoreRead: '/Data Store Read' + * Product: '/Divide2' + * Product: '/Divide3' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('VN7008AJ_RearLINActuatorPowerDriverC V = %f Iout = %f\n',U,I); */ + printf("VN7008AJ_RearLINActuatorPowerDriverC V = %f Iout = %f\n", + rtb_Divide1, rtb_Divide1 / 2490.0 * 5890.0); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write' incorporates: + * DataStoreRead: '/Data Store Read2' + * DataStoreRead: '/Data Store Read3' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('ST_ReservePower = %u \n',data); */ + printf("ST_ReservePower = %u \n", rtDW.ADC_Key_Data_Model.ST_ReservePower); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write' */ + + /* MATLAB Function: '/Write1' incorporates: + * DataStoreRead: '/Data Store Read2' + * DataStoreRead: '/Data Store Read3' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('ST_BATTChiller = %u \n',data); */ + printf("ST_BATTChiller = %u \n", rtDW.ADC_Key_Data_Model.ST_BATTChiller); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write1' */ + + /* MATLAB Function: '/Write2' incorporates: + * DataStoreRead: '/Data Store Read2' + * DataStoreRead: '/Data Store Read3' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('EmergencyAirCleanSwitch = %u \n',data); */ + printf("EmergencyAirCleanSwitch = %u \n", + rtDW.ADC_Key_Data_Model.EmergencyAirCleanSwitch); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write2' */ + + /* MATLAB Function: '/Write3' incorporates: + * DataStoreRead: '/Data Store Read2' + * DataStoreRead: '/Data Store Read3' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('FireExtinguishSwitch = %u \n',data); */ + printf("FireExtinguishSwitch = %u \n", + rtDW.ADC_Key_Data_Model.FireExtinguishSwitch); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write3' */ + + /* MATLAB Function: '/Write4' incorporates: + * DataStoreRead: '/Data Store Read2' + * DataStoreRead: '/Data Store Read3' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_ACP != 0.0) { + /* : fprintf('Ign_Wakeup = %u \n',data); */ + printf("Ign_Wakeup = %u \n", rtDW.ADC_Key_Data_Model.Ign_Wakeup); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write4' */ + + /* BusCreator: '/Bus Creator' incorporates: + * DataStoreWrite: '/Data Store Write' + * DataTypeConversion: '/Data Type Conversion' + * DataTypeConversion: '/Data Type Conversion' + * DataTypeConversion: '/Data Type Conversion' + * DataTypeConversion: '/Data Type Conversion' + * DataTypeConversion: '/Data Type Conversion' + * DataTypeConversion: '/Data Type Conversion' + * Logic: '/Logical Operator4' + * Logic: '/Logical Operator4' + */ + CCU_Errors_Model.CCU_IncarTempErrF_Stat = (uint8_t)(rtb_LogicalOperator1_ca || + rtb_LogicalOperator3_f3); + CCU_Errors_Model.CCU_IncarTempErrR_Stat = (uint8_t)(rtb_LogicalOperator1_lc || + rtb_LogicalOperator3_oi); + CCU_Errors_Model.CCU_DuctTempSenErrF_Stat = 0U; + CCU_Errors_Model.CCU_DuctTempSenErrR_Stat = 0U; + CCU_Errors_Model.CCU_EvaTempSenErrF_Stat = rtb_LogicalOperator1_f; + CCU_Errors_Model.CCU_EvaTempSenErrR_Stat = rtb_LogicalOperator1_k; + CCU_Errors_Model.CCU_DeflectorSwErrF_Stat = 0U; + CCU_Errors_Model.CCU_DeflectorSwErrR_Stat = 0U; + CCU_Errors_Model.CCU_PressSenErr_Stat = rtb_LogicalOperator1_lk; + CCU_Errors_Model.CCU_AmbienTemptSenErr_Stat = rtb_LogicalOperator1; + CCU_Errors_Model.CCU_SealingValveErr_Stat = 0U; + CCU_Errors_Model.CCU_ETXVerr_Stat = 0U; + CCU_Errors_Model.CCU_HVACfanOrTXVerrF_Stat = 0U; + CCU_Errors_Model.CCU_HVACfanOrTXVerrR_Stat = 0U; + CCU_Errors_Model.CCU_ActuatorErrF_Stat = 0U; + CCU_Errors_Model.CCU_ActuatorErrR_Stat = 0U; + CCU_Errors_Model.CCU_UltravioletErr_Stat = 0U; + CCU_Errors_Model.CCU_VinRecordErr_Stat = 0U; + CCU_Errors_Model.CCU_AirQualSenErr_Stat = 0U; + CCU_Errors_Model.CCU_CommErr_Stat = 0U; + CCU_Errors_Model.CCU_TWVerr_Stat = 0U; + CCU_Errors_Model.CCU_IonizationErr_Stat = 0U; + CCU_Errors_Model.CCU_AromaErr_Stat = 0U; + + /* BusCreator: '/Bus Creator' incorporates: + * Constant: '/Constant' + * Constant: '/Constant1' + * Constant: '/Constant2' + * Constant: '/Constant3' + * DataStoreWrite: '/Data Store Write' + */ + PWM_Get.pwmPercentFront = 30U; + PWM_Get.pwmPercentRear = 30U; + PWM_Get.pwmPercentFrontReserved = 30U; + PWM_Get.pwmPercentRearReserved = 30U; + + /* MATLAB Function: '/Write' incorporates: + * DataStoreRead: '/Data Store Read' + */ + /* : if(LOGGER) */ + /* : fprintf('pwmPercentFront = %u \n',data); */ + printf("pwmPercentFront = %u \n", rtDW.PWM_Set_Model.pwmPercentFront); + fflush(stdout); + + /* MATLAB Function: '/Write1' incorporates: + * DataStoreRead: '/Data Store Read' + */ + /* : if(LOGGER) */ + /* : fprintf('pwmPercentRear = %u \n',data); */ + printf("pwmPercentRear = %u \n", rtDW.PWM_Set_Model.pwmPercentRear); + fflush(stdout); + + /* MATLAB Function: '/Write2' incorporates: + * DataStoreRead: '/Data Store Read' + */ + /* : if(LOGGER) */ + /* : fprintf('pwmPercentFrontReserved = %u \n',data); */ + printf("pwmPercentFrontReserved = %u \n", + rtDW.PWM_Set_Model.pwmPercentFrontReserved); + fflush(stdout); + + /* MATLAB Function: '/Write3' incorporates: + * DataStoreRead: '/Data Store Read' + */ + /* : if(LOGGER) */ + /* : fprintf('pwmPercentRearReserved = %u \n',data); */ + printf("pwmPercentRearReserved = %u \n", + rtDW.PWM_Set_Model.pwmPercentRearReserved); + fflush(stdout); + + /* Switch: '/Switch' incorporates: + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read' + * DataStoreRead: '/Data Store Read2' + */ + if (rtDW.stepSig_private > 0) { + rtb_Switch_l5 = rtDW.stepSig_private; + } else { + rtb_Switch_l5 = 1; + } + + /* End of Switch: '/Switch' */ + + /* SwitchCase: '/Switch Case' */ + switch (rtb_Switch_l5) { + case 1: + /* Outputs for IfAction SubSystem: '/Stop Mode' incorporates: + * ActionPort: '/Action Port' + */ + /* If: '/If1' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + */ + if ((rtDW.Actuator_Ch0_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch0_Status_Model.Error_Connect == 0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* BusCreator: '/Bus Creator' incorporates: + * DataStoreWrite: '/Data Store Write' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch0_Command_Model.POS[i] = 0U; + Actuator_Ch0_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch0_Command_Model.MODE[i] = 2U; + Actuator_Ch0_Command_Model.COM[i] = 1U; + Actuator_Ch0_Command_Model.Stall_SET[i] = 0U; + Actuator_Ch0_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch0_Command_Model.Autos_SET[i] = 0U; + Actuator_Ch0_Command_Model.Speed_SET[i] = 0U; + Actuator_Ch0_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * Sum: '/step inc' + */ + rtB.Merge = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3(rtb_Switch_l5, &rtB.Merge); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If1' */ + /* End of Outputs for SubSystem: '/Stop Mode' */ + break; + + case 2: + /* Outputs for IfAction SubSystem: '/Initial CPOS Min' incorporates: + * ActionPort: '/Action Port' + */ + /* If: '/If' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + */ + if ((rtDW.Actuator_Ch0_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch0_Status_Model.Error_Connect == 0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem' incorporates: + * ActionPort: '/Action Port' + */ + /* BusCreator: '/Bus Creator' incorporates: + * DataStoreWrite: '/Data Store Write2' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch0_Command_Model.POS[i] = 6000U; + Actuator_Ch0_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch0_Command_Model.MODE[i] = 0U; + Actuator_Ch0_Command_Model.COM[i] = 2U; + Actuator_Ch0_Command_Model.Stall_SET[i] = 0U; + Actuator_Ch0_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch0_Command_Model.Autos_SET[i] = 0U; + Actuator_Ch0_Command_Model.Speed_SET[i] = 0U; + Actuator_Ch0_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* MATLAB Function: '/Initial CPOS Min' incorporates: + * Constant: '/Constant' + * DataStoreRead: '/Data Store Read3' + * Sum: '/step inc' + */ + InitialCPOSMin(rtDW.LOGGER_LIN, (int8_t)(rtb_Switch_l5 + 1), &rtb_y_fb); + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * Merge: '/Merge' + * SignalConversion generated from: '/step' + * Sum: '/step inc' + */ + rtB.Merge = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + /* BusCreator: '/Bus Creator' incorporates: + * DataStoreWrite: '/Data Store Write' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch0_Command_Model.POS[i] = 0U; + Actuator_Ch0_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch0_Command_Model.MODE[i] = 0U; + Actuator_Ch0_Command_Model.COM[i] = 0U; + Actuator_Ch0_Command_Model.Stall_SET[i] = 0U; + Actuator_Ch0_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch0_Command_Model.Autos_SET[i] = 0U; + Actuator_Ch0_Command_Model.Speed_SET[i] = 0U; + Actuator_Ch0_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* Merge: '/Merge' incorporates: + * Merge: '/Merge' + * SignalConversion generated from: '/stepIn1' + */ + rtB.Merge = rtb_Switch_l5; + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If' */ + /* End of Outputs for SubSystem: '/Initial CPOS Min' */ + break; + + case 3: + /* Outputs for IfAction SubSystem: '/Normal Mode' incorporates: + * ActionPort: '/Action Port' + */ + /* If: '/If1' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + */ + if ((rtDW.Actuator_Ch0_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch0_Status_Model.Error_Connect == 0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* BusCreator: '/Bus Creator' incorporates: + * DataStoreWrite: '/Data Store Write1' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch0_Command_Model.POS[i] = 0U; + Actuator_Ch0_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch0_Command_Model.MODE[i] = 0U; + Actuator_Ch0_Command_Model.COM[i] = 1U; + Actuator_Ch0_Command_Model.Stall_SET[i] = 0U; + Actuator_Ch0_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch0_Command_Model.Autos_SET[i] = 0U; + Actuator_Ch0_Command_Model.Speed_SET[i] = 0U; + Actuator_Ch0_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* MATLAB Function: '/Normal Mode' incorporates: + * Constant: '/Constant' + * DataStoreRead: '/Data Store Read3' + * Sum: '/step inc' + */ + NormalMode(rtDW.LOGGER_LIN, (int8_t)(rtb_Switch_l5 + 1), &rtb_y_fb); + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * SignalConversion generated from: '/step' + * Sum: '/step inc' + */ + rtB.Merge = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3(rtb_Switch_l5, &rtB.Merge); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If1' */ + /* End of Outputs for SubSystem: '/Normal Mode' */ + break; + + case 4: + /* Outputs for IfAction SubSystem: '/Move to position Min' incorporates: + * ActionPort: '/Action Port' + */ + /* If: '/If1' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + */ + if ((rtDW.Actuator_Ch0_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch0_Status_Model.Error_Connect == 0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* BusCreator: '/Bus Creator' incorporates: + * Constant: '/Constant1' + * Constant: '/Constant10' + * Constant: '/Constant11' + * Constant: '/Constant14' + * Constant: '/Constant2' + * Constant: '/Constant9' + * DataStoreWrite: '/Data Store Write7' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch0_Command_Model.POS[i] = 1U; + Actuator_Ch0_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch0_Command_Model.MODE[i] = 0U; + Actuator_Ch0_Command_Model.COM[i] = 3U; + Actuator_Ch0_Command_Model.Stall_SET[i] = 1U; + Actuator_Ch0_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch0_Command_Model.Autos_SET[i] = 1U; + Actuator_Ch0_Command_Model.Speed_SET[i] = 3U; + Actuator_Ch0_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* MATLAB Function: '/Move to position Min' incorporates: + * Constant: '/Constant' + * DataStoreRead: '/Data Store Read3' + * Sum: '/step inc' + */ + MovetopositionMin(rtDW.LOGGER_LIN, (int8_t)(rtb_Switch_l5 + 1), &rtb_y_fb); + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * SignalConversion generated from: '/step' + * Sum: '/step inc' + */ + rtB.Merge = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3(rtb_Switch_l5, &rtB.Merge); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If1' */ + /* End of Outputs for SubSystem: '/Move to position Min' */ + break; + + case 5: + /* Outputs for IfAction SubSystem: '/Check Stall Min' incorporates: + * ActionPort: '/Action Port' + */ + /* RelationalOperator: '/Relational Operator1' incorporates: + * DataStoreRead: '/Data Store Read1' + * RelationalOperator: '/Relational Operator' + */ + for (i = 0; i < 9; i++) { + rtb_RelationalOperator_j[i] = + (rtDW.Actuator_Ch0_Status_Model.in_Act_Stall_Slave[i] == 1); + } + + /* End of RelationalOperator: '/Relational Operator1' */ + + /* Logic: '/Logical Operator2' incorporates: + * RelationalOperator: '/Relational Operator' + */ + rtb_LogicalOperator1 = rtb_RelationalOperator_j[0]; + for (i = 0; i < 8; i++) { + rtb_LogicalOperator1 = (rtb_LogicalOperator1 || rtb_RelationalOperator_j[i + + 1]); + } + + /* RelationalOperator: '/Relational Operator' incorporates: + * DataStoreRead: '/Data Store Read1' + */ + for (i = 0; i < 9; i++) { + rtb_RelationalOperator_j[i] = + (rtDW.Actuator_Ch0_Status_Model.in_CPOS_ALL[i] == 1); + } + + /* End of RelationalOperator: '/Relational Operator' */ + + /* Logic: '/Logical Operator1' incorporates: + * RelationalOperator: '/Relational Operator' + */ + rtb_LogicalOperator1_f = rtb_RelationalOperator_j[0]; + for (i = 0; i < 8; i++) { + rtb_LogicalOperator1_f = (rtb_LogicalOperator1_f || + rtb_RelationalOperator_j[i + 1]); + } + + /* If: '/If2' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + * DataTypeConversion: '/Data Type Conversion' + * DataTypeConversion: '/Data Type Conversion1' + * Logic: '/Logical Operator' + * Logic: '/Logical Operator1' + * Logic: '/Logical Operator2' + */ + if ((rtDW.Actuator_Ch0_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch0_Status_Model.Error_Connect == 0) && + (rtb_LogicalOperator1 || rtb_LogicalOperator1_f)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * Sum: '/step inc' + */ + rtB.Merge = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + for (i = 0; i < 9; i++) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + rtb_y_ey[i] = rtDW.Actuator_Ch0_Status_Model.in_CPOS_ALL[i]; + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } + + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* MATLAB Function: '/MIN POSITION' incorporates: + * DataStoreRead: '/Data Store Read3' + */ + MINPOSITION(rtb_y_ey, rtDW.LOGGER_LIN); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3(rtb_Switch_l5, &rtB.Merge); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If2' */ + /* End of Outputs for SubSystem: '/Check Stall Min' */ + break; + + case 6: + /* Outputs for IfAction SubSystem: '/Initial CPOS Max' incorporates: + * ActionPort: '/Action Port' + */ + /* If: '/If1' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + */ + if ((rtDW.Actuator_Ch0_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch0_Status_Model.Error_Connect == 0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* BusCreator: '/Bus Creator' incorporates: + * DataStoreWrite: '/Data Store Write2' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch0_Command_Model.POS[i] = 1U; + Actuator_Ch0_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch0_Command_Model.MODE[i] = 0U; + Actuator_Ch0_Command_Model.COM[i] = 2U; + Actuator_Ch0_Command_Model.Stall_SET[i] = 0U; + Actuator_Ch0_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch0_Command_Model.Autos_SET[i] = 0U; + Actuator_Ch0_Command_Model.Speed_SET[i] = 0U; + Actuator_Ch0_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* MATLAB Function: '/Initial CPOS Max' incorporates: + * Constant: '/Constant' + * DataStoreRead: '/Data Store Read3' + * Sum: '/step inc' + */ + InitialCPOSMax(rtDW.LOGGER_LIN, (int8_t)(rtb_Switch_l5 + 1), &rtb_y_fb); + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * SignalConversion generated from: '/step' + * Sum: '/step inc' + */ + rtB.Merge = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3(rtb_Switch_l5, &rtB.Merge); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If1' */ + /* End of Outputs for SubSystem: '/Initial CPOS Max' */ + break; + + case 7: + /* Outputs for IfAction SubSystem: '/Move to position Max' incorporates: + * ActionPort: '/Action Port' + */ + /* If: '/If1' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + */ + if ((rtDW.Actuator_Ch0_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch0_Status_Model.Error_Connect == 0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* BusCreator: '/Bus Creator' incorporates: + * Constant: '/Constant1' + * Constant: '/Constant10' + * Constant: '/Constant11' + * Constant: '/Constant14' + * Constant: '/Constant2' + * Constant: '/Constant9' + * DataStoreWrite: '/Data Store Write7' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch0_Command_Model.POS[i] = 6000U; + Actuator_Ch0_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch0_Command_Model.MODE[i] = 0U; + Actuator_Ch0_Command_Model.COM[i] = 3U; + Actuator_Ch0_Command_Model.Stall_SET[i] = 1U; + Actuator_Ch0_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch0_Command_Model.Autos_SET[i] = 1U; + Actuator_Ch0_Command_Model.Speed_SET[i] = 3U; + Actuator_Ch0_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* MATLAB Function: '/Move to position Max' incorporates: + * Constant: '/Constant' + * DataStoreRead: '/Data Store Read3' + * Sum: '/step inc' + */ + MovetopositionMax((int8_t)(rtb_Switch_l5 + 1), rtDW.LOGGER_LIN, &rtb_y_fb); + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * SignalConversion generated from: '/step' + * Sum: '/step inc' + */ + rtB.Merge = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3(rtb_Switch_l5, &rtB.Merge); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If1' */ + /* End of Outputs for SubSystem: '/Move to position Max' */ + break; + + case 8: + /* Outputs for IfAction SubSystem: '/Check Stall Max' incorporates: + * ActionPort: '/Action Port' + */ + /* RelationalOperator: '/Relational Operator1' incorporates: + * DataStoreRead: '/Data Store Read1' + * RelationalOperator: '/Relational Operator' + */ + for (i = 0; i < 9; i++) { + rtb_RelationalOperator_j[i] = + (rtDW.Actuator_Ch0_Status_Model.in_Act_Stall_Slave[i] == 1); + } + + /* End of RelationalOperator: '/Relational Operator1' */ + + /* Logic: '/Logical Operator2' incorporates: + * RelationalOperator: '/Relational Operator' + */ + rtb_LogicalOperator1 = rtb_RelationalOperator_j[0]; + for (i = 0; i < 8; i++) { + rtb_LogicalOperator1 = (rtb_LogicalOperator1 || rtb_RelationalOperator_j[i + + 1]); + } + + /* RelationalOperator: '/Relational Operator' incorporates: + * DataStoreRead: '/Data Store Read1' + */ + for (i = 0; i < 9; i++) { + rtb_RelationalOperator_j[i] = + (rtDW.Actuator_Ch0_Status_Model.in_CPOS_ALL[i] == 6000); + } + + /* End of RelationalOperator: '/Relational Operator' */ + + /* Logic: '/Logical Operator1' incorporates: + * RelationalOperator: '/Relational Operator' + */ + rtb_LogicalOperator1_f = rtb_RelationalOperator_j[0]; + for (i = 0; i < 8; i++) { + rtb_LogicalOperator1_f = (rtb_LogicalOperator1_f || + rtb_RelationalOperator_j[i + 1]); + } + + /* If: '/If2' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + * DataTypeConversion: '/Data Type Conversion' + * DataTypeConversion: '/Data Type Conversion1' + * Logic: '/Logical Operator' + * Logic: '/Logical Operator1' + * Logic: '/Logical Operator2' + */ + if ((rtDW.Actuator_Ch0_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch0_Status_Model.Error_Connect == 0) && + (rtb_LogicalOperator1 || rtb_LogicalOperator1_f)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * Sum: '/step inc' + */ + rtB.Merge = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + for (i = 0; i < 9; i++) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + rtb_y_ey[i] = rtDW.Actuator_Ch0_Status_Model.in_CPOS_ALL[i]; + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } + + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* MATLAB Function: '/MIN POSITION' incorporates: + * DataStoreRead: '/Data Store Read3' + */ + MINPOSITION_g(rtb_y_ey, rtDW.LOGGER_LIN); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3(rtb_Switch_l5, &rtB.Merge); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If2' */ + /* End of Outputs for SubSystem: '/Check Stall Max' */ + break; + + case 9: + break; + } + + /* End of SwitchCase: '/Switch Case' */ + + /* DataStoreWrite: '/Finish write stepSig' */ + rtDW.stepSig_private = rtB.Merge; + + /* MATLAB Function: '/Write Ignition' incorporates: + * DataStoreRead: '/Data Store Read3' + */ + WriteIgnition(rtDW.LOGGER_LIN, rtb_Switch_l5); + + /* Switch: '/Switch' incorporates: + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read' + * DataStoreRead: '/Data Store Read2' + */ + if (rtDW.stepSig_private_c > 0) { + rtb_Switch_l5 = rtDW.stepSig_private_c; + } else { + rtb_Switch_l5 = 1; + } + + /* End of Switch: '/Switch' */ + + /* SwitchCase: '/Switch Case' */ + switch (rtb_Switch_l5) { + case 1: + /* Outputs for IfAction SubSystem: '/Stop Mode' incorporates: + * ActionPort: '/Action Port' + */ + /* If: '/If1' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + */ + if ((rtDW.Actuator_Ch1_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch1_Status_Model.Error_Connect == 0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* BusCreator: '/Bus Creator' incorporates: + * DataStoreWrite: '/Data Store Write' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch1_Command_Model.POS[i] = 0U; + Actuator_Ch1_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch1_Command_Model.MODE[i] = 2U; + Actuator_Ch1_Command_Model.COM[i] = 1U; + Actuator_Ch1_Command_Model.Stall_SET[i] = 0U; + Actuator_Ch1_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch1_Command_Model.Autos_SET[i] = 0U; + Actuator_Ch1_Command_Model.Speed_SET[i] = 0U; + Actuator_Ch1_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * Sum: '/step inc' + */ + rtB.Merge_c = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3_m(rtb_Switch_l5, &rtB.Merge_c); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If1' */ + /* End of Outputs for SubSystem: '/Stop Mode' */ + break; + + case 2: + /* Outputs for IfAction SubSystem: '/Initial CPOS Min' incorporates: + * ActionPort: '/Action Port' + */ + /* If: '/If' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + */ + if ((rtDW.Actuator_Ch1_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch1_Status_Model.Error_Connect == 0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem' incorporates: + * ActionPort: '/Action Port' + */ + /* BusCreator: '/Bus Creator' incorporates: + * DataStoreWrite: '/Data Store Write2' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch1_Command_Model.POS[i] = 6000U; + Actuator_Ch1_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch1_Command_Model.MODE[i] = 0U; + Actuator_Ch1_Command_Model.COM[i] = 2U; + Actuator_Ch1_Command_Model.Stall_SET[i] = 0U; + Actuator_Ch1_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch1_Command_Model.Autos_SET[i] = 0U; + Actuator_Ch1_Command_Model.Speed_SET[i] = 0U; + Actuator_Ch1_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* MATLAB Function: '/Initial CPOS Min' incorporates: + * Constant: '/Constant' + * DataStoreRead: '/Data Store Read3' + * Sum: '/step inc' + */ + InitialCPOSMin(rtDW.LOGGER_LIN, (int8_t)(rtb_Switch_l5 + 1), &rtb_y_fb); + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * Merge: '/Merge' + * SignalConversion generated from: '/step' + * Sum: '/step inc' + */ + rtB.Merge_c = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + /* BusCreator: '/Bus Creator' incorporates: + * DataStoreWrite: '/Data Store Write' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch1_Command_Model.POS[i] = 0U; + Actuator_Ch1_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch1_Command_Model.MODE[i] = 0U; + Actuator_Ch1_Command_Model.COM[i] = 0U; + Actuator_Ch1_Command_Model.Stall_SET[i] = 0U; + Actuator_Ch1_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch1_Command_Model.Autos_SET[i] = 0U; + Actuator_Ch1_Command_Model.Speed_SET[i] = 0U; + Actuator_Ch1_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* Merge: '/Merge' incorporates: + * Merge: '/Merge' + * SignalConversion generated from: '/stepIn1' + */ + rtB.Merge_c = rtb_Switch_l5; + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If' */ + /* End of Outputs for SubSystem: '/Initial CPOS Min' */ + break; + + case 3: + /* Outputs for IfAction SubSystem: '/Normal Mode' incorporates: + * ActionPort: '/Action Port' + */ + /* If: '/If1' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + */ + if ((rtDW.Actuator_Ch1_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch1_Status_Model.Error_Connect == 0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* BusCreator: '/Bus Creator' incorporates: + * DataStoreWrite: '/Data Store Write1' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch1_Command_Model.POS[i] = 0U; + Actuator_Ch1_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch1_Command_Model.MODE[i] = 0U; + Actuator_Ch1_Command_Model.COM[i] = 1U; + Actuator_Ch1_Command_Model.Stall_SET[i] = 0U; + Actuator_Ch1_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch1_Command_Model.Autos_SET[i] = 0U; + Actuator_Ch1_Command_Model.Speed_SET[i] = 0U; + Actuator_Ch1_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* MATLAB Function: '/Normal Mode' incorporates: + * Constant: '/Constant' + * DataStoreRead: '/Data Store Read3' + * Sum: '/step inc' + */ + NormalMode(rtDW.LOGGER_LIN, (int8_t)(rtb_Switch_l5 + 1), &rtb_y_fb); + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * SignalConversion generated from: '/step' + * Sum: '/step inc' + */ + rtB.Merge_c = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3_m(rtb_Switch_l5, &rtB.Merge_c); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If1' */ + /* End of Outputs for SubSystem: '/Normal Mode' */ + break; + + case 4: + /* Outputs for IfAction SubSystem: '/Move to position Min' incorporates: + * ActionPort: '/Action Port' + */ + /* If: '/If1' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + */ + if ((rtDW.Actuator_Ch1_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch1_Status_Model.Error_Connect == 0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* BusCreator: '/Bus Creator' incorporates: + * Constant: '/Constant1' + * Constant: '/Constant10' + * Constant: '/Constant11' + * Constant: '/Constant14' + * Constant: '/Constant2' + * Constant: '/Constant9' + * DataStoreWrite: '/Data Store Write7' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch1_Command_Model.POS[i] = 1U; + Actuator_Ch1_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch1_Command_Model.MODE[i] = 0U; + Actuator_Ch1_Command_Model.COM[i] = 3U; + Actuator_Ch1_Command_Model.Stall_SET[i] = 1U; + Actuator_Ch1_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch1_Command_Model.Autos_SET[i] = 1U; + Actuator_Ch1_Command_Model.Speed_SET[i] = 3U; + Actuator_Ch1_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* MATLAB Function: '/Move to position Min' incorporates: + * Constant: '/Constant' + * DataStoreRead: '/Data Store Read3' + * Sum: '/step inc' + */ + MovetopositionMin(rtDW.LOGGER_LIN, (int8_t)(rtb_Switch_l5 + 1), &rtb_y_fb); + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * SignalConversion generated from: '/step' + * Sum: '/step inc' + */ + rtB.Merge_c = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3_m(rtb_Switch_l5, &rtB.Merge_c); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If1' */ + /* End of Outputs for SubSystem: '/Move to position Min' */ + break; + + case 5: + /* Outputs for IfAction SubSystem: '/Check Stall Min' incorporates: + * ActionPort: '/Action Port' + */ + /* RelationalOperator: '/Relational Operator1' incorporates: + * DataStoreRead: '/Data Store Read1' + * RelationalOperator: '/Relational Operator' + */ + for (i = 0; i < 9; i++) { + rtb_RelationalOperator_j[i] = + (rtDW.Actuator_Ch1_Status_Model.in_Act_Stall_Slave[i] == 1); + } + + /* End of RelationalOperator: '/Relational Operator1' */ + + /* Logic: '/Logical Operator2' incorporates: + * RelationalOperator: '/Relational Operator' + */ + rtb_LogicalOperator1 = rtb_RelationalOperator_j[0]; + for (i = 0; i < 8; i++) { + rtb_LogicalOperator1 = (rtb_LogicalOperator1 || rtb_RelationalOperator_j[i + + 1]); + } + + /* RelationalOperator: '/Relational Operator' incorporates: + * DataStoreRead: '/Data Store Read1' + */ + for (i = 0; i < 9; i++) { + rtb_RelationalOperator_j[i] = + (rtDW.Actuator_Ch1_Status_Model.in_CPOS_ALL[i] == 1); + } + + /* End of RelationalOperator: '/Relational Operator' */ + + /* Logic: '/Logical Operator1' incorporates: + * RelationalOperator: '/Relational Operator' + */ + rtb_LogicalOperator1_f = rtb_RelationalOperator_j[0]; + for (i = 0; i < 8; i++) { + rtb_LogicalOperator1_f = (rtb_LogicalOperator1_f || + rtb_RelationalOperator_j[i + 1]); + } + + /* If: '/If2' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + * DataTypeConversion: '/Data Type Conversion' + * DataTypeConversion: '/Data Type Conversion1' + * Logic: '/Logical Operator' + * Logic: '/Logical Operator1' + * Logic: '/Logical Operator2' + */ + if ((rtDW.Actuator_Ch1_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch1_Status_Model.Error_Connect == 0) && + (rtb_LogicalOperator1 || rtb_LogicalOperator1_f)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * Sum: '/step inc' + */ + rtB.Merge_c = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + for (i = 0; i < 9; i++) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + rtb_y_ey[i] = rtDW.Actuator_Ch1_Status_Model.in_CPOS_ALL[i]; + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } + + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* MATLAB Function: '/MIN POSITION' incorporates: + * DataStoreRead: '/Data Store Read3' + */ + MINPOSITION(rtb_y_ey, rtDW.LOGGER_LIN); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3_m(rtb_Switch_l5, &rtB.Merge_c); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If2' */ + /* End of Outputs for SubSystem: '/Check Stall Min' */ + break; + + case 6: + /* Outputs for IfAction SubSystem: '/Initial CPOS Max' incorporates: + * ActionPort: '/Action Port' + */ + /* If: '/If1' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + */ + if ((rtDW.Actuator_Ch1_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch1_Status_Model.Error_Connect == 0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* BusCreator: '/Bus Creator' incorporates: + * DataStoreWrite: '/Data Store Write2' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch1_Command_Model.POS[i] = 1U; + Actuator_Ch1_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch1_Command_Model.MODE[i] = 0U; + Actuator_Ch1_Command_Model.COM[i] = 2U; + Actuator_Ch1_Command_Model.Stall_SET[i] = 0U; + Actuator_Ch1_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch1_Command_Model.Autos_SET[i] = 0U; + Actuator_Ch1_Command_Model.Speed_SET[i] = 0U; + Actuator_Ch1_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* MATLAB Function: '/Initial CPOS Max' incorporates: + * Constant: '/Constant' + * DataStoreRead: '/Data Store Read3' + * Sum: '/step inc' + */ + InitialCPOSMax(rtDW.LOGGER_LIN, (int8_t)(rtb_Switch_l5 + 1), &rtb_y_fb); + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * SignalConversion generated from: '/step' + * Sum: '/step inc' + */ + rtB.Merge_c = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3_m(rtb_Switch_l5, &rtB.Merge_c); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If1' */ + /* End of Outputs for SubSystem: '/Initial CPOS Max' */ + break; + + case 7: + /* Outputs for IfAction SubSystem: '/Move to position Max' incorporates: + * ActionPort: '/Action Port' + */ + /* If: '/If1' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + */ + if ((rtDW.Actuator_Ch1_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch1_Status_Model.Error_Connect == 0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* BusCreator: '/Bus Creator' incorporates: + * Constant: '/Constant1' + * Constant: '/Constant10' + * Constant: '/Constant11' + * Constant: '/Constant14' + * Constant: '/Constant2' + * Constant: '/Constant9' + * DataStoreWrite: '/Data Store Write7' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch1_Command_Model.POS[i] = 6000U; + Actuator_Ch1_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch1_Command_Model.MODE[i] = 0U; + Actuator_Ch1_Command_Model.COM[i] = 3U; + Actuator_Ch1_Command_Model.Stall_SET[i] = 1U; + Actuator_Ch1_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch1_Command_Model.Autos_SET[i] = 1U; + Actuator_Ch1_Command_Model.Speed_SET[i] = 3U; + Actuator_Ch1_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* MATLAB Function: '/Move to position Max' incorporates: + * Constant: '/Constant' + * DataStoreRead: '/Data Store Read3' + * Sum: '/step inc' + */ + MovetopositionMax((int8_t)(rtb_Switch_l5 + 1), rtDW.LOGGER_LIN, &rtb_y_fb); + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * SignalConversion generated from: '/step' + * Sum: '/step inc' + */ + rtB.Merge_c = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3_m(rtb_Switch_l5, &rtB.Merge_c); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If1' */ + /* End of Outputs for SubSystem: '/Move to position Max' */ + break; + + case 8: + /* Outputs for IfAction SubSystem: '/Check Stall Max' incorporates: + * ActionPort: '/Action Port' + */ + /* RelationalOperator: '/Relational Operator1' incorporates: + * DataStoreRead: '/Data Store Read1' + * RelationalOperator: '/Relational Operator' + */ + for (i = 0; i < 9; i++) { + rtb_RelationalOperator_j[i] = + (rtDW.Actuator_Ch1_Status_Model.in_Act_Stall_Slave[i] == 1); + } + + /* End of RelationalOperator: '/Relational Operator1' */ + + /* Logic: '/Logical Operator2' incorporates: + * RelationalOperator: '/Relational Operator' + */ + rtb_LogicalOperator1 = rtb_RelationalOperator_j[0]; + for (i = 0; i < 8; i++) { + rtb_LogicalOperator1 = (rtb_LogicalOperator1 || rtb_RelationalOperator_j[i + + 1]); + } + + /* RelationalOperator: '/Relational Operator' incorporates: + * DataStoreRead: '/Data Store Read1' + */ + for (i = 0; i < 9; i++) { + rtb_RelationalOperator_j[i] = + (rtDW.Actuator_Ch1_Status_Model.in_CPOS_ALL[i] == 6000); + } + + /* End of RelationalOperator: '/Relational Operator' */ + + /* Logic: '/Logical Operator1' incorporates: + * RelationalOperator: '/Relational Operator' + */ + rtb_LogicalOperator1_f = rtb_RelationalOperator_j[0]; + for (i = 0; i < 8; i++) { + rtb_LogicalOperator1_f = (rtb_LogicalOperator1_f || + rtb_RelationalOperator_j[i + 1]); + } + + /* If: '/If2' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + * DataTypeConversion: '/Data Type Conversion' + * DataTypeConversion: '/Data Type Conversion1' + * Logic: '/Logical Operator' + * Logic: '/Logical Operator1' + * Logic: '/Logical Operator2' + */ + if ((rtDW.Actuator_Ch1_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch1_Status_Model.Error_Connect == 0) && + (rtb_LogicalOperator1 || rtb_LogicalOperator1_f)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * Sum: '/step inc' + */ + rtB.Merge_c = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + for (i = 0; i < 9; i++) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + rtb_y_ey[i] = rtDW.Actuator_Ch1_Status_Model.in_CPOS_ALL[i]; + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } + + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* MATLAB Function: '/MIN POSITION' incorporates: + * DataStoreRead: '/Data Store Read3' + */ + MINPOSITION_g(rtb_y_ey, rtDW.LOGGER_LIN); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3_m(rtb_Switch_l5, &rtB.Merge_c); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If2' */ + /* End of Outputs for SubSystem: '/Check Stall Max' */ + break; + + case 9: + break; + } + + /* End of SwitchCase: '/Switch Case' */ + + /* DataStoreWrite: '/Finish write stepSig' */ + rtDW.stepSig_private_c = rtB.Merge_c; + + /* MATLAB Function: '/Write Ignition' incorporates: + * DataStoreRead: '/Data Store Read3' + */ + WriteIgnition(rtDW.LOGGER_LIN, rtb_Switch_l5); + + /* Switch: '/Switch' incorporates: + * Constant: '/Constant1' + * DataStoreRead: '/Data Store Read' + * DataStoreRead: '/Data Store Read2' + */ + if (rtDW.stepSig_private_p > 0) { + rtb_Switch_l5 = rtDW.stepSig_private_p; + } else { + rtb_Switch_l5 = 1; + } + + /* End of Switch: '/Switch' */ + + /* SwitchCase: '/Switch Case' */ + switch (rtb_Switch_l5) { + case 1: + /* Outputs for IfAction SubSystem: '/Stop Mode' incorporates: + * ActionPort: '/Action Port' + */ + /* If: '/If1' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + */ + if ((rtDW.Actuator_Ch2_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch2_Status_Model.Error_Connect == 0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* BusCreator: '/Bus Creator' incorporates: + * DataStoreWrite: '/Data Store Write' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch2_Command_Model.POS[i] = 0U; + Actuator_Ch2_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch2_Command_Model.MODE[i] = 2U; + Actuator_Ch2_Command_Model.COM[i] = 1U; + Actuator_Ch2_Command_Model.Stall_SET[i] = 0U; + Actuator_Ch2_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch2_Command_Model.Autos_SET[i] = 0U; + Actuator_Ch2_Command_Model.Speed_SET[i] = 0U; + Actuator_Ch2_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * Sum: '/step inc' + */ + rtB.Merge_cs = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3_n(rtb_Switch_l5, &rtB.Merge_cs); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If1' */ + /* End of Outputs for SubSystem: '/Stop Mode' */ + break; + + case 2: + /* Outputs for IfAction SubSystem: '/Initial CPOS Min' incorporates: + * ActionPort: '/Action Port' + */ + /* MATLAB Function: '/Write Ignition' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreRead: '/Data Store Read3' + * DataStoreWrite: '/Data Store Write' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_LIN != 0.0) { + /* : fprintf('LIN 3 busy = %u\n',step); */ + printf("LIN 3 busy = %u\n", rtDW.Actuator_Ch2_Status_Model.Busy); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write Ignition' */ + + /* MATLAB Function: '/Write Ignition1' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreRead: '/Data Store Read2' + * DataStoreWrite: '/Data Store Write1' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_LIN != 0.0) { + /* : fprintf('LIN 3 Error_Connect = %u\n',step); */ + printf("LIN 3 Error_Connect = %u\n", + rtDW.Actuator_Ch2_Status_Model.Error_Connect); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write Ignition1' */ + + /* If: '/If' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + */ + if ((rtDW.Actuator_Ch2_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch2_Status_Model.Error_Connect == 0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem' incorporates: + * ActionPort: '/Action Port' + */ + /* BusCreator: '/Bus Creator' incorporates: + * DataStoreWrite: '/Data Store Write2' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch2_Command_Model.POS[i] = 6000U; + Actuator_Ch2_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch2_Command_Model.MODE[i] = 0U; + Actuator_Ch2_Command_Model.COM[i] = 2U; + Actuator_Ch2_Command_Model.Stall_SET[i] = 0U; + Actuator_Ch2_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch2_Command_Model.Autos_SET[i] = 0U; + Actuator_Ch2_Command_Model.Speed_SET[i] = 0U; + Actuator_Ch2_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* MATLAB Function: '/Initial CPOS Min' incorporates: + * DataStoreRead: '/Data Store Read3' + */ + /* : y = step; */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_LIN != 0.0) { + /* : fprintf('LIN 3 SIMULINK Initial CPOS Min - 6000\n'); */ + printf("LIN 3 SIMULINK Initial CPOS Min - 6000\n"); + fflush(stdout); + } + + /* End of MATLAB Function: '/Initial CPOS Min' */ + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * Merge: '/Merge' + * SignalConversion generated from: '/step' + * Sum: '/step inc' + */ + rtB.Merge_cs = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + /* BusCreator: '/Bus Creator' incorporates: + * DataStoreWrite: '/Data Store Write' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch2_Command_Model.POS[i] = 0U; + Actuator_Ch2_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch2_Command_Model.MODE[i] = 0U; + Actuator_Ch2_Command_Model.COM[i] = 0U; + Actuator_Ch2_Command_Model.Stall_SET[i] = 0U; + Actuator_Ch2_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch2_Command_Model.Autos_SET[i] = 0U; + Actuator_Ch2_Command_Model.Speed_SET[i] = 0U; + Actuator_Ch2_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* Merge: '/Merge' incorporates: + * Merge: '/Merge' + * SignalConversion generated from: '/stepIn1' + */ + rtB.Merge_cs = rtb_Switch_l5; + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If' */ + /* End of Outputs for SubSystem: '/Initial CPOS Min' */ + break; + + case 3: + /* Outputs for IfAction SubSystem: '/Normal Mode' incorporates: + * ActionPort: '/Action Port' + */ + /* If: '/If1' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + */ + if ((rtDW.Actuator_Ch2_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch2_Status_Model.Error_Connect == 0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* BusCreator: '/Bus Creator' incorporates: + * DataStoreWrite: '/Data Store Write1' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch2_Command_Model.POS[i] = 0U; + Actuator_Ch2_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch2_Command_Model.MODE[i] = 0U; + Actuator_Ch2_Command_Model.COM[i] = 1U; + Actuator_Ch2_Command_Model.Stall_SET[i] = 0U; + Actuator_Ch2_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch2_Command_Model.Autos_SET[i] = 0U; + Actuator_Ch2_Command_Model.Speed_SET[i] = 0U; + Actuator_Ch2_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* MATLAB Function: '/Normal Mode' incorporates: + * DataStoreRead: '/Data Store Read3' + */ + /* : y = step; */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_LIN != 0.0) { + /* : fprintf('LIN 3 SIMULINK Normal Mode\n'); */ + printf("LIN 3 SIMULINK Normal Mode\n"); + fflush(stdout); + } + + /* End of MATLAB Function: '/Normal Mode' */ + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * SignalConversion generated from: '/step' + * Sum: '/step inc' + */ + rtB.Merge_cs = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3_n(rtb_Switch_l5, &rtB.Merge_cs); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If1' */ + /* End of Outputs for SubSystem: '/Normal Mode' */ + break; + + case 4: + /* Outputs for IfAction SubSystem: '/Move to position Min' incorporates: + * ActionPort: '/Action Port' + */ + /* If: '/If1' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + */ + if ((rtDW.Actuator_Ch2_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch2_Status_Model.Error_Connect == 0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* BusCreator: '/Bus Creator' incorporates: + * Constant: '/Constant1' + * Constant: '/Constant10' + * Constant: '/Constant11' + * Constant: '/Constant14' + * Constant: '/Constant2' + * Constant: '/Constant9' + * DataStoreWrite: '/Data Store Write7' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch2_Command_Model.POS[i] = 1U; + Actuator_Ch2_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch2_Command_Model.MODE[i] = 0U; + Actuator_Ch2_Command_Model.COM[i] = 3U; + Actuator_Ch2_Command_Model.Stall_SET[i] = 1U; + Actuator_Ch2_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch2_Command_Model.Autos_SET[i] = 1U; + Actuator_Ch2_Command_Model.Speed_SET[i] = 3U; + Actuator_Ch2_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* MATLAB Function: '/Move to position Min' incorporates: + * Constant: '/Constant' + * DataStoreRead: '/Data Store Read3' + * Sum: '/step inc' + */ + MovetopositionMin(rtDW.LOGGER_LIN, (int8_t)(rtb_Switch_l5 + 1), &rtb_y_fb); + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * SignalConversion generated from: '/step' + * Sum: '/step inc' + */ + rtB.Merge_cs = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3_n(rtb_Switch_l5, &rtB.Merge_cs); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If1' */ + /* End of Outputs for SubSystem: '/Move to position Min' */ + break; + + case 5: + /* Outputs for IfAction SubSystem: '/Check Stall Min' incorporates: + * ActionPort: '/Action Port' + */ + /* RelationalOperator: '/Relational Operator1' incorporates: + * DataStoreRead: '/Data Store Read1' + * RelationalOperator: '/Relational Operator' + */ + for (i = 0; i < 9; i++) { + rtb_RelationalOperator_j[i] = + (rtDW.Actuator_Ch2_Status_Model.in_Act_Stall_Slave[i] == 1); + } + + /* End of RelationalOperator: '/Relational Operator1' */ + + /* Logic: '/Logical Operator2' incorporates: + * RelationalOperator: '/Relational Operator' + */ + rtb_LogicalOperator1 = rtb_RelationalOperator_j[0]; + for (i = 0; i < 8; i++) { + rtb_LogicalOperator1 = (rtb_LogicalOperator1 || rtb_RelationalOperator_j[i + + 1]); + } + + /* RelationalOperator: '/Relational Operator' incorporates: + * DataStoreRead: '/Data Store Read1' + */ + for (i = 0; i < 9; i++) { + rtb_RelationalOperator_j[i] = + (rtDW.Actuator_Ch2_Status_Model.in_CPOS_ALL[i] == 1); + } + + /* End of RelationalOperator: '/Relational Operator' */ + + /* Logic: '/Logical Operator1' incorporates: + * RelationalOperator: '/Relational Operator' + */ + rtb_LogicalOperator1_f = rtb_RelationalOperator_j[0]; + for (i = 0; i < 8; i++) { + rtb_LogicalOperator1_f = (rtb_LogicalOperator1_f || + rtb_RelationalOperator_j[i + 1]); + } + + /* If: '/If2' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + * DataTypeConversion: '/Data Type Conversion' + * DataTypeConversion: '/Data Type Conversion1' + * Logic: '/Logical Operator' + * Logic: '/Logical Operator1' + * Logic: '/Logical Operator2' + */ + if ((rtDW.Actuator_Ch2_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch2_Status_Model.Error_Connect == 0) && + (rtb_LogicalOperator1 || rtb_LogicalOperator1_f)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * Sum: '/step inc' + */ + rtB.Merge_cs = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + for (i = 0; i < 9; i++) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + rtb_y_ey[i] = rtDW.Actuator_Ch2_Status_Model.in_CPOS_ALL[i]; + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } + + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* MATLAB Function: '/MIN POSITION' incorporates: + * DataStoreRead: '/Data Store Read3' + */ + MINPOSITION(rtb_y_ey, rtDW.LOGGER_LIN); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3_n(rtb_Switch_l5, &rtB.Merge_cs); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If2' */ + /* End of Outputs for SubSystem: '/Check Stall Min' */ + break; + + case 6: + /* Outputs for IfAction SubSystem: '/Initial CPOS Max' incorporates: + * ActionPort: '/Action Port' + */ + /* If: '/If1' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + */ + if ((rtDW.Actuator_Ch2_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch2_Status_Model.Error_Connect == 0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* BusCreator: '/Bus Creator' incorporates: + * DataStoreWrite: '/Data Store Write2' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch2_Command_Model.POS[i] = 1U; + Actuator_Ch2_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch2_Command_Model.MODE[i] = 0U; + Actuator_Ch2_Command_Model.COM[i] = 2U; + Actuator_Ch2_Command_Model.Stall_SET[i] = 0U; + Actuator_Ch2_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch2_Command_Model.Autos_SET[i] = 0U; + Actuator_Ch2_Command_Model.Speed_SET[i] = 0U; + Actuator_Ch2_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* MATLAB Function: '/Initial CPOS Max' incorporates: + * Constant: '/Constant' + * DataStoreRead: '/Data Store Read3' + * Sum: '/step inc' + */ + InitialCPOSMax(rtDW.LOGGER_LIN, (int8_t)(rtb_Switch_l5 + 1), &rtb_y_fb); + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * SignalConversion generated from: '/step' + * Sum: '/step inc' + */ + rtB.Merge_cs = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3_n(rtb_Switch_l5, &rtB.Merge_cs); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If1' */ + /* End of Outputs for SubSystem: '/Initial CPOS Max' */ + break; + + case 7: + /* Outputs for IfAction SubSystem: '/Move to position Max' incorporates: + * ActionPort: '/Action Port' + */ + /* If: '/If1' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + */ + if ((rtDW.Actuator_Ch2_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch2_Status_Model.Error_Connect == 0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* BusCreator: '/Bus Creator' incorporates: + * Constant: '/Constant1' + * Constant: '/Constant10' + * Constant: '/Constant11' + * Constant: '/Constant14' + * Constant: '/Constant2' + * Constant: '/Constant9' + * DataStoreWrite: '/Data Store Write7' + * SignalConversion generated from: '/Bus Creator' + * */ + for (i = 0; i < 9; i++) { + Actuator_Ch2_Command_Model.POS[i] = 6000U; + Actuator_Ch2_Command_Model.BUS_ADR[i] = 0U; + Actuator_Ch2_Command_Model.MODE[i] = 0U; + Actuator_Ch2_Command_Model.COM[i] = 3U; + Actuator_Ch2_Command_Model.Stall_SET[i] = 1U; + Actuator_Ch2_Command_Model.Lnoise_SET[i] = 0U; + Actuator_Ch2_Command_Model.Autos_SET[i] = 1U; + Actuator_Ch2_Command_Model.Speed_SET[i] = 3U; + Actuator_Ch2_Command_Model.Coils_Stop_SET[i] = 0U; + } + + /* End of BusCreator: '/Bus Creator' */ + + /* MATLAB Function: '/Move to position Max' incorporates: + * Constant: '/Constant' + * DataStoreRead: '/Data Store Read3' + * Sum: '/step inc' + */ + MovetopositionMax((int8_t)(rtb_Switch_l5 + 1), rtDW.LOGGER_LIN, &rtb_y_fb); + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * SignalConversion generated from: '/step' + * Sum: '/step inc' + */ + rtB.Merge_cs = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3_n(rtb_Switch_l5, &rtB.Merge_cs); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If1' */ + /* End of Outputs for SubSystem: '/Move to position Max' */ + break; + + case 8: + /* Outputs for IfAction SubSystem: '/Check Stall Max' incorporates: + * ActionPort: '/Action Port' + */ + /* RelationalOperator: '/Relational Operator1' incorporates: + * DataStoreRead: '/Data Store Read1' + * RelationalOperator: '/Relational Operator' + */ + for (i = 0; i < 9; i++) { + rtb_RelationalOperator_j[i] = + (rtDW.Actuator_Ch2_Status_Model.in_Act_Stall_Slave[i] == 1); + } + + /* End of RelationalOperator: '/Relational Operator1' */ + + /* Logic: '/Logical Operator2' incorporates: + * RelationalOperator: '/Relational Operator' + */ + rtb_LogicalOperator1 = rtb_RelationalOperator_j[0]; + for (i = 0; i < 8; i++) { + rtb_LogicalOperator1 = (rtb_LogicalOperator1 || rtb_RelationalOperator_j[i + + 1]); + } + + /* RelationalOperator: '/Relational Operator' incorporates: + * DataStoreRead: '/Data Store Read1' + */ + for (i = 0; i < 9; i++) { + rtb_RelationalOperator_j[i] = + (rtDW.Actuator_Ch2_Status_Model.in_CPOS_ALL[i] == 6000); + } + + /* End of RelationalOperator: '/Relational Operator' */ + + /* Logic: '/Logical Operator1' incorporates: + * RelationalOperator: '/Relational Operator' + */ + rtb_LogicalOperator1_f = rtb_RelationalOperator_j[0]; + for (i = 0; i < 8; i++) { + rtb_LogicalOperator1_f = (rtb_LogicalOperator1_f || + rtb_RelationalOperator_j[i + 1]); + } + + /* If: '/If2' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreWrite: '/Data Store Write' + * DataStoreWrite: '/Data Store Write1' + * DataTypeConversion: '/Data Type Conversion' + * DataTypeConversion: '/Data Type Conversion1' + * Logic: '/Logical Operator' + * Logic: '/Logical Operator1' + * Logic: '/Logical Operator2' + */ + if ((rtDW.Actuator_Ch2_Status_Model.Busy == 0) && + (rtDW.Actuator_Ch2_Status_Model.Error_Connect == 0) && + (rtb_LogicalOperator1 || rtb_LogicalOperator1_f)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * Sum: '/step inc' + */ + rtB.Merge_cs = (int8_t)(rtb_Switch_l5 + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + for (i = 0; i < 9; i++) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + rtb_y_ey[i] = rtDW.Actuator_Ch2_Status_Model.in_CPOS_ALL[i]; + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } + + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* MATLAB Function: '/MIN POSITION' incorporates: + * DataStoreRead: '/Data Store Read3' + */ + MINPOSITION_g(rtb_y_ey, rtDW.LOGGER_LIN); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3_n(rtb_Switch_l5, &rtB.Merge_cs); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If2' */ + /* End of Outputs for SubSystem: '/Check Stall Max' */ + break; + + case 9: + break; + } + + /* End of SwitchCase: '/Switch Case' */ + + /* Outport: '/Out1' incorporates: + * DataStoreRead: '/Data Store Read10' + */ + rtY.Out1 = CCU_Errors_Model; + + /* DataStoreWrite: '/Finish write stepSig' */ + rtDW.stepSig_private_p = rtB.Merge_cs; + + /* MATLAB Function: '/Write Ignition' incorporates: + * DataStoreRead: '/Data Store Read3' + */ + /* : if(LOGGER) */ + if (rtDW.LOGGER_LIN != 0.0) { + /* : fprintf('LIN 3 step = %d\n',step); */ + printf("LIN 3 step = %d\n", rtb_Switch_l5); + fflush(stdout); + } + + /* End of MATLAB Function: '/Write Ignition' */ + + /* DataStoreWrite: '/Data Store Write' incorporates: + * Constant: '/Constant' + */ + rtDW.LOGGER_LIN = 0.0; + + /* Update for UnitDelay: '/Cond_prev_private ' */ + rtDW.Cond_prev_private_DSTATE = rtb_FailCond; + + /* Update for UnitDelay: '/Cond_prev_private ' */ + rtDW.Cond_prev_private_DSTATE_h = rtb_FailCond_f; + + /* Update for UnitDelay: '/Cond_prev_private ' */ + rtDW.Cond_prev_private_DSTATE_i = rtb_FailCond_g; + + /* Update for UnitDelay: '/Cond_prev_private ' */ + rtDW.Cond_prev_private_DSTATE_e = rtb_FailCond_mg; + + /* Update for UnitDelay: '/Cond_prev_private ' */ + rtDW.Cond_prev_private_DSTATE_c = rtb_FailCond_e; + + /* Update for UnitDelay: '/Cond_prev_private ' */ + rtDW.Cond_prev_private_DSTATE_b = rtb_FailCond_a; + + /* Update for UnitDelay: '/Cond_prev_private ' */ + rtDW.Cond_prev_private_DSTATE_j = rtb_FailCond_l; + + /* Update for UnitDelay: '/Cond_prev_private ' */ + rtDW.Cond_prev_private_DSTATE_f = rtb_FailCond_b; +} + +/* Model initialize function */ +void HVAC_model_initialize(void) +{ + /* (no initialization code required) */ +} + +/* Model terminate function */ +void HVAC_model_terminate(void) +{ + /* (no terminate code required) */ +} + +/* + * File trailer for generated code. + * + * [EOF] + */ diff --git a/HVAC_model.h b/HVAC_model.h old mode 100644 new mode 100755 index ebc1cba..ee085f5 --- a/HVAC_model.h +++ b/HVAC_model.h @@ -1,274 +1,443 @@ -/* - * File: HVAC_model.h - * - * Code generated for Simulink model 'HVAC_model'. - * - * Model version : 1.613 - * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 - * C/C++ source code generated on : Mon Feb 16 16:08:44 2026 - * - * Target selection: ert.tlc - * Embedded hardware selection: ARM Compatible->ARM Cortex-M - * Emulation hardware selection: - * Differs from embedded hardware (MATLAB Host) - * Code generation objectives: Unspecified - * Validation result: Not run - */ - -#ifndef HVAC_model_h_ -#define HVAC_model_h_ -#ifndef HVAC_model_COMMON_INCLUDES_ -#define HVAC_model_COMMON_INCLUDES_ -#include -#include -#include -#endif /* HVAC_model_COMMON_INCLUDES_ */ - -#include "HVAC_model_types.h" - -/* Macros for accessing real-time model data structure */ -#ifndef rtmGetErrorStatus -#define rtmGetErrorStatus(rtm) ((rtm)->errorStatus) -#endif - -#ifndef rtmSetErrorStatus -#define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val)) -#endif - -/* user code (top of header file) */ -#include - -/* Block signals (default storage) */ -typedef struct { - int8_t Merge; /* '/Merge' */ - int8_t Merge_c; /* '/Merge' */ - int8_t Merge_cs; /* '/Merge' */ -} B; - -/* Block states (default storage) for system '' */ -typedef struct { - ActuatorCmdBusInput Actuator_Ch0_Status_Model;/* '/Data Store Memory17' */ - ActuatorCmdBusInput Actuator_Ch1_Status_Model;/* '/Data Store Memory17' */ - ActuatorCmdBusInput Actuator_Ch2_Status_Model;/* '/Data Store Memory17' */ - CmdBusADCData ADC_Data_Model; /* '/Data Store Memory2' */ - double LOGGER_ACP; /* '/Data Store Memory1' */ - double LOGGER_LIN; /* '/Data Store Memory1' */ - CmdBusADCDataKey ADC_Key_Data_Model; /* '/Data Store Memory3' */ - CmdBusPwm PWM_Set_Model; /* '/Data Store Memory3' */ - uint32_t t_start_delay_private_DSTATE;/* '/t_start_delay_private ' */ - uint32_t t_now; /* '/Data Store Memory5' */ - bool Cond_prev_private_DSTATE; /* '/Cond_prev_private ' */ - int8_t stepSig_private; /* '/Data Store Memory' */ - int8_t stepSig_private_c; /* '/Data Store Memory' */ - int8_t stepSig_private_p; /* '/Data Store Memory' */ -} DW; - -/* Constant parameters (default storage) */ -typedef struct { - /* Expression: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 698 694 690 686 683 679 676 672 668 665 662 658 655 652 648 645 642 639 636 632 629 626 623 620 617 615 612 609 606 603 600 598 595 592 590 587 584 582 579 577 574 571 569 566 564 562 559 557 554 552 550 547 545 543 540 538 536 534 532 529 527 525 523 521 519 517 514 512 510 508 506 504 502 500 498 496 494 492 490 489 487 485 483 481 479 477 475 474 472 470 468 466 464 463 461 459 457 456 454 452 451 449 447 445 444 442 440 439 437 436 434 432 431 429 428 426 424 423 421 420 418 417 415 414 412 411 409 408 406 405 403 402 400 399 397 396 394 393 391 390 389 387 386 384 383 382 380 379 377 376 375 373 372 371 369 368 366 365 364 362 361 360 359 357 356 355 353 352 351 349 348 347 346 344 343 342 341 339 338 337 336 334 333 332 331 330 328 327 326 325 324 322 321 320 319 318 317 315 314 313 312 311 310 308 307 306 305 304 303 302 300 299 298 297 296 295 294 293 292 290 289 288 287 286 285 284 283 282 281 280 279 278 276 275 274 273 272 271 270 269 268 267 266 265 264 263 262 261 260 259 258 257 256 255 254 253 252 251 250 249 248 247 246 245 244 243 242 241 240 239 238 237 236 235 234 233 232 231 230 229 228 227 226 225 224 223 222 221 220 219 218 217 217 216 215 214 213 212 211 210 209 208 207 206 205 204 203 202 202 201 200 199 198 197 196 195 194 193 192 192 191 190 189 188 187 186 185 184 183 183 182 181 180 179 178 177 176 175 175 174 173 172 171 170 169 168 168 167 166 165 164 163 162 161 161 160 159 158 157 156 155 155 154 153 152 151 150 149 149 148 147 146 145 144 143 143 142 141 140 139 138 138 137 136 135 134 133 133 132 131 130 129 128 128 127 126 125 124 123 123 122 121 120 119 118 118 117 116 115 114 114 113 112 111 110 109 109 108 107 106 105 105 104 103 102 101 100 100 99 98 97 96 96 95 94 93 92 91 91 90 89 88 87 87 86 85 84 83 83 82 81 80 79 78 78 77 76 75 74 74 73 72 71 70 70 69 68 67 66 66 65 64 63 62 62 61 60 59 58 58 57 56 55 54 54 53 52 51 50 50 49 48 47 46 45 45 44 43 42 41 41 40 39 38 37 37 36 35 34 33 33 32 31 30 29 29 28 27 26 25 25 24 23 22 21 21 20 19 18 17 17 16 15 14 13 13 12 11 10 9 9 8 7 6 5 5 4 3 2 1 1 0 0 -1 -2 -3 -3 -4 -5 -6 -7 -7 -8 -9 -10 -11 -12 -12 -13 -14 -15 -16 -17 -17 -18 -19 -20 -21 -22 -22 -23 -24 -25 -26 -27 -27 -28 -29 -30 -31 -32 -32 -33 -34 -35 -36 -37 -37 -38 -39 -40 -41 -42 -42 -43 -44 -45 -46 -47 -48 -48 -49 -50 -51 -52 -53 -53 -54 -55 -56 -57 -58 -59 -59 -60 -61 -62 -63 -64 -65 -66 -66 -67 -68 -69 -70 -71 -72 -73 -73 -74 -75 -76 -77 -78 -79 -80 -80 -81 -82 -83 -84 -85 -86 -87 -88 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155 -156 -157 -158 -159 -161 -162 -163 -164 -165 -166 -167 -168 -169 -170 -171 -172 -173 -175 -176 -177 -178 -179 -180 -181 -182 -183 -185 -186 -187 -188 -189 -190 -191 -193 -194 -195 -196 -197 -198 -200 -201 -202 -203 -204 -206 -207 -208 -209 -211 -212 -213 -214 -216 -217 -218 -219 -221 -222 -223 -225 -226 -227 -228 -230 -231 -232 -234 -235 -237 -238 -239 -241 -242 -243 -245 -246 -248 -249 -250 -252 -253 -255 -256 -258 -259 -261 -262 -263 -265 -266 -268 -270 -271 -273 -274 -276 -277 -279 -280 -282 -284 -285 -287 -288 -290 -292 -293 -295 -297 -299 -300 -302 -304 -305 -307 -309 -311 -313 -314 -316 -318 -320 -322 -324 -326 -328 -329 -331 -333 -335 -337 -339 -341 -344 -346 -348 -350 -352 -354 -356 -359 -361 -363 -365 -368 -370 -372 -375 -377 -380 -382 -385 -387 -390 -392 -395 -398 -400 -403 -406 -409 -412 -414 -417 -420 -423 -427 -430 -433 -436 -440 -443 -446 -450 -453 -457 -461 -465 -469 -473 -477 -481 -485 -490 -494 -499 -504 -509 -514 -519 -524 -530 -536 -542 -548 -555 -561 -569 -576 -584 -592 -601 -611 -621 -632 -644 -657 -671 -687 -705 -727 -752 -785 -831 -911] - * Referenced by: '/1-D Lookup Table' - */ - double uDLookupTable_tableData[1024]; - - /* Computed Parameter: uDLookupTable_bp01Data - * Referenced by: '/1-D Lookup Table' - */ - uint16_t uDLookupTable_bp01Data[1024]; -} ConstP; - -/* External outputs (root outports fed by signals with default storage) */ -typedef struct { - CmdBusError Out1; /* '/Out1' */ -} ExtY; - -/* Real-time Model Data Structure */ -struct tag_RTM { - const char * volatile errorStatus; -}; - -/* Block signals (default storage) */ -extern B rtB; - -/* Block states (default storage) */ -extern DW rtDW; - -/* External outputs (root outports fed by signals with default storage) */ -extern ExtY rtY; - -/* Constant parameters (default storage) */ -extern const ConstP rtConstP; - -/* - * Exported States - * - * Note: Exported states are block states with an exported global - * storage class designation. Code generation will declare the memory for these - * states and exports their symbols. - * - */ -extern ActuatorCmdBus Actuator_Ch0_Command_Model;/* '/Data Store Memory15' */ -extern ActuatorCmdBus Actuator_Ch1_Command_Model;/* '/Data Store Memory15' */ -extern ActuatorCmdBus Actuator_Ch2_Command_Model;/* '/Data Store Memory15' */ -extern CmdBusStatus Status_Sensor_Model;/* '/Data Store Memory' */ -extern CmdBusError CCU_Errors_Model; /* '/Data Store Memory3' */ -extern CmdBusPWMGet PWM_Get; /* '/Data Store Memory1' */ - -/* Model entry point functions */ -extern void HVAC_model_initialize(void); -extern void HVAC_model_step(void); -extern void HVAC_model_terminate(void); - -/* Real-time Model object */ -extern RT_MODEL *const rtM; - -/*- - * These blocks were eliminated from the model due to optimizations: - * - * Block '/Display3' : Unused code path elimination - * Block '/Display3' : Unused code path elimination - * Block '/Display3' : Unused code path elimination - */ - -/*- - * The generated code includes comments that allow you to trace directly - * back to the appropriate location in the model. The basic format - * is /block_name, where system is the system number (uniquely - * assigned by Simulink) and block_name is the name of the block. - * - * Use the MATLAB hilite_system command to trace the generated code back - * to the model. For example, - * - * hilite_system('') - opens system 3 - * hilite_system('/Kp') - opens and selects block Kp which resides in S3 - * - * Here is the system hierarchy for this model - * - * '' : 'HVAC_model' - * '' : 'HVAC_model/ACP' - * '' : 'HVAC_model/LIN' - * '' : 'HVAC_model/PWN' - * '' : 'HVAC_model/ACP/Ambient' - * '' : 'HVAC_model/ACP/Write' - * '' : 'HVAC_model/ACP/Write1' - * '' : 'HVAC_model/ACP/Write2' - * '' : 'HVAC_model/ACP/Write3' - * '' : 'HVAC_model/ACP/Write4' - * '' : 'HVAC_model/ACP/Ambient/Compare To Constant' - * '' : 'HVAC_model/ACP/Ambient/Compare To Constant1' - * '' : 'HVAC_model/ACP/Ambient/Compare To Constant2' - * '' : 'HVAC_model/ACP/Ambient/RealTime_Timer' - * '' : 'HVAC_model/ACP/Ambient/Status_Sensor_Model' - * '' : 'HVAC_model/ACP/Ambient/UDS ERROR' - * '' : 'HVAC_model/ACP/Ambient/Write Ambient' - * '' : 'HVAC_model/ACP/Ambient/Write ERROR' - * '' : 'HVAC_model/LIN/CHANEL0' - * '' : 'HVAC_model/LIN/CHANEL1' - * '' : 'HVAC_model/LIN/CHANEL2' - * '' : 'HVAC_model/LIN/CHANEL0/Check Stall Max' - * '' : 'HVAC_model/LIN/CHANEL0/Check Stall Min' - * '' : 'HVAC_model/LIN/CHANEL0/Initial CPOS Max' - * '' : 'HVAC_model/LIN/CHANEL0/Initial CPOS Min' - * '' : 'HVAC_model/LIN/CHANEL0/Move to position Max' - * '' : 'HVAC_model/LIN/CHANEL0/Move to position Min' - * '' : 'HVAC_model/LIN/CHANEL0/Normal Mode' - * '' : 'HVAC_model/LIN/CHANEL0/Stop Mode' - * '' : 'HVAC_model/LIN/CHANEL0/Write Ignition' - * '' : 'HVAC_model/LIN/CHANEL0/Check Stall Max/If Action Subsystem2' - * '' : 'HVAC_model/LIN/CHANEL0/Check Stall Max/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL0/Check Stall Max/If Action Subsystem2/MIN POSITION' - * '' : 'HVAC_model/LIN/CHANEL0/Check Stall Min/If Action Subsystem2' - * '' : 'HVAC_model/LIN/CHANEL0/Check Stall Min/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL0/Check Stall Min/If Action Subsystem2/MIN POSITION' - * '' : 'HVAC_model/LIN/CHANEL0/Initial CPOS Max/If Action Subsystem2' - * '' : 'HVAC_model/LIN/CHANEL0/Initial CPOS Max/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL0/Initial CPOS Max/If Action Subsystem2/Initial CPOS Max' - * '' : 'HVAC_model/LIN/CHANEL0/Initial CPOS Min/If Action Subsystem' - * '' : 'HVAC_model/LIN/CHANEL0/Initial CPOS Min/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL0/Initial CPOS Min/If Action Subsystem/Initial CPOS Min' - * '' : 'HVAC_model/LIN/CHANEL0/Move to position Max/If Action Subsystem2' - * '' : 'HVAC_model/LIN/CHANEL0/Move to position Max/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL0/Move to position Max/If Action Subsystem2/Move to position Max' - * '' : 'HVAC_model/LIN/CHANEL0/Move to position Min/If Action Subsystem2' - * '' : 'HVAC_model/LIN/CHANEL0/Move to position Min/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL0/Move to position Min/If Action Subsystem2/Move to position Min' - * '' : 'HVAC_model/LIN/CHANEL0/Normal Mode/If Action Subsystem2' - * '' : 'HVAC_model/LIN/CHANEL0/Normal Mode/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL0/Normal Mode/If Action Subsystem2/Normal Mode' - * '' : 'HVAC_model/LIN/CHANEL0/Stop Mode/If Action Subsystem2' - * '' : 'HVAC_model/LIN/CHANEL0/Stop Mode/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL1/Check Stall Max' - * '' : 'HVAC_model/LIN/CHANEL1/Check Stall Min' - * '' : 'HVAC_model/LIN/CHANEL1/Initial CPOS Max' - * '' : 'HVAC_model/LIN/CHANEL1/Initial CPOS Min' - * '' : 'HVAC_model/LIN/CHANEL1/Move to position Max' - * '' : 'HVAC_model/LIN/CHANEL1/Move to position Min' - * '' : 'HVAC_model/LIN/CHANEL1/Normal Mode' - * '' : 'HVAC_model/LIN/CHANEL1/Stop Mode' - * '' : 'HVAC_model/LIN/CHANEL1/Write Ignition' - * '' : 'HVAC_model/LIN/CHANEL1/Check Stall Max/If Action Subsystem2' - * '' : 'HVAC_model/LIN/CHANEL1/Check Stall Max/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL1/Check Stall Max/If Action Subsystem2/MIN POSITION' - * '' : 'HVAC_model/LIN/CHANEL1/Check Stall Min/If Action Subsystem2' - * '' : 'HVAC_model/LIN/CHANEL1/Check Stall Min/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL1/Check Stall Min/If Action Subsystem2/MIN POSITION' - * '' : 'HVAC_model/LIN/CHANEL1/Initial CPOS Max/If Action Subsystem2' - * '' : 'HVAC_model/LIN/CHANEL1/Initial CPOS Max/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL1/Initial CPOS Max/If Action Subsystem2/Initial CPOS Max' - * '' : 'HVAC_model/LIN/CHANEL1/Initial CPOS Min/If Action Subsystem' - * '' : 'HVAC_model/LIN/CHANEL1/Initial CPOS Min/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL1/Initial CPOS Min/If Action Subsystem/Initial CPOS Min' - * '' : 'HVAC_model/LIN/CHANEL1/Move to position Max/If Action Subsystem2' - * '' : 'HVAC_model/LIN/CHANEL1/Move to position Max/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL1/Move to position Max/If Action Subsystem2/Move to position Max' - * '' : 'HVAC_model/LIN/CHANEL1/Move to position Min/If Action Subsystem2' - * '' : 'HVAC_model/LIN/CHANEL1/Move to position Min/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL1/Move to position Min/If Action Subsystem2/Move to position Min' - * '' : 'HVAC_model/LIN/CHANEL1/Normal Mode/If Action Subsystem2' - * '' : 'HVAC_model/LIN/CHANEL1/Normal Mode/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL1/Normal Mode/If Action Subsystem2/Normal Mode' - * '' : 'HVAC_model/LIN/CHANEL1/Stop Mode/If Action Subsystem2' - * '' : 'HVAC_model/LIN/CHANEL1/Stop Mode/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL2/Check Stall Max' - * '' : 'HVAC_model/LIN/CHANEL2/Check Stall Min' - * '' : 'HVAC_model/LIN/CHANEL2/Initial CPOS Max' - * '' : 'HVAC_model/LIN/CHANEL2/Initial CPOS Min' - * '' : 'HVAC_model/LIN/CHANEL2/Move to position Max' - * '' : 'HVAC_model/LIN/CHANEL2/Move to position Min' - * '' : 'HVAC_model/LIN/CHANEL2/Normal Mode' - * '' : 'HVAC_model/LIN/CHANEL2/Stop Mode' - * '' : 'HVAC_model/LIN/CHANEL2/Write Ignition' - * '' : 'HVAC_model/LIN/CHANEL2/Check Stall Max/If Action Subsystem2' - * '' : 'HVAC_model/LIN/CHANEL2/Check Stall Max/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL2/Check Stall Max/If Action Subsystem2/MIN POSITION' - * '' : 'HVAC_model/LIN/CHANEL2/Check Stall Min/If Action Subsystem2' - * '' : 'HVAC_model/LIN/CHANEL2/Check Stall Min/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL2/Check Stall Min/If Action Subsystem2/MIN POSITION' - * '' : 'HVAC_model/LIN/CHANEL2/Initial CPOS Max/If Action Subsystem2' - * '' : 'HVAC_model/LIN/CHANEL2/Initial CPOS Max/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL2/Initial CPOS Max/If Action Subsystem2/Initial CPOS Max' - * '' : 'HVAC_model/LIN/CHANEL2/Initial CPOS Min/If Action Subsystem' - * '' : 'HVAC_model/LIN/CHANEL2/Initial CPOS Min/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL2/Initial CPOS Min/If Action Subsystem/Initial CPOS Min' - * '' : 'HVAC_model/LIN/CHANEL2/Move to position Max/If Action Subsystem2' - * '' : 'HVAC_model/LIN/CHANEL2/Move to position Max/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL2/Move to position Max/If Action Subsystem2/Move to position Max' - * '' : 'HVAC_model/LIN/CHANEL2/Move to position Min/If Action Subsystem2' - * '' : 'HVAC_model/LIN/CHANEL2/Move to position Min/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL2/Move to position Min/If Action Subsystem2/Move to position Min' - * '' : 'HVAC_model/LIN/CHANEL2/Normal Mode/If Action Subsystem2' - * '' : 'HVAC_model/LIN/CHANEL2/Normal Mode/If Action Subsystem3' - * '' : 'HVAC_model/LIN/CHANEL2/Normal Mode/If Action Subsystem2/Normal Mode' - * '' : 'HVAC_model/LIN/CHANEL2/Stop Mode/If Action Subsystem2' - * '' : 'HVAC_model/LIN/CHANEL2/Stop Mode/If Action Subsystem3' - * '' : 'HVAC_model/PWN/Write' - * '' : 'HVAC_model/PWN/Write1' - * '' : 'HVAC_model/PWN/Write2' - * '' : 'HVAC_model/PWN/Write3' - */ -#endif /* HVAC_model_h_ */ - -/* - * File trailer for generated code. - * - * [EOF] - */ +/* + * File: HVAC_model.h + * + * Code generated for Simulink model 'HVAC_model'. + * + * Model version : 1.625 + * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 + * C/C++ source code generated on : Tue Feb 17 18:15:10 2026 + * + * Target selection: ert.tlc + * Embedded hardware selection: ARM Compatible->ARM Cortex-M + * Emulation hardware selection: + * Differs from embedded hardware (MATLAB Host) + * Code generation objectives: Unspecified + * Validation result: Not run + */ + +#ifndef HVAC_model_h_ +#define HVAC_model_h_ +#ifndef HVAC_model_COMMON_INCLUDES_ +#define HVAC_model_COMMON_INCLUDES_ +#include +#include +#include +#endif /* HVAC_model_COMMON_INCLUDES_ */ + +#include "HVAC_model_types.h" + +/* Macros for accessing real-time model data structure */ +#ifndef rtmGetErrorStatus +#define rtmGetErrorStatus(rtm) ((rtm)->errorStatus) +#endif + +#ifndef rtmSetErrorStatus +#define rtmSetErrorStatus(rtm, val) ((rtm)->errorStatus = (val)) +#endif + +/* user code (top of header file) */ +#include + +/* Block signals (default storage) */ +typedef struct { + int8_t Merge; /* '/Merge' */ + int8_t Merge_c; /* '/Merge' */ + int8_t Merge_cs; /* '/Merge' */ +} B; + +/* Block states (default storage) for system '' */ +typedef struct { + ActuatorCmdBusInput Actuator_Ch0_Status_Model;/* '/Data Store Memory17' */ + ActuatorCmdBusInput Actuator_Ch1_Status_Model;/* '/Data Store Memory17' */ + ActuatorCmdBusInput Actuator_Ch2_Status_Model;/* '/Data Store Memory17' */ + CmdBusADCData ADC_Data_Model; /* '/Data Store Memory2' */ + double LOGGER_ACP; /* '/Data Store Memory1' */ + double LOGGER_LIN; /* '/Data Store Memory1' */ + CmdBusADCDataKey ADC_Key_Data_Model; /* '/Data Store Memory3' */ + CmdBusPwm PWM_Set_Model; /* '/Data Store Memory3' */ + uint32_t t_start_delay_private_DSTATE;/* '/t_start_delay_private ' */ + uint32_t t_start_delay_private_DSTATE_p;/* '/t_start_delay_private ' */ + uint32_t t_start_delay_private_DSTATE_pk;/* '/t_start_delay_private ' */ + uint32_t t_start_delay_private_DSTATE_e;/* '/t_start_delay_private ' */ + uint32_t t_start_delay_private_DSTATE_b;/* '/t_start_delay_private ' */ + uint32_t t_start_delay_private_DSTATE_j;/* '/t_start_delay_private ' */ + uint32_t t_start_delay_private_DSTATE_bh;/* '/t_start_delay_private ' */ + uint32_t t_start_delay_private_DSTATE_bx;/* '/t_start_delay_private ' */ + uint32_t t_now; /* '/Data Store Memory5' */ + bool Cond_prev_private_DSTATE; /* '/Cond_prev_private ' */ + bool Cond_prev_private_DSTATE_h; /* '/Cond_prev_private ' */ + bool Cond_prev_private_DSTATE_i; /* '/Cond_prev_private ' */ + bool Cond_prev_private_DSTATE_e; /* '/Cond_prev_private ' */ + bool Cond_prev_private_DSTATE_c; /* '/Cond_prev_private ' */ + bool Cond_prev_private_DSTATE_b; /* '/Cond_prev_private ' */ + bool Cond_prev_private_DSTATE_j; /* '/Cond_prev_private ' */ + bool Cond_prev_private_DSTATE_f; /* '/Cond_prev_private ' */ + int8_t stepSig_private; /* '/Data Store Memory' */ + int8_t stepSig_private_c; /* '/Data Store Memory' */ + int8_t stepSig_private_p; /* '/Data Store Memory' */ +} DW; + +/* Constant parameters (default storage) */ +typedef struct { + /* Expression: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 698 694 690 686 683 679 676 672 668 665 662 658 655 652 648 645 642 639 636 632 629 626 623 620 617 615 612 609 606 603 600 598 595 592 590 587 584 582 579 577 574 571 569 566 564 562 559 557 554 552 550 547 545 543 540 538 536 534 532 529 527 525 523 521 519 517 514 512 510 508 506 504 502 500 498 496 494 492 490 489 487 485 483 481 479 477 475 474 472 470 468 466 464 463 461 459 457 456 454 452 451 449 447 445 444 442 440 439 437 436 434 432 431 429 428 426 424 423 421 420 418 417 415 414 412 411 409 408 406 405 403 402 400 399 397 396 394 393 391 390 389 387 386 384 383 382 380 379 377 376 375 373 372 371 369 368 366 365 364 362 361 360 359 357 356 355 353 352 351 349 348 347 346 344 343 342 341 339 338 337 336 334 333 332 331 330 328 327 326 325 324 322 321 320 319 318 317 315 314 313 312 311 310 308 307 306 305 304 303 302 300 299 298 297 296 295 294 293 292 290 289 288 287 286 285 284 283 282 281 280 279 278 276 275 274 273 272 271 270 269 268 267 266 265 264 263 262 261 260 259 258 257 256 255 254 253 252 251 250 249 248 247 246 245 244 243 242 241 240 239 238 237 236 235 234 233 232 231 230 229 228 227 226 225 224 223 222 221 220 219 218 217 217 216 215 214 213 212 211 210 209 208 207 206 205 204 203 202 202 201 200 199 198 197 196 195 194 193 192 192 191 190 189 188 187 186 185 184 183 183 182 181 180 179 178 177 176 175 175 174 173 172 171 170 169 168 168 167 166 165 164 163 162 161 161 160 159 158 157 156 155 155 154 153 152 151 150 149 149 148 147 146 145 144 143 143 142 141 140 139 138 138 137 136 135 134 133 133 132 131 130 129 128 128 127 126 125 124 123 123 122 121 120 119 118 118 117 116 115 114 114 113 112 111 110 109 109 108 107 106 105 105 104 103 102 101 100 100 99 98 97 96 96 95 94 93 92 91 91 90 89 88 87 87 86 85 84 83 83 82 81 80 79 78 78 77 76 75 74 74 73 72 71 70 70 69 68 67 66 66 65 64 63 62 62 61 60 59 58 58 57 56 55 54 54 53 52 51 50 50 49 48 47 46 45 45 44 43 42 41 41 40 39 38 37 37 36 35 34 33 33 32 31 30 29 29 28 27 26 25 25 24 23 22 21 21 20 19 18 17 17 16 15 14 13 13 12 11 10 9 9 8 7 6 5 5 4 3 2 1 1 0 0 -1 -2 -3 -3 -4 -5 -6 -7 -7 -8 -9 -10 -11 -12 -12 -13 -14 -15 -16 -17 -17 -18 -19 -20 -21 -22 -22 -23 -24 -25 -26 -27 -27 -28 -29 -30 -31 -32 -32 -33 -34 -35 -36 -37 -37 -38 -39 -40 -41 -42 -42 -43 -44 -45 -46 -47 -48 -48 -49 -50 -51 -52 -53 -53 -54 -55 -56 -57 -58 -59 -59 -60 -61 -62 -63 -64 -65 -66 -66 -67 -68 -69 -70 -71 -72 -73 -73 -74 -75 -76 -77 -78 -79 -80 -80 -81 -82 -83 -84 -85 -86 -87 -88 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155 -156 -157 -158 -159 -161 -162 -163 -164 -165 -166 -167 -168 -169 -170 -171 -172 -173 -175 -176 -177 -178 -179 -180 -181 -182 -183 -185 -186 -187 -188 -189 -190 -191 -193 -194 -195 -196 -197 -198 -200 -201 -202 -203 -204 -206 -207 -208 -209 -211 -212 -213 -214 -216 -217 -218 -219 -221 -222 -223 -225 -226 -227 -228 -230 -231 -232 -234 -235 -237 -238 -239 -241 -242 -243 -245 -246 -248 -249 -250 -252 -253 -255 -256 -258 -259 -261 -262 -263 -265 -266 -268 -270 -271 -273 -274 -276 -277 -279 -280 -282 -284 -285 -287 -288 -290 -292 -293 -295 -297 -299 -300 -302 -304 -305 -307 -309 -311 -313 -314 -316 -318 -320 -322 -324 -326 -328 -329 -331 -333 -335 -337 -339 -341 -344 -346 -348 -350 -352 -354 -356 -359 -361 -363 -365 -368 -370 -372 -375 -377 -380 -382 -385 -387 -390 -392 -395 -398 -400 -403 -406 -409 -412 -414 -417 -420 -423 -427 -430 -433 -436 -440 -443 -446 -450 -453 -457 -461 -465 -469 -473 -477 -481 -485 -490 -494 -499 -504 -509 -514 -519 -524 -530 -536 -542 -548 -555 -561 -569 -576 -584 -592 -601 -611 -621 -632 -644 -657 -671 -687 -705 -727 -752 -785 -831 -911] + * Referenced by: '/1-D Lookup Table' + */ + double uDLookupTable_tableData[1024]; + + /* Pooled Parameter (Expression: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 848 844 840 836 832 829 825 821 818 814 811 807 804 800 797 794 790 787 784 781 778 774 771 768 765 762 759 756 753 750 748 745 742 739 736 734 731 728 725 723 720 717 715 712 710 707 705 702 700 697 695 692 690 688 685 683 680 678 676 674 671 669 667 665 662 660 658 656 654 652 649 647 645 643 641 639 637 635 633 631 629 627 625 623 621 619 617 615 613 611 609 607 606 604 602 600 598 596 595 593 591 589 587 586 584 582 580 579 577 575 573 572 570 568 567 565 563 562 560 558 557 555 554 552 550 549 547 546 544 542 541 539 538 536 535 533 532 530 529 527 526 524 523 521 520 518 517 515 514 512 511 509 508 507 505 504 502 501 499 498 497 495 494 492 491 490 488 487 486 484 483 482 480 479 478 476 475 474 472 471 470 468 467 466 465 463 462 461 459 458 457 456 454 453 452 451 449 448 447 446 444 443 442 441 440 438 437 436 435 433 432 431 430 429 427 426 425 424 423 422 420 419 418 417 416 415 413 412 411 410 409 408 407 405 404 403 402 401 400 399 398 397 395 394 393 392 391 390 389 388 387 385 384 383 382 381 380 379 378 377 376 375 374 373 372 370 369 368 367 366 365 364 363 362 361 360 359 358 357 356 355 354 353 352 351 350 349 348 347 346 345 344 343 342 341 340 339 338 337 336 335 334 333 332 331 330 329 328 327 326 325 324 323 322 321 320 319 318 317 316 315 314 313 312 311 310 309 308 307 306 306 305 304 303 302 301 300 299 298 297 296 295 294 293 292 291 290 290 289 288 287 286 285 284 283 282 281 280 279 278 277 277 276 275 274 273 272 271 270 269 268 267 266 266 265 264 263 262 261 260 259 258 257 257 256 255 254 253 252 251 250 249 248 248 247 246 245 244 243 242 241 240 240 239 238 237 236 235 234 233 232 232 231 230 229 228 227 226 225 225 224 223 222 221 220 219 218 218 217 216 215 214 213 212 211 211 210 209 208 207 206 205 204 204 203 202 201 200 199 198 198 197 196 195 194 193 192 191 191 190 189 188 187 186 185 185 184 183 182 181 180 179 178 178 177 176 175 174 173 172 172 171 170 169 168 167 166 166 165 164 163 162 161 160 160 159 158 157 156 155 154 154 153 152 151 150 149 148 147 147 146 145 144 143 142 141 141 140 139 138 137 136 135 135 134 133 132 131 130 129 128 128 127 126 125 124 123 122 122 121 120 119 118 117 116 115 115 114 113 112 111 110 109 108 108 107 106 105 104 103 102 101 101 100 99 98 97 96 95 94 94 93 92 91 90 89 88 87 86 86 85 84 83 82 81 80 79 78 77 77 76 75 74 73 72 71 70 69 68 68 67 66 65 64 63 62 61 60 59 58 58 57 56 55 54 53 52 51 50 49 48 47 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -45 -46 -47 -48 -49 -50 -51 -52 -53 -55 -56 -57 -58 -59 -60 -61 -63 -64 -65 -66 -67 -68 -69 -71 -72 -73 -74 -75 -77 -78 -79 -80 -81 -83 -84 -85 -86 -87 -89 -90 -91 -92 -94 -95 -96 -97 -99 -100 -101 -102 -104 -105 -106 -108 -109 -110 -112 -113 -114 -116 -117 -118 -120 -121 -122 -124 -125 -126 -128 -129 -131 -132 -133 -135 -136 -138 -139 -141 -142 -144 -145 -146 -148 -149 -151 -152 -154 -155 -157 -159 -160 -162 -163 -165 -166 -168 -170 -171 -173 -174 -176 -178 -179 -181 -183 -184 -186 -188 -189 -191 -193 -195 -196 -198 -200 -202 -204 -205 -207 -209 -211 -213 -215 -217 -219 -221 -223 -225 -227 -229 -231 -233 -235 -237 -239 -241 -243 -245 -248 -250 -252 -254 -257 -259 -261 -263 -266 -268 -271 -273 -276 -278 -281 -283 -286 -288 -291 -294 -296 -299 -302 -305 -308 -311 -314 -317 -320 -323 -326 -329 -332 -336 -339 -342 -346 -349 -353 -357 -360 -364 -368 -372 -376 -380 -384 -389 -393 -398 -402 -407 -412 -417 -422 -428 -433 -439 -445 -451 -457 -463 -470 -477 -485 -492 -500 -509 -518 -528 -538 -549 -560 -573 -587 -602 -620 -639 -662 -690 -725 -774 -859 ]) + * Referenced by: + * '/1-D Lookup Table' + * '/1-D Lookup Table' + */ + double pooled3[1024]; + + /* Expression: [-4 -2.4 -0.8 0.8 2.4 4 5.6 7.2 8.8 10.4 12 13.6 15.2 16.8 18.4 20 21.6 23.2 24.8 26.4 28 29.6 31.2 32.8 34.4 36 37.6 39.2 40.8 42.4 44 45.6 47.2 48.8 50.4 52 53.6 55.2 56.8 58.4 60 61.6 63.2 64.8 66.4 68 69.6 71.2 72.8 74.4 76 77.6 79.2 80.8 82.4 84 85.6 87.2 88.8 90.4 92 93.6 95.2 96.8 98.4 100 101.6 103.2 104.8 106.4 108 109.6 111.2 112.8 114.4 116 117.6 119.2 120.8 122.4 124 125.6 127.2 128.8 130.4 132 133.6 135.2 136.8 138.4 140 141.6 143.2 144.8 146.4 148 149.6 151.2 152.8 154.4 156 157.6 159.2 160.8 162.4 164 165.6 167.2 168.8 170.4 172 173.6 175.2 176.8 178.4 180 181.6 183.2 184.8 186.4 188 189.6 191.2 192.8 194.4 196 197.6 199.2 200.8 202.4 204 205.6 207.2 208.8 210.4 212 213.6 215.2 216.8 218.4 220 221.6 223.2 224.8 226.4 228 229.6 231.2 232.8 234.4 236 237.6 239.2 240.8 242.4 244 245.6 247.2 248.8 250.4 252 253.6 255.2 256.8 258.4 260 261.6 263.2 264.8 266.4 268 269.6 271.2 272.8 274.4 276 277.6 279.2 280.8 282.4 284 285.6 287.2 288.8 290.4 292 293.6 295.2 296.8 298.4 300 301.6 303.2 304.8 306.4 308 309.6 311.2 312.8 314.4 316 317.6 319.2 320.8 322.4 324 325.6 327.2 328.8 330.4 332 333.6 335.2 336.8 338.4 340 341.6 343.2 344.8 346.4 348 349.6 351.2 352.8 354.4 356 357.6 359.2 360.8 362.4 364 365.6 367.2 368.8 370.4 372 373.6 375.2 376.8 378.4 380 381.6 383.2 384.8 386.4 388 389.6 391.2 392.8 394.4 396 397.6 399.2 400.8 402.4 404 405.6 407.2 408.8 410.4 412 413.6 415.2 416.8 418.4 420 421.6 423.2 424.8 426.4 428 429.6 431.2 432.8 434.4 436 437.6 439.2 440.8 442.4 444 445.6 447.2 448.8 450.4 452 453.6 455.2 456.8 458.4 460 461.6 463.2 464.8 466.4 468 469.6 471.2 472.8 474.4 476 477.6 479.2 480.8 482.4 484 485.6 487.2 488.8 490.4 492 493.6 495.2 496.8 498.4 500 501.6 503.2 504.8 506.4 508 509.6 511.2 512.8 514.4 516 517.6 519.2 520.8 522.4 524 525.6 527.2 528.8 530.4 532 533.6 535.2 536.8 538.4 540 541.6 543.2 544.8 546.4 548 549.6 551.2 552.8 554.4 556 557.6 559.2 560.8 562.4 564 565.6 567.2 568.8 570.4 572 573.6 575.2 576.8 578.4 580 581.6 583.2 584.8 586.4 588 589.6 591.2 592.8 594.4 596 597.6 599.2 600.8 602.4 604 605.6 607.2 608.8 610.4 612 613.6 615.2 616.8 618.4 620 621.6 623.2 624.8 626.4 628 629.6 631.2 632.8 634.4 636 637.6 639.2 640.8 642.4 644 645.6 647.2 648.8 650.4 652 653.6 655.2 656.8 658.4 660 661.6 663.2 664.8 666.4 668 669.6 671.2 672.8 674.4 676 677.6 679.2 680.8 682.4 684 685.6 687.2 688.8 690.4 692 693.6 695.2 696.8 698.4 700 701.6 703.2 704.8 706.4 708 709.6 711.2 712.8 714.4 716 717.6 719.2 720.8 722.4 724 725.6 727.2 728.8 730.4 732 733.6 735.2 736.8 738.4 740 741.6 743.2 744.8 746.4 748 749.6 751.2 752.8 754.4 756 757.6 759.2 760.8 762.4 764 765.6 767.2 768.8 770.4 772 773.6 775.2 776.8 778.4 780 781.6 783.2 784.8 786.4 788 789.6 791.2 792.8 794.4 796 797.6 799.2 800.8 802.4 804 805.6 807.2 808.8 810.4 812 813.6 815.2 816.8 818.4 820 821.6 823.2 824.8 826.4 828 829.6 831.2 832.8 834.4 836 837.6 839.2 840.8 842.4 844 845.6 847.2 848.8 850.4 852 853.6 855.2 856.8 858.4 860 861.6 863.2 864.8 866.4 868 869.6 871.2 872.8 874.4 876 877.6 879.2 880.8 882.4 884 885.6 887.2 888.8 890.4 892 893.6 895.2 896.8 898.4 900 901.6 903.2 904.8 906.4 908 909.6 911.2 912.8 914.4 916 917.6 919.2 920.8 922.4 924 925.6 927.2 928.8 930.4 932 933.6 935.2 936.8 938.4 940 941.6 943.2 944.8 946.4 948 949.6 951.2 952.8 954.4 956 957.6 959.2 960.8 962.4 964 965.6 967.2 968.8 970.4 972 973.6 975.2 976.8 978.4 980 981.6 983.2 984.8 986.4 988 989.6 991.2 992.8 994.4 996 997.6 999.2 1000.8 1002.4 1004 1005.6 1007.2 1008.8 1010.4 1012 1013.6 1015.2 1016.8 1018.4 1020 1021.6 1023.2 1024.8 1026.4 1028 1029.6 1031.2 1032.8 1034.4 1036 1037.6 1039.2 1040.8 1042.4 1044 1045.6 1047.2 1048.8 1050.4 1052 1053.6 1055.2 1056.8 1058.4 1060 1061.6 1063.2 1064.8 1066.4 1068 1069.6 1071.2 1072.8 1074.4 1076 1077.6 1079.2 1080.8 1082.4 1084 1085.6 1087.2 1088.8 1090.4 1092 1093.6 1095.2 1096.8 1098.4 1100 1101.6 1103.2 1104.8 1106.4 1108 1109.6 1111.2 1112.8 1114.4 1116 1117.6 1119.2 1120.8 1122.4 1124 1125.6 1127.2 1128.8 1130.4 1132 1133.6 1135.2 1136.8 1138.4 1140 1141.6 1143.2 1144.8 1146.4 1148 1149.6 1151.2 1152.8 1154.4 1156 1157.6 1159.2 1160.8 1162.4 1164 1165.6 1167.2 1168.8 1170.4 1172 1173.6 1175.2 1176.8 1178.4 1180 1181.6 1183.2 1184.8 1186.4 1188 1189.6 1191.2 1192.8 1194.4 1196 1197.6 1199.2 1200.8 1202.4 1204 1205.6 1207.2 1208.8 1210.4 1212 1213.6 1215.2 1216.8 1218.4 1220 1221.6 1223.2 1224.8 1226.4 1228 1229.6 1231.2 1232.8 1234.4 1236 1237.6 1239.2 1240.8 1242.4 1244 1245.6 1247.2 1248.8 1250.4 1252 1253.6 1255.2 1256.8 1258.4 1260 1261.6 1263.2 1264.8 1266.4 1268 1269.6 1271.2 1272.8 1274.4 1276 1277.6 1279.2 1280.8 1282.4 1284 1285.6 1287.2 1288.8 1290.4 1292 1293.6 1295.2 1296.8 1298.4 1300 1301.6 1303.2 1304.8 1306.4 1308 1309.6 1311.2 1312.8 1314.4 1316 1317.6 1319.2 1320.8 1322.4 1324 1325.6 1327.2 1328.8 1330.4 1332 1333.6 1335.2 1336.8 1338.4 1340 1341.6 1343.2 1344.8 1346.4 1348 1349.6 1351.2 1352.8 1354.4 1356 1357.6 1359.2 1360.8 1362.4 1364 1365.6 1367.2 1368.8 1370.4 1372 1373.6 1375.2 1376.8 1378.4 1380 1381.6 1383.2 1384.8 1386.4 1388 1389.6 1391.2 1392.8 1394.4 1396 1397.6 1399.2 1400.8 1402.4 1404 1405.6 1407.2 1408.8 1410.4 1412 1413.6 1415.2 1416.8 1418.4 1420 1421.6 1423.2 1424.8 1426.4 1428 1429.6 1431.2 1432.8 1434.4 1436 1437.6 1439.2 1440.8 1442.4 1444 1445.6 1447.2 1448.8 1450.4 1452 1453.6 1455.2 1456.8 1458.4 1460 1461.6 1463.2 1464.8 1466.4 1468 1469.6 1471.2 1472.8 1474.4 1476 1477.6 1479.2 1480.8 1482.4 1484 1485.6 1487.2 1488.8 1490.4 1492 1493.6 1495.2 1496.8 1498.4 1500 1501.6 1503.2 1504.8 1506.4 1508 1509.6 1511.2 1512.8 1514.4 1516 1517.6 1519.2 1520.8 1522.4 1524 1525.6 1527.2 1528.8 1530.4 1532 1533.6 1535.2 1536.8 1538.4 1540 1541.6 1543.2 1544.8 1546.4 1548 1549.6 1551.2 1552.8 1554.4 1556 1557.6 1559.2 1560.8 1562.4 1564 1565.6 1567.2 1568.8 1570.4 1572 1573.6 1575.2 1576.8 1578.4 1580 1581.6 1583.2 1584.8 1586.4 1588 1589.6 1591.2 1592.8 1594.4 1596 1597.6 1599.2 1600.8 1602.4 1604 1605.6 1607.2 1608.8 1610.4 1612 1613.6 1615.2 1616.8 1618.4 1620 1621.6 1623.2 1624.8 1626.4 1628 1629.6 1631.2 1632.8] + * Referenced by: '/1-D Lookup Table' + */ + double uDLookupTable_tableData_f[1024]; + + /* Pooled Parameter (Expression: [-2731 3108 2584 2319 2146 2020 1922 1841 1774 1716 1666 1621 1581 1544 1511 1481 1453 1427 1403 1380 1358 1338 1319 1301 1284 1268 1252 1237 1223 1209 1196 1184 1171 1160 1148 1137 1127 1117 1107 1097 1088 1079 1070 1061 1053 1045 1037 1029 1021 1014 1007 1000 993 986 979 973 967 960 954 948 942 937 931 925 920 915 909 904 899 894 889 884 880 875 870 866 861 857 852 848 844 840 836 831 827 823 820 816 812 808 804 801 797 793 790 786 783 780 776 773 770 766 763 760 757 754 750 747 744 741 738 735 732 729 727 724 721 718 715 713 710 707 704 702 699 697 694 691 689 686 684 681 679 676 674 672 669 667 664 662 660 658 655 653 651 648 646 644 642 640 637 635 633 631 629 627 625 623 621 618 616 614 612 610 608 606 604 602 601 599 597 595 593 591 589 587 586 584 582 580 578 576 575 573 571 569 568 566 564 563 561 559 557 556 554 552 551 549 547 546 544 543 541 539 538 536 534 533 531 530 528 527 525 523 522 520 519 517 516 514 513 511 510 508 507 505 504 502 501 500 498 497 495 494 492 491 490 488 487 485 484 483 481 480 479 477 476 475 473 472 471 469 468 467 465 464 463 461 460 459 457 456 455 454 452 451 450 449 447 446 445 444 442 441 440 439 437 436 435 434 432 431 430 429 428 426 425 424 423 422 420 419 418 417 416 415 413 412 411 410 409 408 406 405 404 403 402 401 400 399 397 396 395 394 393 392 391 390 389 387 386 385 384 383 382 381 380 379 378 377 376 375 373 372 371 370 369 368 367 366 365 364 363 362 361 360 359 358 357 356 355 354 353 352 351 350 349 348 347 346 345 344 343 342 341 340 339 338 337 336 335 334 333 332 331 330 329 328 327 326 325 324 323 322 321 320 319 318 317 316 315 314 313 312 311 310 309 308 307 307 306 305 304 303 302 301 300 299 298 297 296 295 294 293 293 292 291 290 289 288 287 286 285 284 283 282 281 281 280 279 278 277 276 275 274 273 272 272 271 270 269 268 267 266 265 264 264 263 262 261 260 259 258 257 256 256 255 254 253 252 251 250 249 249 248 247 246 245 244 243 242 242 241 240 239 238 237 236 235 235 234 233 232 231 230 229 229 228 227 226 225 224 223 223 222 221 220 219 218 217 217 216 215 214 213 212 211 211 210 209 208 207 206 206 205 204 203 202 201 200 200 199 198 197 196 195 195 194 193 192 191 190 190 189 188 187 186 185 184 184 183 182 181 180 179 179 178 177 176 175 174 174 173 172 171 170 169 169 168 167 166 165 164 164 163 162 161 160 159 159 158 157 156 155 154 154 153 152 151 150 149 149 148 147 146 145 144 144 143 142 141 140 139 139 138 137 136 135 134 134 133 132 131 130 129 129 128 127 126 125 124 124 123 122 121 120 119 118 118 117 116 115 114 113 113 112 111 110 109 108 108 107 106 105 104 103 103 102 101 100 99 98 97 97 96 95 94 93 92 92 91 90 89 88 87 86 86 85 84 83 82 81 80 80 79 78 77 76 75 74 74 73 72 71 70 69 68 67 67 66 65 64 63 62 61 60 60 59 58 57 56 55 54 53 53 52 51 50 49 48 47 46 45 45 44 43 42 41 40 39 38 37 36 36 35 34 33 32 31 30 29 28 27 26 26 25 24 23 22 21 20 19 18 17 16 15 14 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 -1 -2 -3 -4 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -68 -69 -70 -71 -72 -73 -74 -75 -77 -78 -79 -80 -81 -82 -84 -85 -86 -87 -88 -89 -91 -92 -93 -94 -95 -97 -98 -99 -100 -101 -103 -104 -105 -106 -108 -109 -110 -111 -113 -114 -115 -117 -118 -119 -120 -122 -123 -124 -126 -127 -128 -130 -131 -132 -134 -135 -136 -138 -139 -141 -142 -143 -145 -146 -148 -149 -150 -152 -153 -155 -156 -158 -159 -161 -162 -164 -165 -167 -168 -170 -172 -173 -175 -176 -178 -179 -181 -183 -184 -186 -188 -189 -191 -193 -194 -196 -198 -199 -201 -203 -205 -206 -208 -210 -212 -214 -216 -217 -219 -221 -223 -225 -227 -229 -231 -233 -235 -237 -239 -241 -243 -245 -247 -250 -252 -254 -256 -258 -261 -263 -265 -268 -270 -272 -275 -277 -280 -282 -285 -287 -290 -292 -295 -298 -300 -303 -306 -309 -312 -314 -317 -320 -323 -327 -330 -333 -336 -339 -343 -346 -350 -353 -357 -361 -364 -368 -372 -376 -380 -384 -389 -393 -398 -402 -407 -412 -417 -422 -427 -433 -438 -444 -450 -456 -463 -470 -477 -484 -492 -500 -508 -517 -526 -537 -547 -559 -572 -585 -601 -618 -637 -660 -687 -722 -771 -856 + ]) + * Referenced by: + * '/1-D Lookup Table' + * '/1-D Lookup Table1' + * '/1-D Lookup Table' + * '/1-D Lookup Table1' + */ + double pooled4[1024]; + + /* Pooled Parameter (Expression: [0:4:4092]) + * Referenced by: + * '/1-D Lookup Table' + * '/1-D Lookup Table' + * '/1-D Lookup Table' + * '/1-D Lookup Table' + * '/1-D Lookup Table' + * '/1-D Lookup Table1' + * '/1-D Lookup Table' + * '/1-D Lookup Table1' + */ + uint16_t pooled23[1024]; +} ConstP; + +/* External outputs (root outports fed by signals with default storage) */ +typedef struct { + CmdBusError Out1; /* '/Out1' */ +} ExtY; + +/* Real-time Model Data Structure */ +struct tag_RTM { + const char * volatile errorStatus; +}; + +/* Block signals (default storage) */ +extern B rtB; + +/* Block states (default storage) */ +extern DW rtDW; + +/* External outputs (root outports fed by signals with default storage) */ +extern ExtY rtY; + +/* Constant parameters (default storage) */ +extern const ConstP rtConstP; + +/* + * Exported States + * + * Note: Exported states are block states with an exported global + * storage class designation. Code generation will declare the memory for these + * states and exports their symbols. + * + */ +extern ActuatorCmdBus Actuator_Ch0_Command_Model;/* '/Data Store Memory15' */ +extern ActuatorCmdBus Actuator_Ch1_Command_Model;/* '/Data Store Memory15' */ +extern ActuatorCmdBus Actuator_Ch2_Command_Model;/* '/Data Store Memory15' */ +extern CmdBusStatus Status_Sensor_Model;/* '/Data Store Memory' */ +extern CmdBusError CCU_Errors_Model; /* '/Data Store Memory3' */ +extern CmdBusPWMGet PWM_Get; /* '/Data Store Memory1' */ + +/* Model entry point functions */ +extern void HVAC_model_initialize(void); +extern void HVAC_model_step(void); +extern void HVAC_model_terminate(void); + +/* Real-time Model object */ +extern RT_MODEL *const rtM; + +/*- + * These blocks were eliminated from the model due to optimizations: + * + * Block '/Display' : Unused code path elimination + * Block '/Display1' : Unused code path elimination + * Block '/Display' : Unused code path elimination + * Block '/Display1' : Unused code path elimination + * Block '/Display' : Unused code path elimination + * Block '/Display1' : Unused code path elimination + * Block '/Display' : Unused code path elimination + * Block '/Display1' : Unused code path elimination + * Block '/Display3' : Unused code path elimination + * Block '/Display3' : Unused code path elimination + * Block '/Display3' : Unused code path elimination + */ + +/*- + * The generated code includes comments that allow you to trace directly + * back to the appropriate location in the model. The basic format + * is /block_name, where system is the system number (uniquely + * assigned by Simulink) and block_name is the name of the block. + * + * Use the MATLAB hilite_system command to trace the generated code back + * to the model. For example, + * + * hilite_system('') - opens system 3 + * hilite_system('/Kp') - opens and selects block Kp which resides in S3 + * + * Here is the system hierarchy for this model + * + * '' : 'HVAC_model' + * '' : 'HVAC_model/ACP' + * '' : 'HVAC_model/LIN' + * '' : 'HVAC_model/PWN' + * '' : 'HVAC_model/ACP/Ambient' + * '' : 'HVAC_model/ACP/EvapF' + * '' : 'HVAC_model/ACP/EvapR' + * '' : 'HVAC_model/ACP/PRINT BTS5120_2EKA_ShutoffValvePowerTXV1' + * '' : 'HVAC_model/ACP/PRINT BTS5120_2EKA_ShutoffValvePowerTXV2' + * '' : 'HVAC_model/ACP/PRINT BTS5180_2EKA_ChannelPTCPower1' + * '' : 'HVAC_model/ACP/PRINT BTS5180_2EKA_ChannelPTCPower2' + * '' : 'HVAC_model/ACP/PRINT BTS5180_2EKA_FrontIncarMotor' + * '' : 'HVAC_model/ACP/PRINT BTS5180_2EKA_RearIncarMotor' + * '' : 'HVAC_model/ACP/PRINT BTS5180_2EKA_ReservePowerSupply' + * '' : 'HVAC_model/ACP/PRINT BTS5180_2EKA_ShutOFFValveFront' + * '' : 'HVAC_model/ACP/PRINT BTS5180_2EKA_ShutOFFValveRear' + * '' : 'HVAC_model/ACP/PRINT BTS5180_2EKA_TwoWayValve' + * '' : 'HVAC_model/ACP/PRINT IGN_ANS' + * '' : 'HVAC_model/ACP/PRINT PBATT_CHECK' + * '' : 'HVAC_model/ACP/PRINT Pressure_DIAG' + * '' : 'HVAC_model/ACP/PRINT Reserve_Sensor_Duct_Temp_1' + * '' : 'HVAC_model/ACP/PRINT Reserve_Sensor_Duct_Temp_2' + * '' : 'HVAC_model/ACP/PRINT Sensor_AC_Pressure' + * '' : 'HVAC_model/ACP/PRINT Sensor_Front_Duct1' + * '' : 'HVAC_model/ACP/PRINT Sensor_Front_Duct2' + * '' : 'HVAC_model/ACP/PRINT Sensor_Front_Duct3' + * '' : 'HVAC_model/ACP/PRINT Sensor_Front_Duct4' + * '' : 'HVAC_model/ACP/PRINT Sensor_Front_Duct5' + * '' : 'HVAC_model/ACP/PRINT Sensor_Front_Duct6' + * '' : 'HVAC_model/ACP/PRINT Sensor_Rear_Duct1' + * '' : 'HVAC_model/ACP/PRINT Sensor_Rear_Duct2' + * '' : 'HVAC_model/ACP/PRINT Sensor_Rear_Duct3' + * '' : 'HVAC_model/ACP/PRINT Sensor_Rear_Duct4' + * '' : 'HVAC_model/ACP/PRINT Sensor_Rear_Duct5' + * '' : 'HVAC_model/ACP/PRINT Sensor_Rear_Duct6' + * '' : 'HVAC_model/ACP/PRINT VN7008AJ_DIAG_FrontLINActuatorPowerDriverAB' + * '' : 'HVAC_model/ACP/PRINT VN7008AJ_DIAG_RearLINActuatorPowerDriverC' + * '' : 'HVAC_model/ACP/PRINT VN7008AJ_FrontLINActuatorPowerDriverAB' + * '' : 'HVAC_model/ACP/PRINT VN7008AJ_RearLINActuatorPowerDriverC' + * '' : 'HVAC_model/ACP/Subsystem' + * '' : 'HVAC_model/ACP/Subsystem1' + * '' : 'HVAC_model/ACP/Write' + * '' : 'HVAC_model/ACP/Write1' + * '' : 'HVAC_model/ACP/Write2' + * '' : 'HVAC_model/ACP/Write3' + * '' : 'HVAC_model/ACP/Write4' + * '' : 'HVAC_model/ACP/Ambient/Compare To Constant' + * '' : 'HVAC_model/ACP/Ambient/Compare To Constant1' + * '' : 'HVAC_model/ACP/Ambient/Compare To Constant2' + * '' : 'HVAC_model/ACP/Ambient/RealTime_Timer' + * '' : 'HVAC_model/ACP/Ambient/UDS ERROR' + * '' : 'HVAC_model/ACP/Ambient/Write Ambient' + * '' : 'HVAC_model/ACP/Ambient/Write ERROR' + * '' : 'HVAC_model/ACP/EvapF/Compare To Constant' + * '' : 'HVAC_model/ACP/EvapF/Compare To Constant1' + * '' : 'HVAC_model/ACP/EvapF/Compare To Constant2' + * '' : 'HVAC_model/ACP/EvapF/RealTime_Timer' + * '' : 'HVAC_model/ACP/EvapF/UDS ERROR' + * '' : 'HVAC_model/ACP/EvapF/Write ERROR' + * '' : 'HVAC_model/ACP/EvapF/Write Eva_F' + * '' : 'HVAC_model/ACP/EvapR/Compare To Constant' + * '' : 'HVAC_model/ACP/EvapR/Compare To Constant1' + * '' : 'HVAC_model/ACP/EvapR/Compare To Constant2' + * '' : 'HVAC_model/ACP/EvapR/RealTime_Timer' + * '' : 'HVAC_model/ACP/EvapR/UDS ERROR' + * '' : 'HVAC_model/ACP/EvapR/Write ERROR' + * '' : 'HVAC_model/ACP/EvapR/Write Eva_F' + * '' : 'HVAC_model/ACP/PRINT BTS5120_2EKA_ShutoffValvePowerTXV1/Write' + * '' : 'HVAC_model/ACP/PRINT BTS5120_2EKA_ShutoffValvePowerTXV2/Write' + * '' : 'HVAC_model/ACP/PRINT BTS5180_2EKA_ChannelPTCPower1/Write' + * '' : 'HVAC_model/ACP/PRINT BTS5180_2EKA_ChannelPTCPower2/Write' + * '' : 'HVAC_model/ACP/PRINT BTS5180_2EKA_FrontIncarMotor/Write' + * '' : 'HVAC_model/ACP/PRINT BTS5180_2EKA_RearIncarMotor/Write' + * '' : 'HVAC_model/ACP/PRINT BTS5180_2EKA_ReservePowerSupply/Write' + * '' : 'HVAC_model/ACP/PRINT BTS5180_2EKA_ShutOFFValveFront/Write' + * '' : 'HVAC_model/ACP/PRINT BTS5180_2EKA_ShutOFFValveRear/Write' + * '' : 'HVAC_model/ACP/PRINT BTS5180_2EKA_TwoWayValve/Write' + * '' : 'HVAC_model/ACP/PRINT IGN_ANS/Write' + * '' : 'HVAC_model/ACP/PRINT PBATT_CHECK/Write' + * '' : 'HVAC_model/ACP/PRINT Pressure_DIAG/Write' + * '' : 'HVAC_model/ACP/PRINT Reserve_Sensor_Duct_Temp_1/Write' + * '' : 'HVAC_model/ACP/PRINT Reserve_Sensor_Duct_Temp_2/Write' + * '' : 'HVAC_model/ACP/PRINT Sensor_AC_Pressure/Compare To Constant' + * '' : 'HVAC_model/ACP/PRINT Sensor_AC_Pressure/Compare To Constant1' + * '' : 'HVAC_model/ACP/PRINT Sensor_AC_Pressure/Compare To Constant2' + * '' : 'HVAC_model/ACP/PRINT Sensor_AC_Pressure/RealTime_Timer' + * '' : 'HVAC_model/ACP/PRINT Sensor_AC_Pressure/UDS ERROR' + * '' : 'HVAC_model/ACP/PRINT Sensor_AC_Pressure/Write' + * '' : 'HVAC_model/ACP/PRINT Sensor_AC_Pressure/Write ERROR' + * '' : 'HVAC_model/ACP/PRINT Sensor_Front_Duct1/Write' + * '' : 'HVAC_model/ACP/PRINT Sensor_Front_Duct2/Write' + * '' : 'HVAC_model/ACP/PRINT Sensor_Front_Duct3/Write' + * '' : 'HVAC_model/ACP/PRINT Sensor_Front_Duct4/Write' + * '' : 'HVAC_model/ACP/PRINT Sensor_Front_Duct5/Write' + * '' : 'HVAC_model/ACP/PRINT Sensor_Front_Duct6/Write' + * '' : 'HVAC_model/ACP/PRINT Sensor_Rear_Duct1/Write' + * '' : 'HVAC_model/ACP/PRINT Sensor_Rear_Duct2/Write' + * '' : 'HVAC_model/ACP/PRINT Sensor_Rear_Duct3/Write' + * '' : 'HVAC_model/ACP/PRINT Sensor_Rear_Duct4/Write' + * '' : 'HVAC_model/ACP/PRINT Sensor_Rear_Duct5/Write' + * '' : 'HVAC_model/ACP/PRINT Sensor_Rear_Duct6/Write' + * '' : 'HVAC_model/ACP/PRINT VN7008AJ_DIAG_FrontLINActuatorPowerDriverAB/Write' + * '' : 'HVAC_model/ACP/PRINT VN7008AJ_DIAG_RearLINActuatorPowerDriverC/Write' + * '' : 'HVAC_model/ACP/PRINT VN7008AJ_FrontLINActuatorPowerDriverAB/Write' + * '' : 'HVAC_model/ACP/PRINT VN7008AJ_RearLINActuatorPowerDriverC/Write' + * '' : 'HVAC_model/ACP/Subsystem/Compare To Constant' + * '' : 'HVAC_model/ACP/Subsystem/Compare To Constant1' + * '' : 'HVAC_model/ACP/Subsystem/Compare To Constant2' + * '' : 'HVAC_model/ACP/Subsystem/Compare To Constant3' + * '' : 'HVAC_model/ACP/Subsystem/Compare To Constant4' + * '' : 'HVAC_model/ACP/Subsystem/Compare To Constant5' + * '' : 'HVAC_model/ACP/Subsystem/RealTime_Timer' + * '' : 'HVAC_model/ACP/Subsystem/RealTime_Timer1' + * '' : 'HVAC_model/ACP/Subsystem/UDS ERROR' + * '' : 'HVAC_model/ACP/Subsystem/UDS ERROR1' + * '' : 'HVAC_model/ACP/Subsystem/Write ERROR' + * '' : 'HVAC_model/ACP/Subsystem/Write ERROR1' + * '' : 'HVAC_model/ACP/Subsystem/Write IncarFL' + * '' : 'HVAC_model/ACP/Subsystem/Write IncarRL' + * '' : 'HVAC_model/ACP/Subsystem1/Compare To Constant' + * '' : 'HVAC_model/ACP/Subsystem1/Compare To Constant1' + * '' : 'HVAC_model/ACP/Subsystem1/Compare To Constant2' + * '' : 'HVAC_model/ACP/Subsystem1/Compare To Constant3' + * '' : 'HVAC_model/ACP/Subsystem1/Compare To Constant4' + * '' : 'HVAC_model/ACP/Subsystem1/Compare To Constant5' + * '' : 'HVAC_model/ACP/Subsystem1/RealTime_Timer' + * '' : 'HVAC_model/ACP/Subsystem1/RealTime_Timer1' + * '' : 'HVAC_model/ACP/Subsystem1/UDS ERROR' + * '' : 'HVAC_model/ACP/Subsystem1/UDS ERROR1' + * '' : 'HVAC_model/ACP/Subsystem1/Write ERROR' + * '' : 'HVAC_model/ACP/Subsystem1/Write ERROR1' + * '' : 'HVAC_model/ACP/Subsystem1/Write IncarFR' + * '' : 'HVAC_model/ACP/Subsystem1/Write IncarRR' + * '' : 'HVAC_model/LIN/CHANEL0' + * '' : 'HVAC_model/LIN/CHANEL1' + * '' : 'HVAC_model/LIN/CHANEL2' + * '' : 'HVAC_model/LIN/CHANEL0/Check Stall Max' + * '' : 'HVAC_model/LIN/CHANEL0/Check Stall Min' + * '' : 'HVAC_model/LIN/CHANEL0/Initial CPOS Max' + * '' : 'HVAC_model/LIN/CHANEL0/Initial CPOS Min' + * '' : 'HVAC_model/LIN/CHANEL0/Move to position Max' + * '' : 'HVAC_model/LIN/CHANEL0/Move to position Min' + * '' : 'HVAC_model/LIN/CHANEL0/Normal Mode' + * '' : 'HVAC_model/LIN/CHANEL0/Stop Mode' + * '' : 'HVAC_model/LIN/CHANEL0/Write Ignition' + * '' : 'HVAC_model/LIN/CHANEL0/Check Stall Max/If Action Subsystem2' + * '' : 'HVAC_model/LIN/CHANEL0/Check Stall Max/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL0/Check Stall Max/If Action Subsystem2/MIN POSITION' + * '' : 'HVAC_model/LIN/CHANEL0/Check Stall Min/If Action Subsystem2' + * '' : 'HVAC_model/LIN/CHANEL0/Check Stall Min/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL0/Check Stall Min/If Action Subsystem2/MIN POSITION' + * '' : 'HVAC_model/LIN/CHANEL0/Initial CPOS Max/If Action Subsystem2' + * '' : 'HVAC_model/LIN/CHANEL0/Initial CPOS Max/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL0/Initial CPOS Max/If Action Subsystem2/Initial CPOS Max' + * '' : 'HVAC_model/LIN/CHANEL0/Initial CPOS Min/If Action Subsystem' + * '' : 'HVAC_model/LIN/CHANEL0/Initial CPOS Min/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL0/Initial CPOS Min/If Action Subsystem/Initial CPOS Min' + * '' : 'HVAC_model/LIN/CHANEL0/Move to position Max/If Action Subsystem2' + * '' : 'HVAC_model/LIN/CHANEL0/Move to position Max/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL0/Move to position Max/If Action Subsystem2/Move to position Max' + * '' : 'HVAC_model/LIN/CHANEL0/Move to position Min/If Action Subsystem2' + * '' : 'HVAC_model/LIN/CHANEL0/Move to position Min/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL0/Move to position Min/If Action Subsystem2/Move to position Min' + * '' : 'HVAC_model/LIN/CHANEL0/Normal Mode/If Action Subsystem2' + * '' : 'HVAC_model/LIN/CHANEL0/Normal Mode/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL0/Normal Mode/If Action Subsystem2/Normal Mode' + * '' : 'HVAC_model/LIN/CHANEL0/Stop Mode/If Action Subsystem2' + * '' : 'HVAC_model/LIN/CHANEL0/Stop Mode/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL1/Check Stall Max' + * '' : 'HVAC_model/LIN/CHANEL1/Check Stall Min' + * '' : 'HVAC_model/LIN/CHANEL1/Initial CPOS Max' + * '' : 'HVAC_model/LIN/CHANEL1/Initial CPOS Min' + * '' : 'HVAC_model/LIN/CHANEL1/Move to position Max' + * '' : 'HVAC_model/LIN/CHANEL1/Move to position Min' + * '' : 'HVAC_model/LIN/CHANEL1/Normal Mode' + * '' : 'HVAC_model/LIN/CHANEL1/Stop Mode' + * '' : 'HVAC_model/LIN/CHANEL1/Write Ignition' + * '' : 'HVAC_model/LIN/CHANEL1/Check Stall Max/If Action Subsystem2' + * '' : 'HVAC_model/LIN/CHANEL1/Check Stall Max/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL1/Check Stall Max/If Action Subsystem2/MIN POSITION' + * '' : 'HVAC_model/LIN/CHANEL1/Check Stall Min/If Action Subsystem2' + * '' : 'HVAC_model/LIN/CHANEL1/Check Stall Min/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL1/Check Stall Min/If Action Subsystem2/MIN POSITION' + * '' : 'HVAC_model/LIN/CHANEL1/Initial CPOS Max/If Action Subsystem2' + * '' : 'HVAC_model/LIN/CHANEL1/Initial CPOS Max/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL1/Initial CPOS Max/If Action Subsystem2/Initial CPOS Max' + * '' : 'HVAC_model/LIN/CHANEL1/Initial CPOS Min/If Action Subsystem' + * '' : 'HVAC_model/LIN/CHANEL1/Initial CPOS Min/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL1/Initial CPOS Min/If Action Subsystem/Initial CPOS Min' + * '' : 'HVAC_model/LIN/CHANEL1/Move to position Max/If Action Subsystem2' + * '' : 'HVAC_model/LIN/CHANEL1/Move to position Max/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL1/Move to position Max/If Action Subsystem2/Move to position Max' + * '' : 'HVAC_model/LIN/CHANEL1/Move to position Min/If Action Subsystem2' + * '' : 'HVAC_model/LIN/CHANEL1/Move to position Min/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL1/Move to position Min/If Action Subsystem2/Move to position Min' + * '' : 'HVAC_model/LIN/CHANEL1/Normal Mode/If Action Subsystem2' + * '' : 'HVAC_model/LIN/CHANEL1/Normal Mode/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL1/Normal Mode/If Action Subsystem2/Normal Mode' + * '' : 'HVAC_model/LIN/CHANEL1/Stop Mode/If Action Subsystem2' + * '' : 'HVAC_model/LIN/CHANEL1/Stop Mode/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL2/Check Stall Max' + * '' : 'HVAC_model/LIN/CHANEL2/Check Stall Min' + * '' : 'HVAC_model/LIN/CHANEL2/Initial CPOS Max' + * '' : 'HVAC_model/LIN/CHANEL2/Initial CPOS Min' + * '' : 'HVAC_model/LIN/CHANEL2/Move to position Max' + * '' : 'HVAC_model/LIN/CHANEL2/Move to position Min' + * '' : 'HVAC_model/LIN/CHANEL2/Normal Mode' + * '' : 'HVAC_model/LIN/CHANEL2/Stop Mode' + * '' : 'HVAC_model/LIN/CHANEL2/Write Ignition' + * '' : 'HVAC_model/LIN/CHANEL2/Check Stall Max/If Action Subsystem2' + * '' : 'HVAC_model/LIN/CHANEL2/Check Stall Max/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL2/Check Stall Max/If Action Subsystem2/MIN POSITION' + * '' : 'HVAC_model/LIN/CHANEL2/Check Stall Min/If Action Subsystem2' + * '' : 'HVAC_model/LIN/CHANEL2/Check Stall Min/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL2/Check Stall Min/If Action Subsystem2/MIN POSITION' + * '' : 'HVAC_model/LIN/CHANEL2/Initial CPOS Max/If Action Subsystem2' + * '' : 'HVAC_model/LIN/CHANEL2/Initial CPOS Max/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL2/Initial CPOS Max/If Action Subsystem2/Initial CPOS Max' + * '' : 'HVAC_model/LIN/CHANEL2/Initial CPOS Min/If Action Subsystem' + * '' : 'HVAC_model/LIN/CHANEL2/Initial CPOS Min/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL2/Initial CPOS Min/Write Ignition' + * '' : 'HVAC_model/LIN/CHANEL2/Initial CPOS Min/Write Ignition1' + * '' : 'HVAC_model/LIN/CHANEL2/Initial CPOS Min/If Action Subsystem/Initial CPOS Min' + * '' : 'HVAC_model/LIN/CHANEL2/Move to position Max/If Action Subsystem2' + * '' : 'HVAC_model/LIN/CHANEL2/Move to position Max/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL2/Move to position Max/If Action Subsystem2/Move to position Max' + * '' : 'HVAC_model/LIN/CHANEL2/Move to position Min/If Action Subsystem2' + * '' : 'HVAC_model/LIN/CHANEL2/Move to position Min/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL2/Move to position Min/If Action Subsystem2/Move to position Min' + * '' : 'HVAC_model/LIN/CHANEL2/Normal Mode/If Action Subsystem2' + * '' : 'HVAC_model/LIN/CHANEL2/Normal Mode/If Action Subsystem3' + * '' : 'HVAC_model/LIN/CHANEL2/Normal Mode/If Action Subsystem2/Normal Mode' + * '' : 'HVAC_model/LIN/CHANEL2/Stop Mode/If Action Subsystem2' + * '' : 'HVAC_model/LIN/CHANEL2/Stop Mode/If Action Subsystem3' + * '' : 'HVAC_model/PWN/Write' + * '' : 'HVAC_model/PWN/Write1' + * '' : 'HVAC_model/PWN/Write2' + * '' : 'HVAC_model/PWN/Write3' + */ +#endif /* HVAC_model_h_ */ + +/* + * File trailer for generated code. + * + * [EOF] + */ diff --git a/HVAC_model_data.c b/HVAC_model_data.c old mode 100644 new mode 100755 index 245762f..884af45 --- a/HVAC_model_data.c +++ b/HVAC_model_data.c @@ -1,220 +1,537 @@ -/* - * File: HVAC_model_data.c - * - * Code generated for Simulink model 'HVAC_model'. - * - * Model version : 1.613 - * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 - * C/C++ source code generated on : Mon Feb 16 16:08:44 2026 - * - * Target selection: ert.tlc - * Embedded hardware selection: ARM Compatible->ARM Cortex-M - * Emulation hardware selection: - * Differs from embedded hardware (MATLAB Host) - * Code generation objectives: Unspecified - * Validation result: Not run - */ - -#include "HVAC_model.h" - -/* Constant parameters (default storage) */ -const ConstP rtConstP = { - /* Expression: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 698 694 690 686 683 679 676 672 668 665 662 658 655 652 648 645 642 639 636 632 629 626 623 620 617 615 612 609 606 603 600 598 595 592 590 587 584 582 579 577 574 571 569 566 564 562 559 557 554 552 550 547 545 543 540 538 536 534 532 529 527 525 523 521 519 517 514 512 510 508 506 504 502 500 498 496 494 492 490 489 487 485 483 481 479 477 475 474 472 470 468 466 464 463 461 459 457 456 454 452 451 449 447 445 444 442 440 439 437 436 434 432 431 429 428 426 424 423 421 420 418 417 415 414 412 411 409 408 406 405 403 402 400 399 397 396 394 393 391 390 389 387 386 384 383 382 380 379 377 376 375 373 372 371 369 368 366 365 364 362 361 360 359 357 356 355 353 352 351 349 348 347 346 344 343 342 341 339 338 337 336 334 333 332 331 330 328 327 326 325 324 322 321 320 319 318 317 315 314 313 312 311 310 308 307 306 305 304 303 302 300 299 298 297 296 295 294 293 292 290 289 288 287 286 285 284 283 282 281 280 279 278 276 275 274 273 272 271 270 269 268 267 266 265 264 263 262 261 260 259 258 257 256 255 254 253 252 251 250 249 248 247 246 245 244 243 242 241 240 239 238 237 236 235 234 233 232 231 230 229 228 227 226 225 224 223 222 221 220 219 218 217 217 216 215 214 213 212 211 210 209 208 207 206 205 204 203 202 202 201 200 199 198 197 196 195 194 193 192 192 191 190 189 188 187 186 185 184 183 183 182 181 180 179 178 177 176 175 175 174 173 172 171 170 169 168 168 167 166 165 164 163 162 161 161 160 159 158 157 156 155 155 154 153 152 151 150 149 149 148 147 146 145 144 143 143 142 141 140 139 138 138 137 136 135 134 133 133 132 131 130 129 128 128 127 126 125 124 123 123 122 121 120 119 118 118 117 116 115 114 114 113 112 111 110 109 109 108 107 106 105 105 104 103 102 101 100 100 99 98 97 96 96 95 94 93 92 91 91 90 89 88 87 87 86 85 84 83 83 82 81 80 79 78 78 77 76 75 74 74 73 72 71 70 70 69 68 67 66 66 65 64 63 62 62 61 60 59 58 58 57 56 55 54 54 53 52 51 50 50 49 48 47 46 45 45 44 43 42 41 41 40 39 38 37 37 36 35 34 33 33 32 31 30 29 29 28 27 26 25 25 24 23 22 21 21 20 19 18 17 17 16 15 14 13 13 12 11 10 9 9 8 7 6 5 5 4 3 2 1 1 0 0 -1 -2 -3 -3 -4 -5 -6 -7 -7 -8 -9 -10 -11 -12 -12 -13 -14 -15 -16 -17 -17 -18 -19 -20 -21 -22 -22 -23 -24 -25 -26 -27 -27 -28 -29 -30 -31 -32 -32 -33 -34 -35 -36 -37 -37 -38 -39 -40 -41 -42 -42 -43 -44 -45 -46 -47 -48 -48 -49 -50 -51 -52 -53 -53 -54 -55 -56 -57 -58 -59 -59 -60 -61 -62 -63 -64 -65 -66 -66 -67 -68 -69 -70 -71 -72 -73 -73 -74 -75 -76 -77 -78 -79 -80 -80 -81 -82 -83 -84 -85 -86 -87 -88 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155 -156 -157 -158 -159 -161 -162 -163 -164 -165 -166 -167 -168 -169 -170 -171 -172 -173 -175 -176 -177 -178 -179 -180 -181 -182 -183 -185 -186 -187 -188 -189 -190 -191 -193 -194 -195 -196 -197 -198 -200 -201 -202 -203 -204 -206 -207 -208 -209 -211 -212 -213 -214 -216 -217 -218 -219 -221 -222 -223 -225 -226 -227 -228 -230 -231 -232 -234 -235 -237 -238 -239 -241 -242 -243 -245 -246 -248 -249 -250 -252 -253 -255 -256 -258 -259 -261 -262 -263 -265 -266 -268 -270 -271 -273 -274 -276 -277 -279 -280 -282 -284 -285 -287 -288 -290 -292 -293 -295 -297 -299 -300 -302 -304 -305 -307 -309 -311 -313 -314 -316 -318 -320 -322 -324 -326 -328 -329 -331 -333 -335 -337 -339 -341 -344 -346 -348 -350 -352 -354 -356 -359 -361 -363 -365 -368 -370 -372 -375 -377 -380 -382 -385 -387 -390 -392 -395 -398 -400 -403 -406 -409 -412 -414 -417 -420 -423 -427 -430 -433 -436 -440 -443 -446 -450 -453 -457 -461 -465 -469 -473 -477 -481 -485 -490 -494 -499 -504 -509 -514 -519 -524 -530 -536 -542 -548 -555 -561 -569 -576 -584 -592 -601 -611 -621 -632 -644 -657 -671 -687 -705 -727 -752 -785 -831 -911] - * Referenced by: '/1-D Lookup Table' - */ - { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 698.0, 694.0, 690.0, 686.0, 683.0, - 679.0, 676.0, 672.0, 668.0, 665.0, 662.0, 658.0, 655.0, 652.0, 648.0, 645.0, - 642.0, 639.0, 636.0, 632.0, 629.0, 626.0, 623.0, 620.0, 617.0, 615.0, 612.0, - 609.0, 606.0, 603.0, 600.0, 598.0, 595.0, 592.0, 590.0, 587.0, 584.0, 582.0, - 579.0, 577.0, 574.0, 571.0, 569.0, 566.0, 564.0, 562.0, 559.0, 557.0, 554.0, - 552.0, 550.0, 547.0, 545.0, 543.0, 540.0, 538.0, 536.0, 534.0, 532.0, 529.0, - 527.0, 525.0, 523.0, 521.0, 519.0, 517.0, 514.0, 512.0, 510.0, 508.0, 506.0, - 504.0, 502.0, 500.0, 498.0, 496.0, 494.0, 492.0, 490.0, 489.0, 487.0, 485.0, - 483.0, 481.0, 479.0, 477.0, 475.0, 474.0, 472.0, 470.0, 468.0, 466.0, 464.0, - 463.0, 461.0, 459.0, 457.0, 456.0, 454.0, 452.0, 451.0, 449.0, 447.0, 445.0, - 444.0, 442.0, 440.0, 439.0, 437.0, 436.0, 434.0, 432.0, 431.0, 429.0, 428.0, - 426.0, 424.0, 423.0, 421.0, 420.0, 418.0, 417.0, 415.0, 414.0, 412.0, 411.0, - 409.0, 408.0, 406.0, 405.0, 403.0, 402.0, 400.0, 399.0, 397.0, 396.0, 394.0, - 393.0, 391.0, 390.0, 389.0, 387.0, 386.0, 384.0, 383.0, 382.0, 380.0, 379.0, - 377.0, 376.0, 375.0, 373.0, 372.0, 371.0, 369.0, 368.0, 366.0, 365.0, 364.0, - 362.0, 361.0, 360.0, 359.0, 357.0, 356.0, 355.0, 353.0, 352.0, 351.0, 349.0, - 348.0, 347.0, 346.0, 344.0, 343.0, 342.0, 341.0, 339.0, 338.0, 337.0, 336.0, - 334.0, 333.0, 332.0, 331.0, 330.0, 328.0, 327.0, 326.0, 325.0, 324.0, 322.0, - 321.0, 320.0, 319.0, 318.0, 317.0, 315.0, 314.0, 313.0, 312.0, 311.0, 310.0, - 308.0, 307.0, 306.0, 305.0, 304.0, 303.0, 302.0, 300.0, 299.0, 298.0, 297.0, - 296.0, 295.0, 294.0, 293.0, 292.0, 290.0, 289.0, 288.0, 287.0, 286.0, 285.0, - 284.0, 283.0, 282.0, 281.0, 280.0, 279.0, 278.0, 276.0, 275.0, 274.0, 273.0, - 272.0, 271.0, 270.0, 269.0, 268.0, 267.0, 266.0, 265.0, 264.0, 263.0, 262.0, - 261.0, 260.0, 259.0, 258.0, 257.0, 256.0, 255.0, 254.0, 253.0, 252.0, 251.0, - 250.0, 249.0, 248.0, 247.0, 246.0, 245.0, 244.0, 243.0, 242.0, 241.0, 240.0, - 239.0, 238.0, 237.0, 236.0, 235.0, 234.0, 233.0, 232.0, 231.0, 230.0, 229.0, - 228.0, 227.0, 226.0, 225.0, 224.0, 223.0, 222.0, 221.0, 220.0, 219.0, 218.0, - 217.0, 217.0, 216.0, 215.0, 214.0, 213.0, 212.0, 211.0, 210.0, 209.0, 208.0, - 207.0, 206.0, 205.0, 204.0, 203.0, 202.0, 202.0, 201.0, 200.0, 199.0, 198.0, - 197.0, 196.0, 195.0, 194.0, 193.0, 192.0, 192.0, 191.0, 190.0, 189.0, 188.0, - 187.0, 186.0, 185.0, 184.0, 183.0, 183.0, 182.0, 181.0, 180.0, 179.0, 178.0, - 177.0, 176.0, 175.0, 175.0, 174.0, 173.0, 172.0, 171.0, 170.0, 169.0, 168.0, - 168.0, 167.0, 166.0, 165.0, 164.0, 163.0, 162.0, 161.0, 161.0, 160.0, 159.0, - 158.0, 157.0, 156.0, 155.0, 155.0, 154.0, 153.0, 152.0, 151.0, 150.0, 149.0, - 149.0, 148.0, 147.0, 146.0, 145.0, 144.0, 143.0, 143.0, 142.0, 141.0, 140.0, - 139.0, 138.0, 138.0, 137.0, 136.0, 135.0, 134.0, 133.0, 133.0, 132.0, 131.0, - 130.0, 129.0, 128.0, 128.0, 127.0, 126.0, 125.0, 124.0, 123.0, 123.0, 122.0, - 121.0, 120.0, 119.0, 118.0, 118.0, 117.0, 116.0, 115.0, 114.0, 114.0, 113.0, - 112.0, 111.0, 110.0, 109.0, 109.0, 108.0, 107.0, 106.0, 105.0, 105.0, 104.0, - 103.0, 102.0, 101.0, 100.0, 100.0, 99.0, 98.0, 97.0, 96.0, 96.0, 95.0, 94.0, - 93.0, 92.0, 91.0, 91.0, 90.0, 89.0, 88.0, 87.0, 87.0, 86.0, 85.0, 84.0, 83.0, - 83.0, 82.0, 81.0, 80.0, 79.0, 78.0, 78.0, 77.0, 76.0, 75.0, 74.0, 74.0, 73.0, - 72.0, 71.0, 70.0, 70.0, 69.0, 68.0, 67.0, 66.0, 66.0, 65.0, 64.0, 63.0, 62.0, - 62.0, 61.0, 60.0, 59.0, 58.0, 58.0, 57.0, 56.0, 55.0, 54.0, 54.0, 53.0, 52.0, - 51.0, 50.0, 50.0, 49.0, 48.0, 47.0, 46.0, 45.0, 45.0, 44.0, 43.0, 42.0, 41.0, - 41.0, 40.0, 39.0, 38.0, 37.0, 37.0, 36.0, 35.0, 34.0, 33.0, 33.0, 32.0, 31.0, - 30.0, 29.0, 29.0, 28.0, 27.0, 26.0, 25.0, 25.0, 24.0, 23.0, 22.0, 21.0, 21.0, - 20.0, 19.0, 18.0, 17.0, 17.0, 16.0, 15.0, 14.0, 13.0, 13.0, 12.0, 11.0, 10.0, - 9.0, 9.0, 8.0, 7.0, 6.0, 5.0, 5.0, 4.0, 3.0, 2.0, 1.0, 1.0, 0.0, 0.0, -1.0, - -2.0, -3.0, -3.0, -4.0, -5.0, -6.0, -7.0, -7.0, -8.0, -9.0, -10.0, -11.0, - -12.0, -12.0, -13.0, -14.0, -15.0, -16.0, -17.0, -17.0, -18.0, -19.0, -20.0, - -21.0, -22.0, -22.0, -23.0, -24.0, -25.0, -26.0, -27.0, -27.0, -28.0, -29.0, - -30.0, -31.0, -32.0, -32.0, -33.0, -34.0, -35.0, -36.0, -37.0, -37.0, -38.0, - -39.0, -40.0, -41.0, -42.0, -42.0, -43.0, -44.0, -45.0, -46.0, -47.0, -48.0, - -48.0, -49.0, -50.0, -51.0, -52.0, -53.0, -53.0, -54.0, -55.0, -56.0, -57.0, - -58.0, -59.0, -59.0, -60.0, -61.0, -62.0, -63.0, -64.0, -65.0, -66.0, -66.0, - -67.0, -68.0, -69.0, -70.0, -71.0, -72.0, -73.0, -73.0, -74.0, -75.0, -76.0, - -77.0, -78.0, -79.0, -80.0, -80.0, -81.0, -82.0, -83.0, -84.0, -85.0, -86.0, - -87.0, -88.0, -88.0, -89.0, -90.0, -91.0, -92.0, -93.0, -94.0, -95.0, -96.0, - -97.0, -98.0, -98.0, -99.0, -100.0, -101.0, -102.0, -103.0, -104.0, -105.0, - -106.0, -107.0, -108.0, -109.0, -110.0, -111.0, -112.0, -113.0, -113.0, - -114.0, -115.0, -116.0, -117.0, -118.0, -119.0, -120.0, -121.0, -122.0, - -123.0, -124.0, -125.0, -126.0, -127.0, -128.0, -129.0, -130.0, -131.0, - -132.0, -133.0, -134.0, -135.0, -136.0, -137.0, -138.0, -139.0, -140.0, - -141.0, -142.0, -143.0, -144.0, -145.0, -146.0, -147.0, -148.0, -149.0, - -150.0, -151.0, -152.0, -153.0, -154.0, -155.0, -156.0, -157.0, -158.0, - -159.0, -161.0, -162.0, -163.0, -164.0, -165.0, -166.0, -167.0, -168.0, - -169.0, -170.0, -171.0, -172.0, -173.0, -175.0, -176.0, -177.0, -178.0, - -179.0, -180.0, -181.0, -182.0, -183.0, -185.0, -186.0, -187.0, -188.0, - -189.0, -190.0, -191.0, -193.0, -194.0, -195.0, -196.0, -197.0, -198.0, - -200.0, -201.0, -202.0, -203.0, -204.0, -206.0, -207.0, -208.0, -209.0, - -211.0, -212.0, -213.0, -214.0, -216.0, -217.0, -218.0, -219.0, -221.0, - -222.0, -223.0, -225.0, -226.0, -227.0, -228.0, -230.0, -231.0, -232.0, - -234.0, -235.0, -237.0, -238.0, -239.0, -241.0, -242.0, -243.0, -245.0, - -246.0, -248.0, -249.0, -250.0, -252.0, -253.0, -255.0, -256.0, -258.0, - -259.0, -261.0, -262.0, -263.0, -265.0, -266.0, -268.0, -270.0, -271.0, - -273.0, -274.0, -276.0, -277.0, -279.0, -280.0, -282.0, -284.0, -285.0, - -287.0, -288.0, -290.0, -292.0, -293.0, -295.0, -297.0, -299.0, -300.0, - -302.0, -304.0, -305.0, -307.0, -309.0, -311.0, -313.0, -314.0, -316.0, - -318.0, -320.0, -322.0, -324.0, -326.0, -328.0, -329.0, -331.0, -333.0, - -335.0, -337.0, -339.0, -341.0, -344.0, -346.0, -348.0, -350.0, -352.0, - -354.0, -356.0, -359.0, -361.0, -363.0, -365.0, -368.0, -370.0, -372.0, - -375.0, -377.0, -380.0, -382.0, -385.0, -387.0, -390.0, -392.0, -395.0, - -398.0, -400.0, -403.0, -406.0, -409.0, -412.0, -414.0, -417.0, -420.0, - -423.0, -427.0, -430.0, -433.0, -436.0, -440.0, -443.0, -446.0, -450.0, - -453.0, -457.0, -461.0, -465.0, -469.0, -473.0, -477.0, -481.0, -485.0, - -490.0, -494.0, -499.0, -504.0, -509.0, -514.0, -519.0, -524.0, -530.0, - -536.0, -542.0, -548.0, -555.0, -561.0, -569.0, -576.0, -584.0, -592.0, - -601.0, -611.0, -621.0, -632.0, -644.0, -657.0, -671.0, -687.0, -705.0, - -727.0, -752.0, -785.0, -831.0, -911.0 }, - - /* Computed Parameter: uDLookupTable_bp01Data - * Referenced by: '/1-D Lookup Table' - */ - { 0U, 4U, 8U, 12U, 16U, 20U, 24U, 28U, 32U, 36U, 40U, 44U, 48U, 52U, 56U, 60U, - 64U, 68U, 72U, 76U, 80U, 84U, 88U, 92U, 96U, 100U, 104U, 108U, 112U, 116U, - 120U, 124U, 128U, 132U, 136U, 140U, 144U, 148U, 152U, 156U, 160U, 164U, 168U, - 172U, 176U, 180U, 184U, 188U, 192U, 196U, 200U, 204U, 208U, 212U, 216U, 220U, - 224U, 228U, 232U, 236U, 240U, 244U, 248U, 252U, 256U, 260U, 264U, 268U, 272U, - 276U, 280U, 284U, 288U, 292U, 296U, 300U, 304U, 308U, 312U, 316U, 320U, 324U, - 328U, 332U, 336U, 340U, 344U, 348U, 352U, 356U, 360U, 364U, 368U, 372U, 376U, - 380U, 384U, 388U, 392U, 396U, 400U, 404U, 408U, 412U, 416U, 420U, 424U, 428U, - 432U, 436U, 440U, 444U, 448U, 452U, 456U, 460U, 464U, 468U, 472U, 476U, 480U, - 484U, 488U, 492U, 496U, 500U, 504U, 508U, 512U, 516U, 520U, 524U, 528U, 532U, - 536U, 540U, 544U, 548U, 552U, 556U, 560U, 564U, 568U, 572U, 576U, 580U, 584U, - 588U, 592U, 596U, 600U, 604U, 608U, 612U, 616U, 620U, 624U, 628U, 632U, 636U, - 640U, 644U, 648U, 652U, 656U, 660U, 664U, 668U, 672U, 676U, 680U, 684U, 688U, - 692U, 696U, 700U, 704U, 708U, 712U, 716U, 720U, 724U, 728U, 732U, 736U, 740U, - 744U, 748U, 752U, 756U, 760U, 764U, 768U, 772U, 776U, 780U, 784U, 788U, 792U, - 796U, 800U, 804U, 808U, 812U, 816U, 820U, 824U, 828U, 832U, 836U, 840U, 844U, - 848U, 852U, 856U, 860U, 864U, 868U, 872U, 876U, 880U, 884U, 888U, 892U, 896U, - 900U, 904U, 908U, 912U, 916U, 920U, 924U, 928U, 932U, 936U, 940U, 944U, 948U, - 952U, 956U, 960U, 964U, 968U, 972U, 976U, 980U, 984U, 988U, 992U, 996U, - 1000U, 1004U, 1008U, 1012U, 1016U, 1020U, 1024U, 1028U, 1032U, 1036U, 1040U, - 1044U, 1048U, 1052U, 1056U, 1060U, 1064U, 1068U, 1072U, 1076U, 1080U, 1084U, - 1088U, 1092U, 1096U, 1100U, 1104U, 1108U, 1112U, 1116U, 1120U, 1124U, 1128U, - 1132U, 1136U, 1140U, 1144U, 1148U, 1152U, 1156U, 1160U, 1164U, 1168U, 1172U, - 1176U, 1180U, 1184U, 1188U, 1192U, 1196U, 1200U, 1204U, 1208U, 1212U, 1216U, - 1220U, 1224U, 1228U, 1232U, 1236U, 1240U, 1244U, 1248U, 1252U, 1256U, 1260U, - 1264U, 1268U, 1272U, 1276U, 1280U, 1284U, 1288U, 1292U, 1296U, 1300U, 1304U, - 1308U, 1312U, 1316U, 1320U, 1324U, 1328U, 1332U, 1336U, 1340U, 1344U, 1348U, - 1352U, 1356U, 1360U, 1364U, 1368U, 1372U, 1376U, 1380U, 1384U, 1388U, 1392U, - 1396U, 1400U, 1404U, 1408U, 1412U, 1416U, 1420U, 1424U, 1428U, 1432U, 1436U, - 1440U, 1444U, 1448U, 1452U, 1456U, 1460U, 1464U, 1468U, 1472U, 1476U, 1480U, - 1484U, 1488U, 1492U, 1496U, 1500U, 1504U, 1508U, 1512U, 1516U, 1520U, 1524U, - 1528U, 1532U, 1536U, 1540U, 1544U, 1548U, 1552U, 1556U, 1560U, 1564U, 1568U, - 1572U, 1576U, 1580U, 1584U, 1588U, 1592U, 1596U, 1600U, 1604U, 1608U, 1612U, - 1616U, 1620U, 1624U, 1628U, 1632U, 1636U, 1640U, 1644U, 1648U, 1652U, 1656U, - 1660U, 1664U, 1668U, 1672U, 1676U, 1680U, 1684U, 1688U, 1692U, 1696U, 1700U, - 1704U, 1708U, 1712U, 1716U, 1720U, 1724U, 1728U, 1732U, 1736U, 1740U, 1744U, - 1748U, 1752U, 1756U, 1760U, 1764U, 1768U, 1772U, 1776U, 1780U, 1784U, 1788U, - 1792U, 1796U, 1800U, 1804U, 1808U, 1812U, 1816U, 1820U, 1824U, 1828U, 1832U, - 1836U, 1840U, 1844U, 1848U, 1852U, 1856U, 1860U, 1864U, 1868U, 1872U, 1876U, - 1880U, 1884U, 1888U, 1892U, 1896U, 1900U, 1904U, 1908U, 1912U, 1916U, 1920U, - 1924U, 1928U, 1932U, 1936U, 1940U, 1944U, 1948U, 1952U, 1956U, 1960U, 1964U, - 1968U, 1972U, 1976U, 1980U, 1984U, 1988U, 1992U, 1996U, 2000U, 2004U, 2008U, - 2012U, 2016U, 2020U, 2024U, 2028U, 2032U, 2036U, 2040U, 2044U, 2048U, 2052U, - 2056U, 2060U, 2064U, 2068U, 2072U, 2076U, 2080U, 2084U, 2088U, 2092U, 2096U, - 2100U, 2104U, 2108U, 2112U, 2116U, 2120U, 2124U, 2128U, 2132U, 2136U, 2140U, - 2144U, 2148U, 2152U, 2156U, 2160U, 2164U, 2168U, 2172U, 2176U, 2180U, 2184U, - 2188U, 2192U, 2196U, 2200U, 2204U, 2208U, 2212U, 2216U, 2220U, 2224U, 2228U, - 2232U, 2236U, 2240U, 2244U, 2248U, 2252U, 2256U, 2260U, 2264U, 2268U, 2272U, - 2276U, 2280U, 2284U, 2288U, 2292U, 2296U, 2300U, 2304U, 2308U, 2312U, 2316U, - 2320U, 2324U, 2328U, 2332U, 2336U, 2340U, 2344U, 2348U, 2352U, 2356U, 2360U, - 2364U, 2368U, 2372U, 2376U, 2380U, 2384U, 2388U, 2392U, 2396U, 2400U, 2404U, - 2408U, 2412U, 2416U, 2420U, 2424U, 2428U, 2432U, 2436U, 2440U, 2444U, 2448U, - 2452U, 2456U, 2460U, 2464U, 2468U, 2472U, 2476U, 2480U, 2484U, 2488U, 2492U, - 2496U, 2500U, 2504U, 2508U, 2512U, 2516U, 2520U, 2524U, 2528U, 2532U, 2536U, - 2540U, 2544U, 2548U, 2552U, 2556U, 2560U, 2564U, 2568U, 2572U, 2576U, 2580U, - 2584U, 2588U, 2592U, 2596U, 2600U, 2604U, 2608U, 2612U, 2616U, 2620U, 2624U, - 2628U, 2632U, 2636U, 2640U, 2644U, 2648U, 2652U, 2656U, 2660U, 2664U, 2668U, - 2672U, 2676U, 2680U, 2684U, 2688U, 2692U, 2696U, 2700U, 2704U, 2708U, 2712U, - 2716U, 2720U, 2724U, 2728U, 2732U, 2736U, 2740U, 2744U, 2748U, 2752U, 2756U, - 2760U, 2764U, 2768U, 2772U, 2776U, 2780U, 2784U, 2788U, 2792U, 2796U, 2800U, - 2804U, 2808U, 2812U, 2816U, 2820U, 2824U, 2828U, 2832U, 2836U, 2840U, 2844U, - 2848U, 2852U, 2856U, 2860U, 2864U, 2868U, 2872U, 2876U, 2880U, 2884U, 2888U, - 2892U, 2896U, 2900U, 2904U, 2908U, 2912U, 2916U, 2920U, 2924U, 2928U, 2932U, - 2936U, 2940U, 2944U, 2948U, 2952U, 2956U, 2960U, 2964U, 2968U, 2972U, 2976U, - 2980U, 2984U, 2988U, 2992U, 2996U, 3000U, 3004U, 3008U, 3012U, 3016U, 3020U, - 3024U, 3028U, 3032U, 3036U, 3040U, 3044U, 3048U, 3052U, 3056U, 3060U, 3064U, - 3068U, 3072U, 3076U, 3080U, 3084U, 3088U, 3092U, 3096U, 3100U, 3104U, 3108U, - 3112U, 3116U, 3120U, 3124U, 3128U, 3132U, 3136U, 3140U, 3144U, 3148U, 3152U, - 3156U, 3160U, 3164U, 3168U, 3172U, 3176U, 3180U, 3184U, 3188U, 3192U, 3196U, - 3200U, 3204U, 3208U, 3212U, 3216U, 3220U, 3224U, 3228U, 3232U, 3236U, 3240U, - 3244U, 3248U, 3252U, 3256U, 3260U, 3264U, 3268U, 3272U, 3276U, 3280U, 3284U, - 3288U, 3292U, 3296U, 3300U, 3304U, 3308U, 3312U, 3316U, 3320U, 3324U, 3328U, - 3332U, 3336U, 3340U, 3344U, 3348U, 3352U, 3356U, 3360U, 3364U, 3368U, 3372U, - 3376U, 3380U, 3384U, 3388U, 3392U, 3396U, 3400U, 3404U, 3408U, 3412U, 3416U, - 3420U, 3424U, 3428U, 3432U, 3436U, 3440U, 3444U, 3448U, 3452U, 3456U, 3460U, - 3464U, 3468U, 3472U, 3476U, 3480U, 3484U, 3488U, 3492U, 3496U, 3500U, 3504U, - 3508U, 3512U, 3516U, 3520U, 3524U, 3528U, 3532U, 3536U, 3540U, 3544U, 3548U, - 3552U, 3556U, 3560U, 3564U, 3568U, 3572U, 3576U, 3580U, 3584U, 3588U, 3592U, - 3596U, 3600U, 3604U, 3608U, 3612U, 3616U, 3620U, 3624U, 3628U, 3632U, 3636U, - 3640U, 3644U, 3648U, 3652U, 3656U, 3660U, 3664U, 3668U, 3672U, 3676U, 3680U, - 3684U, 3688U, 3692U, 3696U, 3700U, 3704U, 3708U, 3712U, 3716U, 3720U, 3724U, - 3728U, 3732U, 3736U, 3740U, 3744U, 3748U, 3752U, 3756U, 3760U, 3764U, 3768U, - 3772U, 3776U, 3780U, 3784U, 3788U, 3792U, 3796U, 3800U, 3804U, 3808U, 3812U, - 3816U, 3820U, 3824U, 3828U, 3832U, 3836U, 3840U, 3844U, 3848U, 3852U, 3856U, - 3860U, 3864U, 3868U, 3872U, 3876U, 3880U, 3884U, 3888U, 3892U, 3896U, 3900U, - 3904U, 3908U, 3912U, 3916U, 3920U, 3924U, 3928U, 3932U, 3936U, 3940U, 3944U, - 3948U, 3952U, 3956U, 3960U, 3964U, 3968U, 3972U, 3976U, 3980U, 3984U, 3988U, - 3992U, 3996U, 4000U, 4004U, 4008U, 4012U, 4016U, 4020U, 4024U, 4028U, 4032U, - 4036U, 4040U, 4044U, 4048U, 4052U, 4056U, 4060U, 4064U, 4068U, 4072U, 4076U, - 4080U, 4084U, 4088U, 4092U } -}; - -/* - * File trailer for generated code. - * - * [EOF] - */ +/* + * File: HVAC_model_data.c + * + * Code generated for Simulink model 'HVAC_model'. + * + * Model version : 1.625 + * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 + * C/C++ source code generated on : Tue Feb 17 18:15:10 2026 + * + * Target selection: ert.tlc + * Embedded hardware selection: ARM Compatible->ARM Cortex-M + * Emulation hardware selection: + * Differs from embedded hardware (MATLAB Host) + * Code generation objectives: Unspecified + * Validation result: Not run + */ + +#include "HVAC_model.h" + +/* Constant parameters (default storage) */ +const ConstP rtConstP = { + /* Expression: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 698 694 690 686 683 679 676 672 668 665 662 658 655 652 648 645 642 639 636 632 629 626 623 620 617 615 612 609 606 603 600 598 595 592 590 587 584 582 579 577 574 571 569 566 564 562 559 557 554 552 550 547 545 543 540 538 536 534 532 529 527 525 523 521 519 517 514 512 510 508 506 504 502 500 498 496 494 492 490 489 487 485 483 481 479 477 475 474 472 470 468 466 464 463 461 459 457 456 454 452 451 449 447 445 444 442 440 439 437 436 434 432 431 429 428 426 424 423 421 420 418 417 415 414 412 411 409 408 406 405 403 402 400 399 397 396 394 393 391 390 389 387 386 384 383 382 380 379 377 376 375 373 372 371 369 368 366 365 364 362 361 360 359 357 356 355 353 352 351 349 348 347 346 344 343 342 341 339 338 337 336 334 333 332 331 330 328 327 326 325 324 322 321 320 319 318 317 315 314 313 312 311 310 308 307 306 305 304 303 302 300 299 298 297 296 295 294 293 292 290 289 288 287 286 285 284 283 282 281 280 279 278 276 275 274 273 272 271 270 269 268 267 266 265 264 263 262 261 260 259 258 257 256 255 254 253 252 251 250 249 248 247 246 245 244 243 242 241 240 239 238 237 236 235 234 233 232 231 230 229 228 227 226 225 224 223 222 221 220 219 218 217 217 216 215 214 213 212 211 210 209 208 207 206 205 204 203 202 202 201 200 199 198 197 196 195 194 193 192 192 191 190 189 188 187 186 185 184 183 183 182 181 180 179 178 177 176 175 175 174 173 172 171 170 169 168 168 167 166 165 164 163 162 161 161 160 159 158 157 156 155 155 154 153 152 151 150 149 149 148 147 146 145 144 143 143 142 141 140 139 138 138 137 136 135 134 133 133 132 131 130 129 128 128 127 126 125 124 123 123 122 121 120 119 118 118 117 116 115 114 114 113 112 111 110 109 109 108 107 106 105 105 104 103 102 101 100 100 99 98 97 96 96 95 94 93 92 91 91 90 89 88 87 87 86 85 84 83 83 82 81 80 79 78 78 77 76 75 74 74 73 72 71 70 70 69 68 67 66 66 65 64 63 62 62 61 60 59 58 58 57 56 55 54 54 53 52 51 50 50 49 48 47 46 45 45 44 43 42 41 41 40 39 38 37 37 36 35 34 33 33 32 31 30 29 29 28 27 26 25 25 24 23 22 21 21 20 19 18 17 17 16 15 14 13 13 12 11 10 9 9 8 7 6 5 5 4 3 2 1 1 0 0 -1 -2 -3 -3 -4 -5 -6 -7 -7 -8 -9 -10 -11 -12 -12 -13 -14 -15 -16 -17 -17 -18 -19 -20 -21 -22 -22 -23 -24 -25 -26 -27 -27 -28 -29 -30 -31 -32 -32 -33 -34 -35 -36 -37 -37 -38 -39 -40 -41 -42 -42 -43 -44 -45 -46 -47 -48 -48 -49 -50 -51 -52 -53 -53 -54 -55 -56 -57 -58 -59 -59 -60 -61 -62 -63 -64 -65 -66 -66 -67 -68 -69 -70 -71 -72 -73 -73 -74 -75 -76 -77 -78 -79 -80 -80 -81 -82 -83 -84 -85 -86 -87 -88 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155 -156 -157 -158 -159 -161 -162 -163 -164 -165 -166 -167 -168 -169 -170 -171 -172 -173 -175 -176 -177 -178 -179 -180 -181 -182 -183 -185 -186 -187 -188 -189 -190 -191 -193 -194 -195 -196 -197 -198 -200 -201 -202 -203 -204 -206 -207 -208 -209 -211 -212 -213 -214 -216 -217 -218 -219 -221 -222 -223 -225 -226 -227 -228 -230 -231 -232 -234 -235 -237 -238 -239 -241 -242 -243 -245 -246 -248 -249 -250 -252 -253 -255 -256 -258 -259 -261 -262 -263 -265 -266 -268 -270 -271 -273 -274 -276 -277 -279 -280 -282 -284 -285 -287 -288 -290 -292 -293 -295 -297 -299 -300 -302 -304 -305 -307 -309 -311 -313 -314 -316 -318 -320 -322 -324 -326 -328 -329 -331 -333 -335 -337 -339 -341 -344 -346 -348 -350 -352 -354 -356 -359 -361 -363 -365 -368 -370 -372 -375 -377 -380 -382 -385 -387 -390 -392 -395 -398 -400 -403 -406 -409 -412 -414 -417 -420 -423 -427 -430 -433 -436 -440 -443 -446 -450 -453 -457 -461 -465 -469 -473 -477 -481 -485 -490 -494 -499 -504 -509 -514 -519 -524 -530 -536 -542 -548 -555 -561 -569 -576 -584 -592 -601 -611 -621 -632 -644 -657 -671 -687 -705 -727 -752 -785 -831 -911] + * Referenced by: '/1-D Lookup Table' + */ + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 698.0, 694.0, 690.0, 686.0, 683.0, + 679.0, 676.0, 672.0, 668.0, 665.0, 662.0, 658.0, 655.0, 652.0, 648.0, 645.0, + 642.0, 639.0, 636.0, 632.0, 629.0, 626.0, 623.0, 620.0, 617.0, 615.0, 612.0, + 609.0, 606.0, 603.0, 600.0, 598.0, 595.0, 592.0, 590.0, 587.0, 584.0, 582.0, + 579.0, 577.0, 574.0, 571.0, 569.0, 566.0, 564.0, 562.0, 559.0, 557.0, 554.0, + 552.0, 550.0, 547.0, 545.0, 543.0, 540.0, 538.0, 536.0, 534.0, 532.0, 529.0, + 527.0, 525.0, 523.0, 521.0, 519.0, 517.0, 514.0, 512.0, 510.0, 508.0, 506.0, + 504.0, 502.0, 500.0, 498.0, 496.0, 494.0, 492.0, 490.0, 489.0, 487.0, 485.0, + 483.0, 481.0, 479.0, 477.0, 475.0, 474.0, 472.0, 470.0, 468.0, 466.0, 464.0, + 463.0, 461.0, 459.0, 457.0, 456.0, 454.0, 452.0, 451.0, 449.0, 447.0, 445.0, + 444.0, 442.0, 440.0, 439.0, 437.0, 436.0, 434.0, 432.0, 431.0, 429.0, 428.0, + 426.0, 424.0, 423.0, 421.0, 420.0, 418.0, 417.0, 415.0, 414.0, 412.0, 411.0, + 409.0, 408.0, 406.0, 405.0, 403.0, 402.0, 400.0, 399.0, 397.0, 396.0, 394.0, + 393.0, 391.0, 390.0, 389.0, 387.0, 386.0, 384.0, 383.0, 382.0, 380.0, 379.0, + 377.0, 376.0, 375.0, 373.0, 372.0, 371.0, 369.0, 368.0, 366.0, 365.0, 364.0, + 362.0, 361.0, 360.0, 359.0, 357.0, 356.0, 355.0, 353.0, 352.0, 351.0, 349.0, + 348.0, 347.0, 346.0, 344.0, 343.0, 342.0, 341.0, 339.0, 338.0, 337.0, 336.0, + 334.0, 333.0, 332.0, 331.0, 330.0, 328.0, 327.0, 326.0, 325.0, 324.0, 322.0, + 321.0, 320.0, 319.0, 318.0, 317.0, 315.0, 314.0, 313.0, 312.0, 311.0, 310.0, + 308.0, 307.0, 306.0, 305.0, 304.0, 303.0, 302.0, 300.0, 299.0, 298.0, 297.0, + 296.0, 295.0, 294.0, 293.0, 292.0, 290.0, 289.0, 288.0, 287.0, 286.0, 285.0, + 284.0, 283.0, 282.0, 281.0, 280.0, 279.0, 278.0, 276.0, 275.0, 274.0, 273.0, + 272.0, 271.0, 270.0, 269.0, 268.0, 267.0, 266.0, 265.0, 264.0, 263.0, 262.0, + 261.0, 260.0, 259.0, 258.0, 257.0, 256.0, 255.0, 254.0, 253.0, 252.0, 251.0, + 250.0, 249.0, 248.0, 247.0, 246.0, 245.0, 244.0, 243.0, 242.0, 241.0, 240.0, + 239.0, 238.0, 237.0, 236.0, 235.0, 234.0, 233.0, 232.0, 231.0, 230.0, 229.0, + 228.0, 227.0, 226.0, 225.0, 224.0, 223.0, 222.0, 221.0, 220.0, 219.0, 218.0, + 217.0, 217.0, 216.0, 215.0, 214.0, 213.0, 212.0, 211.0, 210.0, 209.0, 208.0, + 207.0, 206.0, 205.0, 204.0, 203.0, 202.0, 202.0, 201.0, 200.0, 199.0, 198.0, + 197.0, 196.0, 195.0, 194.0, 193.0, 192.0, 192.0, 191.0, 190.0, 189.0, 188.0, + 187.0, 186.0, 185.0, 184.0, 183.0, 183.0, 182.0, 181.0, 180.0, 179.0, 178.0, + 177.0, 176.0, 175.0, 175.0, 174.0, 173.0, 172.0, 171.0, 170.0, 169.0, 168.0, + 168.0, 167.0, 166.0, 165.0, 164.0, 163.0, 162.0, 161.0, 161.0, 160.0, 159.0, + 158.0, 157.0, 156.0, 155.0, 155.0, 154.0, 153.0, 152.0, 151.0, 150.0, 149.0, + 149.0, 148.0, 147.0, 146.0, 145.0, 144.0, 143.0, 143.0, 142.0, 141.0, 140.0, + 139.0, 138.0, 138.0, 137.0, 136.0, 135.0, 134.0, 133.0, 133.0, 132.0, 131.0, + 130.0, 129.0, 128.0, 128.0, 127.0, 126.0, 125.0, 124.0, 123.0, 123.0, 122.0, + 121.0, 120.0, 119.0, 118.0, 118.0, 117.0, 116.0, 115.0, 114.0, 114.0, 113.0, + 112.0, 111.0, 110.0, 109.0, 109.0, 108.0, 107.0, 106.0, 105.0, 105.0, 104.0, + 103.0, 102.0, 101.0, 100.0, 100.0, 99.0, 98.0, 97.0, 96.0, 96.0, 95.0, 94.0, + 93.0, 92.0, 91.0, 91.0, 90.0, 89.0, 88.0, 87.0, 87.0, 86.0, 85.0, 84.0, 83.0, + 83.0, 82.0, 81.0, 80.0, 79.0, 78.0, 78.0, 77.0, 76.0, 75.0, 74.0, 74.0, 73.0, + 72.0, 71.0, 70.0, 70.0, 69.0, 68.0, 67.0, 66.0, 66.0, 65.0, 64.0, 63.0, 62.0, + 62.0, 61.0, 60.0, 59.0, 58.0, 58.0, 57.0, 56.0, 55.0, 54.0, 54.0, 53.0, 52.0, + 51.0, 50.0, 50.0, 49.0, 48.0, 47.0, 46.0, 45.0, 45.0, 44.0, 43.0, 42.0, 41.0, + 41.0, 40.0, 39.0, 38.0, 37.0, 37.0, 36.0, 35.0, 34.0, 33.0, 33.0, 32.0, 31.0, + 30.0, 29.0, 29.0, 28.0, 27.0, 26.0, 25.0, 25.0, 24.0, 23.0, 22.0, 21.0, 21.0, + 20.0, 19.0, 18.0, 17.0, 17.0, 16.0, 15.0, 14.0, 13.0, 13.0, 12.0, 11.0, 10.0, + 9.0, 9.0, 8.0, 7.0, 6.0, 5.0, 5.0, 4.0, 3.0, 2.0, 1.0, 1.0, 0.0, 0.0, -1.0, + -2.0, -3.0, -3.0, -4.0, -5.0, -6.0, -7.0, -7.0, -8.0, -9.0, -10.0, -11.0, + -12.0, -12.0, -13.0, -14.0, -15.0, -16.0, -17.0, -17.0, -18.0, -19.0, -20.0, + -21.0, -22.0, -22.0, -23.0, -24.0, -25.0, -26.0, -27.0, -27.0, -28.0, -29.0, + -30.0, -31.0, -32.0, -32.0, -33.0, -34.0, -35.0, -36.0, -37.0, -37.0, -38.0, + -39.0, -40.0, -41.0, -42.0, -42.0, -43.0, -44.0, -45.0, -46.0, -47.0, -48.0, + -48.0, -49.0, -50.0, -51.0, -52.0, -53.0, -53.0, -54.0, -55.0, -56.0, -57.0, + -58.0, -59.0, -59.0, -60.0, -61.0, -62.0, -63.0, -64.0, -65.0, -66.0, -66.0, + -67.0, -68.0, -69.0, -70.0, -71.0, -72.0, -73.0, -73.0, -74.0, -75.0, -76.0, + -77.0, -78.0, -79.0, -80.0, -80.0, -81.0, -82.0, -83.0, -84.0, -85.0, -86.0, + -87.0, -88.0, -88.0, -89.0, -90.0, -91.0, -92.0, -93.0, -94.0, -95.0, -96.0, + -97.0, -98.0, -98.0, -99.0, -100.0, -101.0, -102.0, -103.0, -104.0, -105.0, + -106.0, -107.0, -108.0, -109.0, -110.0, -111.0, -112.0, -113.0, -113.0, + -114.0, -115.0, -116.0, -117.0, -118.0, -119.0, -120.0, -121.0, -122.0, + -123.0, -124.0, -125.0, -126.0, -127.0, -128.0, -129.0, -130.0, -131.0, + -132.0, -133.0, -134.0, -135.0, -136.0, -137.0, -138.0, -139.0, -140.0, + -141.0, -142.0, -143.0, -144.0, -145.0, -146.0, -147.0, -148.0, -149.0, + -150.0, -151.0, -152.0, -153.0, -154.0, -155.0, -156.0, -157.0, -158.0, + -159.0, -161.0, -162.0, -163.0, -164.0, -165.0, -166.0, -167.0, -168.0, + -169.0, -170.0, -171.0, -172.0, -173.0, -175.0, -176.0, -177.0, -178.0, + -179.0, -180.0, -181.0, -182.0, -183.0, -185.0, -186.0, -187.0, -188.0, + -189.0, -190.0, -191.0, -193.0, -194.0, -195.0, -196.0, -197.0, -198.0, + -200.0, -201.0, -202.0, -203.0, -204.0, -206.0, -207.0, -208.0, -209.0, + -211.0, -212.0, -213.0, -214.0, -216.0, -217.0, -218.0, -219.0, -221.0, + -222.0, -223.0, -225.0, -226.0, -227.0, -228.0, -230.0, -231.0, -232.0, + -234.0, -235.0, -237.0, -238.0, -239.0, -241.0, -242.0, -243.0, -245.0, + -246.0, -248.0, -249.0, -250.0, -252.0, -253.0, -255.0, -256.0, -258.0, + -259.0, -261.0, -262.0, -263.0, -265.0, -266.0, -268.0, -270.0, -271.0, + -273.0, -274.0, -276.0, -277.0, -279.0, -280.0, -282.0, -284.0, -285.0, + -287.0, -288.0, -290.0, -292.0, -293.0, -295.0, -297.0, -299.0, -300.0, + -302.0, -304.0, -305.0, -307.0, -309.0, -311.0, -313.0, -314.0, -316.0, + -318.0, -320.0, -322.0, -324.0, -326.0, -328.0, -329.0, -331.0, -333.0, + -335.0, -337.0, -339.0, -341.0, -344.0, -346.0, -348.0, -350.0, -352.0, + -354.0, -356.0, -359.0, -361.0, -363.0, -365.0, -368.0, -370.0, -372.0, + -375.0, -377.0, -380.0, -382.0, -385.0, -387.0, -390.0, -392.0, -395.0, + -398.0, -400.0, -403.0, -406.0, -409.0, -412.0, -414.0, -417.0, -420.0, + -423.0, -427.0, -430.0, -433.0, -436.0, -440.0, -443.0, -446.0, -450.0, + -453.0, -457.0, -461.0, -465.0, -469.0, -473.0, -477.0, -481.0, -485.0, + -490.0, -494.0, -499.0, -504.0, -509.0, -514.0, -519.0, -524.0, -530.0, + -536.0, -542.0, -548.0, -555.0, -561.0, -569.0, -576.0, -584.0, -592.0, + -601.0, -611.0, -621.0, -632.0, -644.0, -657.0, -671.0, -687.0, -705.0, + -727.0, -752.0, -785.0, -831.0, -911.0 }, + + /* Pooled Parameter (Expression: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 848 844 840 836 832 829 825 821 818 814 811 807 804 800 797 794 790 787 784 781 778 774 771 768 765 762 759 756 753 750 748 745 742 739 736 734 731 728 725 723 720 717 715 712 710 707 705 702 700 697 695 692 690 688 685 683 680 678 676 674 671 669 667 665 662 660 658 656 654 652 649 647 645 643 641 639 637 635 633 631 629 627 625 623 621 619 617 615 613 611 609 607 606 604 602 600 598 596 595 593 591 589 587 586 584 582 580 579 577 575 573 572 570 568 567 565 563 562 560 558 557 555 554 552 550 549 547 546 544 542 541 539 538 536 535 533 532 530 529 527 526 524 523 521 520 518 517 515 514 512 511 509 508 507 505 504 502 501 499 498 497 495 494 492 491 490 488 487 486 484 483 482 480 479 478 476 475 474 472 471 470 468 467 466 465 463 462 461 459 458 457 456 454 453 452 451 449 448 447 446 444 443 442 441 440 438 437 436 435 433 432 431 430 429 427 426 425 424 423 422 420 419 418 417 416 415 413 412 411 410 409 408 407 405 404 403 402 401 400 399 398 397 395 394 393 392 391 390 389 388 387 385 384 383 382 381 380 379 378 377 376 375 374 373 372 370 369 368 367 366 365 364 363 362 361 360 359 358 357 356 355 354 353 352 351 350 349 348 347 346 345 344 343 342 341 340 339 338 337 336 335 334 333 332 331 330 329 328 327 326 325 324 323 322 321 320 319 318 317 316 315 314 313 312 311 310 309 308 307 306 306 305 304 303 302 301 300 299 298 297 296 295 294 293 292 291 290 290 289 288 287 286 285 284 283 282 281 280 279 278 277 277 276 275 274 273 272 271 270 269 268 267 266 266 265 264 263 262 261 260 259 258 257 257 256 255 254 253 252 251 250 249 248 248 247 246 245 244 243 242 241 240 240 239 238 237 236 235 234 233 232 232 231 230 229 228 227 226 225 225 224 223 222 221 220 219 218 218 217 216 215 214 213 212 211 211 210 209 208 207 206 205 204 204 203 202 201 200 199 198 198 197 196 195 194 193 192 191 191 190 189 188 187 186 185 185 184 183 182 181 180 179 178 178 177 176 175 174 173 172 172 171 170 169 168 167 166 166 165 164 163 162 161 160 160 159 158 157 156 155 154 154 153 152 151 150 149 148 147 147 146 145 144 143 142 141 141 140 139 138 137 136 135 135 134 133 132 131 130 129 128 128 127 126 125 124 123 122 122 121 120 119 118 117 116 115 115 114 113 112 111 110 109 108 108 107 106 105 104 103 102 101 101 100 99 98 97 96 95 94 94 93 92 91 90 89 88 87 86 86 85 84 83 82 81 80 79 78 77 77 76 75 74 73 72 71 70 69 68 68 67 66 65 64 63 62 61 60 59 58 58 57 56 55 54 53 52 51 50 49 48 47 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -45 -46 -47 -48 -49 -50 -51 -52 -53 -55 -56 -57 -58 -59 -60 -61 -63 -64 -65 -66 -67 -68 -69 -71 -72 -73 -74 -75 -77 -78 -79 -80 -81 -83 -84 -85 -86 -87 -89 -90 -91 -92 -94 -95 -96 -97 -99 -100 -101 -102 -104 -105 -106 -108 -109 -110 -112 -113 -114 -116 -117 -118 -120 -121 -122 -124 -125 -126 -128 -129 -131 -132 -133 -135 -136 -138 -139 -141 -142 -144 -145 -146 -148 -149 -151 -152 -154 -155 -157 -159 -160 -162 -163 -165 -166 -168 -170 -171 -173 -174 -176 -178 -179 -181 -183 -184 -186 -188 -189 -191 -193 -195 -196 -198 -200 -202 -204 -205 -207 -209 -211 -213 -215 -217 -219 -221 -223 -225 -227 -229 -231 -233 -235 -237 -239 -241 -243 -245 -248 -250 -252 -254 -257 -259 -261 -263 -266 -268 -271 -273 -276 -278 -281 -283 -286 -288 -291 -294 -296 -299 -302 -305 -308 -311 -314 -317 -320 -323 -326 -329 -332 -336 -339 -342 -346 -349 -353 -357 -360 -364 -368 -372 -376 -380 -384 -389 -393 -398 -402 -407 -412 -417 -422 -428 -433 -439 -445 -451 -457 -463 -470 -477 -485 -492 -500 -509 -518 -528 -538 -549 -560 -573 -587 -602 -620 -639 -662 -690 -725 -774 -859 ]) + * Referenced by: + * '/1-D Lookup Table' + * '/1-D Lookup Table' + */ + { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 848.0, + 844.0, 840.0, 836.0, 832.0, 829.0, 825.0, 821.0, 818.0, 814.0, 811.0, 807.0, + 804.0, 800.0, 797.0, 794.0, 790.0, 787.0, 784.0, 781.0, 778.0, 774.0, 771.0, + 768.0, 765.0, 762.0, 759.0, 756.0, 753.0, 750.0, 748.0, 745.0, 742.0, 739.0, + 736.0, 734.0, 731.0, 728.0, 725.0, 723.0, 720.0, 717.0, 715.0, 712.0, 710.0, + 707.0, 705.0, 702.0, 700.0, 697.0, 695.0, 692.0, 690.0, 688.0, 685.0, 683.0, + 680.0, 678.0, 676.0, 674.0, 671.0, 669.0, 667.0, 665.0, 662.0, 660.0, 658.0, + 656.0, 654.0, 652.0, 649.0, 647.0, 645.0, 643.0, 641.0, 639.0, 637.0, 635.0, + 633.0, 631.0, 629.0, 627.0, 625.0, 623.0, 621.0, 619.0, 617.0, 615.0, 613.0, + 611.0, 609.0, 607.0, 606.0, 604.0, 602.0, 600.0, 598.0, 596.0, 595.0, 593.0, + 591.0, 589.0, 587.0, 586.0, 584.0, 582.0, 580.0, 579.0, 577.0, 575.0, 573.0, + 572.0, 570.0, 568.0, 567.0, 565.0, 563.0, 562.0, 560.0, 558.0, 557.0, 555.0, + 554.0, 552.0, 550.0, 549.0, 547.0, 546.0, 544.0, 542.0, 541.0, 539.0, 538.0, + 536.0, 535.0, 533.0, 532.0, 530.0, 529.0, 527.0, 526.0, 524.0, 523.0, 521.0, + 520.0, 518.0, 517.0, 515.0, 514.0, 512.0, 511.0, 509.0, 508.0, 507.0, 505.0, + 504.0, 502.0, 501.0, 499.0, 498.0, 497.0, 495.0, 494.0, 492.0, 491.0, 490.0, + 488.0, 487.0, 486.0, 484.0, 483.0, 482.0, 480.0, 479.0, 478.0, 476.0, 475.0, + 474.0, 472.0, 471.0, 470.0, 468.0, 467.0, 466.0, 465.0, 463.0, 462.0, 461.0, + 459.0, 458.0, 457.0, 456.0, 454.0, 453.0, 452.0, 451.0, 449.0, 448.0, 447.0, + 446.0, 444.0, 443.0, 442.0, 441.0, 440.0, 438.0, 437.0, 436.0, 435.0, 433.0, + 432.0, 431.0, 430.0, 429.0, 427.0, 426.0, 425.0, 424.0, 423.0, 422.0, 420.0, + 419.0, 418.0, 417.0, 416.0, 415.0, 413.0, 412.0, 411.0, 410.0, 409.0, 408.0, + 407.0, 405.0, 404.0, 403.0, 402.0, 401.0, 400.0, 399.0, 398.0, 397.0, 395.0, + 394.0, 393.0, 392.0, 391.0, 390.0, 389.0, 388.0, 387.0, 385.0, 384.0, 383.0, + 382.0, 381.0, 380.0, 379.0, 378.0, 377.0, 376.0, 375.0, 374.0, 373.0, 372.0, + 370.0, 369.0, 368.0, 367.0, 366.0, 365.0, 364.0, 363.0, 362.0, 361.0, 360.0, + 359.0, 358.0, 357.0, 356.0, 355.0, 354.0, 353.0, 352.0, 351.0, 350.0, 349.0, + 348.0, 347.0, 346.0, 345.0, 344.0, 343.0, 342.0, 341.0, 340.0, 339.0, 338.0, + 337.0, 336.0, 335.0, 334.0, 333.0, 332.0, 331.0, 330.0, 329.0, 328.0, 327.0, + 326.0, 325.0, 324.0, 323.0, 322.0, 321.0, 320.0, 319.0, 318.0, 317.0, 316.0, + 315.0, 314.0, 313.0, 312.0, 311.0, 310.0, 309.0, 308.0, 307.0, 306.0, 306.0, + 305.0, 304.0, 303.0, 302.0, 301.0, 300.0, 299.0, 298.0, 297.0, 296.0, 295.0, + 294.0, 293.0, 292.0, 291.0, 290.0, 290.0, 289.0, 288.0, 287.0, 286.0, 285.0, + 284.0, 283.0, 282.0, 281.0, 280.0, 279.0, 278.0, 277.0, 277.0, 276.0, 275.0, + 274.0, 273.0, 272.0, 271.0, 270.0, 269.0, 268.0, 267.0, 266.0, 266.0, 265.0, + 264.0, 263.0, 262.0, 261.0, 260.0, 259.0, 258.0, 257.0, 257.0, 256.0, 255.0, + 254.0, 253.0, 252.0, 251.0, 250.0, 249.0, 248.0, 248.0, 247.0, 246.0, 245.0, + 244.0, 243.0, 242.0, 241.0, 240.0, 240.0, 239.0, 238.0, 237.0, 236.0, 235.0, + 234.0, 233.0, 232.0, 232.0, 231.0, 230.0, 229.0, 228.0, 227.0, 226.0, 225.0, + 225.0, 224.0, 223.0, 222.0, 221.0, 220.0, 219.0, 218.0, 218.0, 217.0, 216.0, + 215.0, 214.0, 213.0, 212.0, 211.0, 211.0, 210.0, 209.0, 208.0, 207.0, 206.0, + 205.0, 204.0, 204.0, 203.0, 202.0, 201.0, 200.0, 199.0, 198.0, 198.0, 197.0, + 196.0, 195.0, 194.0, 193.0, 192.0, 191.0, 191.0, 190.0, 189.0, 188.0, 187.0, + 186.0, 185.0, 185.0, 184.0, 183.0, 182.0, 181.0, 180.0, 179.0, 178.0, 178.0, + 177.0, 176.0, 175.0, 174.0, 173.0, 172.0, 172.0, 171.0, 170.0, 169.0, 168.0, + 167.0, 166.0, 166.0, 165.0, 164.0, 163.0, 162.0, 161.0, 160.0, 160.0, 159.0, + 158.0, 157.0, 156.0, 155.0, 154.0, 154.0, 153.0, 152.0, 151.0, 150.0, 149.0, + 148.0, 147.0, 147.0, 146.0, 145.0, 144.0, 143.0, 142.0, 141.0, 141.0, 140.0, + 139.0, 138.0, 137.0, 136.0, 135.0, 135.0, 134.0, 133.0, 132.0, 131.0, 130.0, + 129.0, 128.0, 128.0, 127.0, 126.0, 125.0, 124.0, 123.0, 122.0, 122.0, 121.0, + 120.0, 119.0, 118.0, 117.0, 116.0, 115.0, 115.0, 114.0, 113.0, 112.0, 111.0, + 110.0, 109.0, 108.0, 108.0, 107.0, 106.0, 105.0, 104.0, 103.0, 102.0, 101.0, + 101.0, 100.0, 99.0, 98.0, 97.0, 96.0, 95.0, 94.0, 94.0, 93.0, 92.0, 91.0, + 90.0, 89.0, 88.0, 87.0, 86.0, 86.0, 85.0, 84.0, 83.0, 82.0, 81.0, 80.0, 79.0, + 78.0, 77.0, 77.0, 76.0, 75.0, 74.0, 73.0, 72.0, 71.0, 70.0, 69.0, 68.0, 68.0, + 67.0, 66.0, 65.0, 64.0, 63.0, 62.0, 61.0, 60.0, 59.0, 58.0, 58.0, 57.0, 56.0, + 55.0, 54.0, 53.0, 52.0, 51.0, 50.0, 49.0, 48.0, 47.0, 47.0, 46.0, 45.0, 44.0, + 43.0, 42.0, 41.0, 40.0, 39.0, 38.0, 37.0, 36.0, 35.0, 34.0, 33.0, 32.0, 31.0, + 31.0, 30.0, 29.0, 28.0, 27.0, 26.0, 25.0, 24.0, 23.0, 22.0, 21.0, 20.0, 19.0, + 18.0, 17.0, 16.0, 15.0, 14.0, 13.0, 12.0, 11.0, 10.0, 9.0, 8.0, 7.0, 6.0, + 5.0, 4.0, 3.0, 2.0, 1.0, 0.0, 0.0, -1.0, -2.0, -3.0, -4.0, -5.0, -6.0, -7.0, + -8.0, -9.0, -10.0, -11.0, -12.0, -13.0, -14.0, -15.0, -16.0, -17.0, -18.0, + -19.0, -20.0, -21.0, -22.0, -23.0, -24.0, -25.0, -26.0, -27.0, -28.0, -29.0, + -31.0, -32.0, -33.0, -34.0, -35.0, -36.0, -37.0, -38.0, -39.0, -40.0, -41.0, + -42.0, -43.0, -45.0, -46.0, -47.0, -48.0, -49.0, -50.0, -51.0, -52.0, -53.0, + -55.0, -56.0, -57.0, -58.0, -59.0, -60.0, -61.0, -63.0, -64.0, -65.0, -66.0, + -67.0, -68.0, -69.0, -71.0, -72.0, -73.0, -74.0, -75.0, -77.0, -78.0, -79.0, + -80.0, -81.0, -83.0, -84.0, -85.0, -86.0, -87.0, -89.0, -90.0, -91.0, -92.0, + -94.0, -95.0, -96.0, -97.0, -99.0, -100.0, -101.0, -102.0, -104.0, -105.0, + -106.0, -108.0, -109.0, -110.0, -112.0, -113.0, -114.0, -116.0, -117.0, + -118.0, -120.0, -121.0, -122.0, -124.0, -125.0, -126.0, -128.0, -129.0, + -131.0, -132.0, -133.0, -135.0, -136.0, -138.0, -139.0, -141.0, -142.0, + -144.0, -145.0, -146.0, -148.0, -149.0, -151.0, -152.0, -154.0, -155.0, + -157.0, -159.0, -160.0, -162.0, -163.0, -165.0, -166.0, -168.0, -170.0, + -171.0, -173.0, -174.0, -176.0, -178.0, -179.0, -181.0, -183.0, -184.0, + -186.0, -188.0, -189.0, -191.0, -193.0, -195.0, -196.0, -198.0, -200.0, + -202.0, -204.0, -205.0, -207.0, -209.0, -211.0, -213.0, -215.0, -217.0, + -219.0, -221.0, -223.0, -225.0, -227.0, -229.0, -231.0, -233.0, -235.0, + -237.0, -239.0, -241.0, -243.0, -245.0, -248.0, -250.0, -252.0, -254.0, + -257.0, -259.0, -261.0, -263.0, -266.0, -268.0, -271.0, -273.0, -276.0, + -278.0, -281.0, -283.0, -286.0, -288.0, -291.0, -294.0, -296.0, -299.0, + -302.0, -305.0, -308.0, -311.0, -314.0, -317.0, -320.0, -323.0, -326.0, + -329.0, -332.0, -336.0, -339.0, -342.0, -346.0, -349.0, -353.0, -357.0, + -360.0, -364.0, -368.0, -372.0, -376.0, -380.0, -384.0, -389.0, -393.0, + -398.0, -402.0, -407.0, -412.0, -417.0, -422.0, -428.0, -433.0, -439.0, + -445.0, -451.0, -457.0, -463.0, -470.0, -477.0, -485.0, -492.0, -500.0, + -509.0, -518.0, -528.0, -538.0, -549.0, -560.0, -573.0, -587.0, -602.0, + -620.0, -639.0, -662.0, -690.0, -725.0, -774.0, -859.0 }, + + /* Expression: [-4 -2.4 -0.8 0.8 2.4 4 5.6 7.2 8.8 10.4 12 13.6 15.2 16.8 18.4 20 21.6 23.2 24.8 26.4 28 29.6 31.2 32.8 34.4 36 37.6 39.2 40.8 42.4 44 45.6 47.2 48.8 50.4 52 53.6 55.2 56.8 58.4 60 61.6 63.2 64.8 66.4 68 69.6 71.2 72.8 74.4 76 77.6 79.2 80.8 82.4 84 85.6 87.2 88.8 90.4 92 93.6 95.2 96.8 98.4 100 101.6 103.2 104.8 106.4 108 109.6 111.2 112.8 114.4 116 117.6 119.2 120.8 122.4 124 125.6 127.2 128.8 130.4 132 133.6 135.2 136.8 138.4 140 141.6 143.2 144.8 146.4 148 149.6 151.2 152.8 154.4 156 157.6 159.2 160.8 162.4 164 165.6 167.2 168.8 170.4 172 173.6 175.2 176.8 178.4 180 181.6 183.2 184.8 186.4 188 189.6 191.2 192.8 194.4 196 197.6 199.2 200.8 202.4 204 205.6 207.2 208.8 210.4 212 213.6 215.2 216.8 218.4 220 221.6 223.2 224.8 226.4 228 229.6 231.2 232.8 234.4 236 237.6 239.2 240.8 242.4 244 245.6 247.2 248.8 250.4 252 253.6 255.2 256.8 258.4 260 261.6 263.2 264.8 266.4 268 269.6 271.2 272.8 274.4 276 277.6 279.2 280.8 282.4 284 285.6 287.2 288.8 290.4 292 293.6 295.2 296.8 298.4 300 301.6 303.2 304.8 306.4 308 309.6 311.2 312.8 314.4 316 317.6 319.2 320.8 322.4 324 325.6 327.2 328.8 330.4 332 333.6 335.2 336.8 338.4 340 341.6 343.2 344.8 346.4 348 349.6 351.2 352.8 354.4 356 357.6 359.2 360.8 362.4 364 365.6 367.2 368.8 370.4 372 373.6 375.2 376.8 378.4 380 381.6 383.2 384.8 386.4 388 389.6 391.2 392.8 394.4 396 397.6 399.2 400.8 402.4 404 405.6 407.2 408.8 410.4 412 413.6 415.2 416.8 418.4 420 421.6 423.2 424.8 426.4 428 429.6 431.2 432.8 434.4 436 437.6 439.2 440.8 442.4 444 445.6 447.2 448.8 450.4 452 453.6 455.2 456.8 458.4 460 461.6 463.2 464.8 466.4 468 469.6 471.2 472.8 474.4 476 477.6 479.2 480.8 482.4 484 485.6 487.2 488.8 490.4 492 493.6 495.2 496.8 498.4 500 501.6 503.2 504.8 506.4 508 509.6 511.2 512.8 514.4 516 517.6 519.2 520.8 522.4 524 525.6 527.2 528.8 530.4 532 533.6 535.2 536.8 538.4 540 541.6 543.2 544.8 546.4 548 549.6 551.2 552.8 554.4 556 557.6 559.2 560.8 562.4 564 565.6 567.2 568.8 570.4 572 573.6 575.2 576.8 578.4 580 581.6 583.2 584.8 586.4 588 589.6 591.2 592.8 594.4 596 597.6 599.2 600.8 602.4 604 605.6 607.2 608.8 610.4 612 613.6 615.2 616.8 618.4 620 621.6 623.2 624.8 626.4 628 629.6 631.2 632.8 634.4 636 637.6 639.2 640.8 642.4 644 645.6 647.2 648.8 650.4 652 653.6 655.2 656.8 658.4 660 661.6 663.2 664.8 666.4 668 669.6 671.2 672.8 674.4 676 677.6 679.2 680.8 682.4 684 685.6 687.2 688.8 690.4 692 693.6 695.2 696.8 698.4 700 701.6 703.2 704.8 706.4 708 709.6 711.2 712.8 714.4 716 717.6 719.2 720.8 722.4 724 725.6 727.2 728.8 730.4 732 733.6 735.2 736.8 738.4 740 741.6 743.2 744.8 746.4 748 749.6 751.2 752.8 754.4 756 757.6 759.2 760.8 762.4 764 765.6 767.2 768.8 770.4 772 773.6 775.2 776.8 778.4 780 781.6 783.2 784.8 786.4 788 789.6 791.2 792.8 794.4 796 797.6 799.2 800.8 802.4 804 805.6 807.2 808.8 810.4 812 813.6 815.2 816.8 818.4 820 821.6 823.2 824.8 826.4 828 829.6 831.2 832.8 834.4 836 837.6 839.2 840.8 842.4 844 845.6 847.2 848.8 850.4 852 853.6 855.2 856.8 858.4 860 861.6 863.2 864.8 866.4 868 869.6 871.2 872.8 874.4 876 877.6 879.2 880.8 882.4 884 885.6 887.2 888.8 890.4 892 893.6 895.2 896.8 898.4 900 901.6 903.2 904.8 906.4 908 909.6 911.2 912.8 914.4 916 917.6 919.2 920.8 922.4 924 925.6 927.2 928.8 930.4 932 933.6 935.2 936.8 938.4 940 941.6 943.2 944.8 946.4 948 949.6 951.2 952.8 954.4 956 957.6 959.2 960.8 962.4 964 965.6 967.2 968.8 970.4 972 973.6 975.2 976.8 978.4 980 981.6 983.2 984.8 986.4 988 989.6 991.2 992.8 994.4 996 997.6 999.2 1000.8 1002.4 1004 1005.6 1007.2 1008.8 1010.4 1012 1013.6 1015.2 1016.8 1018.4 1020 1021.6 1023.2 1024.8 1026.4 1028 1029.6 1031.2 1032.8 1034.4 1036 1037.6 1039.2 1040.8 1042.4 1044 1045.6 1047.2 1048.8 1050.4 1052 1053.6 1055.2 1056.8 1058.4 1060 1061.6 1063.2 1064.8 1066.4 1068 1069.6 1071.2 1072.8 1074.4 1076 1077.6 1079.2 1080.8 1082.4 1084 1085.6 1087.2 1088.8 1090.4 1092 1093.6 1095.2 1096.8 1098.4 1100 1101.6 1103.2 1104.8 1106.4 1108 1109.6 1111.2 1112.8 1114.4 1116 1117.6 1119.2 1120.8 1122.4 1124 1125.6 1127.2 1128.8 1130.4 1132 1133.6 1135.2 1136.8 1138.4 1140 1141.6 1143.2 1144.8 1146.4 1148 1149.6 1151.2 1152.8 1154.4 1156 1157.6 1159.2 1160.8 1162.4 1164 1165.6 1167.2 1168.8 1170.4 1172 1173.6 1175.2 1176.8 1178.4 1180 1181.6 1183.2 1184.8 1186.4 1188 1189.6 1191.2 1192.8 1194.4 1196 1197.6 1199.2 1200.8 1202.4 1204 1205.6 1207.2 1208.8 1210.4 1212 1213.6 1215.2 1216.8 1218.4 1220 1221.6 1223.2 1224.8 1226.4 1228 1229.6 1231.2 1232.8 1234.4 1236 1237.6 1239.2 1240.8 1242.4 1244 1245.6 1247.2 1248.8 1250.4 1252 1253.6 1255.2 1256.8 1258.4 1260 1261.6 1263.2 1264.8 1266.4 1268 1269.6 1271.2 1272.8 1274.4 1276 1277.6 1279.2 1280.8 1282.4 1284 1285.6 1287.2 1288.8 1290.4 1292 1293.6 1295.2 1296.8 1298.4 1300 1301.6 1303.2 1304.8 1306.4 1308 1309.6 1311.2 1312.8 1314.4 1316 1317.6 1319.2 1320.8 1322.4 1324 1325.6 1327.2 1328.8 1330.4 1332 1333.6 1335.2 1336.8 1338.4 1340 1341.6 1343.2 1344.8 1346.4 1348 1349.6 1351.2 1352.8 1354.4 1356 1357.6 1359.2 1360.8 1362.4 1364 1365.6 1367.2 1368.8 1370.4 1372 1373.6 1375.2 1376.8 1378.4 1380 1381.6 1383.2 1384.8 1386.4 1388 1389.6 1391.2 1392.8 1394.4 1396 1397.6 1399.2 1400.8 1402.4 1404 1405.6 1407.2 1408.8 1410.4 1412 1413.6 1415.2 1416.8 1418.4 1420 1421.6 1423.2 1424.8 1426.4 1428 1429.6 1431.2 1432.8 1434.4 1436 1437.6 1439.2 1440.8 1442.4 1444 1445.6 1447.2 1448.8 1450.4 1452 1453.6 1455.2 1456.8 1458.4 1460 1461.6 1463.2 1464.8 1466.4 1468 1469.6 1471.2 1472.8 1474.4 1476 1477.6 1479.2 1480.8 1482.4 1484 1485.6 1487.2 1488.8 1490.4 1492 1493.6 1495.2 1496.8 1498.4 1500 1501.6 1503.2 1504.8 1506.4 1508 1509.6 1511.2 1512.8 1514.4 1516 1517.6 1519.2 1520.8 1522.4 1524 1525.6 1527.2 1528.8 1530.4 1532 1533.6 1535.2 1536.8 1538.4 1540 1541.6 1543.2 1544.8 1546.4 1548 1549.6 1551.2 1552.8 1554.4 1556 1557.6 1559.2 1560.8 1562.4 1564 1565.6 1567.2 1568.8 1570.4 1572 1573.6 1575.2 1576.8 1578.4 1580 1581.6 1583.2 1584.8 1586.4 1588 1589.6 1591.2 1592.8 1594.4 1596 1597.6 1599.2 1600.8 1602.4 1604 1605.6 1607.2 1608.8 1610.4 1612 1613.6 1615.2 1616.8 1618.4 1620 1621.6 1623.2 1624.8 1626.4 1628 1629.6 1631.2 1632.8] + * Referenced by: '/1-D Lookup Table' + */ + { -4.0, -2.4, -0.8, 0.8, 2.4, 4.0, 5.6, 7.2, 8.8, 10.4, 12.0, 13.6, 15.2, 16.8, + 18.4, 20.0, 21.6, 23.2, 24.8, 26.4, 28.0, 29.6, 31.2, 32.8, 34.4, 36.0, 37.6, + 39.2, 40.8, 42.4, 44.0, 45.6, 47.2, 48.8, 50.4, 52.0, 53.6, 55.2, 56.8, 58.4, + 60.0, 61.6, 63.2, 64.8, 66.4, 68.0, 69.6, 71.2, 72.8, 74.4, 76.0, 77.6, 79.2, + 80.8, 82.4, 84.0, 85.6, 87.2, 88.8, 90.4, 92.0, 93.6, 95.2, 96.8, 98.4, + 100.0, 101.6, 103.2, 104.8, 106.4, 108.0, 109.6, 111.2, 112.8, 114.4, 116.0, + 117.6, 119.2, 120.8, 122.4, 124.0, 125.6, 127.2, 128.8, 130.4, 132.0, 133.6, + 135.2, 136.8, 138.4, 140.0, 141.6, 143.2, 144.8, 146.4, 148.0, 149.6, 151.2, + 152.8, 154.4, 156.0, 157.6, 159.2, 160.8, 162.4, 164.0, 165.6, 167.2, 168.8, + 170.4, 172.0, 173.6, 175.2, 176.8, 178.4, 180.0, 181.6, 183.2, 184.8, 186.4, + 188.0, 189.6, 191.2, 192.8, 194.4, 196.0, 197.6, 199.2, 200.8, 202.4, 204.0, + 205.6, 207.2, 208.8, 210.4, 212.0, 213.6, 215.2, 216.8, 218.4, 220.0, 221.6, + 223.2, 224.8, 226.4, 228.0, 229.6, 231.2, 232.8, 234.4, 236.0, 237.6, 239.2, + 240.8, 242.4, 244.0, 245.6, 247.2, 248.8, 250.4, 252.0, 253.6, 255.2, 256.8, + 258.4, 260.0, 261.6, 263.2, 264.8, 266.4, 268.0, 269.6, 271.2, 272.8, 274.4, + 276.0, 277.6, 279.2, 280.8, 282.4, 284.0, 285.6, 287.2, 288.8, 290.4, 292.0, + 293.6, 295.2, 296.8, 298.4, 300.0, 301.6, 303.2, 304.8, 306.4, 308.0, 309.6, + 311.2, 312.8, 314.4, 316.0, 317.6, 319.2, 320.8, 322.4, 324.0, 325.6, 327.2, + 328.8, 330.4, 332.0, 333.6, 335.2, 336.8, 338.4, 340.0, 341.6, 343.2, 344.8, + 346.4, 348.0, 349.6, 351.2, 352.8, 354.4, 356.0, 357.6, 359.2, 360.8, 362.4, + 364.0, 365.6, 367.2, 368.8, 370.4, 372.0, 373.6, 375.2, 376.8, 378.4, 380.0, + 381.6, 383.2, 384.8, 386.4, 388.0, 389.6, 391.2, 392.8, 394.4, 396.0, 397.6, + 399.2, 400.8, 402.4, 404.0, 405.6, 407.2, 408.8, 410.4, 412.0, 413.6, 415.2, + 416.8, 418.4, 420.0, 421.6, 423.2, 424.8, 426.4, 428.0, 429.6, 431.2, 432.8, + 434.4, 436.0, 437.6, 439.2, 440.8, 442.4, 444.0, 445.6, 447.2, 448.8, 450.4, + 452.0, 453.6, 455.2, 456.8, 458.4, 460.0, 461.6, 463.2, 464.8, 466.4, 468.0, + 469.6, 471.2, 472.8, 474.4, 476.0, 477.6, 479.2, 480.8, 482.4, 484.0, 485.6, + 487.2, 488.8, 490.4, 492.0, 493.6, 495.2, 496.8, 498.4, 500.0, 501.6, 503.2, + 504.8, 506.4, 508.0, 509.6, 511.2, 512.8, 514.4, 516.0, 517.6, 519.2, 520.8, + 522.4, 524.0, 525.6, 527.2, 528.8, 530.4, 532.0, 533.6, 535.2, 536.8, 538.4, + 540.0, 541.6, 543.2, 544.8, 546.4, 548.0, 549.6, 551.2, 552.8, 554.4, 556.0, + 557.6, 559.2, 560.8, 562.4, 564.0, 565.6, 567.2, 568.8, 570.4, 572.0, 573.6, + 575.2, 576.8, 578.4, 580.0, 581.6, 583.2, 584.8, 586.4, 588.0, 589.6, 591.2, + 592.8, 594.4, 596.0, 597.6, 599.2, 600.8, 602.4, 604.0, 605.6, 607.2, 608.8, + 610.4, 612.0, 613.6, 615.2, 616.8, 618.4, 620.0, 621.6, 623.2, 624.8, 626.4, + 628.0, 629.6, 631.2, 632.8, 634.4, 636.0, 637.6, 639.2, 640.8, 642.4, 644.0, + 645.6, 647.2, 648.8, 650.4, 652.0, 653.6, 655.2, 656.8, 658.4, 660.0, 661.6, + 663.2, 664.8, 666.4, 668.0, 669.6, 671.2, 672.8, 674.4, 676.0, 677.6, 679.2, + 680.8, 682.4, 684.0, 685.6, 687.2, 688.8, 690.4, 692.0, 693.6, 695.2, 696.8, + 698.4, 700.0, 701.6, 703.2, 704.8, 706.4, 708.0, 709.6, 711.2, 712.8, 714.4, + 716.0, 717.6, 719.2, 720.8, 722.4, 724.0, 725.6, 727.2, 728.8, 730.4, 732.0, + 733.6, 735.2, 736.8, 738.4, 740.0, 741.6, 743.2, 744.8, 746.4, 748.0, 749.6, + 751.2, 752.8, 754.4, 756.0, 757.6, 759.2, 760.8, 762.4, 764.0, 765.6, 767.2, + 768.8, 770.4, 772.0, 773.6, 775.2, 776.8, 778.4, 780.0, 781.6, 783.2, 784.8, + 786.4, 788.0, 789.6, 791.2, 792.8, 794.4, 796.0, 797.6, 799.2, 800.8, 802.4, + 804.0, 805.6, 807.2, 808.8, 810.4, 812.0, 813.6, 815.2, 816.8, 818.4, 820.0, + 821.6, 823.2, 824.8, 826.4, 828.0, 829.6, 831.2, 832.8, 834.4, 836.0, 837.6, + 839.2, 840.8, 842.4, 844.0, 845.6, 847.2, 848.8, 850.4, 852.0, 853.6, 855.2, + 856.8, 858.4, 860.0, 861.6, 863.2, 864.8, 866.4, 868.0, 869.6, 871.2, 872.8, + 874.4, 876.0, 877.6, 879.2, 880.8, 882.4, 884.0, 885.6, 887.2, 888.8, 890.4, + 892.0, 893.6, 895.2, 896.8, 898.4, 900.0, 901.6, 903.2, 904.8, 906.4, 908.0, + 909.6, 911.2, 912.8, 914.4, 916.0, 917.6, 919.2, 920.8, 922.4, 924.0, 925.6, + 927.2, 928.8, 930.4, 932.0, 933.6, 935.2, 936.8, 938.4, 940.0, 941.6, 943.2, + 944.8, 946.4, 948.0, 949.6, 951.2, 952.8, 954.4, 956.0, 957.6, 959.2, 960.8, + 962.4, 964.0, 965.6, 967.2, 968.8, 970.4, 972.0, 973.6, 975.2, 976.8, 978.4, + 980.0, 981.6, 983.2, 984.8, 986.4, 988.0, 989.6, 991.2, 992.8, 994.4, 996.0, + 997.6, 999.2, 1000.8, 1002.4, 1004.0, 1005.6, 1007.2, 1008.8, 1010.4, 1012.0, + 1013.6, 1015.2, 1016.8, 1018.4, 1020.0, 1021.6, 1023.2, 1024.8, 1026.4, + 1028.0, 1029.6, 1031.2, 1032.8, 1034.4, 1036.0, 1037.6, 1039.2, 1040.8, + 1042.4, 1044.0, 1045.6, 1047.2, 1048.8, 1050.4, 1052.0, 1053.6, 1055.2, + 1056.8, 1058.4, 1060.0, 1061.6, 1063.2, 1064.8, 1066.4, 1068.0, 1069.6, + 1071.2, 1072.8, 1074.4, 1076.0, 1077.6, 1079.2, 1080.8, 1082.4, 1084.0, + 1085.6, 1087.2, 1088.8, 1090.4, 1092.0, 1093.6, 1095.2, 1096.8, 1098.4, + 1100.0, 1101.6, 1103.2, 1104.8, 1106.4, 1108.0, 1109.6, 1111.2, 1112.8, + 1114.4, 1116.0, 1117.6, 1119.2, 1120.8, 1122.4, 1124.0, 1125.6, 1127.2, + 1128.8, 1130.4, 1132.0, 1133.6, 1135.2, 1136.8, 1138.4, 1140.0, 1141.6, + 1143.2, 1144.8, 1146.4, 1148.0, 1149.6, 1151.2, 1152.8, 1154.4, 1156.0, + 1157.6, 1159.2, 1160.8, 1162.4, 1164.0, 1165.6, 1167.2, 1168.8, 1170.4, + 1172.0, 1173.6, 1175.2, 1176.8, 1178.4, 1180.0, 1181.6, 1183.2, 1184.8, + 1186.4, 1188.0, 1189.6, 1191.2, 1192.8, 1194.4, 1196.0, 1197.6, 1199.2, + 1200.8, 1202.4, 1204.0, 1205.6, 1207.2, 1208.8, 1210.4, 1212.0, 1213.6, + 1215.2, 1216.8, 1218.4, 1220.0, 1221.6, 1223.2, 1224.8, 1226.4, 1228.0, + 1229.6, 1231.2, 1232.8, 1234.4, 1236.0, 1237.6, 1239.2, 1240.8, 1242.4, + 1244.0, 1245.6, 1247.2, 1248.8, 1250.4, 1252.0, 1253.6, 1255.2, 1256.8, + 1258.4, 1260.0, 1261.6, 1263.2, 1264.8, 1266.4, 1268.0, 1269.6, 1271.2, + 1272.8, 1274.4, 1276.0, 1277.6, 1279.2, 1280.8, 1282.4, 1284.0, 1285.6, + 1287.2, 1288.8, 1290.4, 1292.0, 1293.6, 1295.2, 1296.8, 1298.4, 1300.0, + 1301.6, 1303.2, 1304.8, 1306.4, 1308.0, 1309.6, 1311.2, 1312.8, 1314.4, + 1316.0, 1317.6, 1319.2, 1320.8, 1322.4, 1324.0, 1325.6, 1327.2, 1328.8, + 1330.4, 1332.0, 1333.6, 1335.2, 1336.8, 1338.4, 1340.0, 1341.6, 1343.2, + 1344.8, 1346.4, 1348.0, 1349.6, 1351.2, 1352.8, 1354.4, 1356.0, 1357.6, + 1359.2, 1360.8, 1362.4, 1364.0, 1365.6, 1367.2, 1368.8, 1370.4, 1372.0, + 1373.6, 1375.2, 1376.8, 1378.4, 1380.0, 1381.6, 1383.2, 1384.8, 1386.4, + 1388.0, 1389.6, 1391.2, 1392.8, 1394.4, 1396.0, 1397.6, 1399.2, 1400.8, + 1402.4, 1404.0, 1405.6, 1407.2, 1408.8, 1410.4, 1412.0, 1413.6, 1415.2, + 1416.8, 1418.4, 1420.0, 1421.6, 1423.2, 1424.8, 1426.4, 1428.0, 1429.6, + 1431.2, 1432.8, 1434.4, 1436.0, 1437.6, 1439.2, 1440.8, 1442.4, 1444.0, + 1445.6, 1447.2, 1448.8, 1450.4, 1452.0, 1453.6, 1455.2, 1456.8, 1458.4, + 1460.0, 1461.6, 1463.2, 1464.8, 1466.4, 1468.0, 1469.6, 1471.2, 1472.8, + 1474.4, 1476.0, 1477.6, 1479.2, 1480.8, 1482.4, 1484.0, 1485.6, 1487.2, + 1488.8, 1490.4, 1492.0, 1493.6, 1495.2, 1496.8, 1498.4, 1500.0, 1501.6, + 1503.2, 1504.8, 1506.4, 1508.0, 1509.6, 1511.2, 1512.8, 1514.4, 1516.0, + 1517.6, 1519.2, 1520.8, 1522.4, 1524.0, 1525.6, 1527.2, 1528.8, 1530.4, + 1532.0, 1533.6, 1535.2, 1536.8, 1538.4, 1540.0, 1541.6, 1543.2, 1544.8, + 1546.4, 1548.0, 1549.6, 1551.2, 1552.8, 1554.4, 1556.0, 1557.6, 1559.2, + 1560.8, 1562.4, 1564.0, 1565.6, 1567.2, 1568.8, 1570.4, 1572.0, 1573.6, + 1575.2, 1576.8, 1578.4, 1580.0, 1581.6, 1583.2, 1584.8, 1586.4, 1588.0, + 1589.6, 1591.2, 1592.8, 1594.4, 1596.0, 1597.6, 1599.2, 1600.8, 1602.4, + 1604.0, 1605.6, 1607.2, 1608.8, 1610.4, 1612.0, 1613.6, 1615.2, 1616.8, + 1618.4, 1620.0, 1621.6, 1623.2, 1624.8, 1626.4, 1628.0, 1629.6, 1631.2, + 1632.8 }, + + /* Pooled Parameter (Expression: [-2731 3108 2584 2319 2146 2020 1922 1841 1774 1716 1666 1621 1581 1544 1511 1481 1453 1427 1403 1380 1358 1338 1319 1301 1284 1268 1252 1237 1223 1209 1196 1184 1171 1160 1148 1137 1127 1117 1107 1097 1088 1079 1070 1061 1053 1045 1037 1029 1021 1014 1007 1000 993 986 979 973 967 960 954 948 942 937 931 925 920 915 909 904 899 894 889 884 880 875 870 866 861 857 852 848 844 840 836 831 827 823 820 816 812 808 804 801 797 793 790 786 783 780 776 773 770 766 763 760 757 754 750 747 744 741 738 735 732 729 727 724 721 718 715 713 710 707 704 702 699 697 694 691 689 686 684 681 679 676 674 672 669 667 664 662 660 658 655 653 651 648 646 644 642 640 637 635 633 631 629 627 625 623 621 618 616 614 612 610 608 606 604 602 601 599 597 595 593 591 589 587 586 584 582 580 578 576 575 573 571 569 568 566 564 563 561 559 557 556 554 552 551 549 547 546 544 543 541 539 538 536 534 533 531 530 528 527 525 523 522 520 519 517 516 514 513 511 510 508 507 505 504 502 501 500 498 497 495 494 492 491 490 488 487 485 484 483 481 480 479 477 476 475 473 472 471 469 468 467 465 464 463 461 460 459 457 456 455 454 452 451 450 449 447 446 445 444 442 441 440 439 437 436 435 434 432 431 430 429 428 426 425 424 423 422 420 419 418 417 416 415 413 412 411 410 409 408 406 405 404 403 402 401 400 399 397 396 395 394 393 392 391 390 389 387 386 385 384 383 382 381 380 379 378 377 376 375 373 372 371 370 369 368 367 366 365 364 363 362 361 360 359 358 357 356 355 354 353 352 351 350 349 348 347 346 345 344 343 342 341 340 339 338 337 336 335 334 333 332 331 330 329 328 327 326 325 324 323 322 321 320 319 318 317 316 315 314 313 312 311 310 309 308 307 307 306 305 304 303 302 301 300 299 298 297 296 295 294 293 293 292 291 290 289 288 287 286 285 284 283 282 281 281 280 279 278 277 276 275 274 273 272 272 271 270 269 268 267 266 265 264 264 263 262 261 260 259 258 257 256 256 255 254 253 252 251 250 249 249 248 247 246 245 244 243 242 242 241 240 239 238 237 236 235 235 234 233 232 231 230 229 229 228 227 226 225 224 223 223 222 221 220 219 218 217 217 216 215 214 213 212 211 211 210 209 208 207 206 206 205 204 203 202 201 200 200 199 198 197 196 195 195 194 193 192 191 190 190 189 188 187 186 185 184 184 183 182 181 180 179 179 178 177 176 175 174 174 173 172 171 170 169 169 168 167 166 165 164 164 163 162 161 160 159 159 158 157 156 155 154 154 153 152 151 150 149 149 148 147 146 145 144 144 143 142 141 140 139 139 138 137 136 135 134 134 133 132 131 130 129 129 128 127 126 125 124 124 123 122 121 120 119 118 118 117 116 115 114 113 113 112 111 110 109 108 108 107 106 105 104 103 103 102 101 100 99 98 97 97 96 95 94 93 92 92 91 90 89 88 87 86 86 85 84 83 82 81 80 80 79 78 77 76 75 74 74 73 72 71 70 69 68 67 67 66 65 64 63 62 61 60 60 59 58 57 56 55 54 53 53 52 51 50 49 48 47 46 45 45 44 43 42 41 40 39 38 37 36 36 35 34 33 32 31 30 29 28 27 26 26 25 24 23 22 21 20 19 18 17 16 15 14 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 -1 -2 -3 -4 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -68 -69 -70 -71 -72 -73 -74 -75 -77 -78 -79 -80 -81 -82 -84 -85 -86 -87 -88 -89 -91 -92 -93 -94 -95 -97 -98 -99 -100 -101 -103 -104 -105 -106 -108 -109 -110 -111 -113 -114 -115 -117 -118 -119 -120 -122 -123 -124 -126 -127 -128 -130 -131 -132 -134 -135 -136 -138 -139 -141 -142 -143 -145 -146 -148 -149 -150 -152 -153 -155 -156 -158 -159 -161 -162 -164 -165 -167 -168 -170 -172 -173 -175 -176 -178 -179 -181 -183 -184 -186 -188 -189 -191 -193 -194 -196 -198 -199 -201 -203 -205 -206 -208 -210 -212 -214 -216 -217 -219 -221 -223 -225 -227 -229 -231 -233 -235 -237 -239 -241 -243 -245 -247 -250 -252 -254 -256 -258 -261 -263 -265 -268 -270 -272 -275 -277 -280 -282 -285 -287 -290 -292 -295 -298 -300 -303 -306 -309 -312 -314 -317 -320 -323 -327 -330 -333 -336 -339 -343 -346 -350 -353 -357 -361 -364 -368 -372 -376 -380 -384 -389 -393 -398 -402 -407 -412 -417 -422 -427 -433 -438 -444 -450 -456 -463 -470 -477 -484 -492 -500 -508 -517 -526 -537 -547 -559 -572 -585 -601 -618 -637 -660 -687 -722 -771 -856 + ]) + * Referenced by: + * '/1-D Lookup Table' + * '/1-D Lookup Table1' + * '/1-D Lookup Table' + * '/1-D Lookup Table1' + */ + { -2731.0, 3108.0, 2584.0, 2319.0, 2146.0, 2020.0, 1922.0, 1841.0, 1774.0, + 1716.0, 1666.0, 1621.0, 1581.0, 1544.0, 1511.0, 1481.0, 1453.0, 1427.0, + 1403.0, 1380.0, 1358.0, 1338.0, 1319.0, 1301.0, 1284.0, 1268.0, 1252.0, + 1237.0, 1223.0, 1209.0, 1196.0, 1184.0, 1171.0, 1160.0, 1148.0, 1137.0, + 1127.0, 1117.0, 1107.0, 1097.0, 1088.0, 1079.0, 1070.0, 1061.0, 1053.0, + 1045.0, 1037.0, 1029.0, 1021.0, 1014.0, 1007.0, 1000.0, 993.0, 986.0, 979.0, + 973.0, 967.0, 960.0, 954.0, 948.0, 942.0, 937.0, 931.0, 925.0, 920.0, 915.0, + 909.0, 904.0, 899.0, 894.0, 889.0, 884.0, 880.0, 875.0, 870.0, 866.0, 861.0, + 857.0, 852.0, 848.0, 844.0, 840.0, 836.0, 831.0, 827.0, 823.0, 820.0, 816.0, + 812.0, 808.0, 804.0, 801.0, 797.0, 793.0, 790.0, 786.0, 783.0, 780.0, 776.0, + 773.0, 770.0, 766.0, 763.0, 760.0, 757.0, 754.0, 750.0, 747.0, 744.0, 741.0, + 738.0, 735.0, 732.0, 729.0, 727.0, 724.0, 721.0, 718.0, 715.0, 713.0, 710.0, + 707.0, 704.0, 702.0, 699.0, 697.0, 694.0, 691.0, 689.0, 686.0, 684.0, 681.0, + 679.0, 676.0, 674.0, 672.0, 669.0, 667.0, 664.0, 662.0, 660.0, 658.0, 655.0, + 653.0, 651.0, 648.0, 646.0, 644.0, 642.0, 640.0, 637.0, 635.0, 633.0, 631.0, + 629.0, 627.0, 625.0, 623.0, 621.0, 618.0, 616.0, 614.0, 612.0, 610.0, 608.0, + 606.0, 604.0, 602.0, 601.0, 599.0, 597.0, 595.0, 593.0, 591.0, 589.0, 587.0, + 586.0, 584.0, 582.0, 580.0, 578.0, 576.0, 575.0, 573.0, 571.0, 569.0, 568.0, + 566.0, 564.0, 563.0, 561.0, 559.0, 557.0, 556.0, 554.0, 552.0, 551.0, 549.0, + 547.0, 546.0, 544.0, 543.0, 541.0, 539.0, 538.0, 536.0, 534.0, 533.0, 531.0, + 530.0, 528.0, 527.0, 525.0, 523.0, 522.0, 520.0, 519.0, 517.0, 516.0, 514.0, + 513.0, 511.0, 510.0, 508.0, 507.0, 505.0, 504.0, 502.0, 501.0, 500.0, 498.0, + 497.0, 495.0, 494.0, 492.0, 491.0, 490.0, 488.0, 487.0, 485.0, 484.0, 483.0, + 481.0, 480.0, 479.0, 477.0, 476.0, 475.0, 473.0, 472.0, 471.0, 469.0, 468.0, + 467.0, 465.0, 464.0, 463.0, 461.0, 460.0, 459.0, 457.0, 456.0, 455.0, 454.0, + 452.0, 451.0, 450.0, 449.0, 447.0, 446.0, 445.0, 444.0, 442.0, 441.0, 440.0, + 439.0, 437.0, 436.0, 435.0, 434.0, 432.0, 431.0, 430.0, 429.0, 428.0, 426.0, + 425.0, 424.0, 423.0, 422.0, 420.0, 419.0, 418.0, 417.0, 416.0, 415.0, 413.0, + 412.0, 411.0, 410.0, 409.0, 408.0, 406.0, 405.0, 404.0, 403.0, 402.0, 401.0, + 400.0, 399.0, 397.0, 396.0, 395.0, 394.0, 393.0, 392.0, 391.0, 390.0, 389.0, + 387.0, 386.0, 385.0, 384.0, 383.0, 382.0, 381.0, 380.0, 379.0, 378.0, 377.0, + 376.0, 375.0, 373.0, 372.0, 371.0, 370.0, 369.0, 368.0, 367.0, 366.0, 365.0, + 364.0, 363.0, 362.0, 361.0, 360.0, 359.0, 358.0, 357.0, 356.0, 355.0, 354.0, + 353.0, 352.0, 351.0, 350.0, 349.0, 348.0, 347.0, 346.0, 345.0, 344.0, 343.0, + 342.0, 341.0, 340.0, 339.0, 338.0, 337.0, 336.0, 335.0, 334.0, 333.0, 332.0, + 331.0, 330.0, 329.0, 328.0, 327.0, 326.0, 325.0, 324.0, 323.0, 322.0, 321.0, + 320.0, 319.0, 318.0, 317.0, 316.0, 315.0, 314.0, 313.0, 312.0, 311.0, 310.0, + 309.0, 308.0, 307.0, 307.0, 306.0, 305.0, 304.0, 303.0, 302.0, 301.0, 300.0, + 299.0, 298.0, 297.0, 296.0, 295.0, 294.0, 293.0, 293.0, 292.0, 291.0, 290.0, + 289.0, 288.0, 287.0, 286.0, 285.0, 284.0, 283.0, 282.0, 281.0, 281.0, 280.0, + 279.0, 278.0, 277.0, 276.0, 275.0, 274.0, 273.0, 272.0, 272.0, 271.0, 270.0, + 269.0, 268.0, 267.0, 266.0, 265.0, 264.0, 264.0, 263.0, 262.0, 261.0, 260.0, + 259.0, 258.0, 257.0, 256.0, 256.0, 255.0, 254.0, 253.0, 252.0, 251.0, 250.0, + 249.0, 249.0, 248.0, 247.0, 246.0, 245.0, 244.0, 243.0, 242.0, 242.0, 241.0, + 240.0, 239.0, 238.0, 237.0, 236.0, 235.0, 235.0, 234.0, 233.0, 232.0, 231.0, + 230.0, 229.0, 229.0, 228.0, 227.0, 226.0, 225.0, 224.0, 223.0, 223.0, 222.0, + 221.0, 220.0, 219.0, 218.0, 217.0, 217.0, 216.0, 215.0, 214.0, 213.0, 212.0, + 211.0, 211.0, 210.0, 209.0, 208.0, 207.0, 206.0, 206.0, 205.0, 204.0, 203.0, + 202.0, 201.0, 200.0, 200.0, 199.0, 198.0, 197.0, 196.0, 195.0, 195.0, 194.0, + 193.0, 192.0, 191.0, 190.0, 190.0, 189.0, 188.0, 187.0, 186.0, 185.0, 184.0, + 184.0, 183.0, 182.0, 181.0, 180.0, 179.0, 179.0, 178.0, 177.0, 176.0, 175.0, + 174.0, 174.0, 173.0, 172.0, 171.0, 170.0, 169.0, 169.0, 168.0, 167.0, 166.0, + 165.0, 164.0, 164.0, 163.0, 162.0, 161.0, 160.0, 159.0, 159.0, 158.0, 157.0, + 156.0, 155.0, 154.0, 154.0, 153.0, 152.0, 151.0, 150.0, 149.0, 149.0, 148.0, + 147.0, 146.0, 145.0, 144.0, 144.0, 143.0, 142.0, 141.0, 140.0, 139.0, 139.0, + 138.0, 137.0, 136.0, 135.0, 134.0, 134.0, 133.0, 132.0, 131.0, 130.0, 129.0, + 129.0, 128.0, 127.0, 126.0, 125.0, 124.0, 124.0, 123.0, 122.0, 121.0, 120.0, + 119.0, 118.0, 118.0, 117.0, 116.0, 115.0, 114.0, 113.0, 113.0, 112.0, 111.0, + 110.0, 109.0, 108.0, 108.0, 107.0, 106.0, 105.0, 104.0, 103.0, 103.0, 102.0, + 101.0, 100.0, 99.0, 98.0, 97.0, 97.0, 96.0, 95.0, 94.0, 93.0, 92.0, 92.0, + 91.0, 90.0, 89.0, 88.0, 87.0, 86.0, 86.0, 85.0, 84.0, 83.0, 82.0, 81.0, 80.0, + 80.0, 79.0, 78.0, 77.0, 76.0, 75.0, 74.0, 74.0, 73.0, 72.0, 71.0, 70.0, 69.0, + 68.0, 67.0, 67.0, 66.0, 65.0, 64.0, 63.0, 62.0, 61.0, 60.0, 60.0, 59.0, 58.0, + 57.0, 56.0, 55.0, 54.0, 53.0, 53.0, 52.0, 51.0, 50.0, 49.0, 48.0, 47.0, 46.0, + 45.0, 45.0, 44.0, 43.0, 42.0, 41.0, 40.0, 39.0, 38.0, 37.0, 36.0, 36.0, 35.0, + 34.0, 33.0, 32.0, 31.0, 30.0, 29.0, 28.0, 27.0, 26.0, 26.0, 25.0, 24.0, 23.0, + 22.0, 21.0, 20.0, 19.0, 18.0, 17.0, 16.0, 15.0, 14.0, 14.0, 13.0, 12.0, 11.0, + 10.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 0.0, 0.0, -1.0, -2.0, + -3.0, -4.0, -4.0, -5.0, -6.0, -7.0, -8.0, -9.0, -10.0, -11.0, -12.0, -13.0, + -14.0, -15.0, -16.0, -17.0, -18.0, -19.0, -20.0, -21.0, -22.0, -23.0, -24.0, + -25.0, -26.0, -27.0, -28.0, -29.0, -30.0, -31.0, -32.0, -33.0, -34.0, -35.0, + -36.0, -37.0, -38.0, -39.0, -41.0, -42.0, -43.0, -44.0, -45.0, -46.0, -47.0, + -48.0, -49.0, -50.0, -51.0, -52.0, -53.0, -54.0, -55.0, -57.0, -58.0, -59.0, + -60.0, -61.0, -62.0, -63.0, -64.0, -65.0, -66.0, -68.0, -69.0, -70.0, -71.0, + -72.0, -73.0, -74.0, -75.0, -77.0, -78.0, -79.0, -80.0, -81.0, -82.0, -84.0, + -85.0, -86.0, -87.0, -88.0, -89.0, -91.0, -92.0, -93.0, -94.0, -95.0, -97.0, + -98.0, -99.0, -100.0, -101.0, -103.0, -104.0, -105.0, -106.0, -108.0, -109.0, + -110.0, -111.0, -113.0, -114.0, -115.0, -117.0, -118.0, -119.0, -120.0, + -122.0, -123.0, -124.0, -126.0, -127.0, -128.0, -130.0, -131.0, -132.0, + -134.0, -135.0, -136.0, -138.0, -139.0, -141.0, -142.0, -143.0, -145.0, + -146.0, -148.0, -149.0, -150.0, -152.0, -153.0, -155.0, -156.0, -158.0, + -159.0, -161.0, -162.0, -164.0, -165.0, -167.0, -168.0, -170.0, -172.0, + -173.0, -175.0, -176.0, -178.0, -179.0, -181.0, -183.0, -184.0, -186.0, + -188.0, -189.0, -191.0, -193.0, -194.0, -196.0, -198.0, -199.0, -201.0, + -203.0, -205.0, -206.0, -208.0, -210.0, -212.0, -214.0, -216.0, -217.0, + -219.0, -221.0, -223.0, -225.0, -227.0, -229.0, -231.0, -233.0, -235.0, + -237.0, -239.0, -241.0, -243.0, -245.0, -247.0, -250.0, -252.0, -254.0, + -256.0, -258.0, -261.0, -263.0, -265.0, -268.0, -270.0, -272.0, -275.0, + -277.0, -280.0, -282.0, -285.0, -287.0, -290.0, -292.0, -295.0, -298.0, + -300.0, -303.0, -306.0, -309.0, -312.0, -314.0, -317.0, -320.0, -323.0, + -327.0, -330.0, -333.0, -336.0, -339.0, -343.0, -346.0, -350.0, -353.0, + -357.0, -361.0, -364.0, -368.0, -372.0, -376.0, -380.0, -384.0, -389.0, + -393.0, -398.0, -402.0, -407.0, -412.0, -417.0, -422.0, -427.0, -433.0, + -438.0, -444.0, -450.0, -456.0, -463.0, -470.0, -477.0, -484.0, -492.0, + -500.0, -508.0, -517.0, -526.0, -537.0, -547.0, -559.0, -572.0, -585.0, + -601.0, -618.0, -637.0, -660.0, -687.0, -722.0, -771.0, -856.0 }, + + /* Pooled Parameter (Expression: [0:4:4092]) + * Referenced by: + * '/1-D Lookup Table' + * '/1-D Lookup Table' + * '/1-D Lookup Table' + * '/1-D Lookup Table' + * '/1-D Lookup Table' + * '/1-D Lookup Table1' + * '/1-D Lookup Table' + * '/1-D Lookup Table1' + */ + { 0U, 4U, 8U, 12U, 16U, 20U, 24U, 28U, 32U, 36U, 40U, 44U, 48U, 52U, 56U, 60U, + 64U, 68U, 72U, 76U, 80U, 84U, 88U, 92U, 96U, 100U, 104U, 108U, 112U, 116U, + 120U, 124U, 128U, 132U, 136U, 140U, 144U, 148U, 152U, 156U, 160U, 164U, 168U, + 172U, 176U, 180U, 184U, 188U, 192U, 196U, 200U, 204U, 208U, 212U, 216U, 220U, + 224U, 228U, 232U, 236U, 240U, 244U, 248U, 252U, 256U, 260U, 264U, 268U, 272U, + 276U, 280U, 284U, 288U, 292U, 296U, 300U, 304U, 308U, 312U, 316U, 320U, 324U, + 328U, 332U, 336U, 340U, 344U, 348U, 352U, 356U, 360U, 364U, 368U, 372U, 376U, + 380U, 384U, 388U, 392U, 396U, 400U, 404U, 408U, 412U, 416U, 420U, 424U, 428U, + 432U, 436U, 440U, 444U, 448U, 452U, 456U, 460U, 464U, 468U, 472U, 476U, 480U, + 484U, 488U, 492U, 496U, 500U, 504U, 508U, 512U, 516U, 520U, 524U, 528U, 532U, + 536U, 540U, 544U, 548U, 552U, 556U, 560U, 564U, 568U, 572U, 576U, 580U, 584U, + 588U, 592U, 596U, 600U, 604U, 608U, 612U, 616U, 620U, 624U, 628U, 632U, 636U, + 640U, 644U, 648U, 652U, 656U, 660U, 664U, 668U, 672U, 676U, 680U, 684U, 688U, + 692U, 696U, 700U, 704U, 708U, 712U, 716U, 720U, 724U, 728U, 732U, 736U, 740U, + 744U, 748U, 752U, 756U, 760U, 764U, 768U, 772U, 776U, 780U, 784U, 788U, 792U, + 796U, 800U, 804U, 808U, 812U, 816U, 820U, 824U, 828U, 832U, 836U, 840U, 844U, + 848U, 852U, 856U, 860U, 864U, 868U, 872U, 876U, 880U, 884U, 888U, 892U, 896U, + 900U, 904U, 908U, 912U, 916U, 920U, 924U, 928U, 932U, 936U, 940U, 944U, 948U, + 952U, 956U, 960U, 964U, 968U, 972U, 976U, 980U, 984U, 988U, 992U, 996U, + 1000U, 1004U, 1008U, 1012U, 1016U, 1020U, 1024U, 1028U, 1032U, 1036U, 1040U, + 1044U, 1048U, 1052U, 1056U, 1060U, 1064U, 1068U, 1072U, 1076U, 1080U, 1084U, + 1088U, 1092U, 1096U, 1100U, 1104U, 1108U, 1112U, 1116U, 1120U, 1124U, 1128U, + 1132U, 1136U, 1140U, 1144U, 1148U, 1152U, 1156U, 1160U, 1164U, 1168U, 1172U, + 1176U, 1180U, 1184U, 1188U, 1192U, 1196U, 1200U, 1204U, 1208U, 1212U, 1216U, + 1220U, 1224U, 1228U, 1232U, 1236U, 1240U, 1244U, 1248U, 1252U, 1256U, 1260U, + 1264U, 1268U, 1272U, 1276U, 1280U, 1284U, 1288U, 1292U, 1296U, 1300U, 1304U, + 1308U, 1312U, 1316U, 1320U, 1324U, 1328U, 1332U, 1336U, 1340U, 1344U, 1348U, + 1352U, 1356U, 1360U, 1364U, 1368U, 1372U, 1376U, 1380U, 1384U, 1388U, 1392U, + 1396U, 1400U, 1404U, 1408U, 1412U, 1416U, 1420U, 1424U, 1428U, 1432U, 1436U, + 1440U, 1444U, 1448U, 1452U, 1456U, 1460U, 1464U, 1468U, 1472U, 1476U, 1480U, + 1484U, 1488U, 1492U, 1496U, 1500U, 1504U, 1508U, 1512U, 1516U, 1520U, 1524U, + 1528U, 1532U, 1536U, 1540U, 1544U, 1548U, 1552U, 1556U, 1560U, 1564U, 1568U, + 1572U, 1576U, 1580U, 1584U, 1588U, 1592U, 1596U, 1600U, 1604U, 1608U, 1612U, + 1616U, 1620U, 1624U, 1628U, 1632U, 1636U, 1640U, 1644U, 1648U, 1652U, 1656U, + 1660U, 1664U, 1668U, 1672U, 1676U, 1680U, 1684U, 1688U, 1692U, 1696U, 1700U, + 1704U, 1708U, 1712U, 1716U, 1720U, 1724U, 1728U, 1732U, 1736U, 1740U, 1744U, + 1748U, 1752U, 1756U, 1760U, 1764U, 1768U, 1772U, 1776U, 1780U, 1784U, 1788U, + 1792U, 1796U, 1800U, 1804U, 1808U, 1812U, 1816U, 1820U, 1824U, 1828U, 1832U, + 1836U, 1840U, 1844U, 1848U, 1852U, 1856U, 1860U, 1864U, 1868U, 1872U, 1876U, + 1880U, 1884U, 1888U, 1892U, 1896U, 1900U, 1904U, 1908U, 1912U, 1916U, 1920U, + 1924U, 1928U, 1932U, 1936U, 1940U, 1944U, 1948U, 1952U, 1956U, 1960U, 1964U, + 1968U, 1972U, 1976U, 1980U, 1984U, 1988U, 1992U, 1996U, 2000U, 2004U, 2008U, + 2012U, 2016U, 2020U, 2024U, 2028U, 2032U, 2036U, 2040U, 2044U, 2048U, 2052U, + 2056U, 2060U, 2064U, 2068U, 2072U, 2076U, 2080U, 2084U, 2088U, 2092U, 2096U, + 2100U, 2104U, 2108U, 2112U, 2116U, 2120U, 2124U, 2128U, 2132U, 2136U, 2140U, + 2144U, 2148U, 2152U, 2156U, 2160U, 2164U, 2168U, 2172U, 2176U, 2180U, 2184U, + 2188U, 2192U, 2196U, 2200U, 2204U, 2208U, 2212U, 2216U, 2220U, 2224U, 2228U, + 2232U, 2236U, 2240U, 2244U, 2248U, 2252U, 2256U, 2260U, 2264U, 2268U, 2272U, + 2276U, 2280U, 2284U, 2288U, 2292U, 2296U, 2300U, 2304U, 2308U, 2312U, 2316U, + 2320U, 2324U, 2328U, 2332U, 2336U, 2340U, 2344U, 2348U, 2352U, 2356U, 2360U, + 2364U, 2368U, 2372U, 2376U, 2380U, 2384U, 2388U, 2392U, 2396U, 2400U, 2404U, + 2408U, 2412U, 2416U, 2420U, 2424U, 2428U, 2432U, 2436U, 2440U, 2444U, 2448U, + 2452U, 2456U, 2460U, 2464U, 2468U, 2472U, 2476U, 2480U, 2484U, 2488U, 2492U, + 2496U, 2500U, 2504U, 2508U, 2512U, 2516U, 2520U, 2524U, 2528U, 2532U, 2536U, + 2540U, 2544U, 2548U, 2552U, 2556U, 2560U, 2564U, 2568U, 2572U, 2576U, 2580U, + 2584U, 2588U, 2592U, 2596U, 2600U, 2604U, 2608U, 2612U, 2616U, 2620U, 2624U, + 2628U, 2632U, 2636U, 2640U, 2644U, 2648U, 2652U, 2656U, 2660U, 2664U, 2668U, + 2672U, 2676U, 2680U, 2684U, 2688U, 2692U, 2696U, 2700U, 2704U, 2708U, 2712U, + 2716U, 2720U, 2724U, 2728U, 2732U, 2736U, 2740U, 2744U, 2748U, 2752U, 2756U, + 2760U, 2764U, 2768U, 2772U, 2776U, 2780U, 2784U, 2788U, 2792U, 2796U, 2800U, + 2804U, 2808U, 2812U, 2816U, 2820U, 2824U, 2828U, 2832U, 2836U, 2840U, 2844U, + 2848U, 2852U, 2856U, 2860U, 2864U, 2868U, 2872U, 2876U, 2880U, 2884U, 2888U, + 2892U, 2896U, 2900U, 2904U, 2908U, 2912U, 2916U, 2920U, 2924U, 2928U, 2932U, + 2936U, 2940U, 2944U, 2948U, 2952U, 2956U, 2960U, 2964U, 2968U, 2972U, 2976U, + 2980U, 2984U, 2988U, 2992U, 2996U, 3000U, 3004U, 3008U, 3012U, 3016U, 3020U, + 3024U, 3028U, 3032U, 3036U, 3040U, 3044U, 3048U, 3052U, 3056U, 3060U, 3064U, + 3068U, 3072U, 3076U, 3080U, 3084U, 3088U, 3092U, 3096U, 3100U, 3104U, 3108U, + 3112U, 3116U, 3120U, 3124U, 3128U, 3132U, 3136U, 3140U, 3144U, 3148U, 3152U, + 3156U, 3160U, 3164U, 3168U, 3172U, 3176U, 3180U, 3184U, 3188U, 3192U, 3196U, + 3200U, 3204U, 3208U, 3212U, 3216U, 3220U, 3224U, 3228U, 3232U, 3236U, 3240U, + 3244U, 3248U, 3252U, 3256U, 3260U, 3264U, 3268U, 3272U, 3276U, 3280U, 3284U, + 3288U, 3292U, 3296U, 3300U, 3304U, 3308U, 3312U, 3316U, 3320U, 3324U, 3328U, + 3332U, 3336U, 3340U, 3344U, 3348U, 3352U, 3356U, 3360U, 3364U, 3368U, 3372U, + 3376U, 3380U, 3384U, 3388U, 3392U, 3396U, 3400U, 3404U, 3408U, 3412U, 3416U, + 3420U, 3424U, 3428U, 3432U, 3436U, 3440U, 3444U, 3448U, 3452U, 3456U, 3460U, + 3464U, 3468U, 3472U, 3476U, 3480U, 3484U, 3488U, 3492U, 3496U, 3500U, 3504U, + 3508U, 3512U, 3516U, 3520U, 3524U, 3528U, 3532U, 3536U, 3540U, 3544U, 3548U, + 3552U, 3556U, 3560U, 3564U, 3568U, 3572U, 3576U, 3580U, 3584U, 3588U, 3592U, + 3596U, 3600U, 3604U, 3608U, 3612U, 3616U, 3620U, 3624U, 3628U, 3632U, 3636U, + 3640U, 3644U, 3648U, 3652U, 3656U, 3660U, 3664U, 3668U, 3672U, 3676U, 3680U, + 3684U, 3688U, 3692U, 3696U, 3700U, 3704U, 3708U, 3712U, 3716U, 3720U, 3724U, + 3728U, 3732U, 3736U, 3740U, 3744U, 3748U, 3752U, 3756U, 3760U, 3764U, 3768U, + 3772U, 3776U, 3780U, 3784U, 3788U, 3792U, 3796U, 3800U, 3804U, 3808U, 3812U, + 3816U, 3820U, 3824U, 3828U, 3832U, 3836U, 3840U, 3844U, 3848U, 3852U, 3856U, + 3860U, 3864U, 3868U, 3872U, 3876U, 3880U, 3884U, 3888U, 3892U, 3896U, 3900U, + 3904U, 3908U, 3912U, 3916U, 3920U, 3924U, 3928U, 3932U, 3936U, 3940U, 3944U, + 3948U, 3952U, 3956U, 3960U, 3964U, 3968U, 3972U, 3976U, 3980U, 3984U, 3988U, + 3992U, 3996U, 4000U, 4004U, 4008U, 4012U, 4016U, 4020U, 4024U, 4028U, 4032U, + 4036U, 4040U, 4044U, 4048U, 4052U, 4056U, 4060U, 4064U, 4068U, 4072U, 4076U, + 4080U, 4084U, 4088U, 4092U } +}; + +/* + * File trailer for generated code. + * + * [EOF] + */ diff --git a/HVAC_model_private.h b/HVAC_model_private.h old mode 100644 new mode 100755 index 9c7e71b..a6423ef --- a/HVAC_model_private.h +++ b/HVAC_model_private.h @@ -1,45 +1,45 @@ -/* - * File: HVAC_model_private.h - * - * Code generated for Simulink model 'HVAC_model'. - * - * Model version : 1.613 - * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 - * C/C++ source code generated on : Mon Feb 16 16:08:44 2026 - * - * Target selection: ert.tlc - * Embedded hardware selection: ARM Compatible->ARM Cortex-M - * Emulation hardware selection: - * Differs from embedded hardware (MATLAB Host) - * Code generation objectives: Unspecified - * Validation result: Not run - */ - -#ifndef HVAC_model_private_h_ -#define HVAC_model_private_h_ -#include -#include -#include "HVAC_model_types.h" -#include "HVAC_model.h" - -extern int16_t look1_iu16tdIs16_binlcs(uint16_t u0, const uint16_t bp0[], const - double table[], uint32_t maxIndex); -extern void IfActionSubsystem3(int8_t rtu_stepIn, int8_t *rty_step); -extern void InitialCPOSMin(double rtu_LOGGER, int8_t rtu_step, int8_t *rty_y); -extern void NormalMode(double rtu_LOGGER, int8_t rtu_step, int8_t *rty_y); -extern void MovetopositionMin(double rtu_LOGGER, int8_t rtu_step, int8_t *rty_y); -extern void MINPOSITION(int16_t rty_y[9], double rtu_LOGGER); -extern void InitialCPOSMax(double rtu_LOGGER, int8_t rtu_step, int8_t *rty_y); -extern void MovetopositionMax(int8_t rtu_step, double rtu_LOGGER, int8_t *rty_y); -extern void MINPOSITION_g(int16_t rty_y[9], double rtu_LOGGER); -extern void WriteIgnition(double rtu_LOGGER, int8_t rtu_step); -extern void IfActionSubsystem3_m(int8_t rtu_stepIn, int8_t *rty_step); -extern void IfActionSubsystem3_n(int8_t rtu_stepIn, int8_t *rty_step); - -#endif /* HVAC_model_private_h_ */ - -/* - * File trailer for generated code. - * - * [EOF] - */ +/* + * File: HVAC_model_private.h + * + * Code generated for Simulink model 'HVAC_model'. + * + * Model version : 1.625 + * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 + * C/C++ source code generated on : Tue Feb 17 18:15:10 2026 + * + * Target selection: ert.tlc + * Embedded hardware selection: ARM Compatible->ARM Cortex-M + * Emulation hardware selection: + * Differs from embedded hardware (MATLAB Host) + * Code generation objectives: Unspecified + * Validation result: Not run + */ + +#ifndef HVAC_model_private_h_ +#define HVAC_model_private_h_ +#include +#include +#include "HVAC_model_types.h" +#include "HVAC_model.h" + +extern int16_t look1_iu16tdIs16_binlcs(uint16_t u0, const uint16_t bp0[], const + double table[], uint32_t maxIndex); +extern void IfActionSubsystem3(int8_t rtu_stepIn, int8_t *rty_step); +extern void InitialCPOSMin(double rtu_LOGGER, int8_t rtu_step, int8_t *rty_y); +extern void NormalMode(double rtu_LOGGER, int8_t rtu_step, int8_t *rty_y); +extern void MovetopositionMin(double rtu_LOGGER, int8_t rtu_step, int8_t *rty_y); +extern void MINPOSITION(int16_t rty_y[9], double rtu_LOGGER); +extern void InitialCPOSMax(double rtu_LOGGER, int8_t rtu_step, int8_t *rty_y); +extern void MovetopositionMax(int8_t rtu_step, double rtu_LOGGER, int8_t *rty_y); +extern void MINPOSITION_g(int16_t rty_y[9], double rtu_LOGGER); +extern void WriteIgnition(double rtu_LOGGER, int8_t rtu_step); +extern void IfActionSubsystem3_m(int8_t rtu_stepIn, int8_t *rty_step); +extern void IfActionSubsystem3_n(int8_t rtu_stepIn, int8_t *rty_step); + +#endif /* HVAC_model_private_h_ */ + +/* + * File trailer for generated code. + * + * [EOF] + */ diff --git a/HVAC_model_types.h b/HVAC_model_types.h old mode 100644 new mode 100755 index 7a0d88e..0a35902 --- a/HVAC_model_types.h +++ b/HVAC_model_types.h @@ -1,209 +1,209 @@ -/* - * File: HVAC_model_types.h - * - * Code generated for Simulink model 'HVAC_model'. - * - * Model version : 1.613 - * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 - * C/C++ source code generated on : Mon Feb 16 16:08:44 2026 - * - * Target selection: ert.tlc - * Embedded hardware selection: ARM Compatible->ARM Cortex-M - * Emulation hardware selection: - * Differs from embedded hardware (MATLAB Host) - * Code generation objectives: Unspecified - * Validation result: Not run - */ - -#ifndef HVAC_model_types_h_ -#define HVAC_model_types_h_ -#include -#ifndef DEFINED_TYPEDEF_FOR_CmdBusError_ -#define DEFINED_TYPEDEF_FOR_CmdBusError_ - -typedef struct { - uint8_t CCU_IncarTempErrF_Stat; - uint8_t CCU_IncarTempErrR_Stat; - uint8_t CCU_DuctTempSenErrF_Stat; - uint8_t CCU_DuctTempSenErrR_Stat; - uint8_t CCU_EvaTempSenErrF_Stat; - uint8_t CCU_EvaTempSenErrR_Stat; - uint8_t CCU_DeflectorSwErrF_Stat; - uint8_t CCU_DeflectorSwErrR_Stat; - uint8_t CCU_PressSenErr_Stat; - uint8_t CCU_AmbienTemptSenErr_Stat; - uint8_t CCU_SealingValveErr_Stat; - uint8_t CCU_ETXVerr_Stat; - uint8_t CCU_HVACfanOrTXVerrF_Stat; - uint8_t CCU_HVACfanOrTXVerrR_Stat; - uint8_t CCU_ActuatorErrF_Stat; - uint8_t CCU_ActuatorErrR_Stat; - uint8_t CCU_UltravioletErr_Stat; - uint8_t CCU_VinRecordErr_Stat; - uint8_t CCU_AirQualSenErr_Stat; - uint8_t CCU_CommErr_Stat; - uint8_t CCU_TWVerr_Stat; - uint8_t CCU_IonizationErr_Stat; - uint8_t CCU_AromaErr_Stat; -} CmdBusError; - -#endif - -#ifndef DEFINED_TYPEDEF_FOR_CmdBusStatus_ -#define DEFINED_TYPEDEF_FOR_CmdBusStatus_ - -typedef struct { - int8_t Battery; - int16_t AMB; - int16_t Incar_FL; - int16_t Incar_FR; - int16_t Incar_RL; - int16_t Incar_RR; - int16_t Eva_F; - int16_t Eva_R; - int16_t Pressure; - int16_t Duct_FL_Upper; - int16_t Duct_FL_Lower; - int16_t Duct_FR_Upper; - int16_t Duct_FR_Lower; - int16_t Duct_RL; - int16_t Duct_RR; - int16_t Duct_Side_FL; - int16_t Duct_Side_FR; - int16_t Duct_Side_RL; - int16_t Duct_Side_RR; - int8_t AQS; -} CmdBusStatus; - -#endif - -#ifndef DEFINED_TYPEDEF_FOR_CmdBusADCData_ -#define DEFINED_TYPEDEF_FOR_CmdBusADCData_ - -typedef struct { - uint16_t Sensor_Ambient_Temp; - uint16_t IGN_ANS; - uint16_t Sensor_AC_Pressure; - uint16_t Sensor_Incar_Temp_FL; - uint16_t Sensor_Incar_Temp_RL; - uint16_t Sensor_Rear_Evap_Temp; - uint16_t Sensor_Evap_Temp; - uint16_t Sensor_Rear_Duct1; - uint16_t Sensor_Rear_Duct2; - uint16_t Sensor_Front_Duct1; - uint16_t Sensor_Front_Duct2; - uint16_t Sensor_Front_Duct3; - uint16_t Sensor_Front_Duct4; - uint16_t Sensor_Rear_Duct3; - uint16_t Sensor_Rear_Duct4; - uint16_t Sensor_Incar_Temp_FR; - uint16_t Sensor_Incar_Temp_RR; - uint16_t Sensor_Rear_Duct5; - uint16_t Sensor_Rear_Duct6; - uint16_t Reserve_Sensor_Duct_Temp_1; - uint16_t Sensor_Front_Duct5; - uint16_t Sensor_Front_Duct6; - uint16_t BTS5120_2EKA_ShutoffValvePowerTXV1; - uint16_t BTS5120_2EKA_ShutoffValvePowerTXV2; - uint16_t Pressure_DIAG; - uint16_t BTS5180_2EKA_ShutOFFValveFront; - uint16_t BTS5180_2EKA_ShutOFFValveRear; - uint16_t BTS5180_2EKA_TwoWayValve; - uint16_t BTS5180_2EKA_ReservePowerSupply; - uint16_t BTS5180_2EKA_FrontIncarMotor; - uint16_t BTS5180_2EKA_RearIncarMotor; - uint16_t BTS5180_2EKA_ChannelPTCPower1; - uint16_t BTS5180_2EKA_ChannelPTCPower2; - uint16_t Reserve_Sensor_Duct_Temp_2; - uint16_t VN7008AJ_DIAG_FrontLINActuatorPowerDriverAB; - uint16_t VN7008AJ_DIAG_RearLINActuatorPowerDriverC; - uint16_t PBATT_CHECK; - uint16_t VN7008AJ_FrontLINActuatorPowerDriverAB; - uint16_t VN7008AJ_RearLINActuatorPowerDriverC; -} CmdBusADCData; - -#endif - -#ifndef DEFINED_TYPEDEF_FOR_CmdBusADCDataKey_ -#define DEFINED_TYPEDEF_FOR_CmdBusADCDataKey_ - -typedef struct { - uint8_t ST_ReservePower; - uint8_t ST_BATTChiller; - uint8_t EmergencyAirCleanSwitch; - uint8_t FireExtinguishSwitch; - uint8_t Ign_Wakeup; -} CmdBusADCDataKey; - -#endif - -#ifndef DEFINED_TYPEDEF_FOR_ActuatorCmdBus_ -#define DEFINED_TYPEDEF_FOR_ActuatorCmdBus_ - -typedef struct { - uint16_t POS[9]; - uint8_t BUS_ADR[9]; - uint8_t MODE[9]; - uint8_t COM[9]; - uint8_t Stall_SET[9]; - uint8_t Lnoise_SET[9]; - uint8_t Autos_SET[9]; - uint8_t Speed_SET[9]; - uint8_t Coils_Stop_SET[9]; -} ActuatorCmdBus; - -#endif - -#ifndef DEFINED_TYPEDEF_FOR_ActuatorCmdBusInput_ -#define DEFINED_TYPEDEF_FOR_ActuatorCmdBusInput_ - -typedef struct { - int16_t in_CPOS_ALL[9]; - int8_t in_Act_Emrf_Slave[9]; - int8_t in_Mode_Slave[9]; - int8_t in_Act_Err1_Supply[9]; - int8_t in_Act_Err2_Communication[9]; - int8_t in_Act_Err3_Temperature[9]; - int8_t in_Act_Err4_Permanent_Electrical[9]; - int8_t in_Act_Stall_Slave[9]; - int8_t in_Act_Reset[9]; - uint8_t Busy; - uint8_t Error_Connect; -} ActuatorCmdBusInput; - -#endif - -#ifndef DEFINED_TYPEDEF_FOR_CmdBusPWMGet_ -#define DEFINED_TYPEDEF_FOR_CmdBusPWMGet_ - -typedef struct { - uint8_t pwmPercentFront; - uint8_t pwmPercentRear; - uint8_t pwmPercentFrontReserved; - uint8_t pwmPercentRearReserved; -} CmdBusPWMGet; - -#endif - -#ifndef DEFINED_TYPEDEF_FOR_CmdBusPwm_ -#define DEFINED_TYPEDEF_FOR_CmdBusPwm_ - -typedef struct { - uint8_t pwmPercentFront; - uint8_t pwmPercentRear; - uint8_t pwmPercentFrontReserved; - uint8_t pwmPercentRearReserved; -} CmdBusPwm; - -#endif - -/* Forward declaration for rtModel */ -typedef struct tag_RTM RT_MODEL; - -#endif /* HVAC_model_types_h_ */ - -/* - * File trailer for generated code. - * - * [EOF] - */ +/* + * File: HVAC_model_types.h + * + * Code generated for Simulink model 'HVAC_model'. + * + * Model version : 1.625 + * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 + * C/C++ source code generated on : Tue Feb 17 18:15:10 2026 + * + * Target selection: ert.tlc + * Embedded hardware selection: ARM Compatible->ARM Cortex-M + * Emulation hardware selection: + * Differs from embedded hardware (MATLAB Host) + * Code generation objectives: Unspecified + * Validation result: Not run + */ + +#ifndef HVAC_model_types_h_ +#define HVAC_model_types_h_ +#include +#ifndef DEFINED_TYPEDEF_FOR_CmdBusError_ +#define DEFINED_TYPEDEF_FOR_CmdBusError_ + +typedef struct { + uint8_t CCU_IncarTempErrF_Stat; + uint8_t CCU_IncarTempErrR_Stat; + uint8_t CCU_DuctTempSenErrF_Stat; + uint8_t CCU_DuctTempSenErrR_Stat; + uint8_t CCU_EvaTempSenErrF_Stat; + uint8_t CCU_EvaTempSenErrR_Stat; + uint8_t CCU_DeflectorSwErrF_Stat; + uint8_t CCU_DeflectorSwErrR_Stat; + uint8_t CCU_PressSenErr_Stat; + uint8_t CCU_AmbienTemptSenErr_Stat; + uint8_t CCU_SealingValveErr_Stat; + uint8_t CCU_ETXVerr_Stat; + uint8_t CCU_HVACfanOrTXVerrF_Stat; + uint8_t CCU_HVACfanOrTXVerrR_Stat; + uint8_t CCU_ActuatorErrF_Stat; + uint8_t CCU_ActuatorErrR_Stat; + uint8_t CCU_UltravioletErr_Stat; + uint8_t CCU_VinRecordErr_Stat; + uint8_t CCU_AirQualSenErr_Stat; + uint8_t CCU_CommErr_Stat; + uint8_t CCU_TWVerr_Stat; + uint8_t CCU_IonizationErr_Stat; + uint8_t CCU_AromaErr_Stat; +} CmdBusError; + +#endif + +#ifndef DEFINED_TYPEDEF_FOR_CmdBusStatus_ +#define DEFINED_TYPEDEF_FOR_CmdBusStatus_ + +typedef struct { + int8_t Battery; + int16_t AMB; + int16_t Incar_FL; + int16_t Incar_FR; + int16_t Incar_RL; + int16_t Incar_RR; + int16_t Eva_F; + int16_t Eva_R; + int16_t Pressure; + int16_t Duct_FL_Upper; + int16_t Duct_FL_Lower; + int16_t Duct_FR_Upper; + int16_t Duct_FR_Lower; + int16_t Duct_RL; + int16_t Duct_RR; + int16_t Duct_Side_FL; + int16_t Duct_Side_FR; + int16_t Duct_Side_RL; + int16_t Duct_Side_RR; + int8_t AQS; +} CmdBusStatus; + +#endif + +#ifndef DEFINED_TYPEDEF_FOR_CmdBusADCData_ +#define DEFINED_TYPEDEF_FOR_CmdBusADCData_ + +typedef struct { + uint16_t Sensor_Ambient_Temp; + uint16_t IGN_ANS; + uint16_t Sensor_AC_Pressure; + uint16_t Sensor_Incar_Temp_FL; + uint16_t Sensor_Incar_Temp_RL; + uint16_t Sensor_Rear_Evap_Temp; + uint16_t Sensor_Evap_Temp; + uint16_t Sensor_Rear_Duct1; + uint16_t Sensor_Rear_Duct2; + uint16_t Sensor_Front_Duct1; + uint16_t Sensor_Front_Duct2; + uint16_t Sensor_Front_Duct3; + uint16_t Sensor_Front_Duct4; + uint16_t Sensor_Rear_Duct3; + uint16_t Sensor_Rear_Duct4; + uint16_t Sensor_Incar_Temp_FR; + uint16_t Sensor_Incar_Temp_RR; + uint16_t Sensor_Rear_Duct5; + uint16_t Sensor_Rear_Duct6; + uint16_t Reserve_Sensor_Duct_Temp_1; + uint16_t Sensor_Front_Duct5; + uint16_t Sensor_Front_Duct6; + uint16_t BTS5120_2EKA_ShutoffValvePowerTXV1; + uint16_t BTS5120_2EKA_ShutoffValvePowerTXV2; + uint16_t Pressure_DIAG; + uint16_t BTS5180_2EKA_ShutOFFValveFront; + uint16_t BTS5180_2EKA_ShutOFFValveRear; + uint16_t BTS5180_2EKA_TwoWayValve; + uint16_t BTS5180_2EKA_ReservePowerSupply; + uint16_t BTS5180_2EKA_FrontIncarMotor; + uint16_t BTS5180_2EKA_RearIncarMotor; + uint16_t BTS5180_2EKA_ChannelPTCPower1; + uint16_t BTS5180_2EKA_ChannelPTCPower2; + uint16_t Reserve_Sensor_Duct_Temp_2; + uint16_t VN7008AJ_DIAG_FrontLINActuatorPowerDriverAB; + uint16_t VN7008AJ_DIAG_RearLINActuatorPowerDriverC; + uint16_t PBATT_CHECK; + uint16_t VN7008AJ_FrontLINActuatorPowerDriverAB; + uint16_t VN7008AJ_RearLINActuatorPowerDriverC; +} CmdBusADCData; + +#endif + +#ifndef DEFINED_TYPEDEF_FOR_CmdBusADCDataKey_ +#define DEFINED_TYPEDEF_FOR_CmdBusADCDataKey_ + +typedef struct { + uint8_t ST_ReservePower; + uint8_t ST_BATTChiller; + uint8_t EmergencyAirCleanSwitch; + uint8_t FireExtinguishSwitch; + uint8_t Ign_Wakeup; +} CmdBusADCDataKey; + +#endif + +#ifndef DEFINED_TYPEDEF_FOR_ActuatorCmdBus_ +#define DEFINED_TYPEDEF_FOR_ActuatorCmdBus_ + +typedef struct { + uint16_t POS[9]; + uint8_t BUS_ADR[9]; + uint8_t MODE[9]; + uint8_t COM[9]; + uint8_t Stall_SET[9]; + uint8_t Lnoise_SET[9]; + uint8_t Autos_SET[9]; + uint8_t Speed_SET[9]; + uint8_t Coils_Stop_SET[9]; +} ActuatorCmdBus; + +#endif + +#ifndef DEFINED_TYPEDEF_FOR_ActuatorCmdBusInput_ +#define DEFINED_TYPEDEF_FOR_ActuatorCmdBusInput_ + +typedef struct { + int16_t in_CPOS_ALL[9]; + int8_t in_Act_Emrf_Slave[9]; + int8_t in_Mode_Slave[9]; + int8_t in_Act_Err1_Supply[9]; + int8_t in_Act_Err2_Communication[9]; + int8_t in_Act_Err3_Temperature[9]; + int8_t in_Act_Err4_Permanent_Electrical[9]; + int8_t in_Act_Stall_Slave[9]; + int8_t in_Act_Reset[9]; + uint8_t Busy; + uint8_t Error_Connect; +} ActuatorCmdBusInput; + +#endif + +#ifndef DEFINED_TYPEDEF_FOR_CmdBusPWMGet_ +#define DEFINED_TYPEDEF_FOR_CmdBusPWMGet_ + +typedef struct { + uint8_t pwmPercentFront; + uint8_t pwmPercentRear; + uint8_t pwmPercentFrontReserved; + uint8_t pwmPercentRearReserved; +} CmdBusPWMGet; + +#endif + +#ifndef DEFINED_TYPEDEF_FOR_CmdBusPwm_ +#define DEFINED_TYPEDEF_FOR_CmdBusPwm_ + +typedef struct { + uint8_t pwmPercentFront; + uint8_t pwmPercentRear; + uint8_t pwmPercentFrontReserved; + uint8_t pwmPercentRearReserved; +} CmdBusPwm; + +#endif + +/* Forward declaration for rtModel */ +typedef struct tag_RTM RT_MODEL; + +#endif /* HVAC_model_types_h_ */ + +/* + * File trailer for generated code. + * + * [EOF] + */