diff --git a/Model_Task.c b/Model_Task.c index 1fa92f1..b8749fc 100644 --- a/Model_Task.c +++ b/Model_Task.c @@ -6,12 +6,16 @@ #include #include "Model_actuator.h" +#define LOG_SIGN "Model" +#define LOGGER env->logger + void ModelTask_Init( - tModelTask *env + tModelTask *env, + tLoggerInterface *logger ) { Model_actuator_initialize(); env->access = osMutexNew(NULL); - + env->logger = logger; InitThreadAtrStatic(&env->thread.attr, "ModelTask", env->thread.controlBlock, env->thread.stack, osPriorityNormal); env->thread.id = 0; } @@ -21,6 +25,8 @@ static bool setActuatorBusy(tModelTask *env) { for (uint8_t i = 0; i < 9; ++i) { if (rtY.Out1.COM[i] != 0) { + LoggerInfoStatic(LOGGER, LOG_SIGN, "DETECT COMMAND") + env->triggerCommand = true; for (uint8_t j = 0; j < 9; ++j) { @@ -38,11 +44,14 @@ static bool setActuatorBusy(tModelTask *env) { static _Noreturn void ModelTask_Thread(tModelTask *env) { for (;;) { if (osMutexAcquire(env->access, 1000) == osOK) { + + LoggerFormatInfo(LOGGER, LOG_SIGN, "in_Busy_Ch0 = %d in_Act_Stall_Slave_Ch0 = %d", rtU.in_Busy_Ch0, rtU.in_Act_Stall_Slave_Ch0[7]) + Model_actuator_step(); setActuatorBusy(env); osMutexRelease(env->access); } - SystemDelayMs(100); + SystemDelayMs(250); } } diff --git a/Model_Task.h b/Model_Task.h index 10ed477..d9e4d12 100644 --- a/Model_Task.h +++ b/Model_Task.h @@ -7,11 +7,14 @@ #include #include "stdbool.h" +#include "LoggerInterface.h" typedef struct { osMutexId_t access; + tLoggerInterface *logger; + bool triggerCommand; uint8_t numCommand[9]; @@ -23,8 +26,10 @@ typedef struct { } thread; } tModelTask; -void ModelTask_Init(tModelTask *env); +void ModelTask_Init(tModelTask *env, tLoggerInterface *logger); + void ModelTask_StartThread(tModelTask *env); + void ModelTask_StopThread(tModelTask *env); #endif //HVAC_M7_MODEL_TASK_H diff --git a/Model_actuator.c b/Model_actuator.c index 9d82b6f..532ca7f 100644 --- a/Model_actuator.c +++ b/Model_actuator.c @@ -3,9 +3,9 @@ * * Code generated for Simulink model 'Model_actuator'. * - * Model version : 1.543 + * Model version : 1.552 * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 - * C/C++ source code generated on : Fri Dec 19 18:00:02 2025 + * C/C++ source code generated on : Wed Dec 24 11:40:12 2025 * * Target selection: ert.tlc * Embedded hardware selection: ARM Compatible->ARM Cortex-M @@ -18,6 +18,7 @@ #include "Model_actuator.h" #include #include "Model_actuator_private.h" +#include #include "Model_actuator_types.h" /* Exported block states */ @@ -41,12 +42,12 @@ 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' + * '/If Action Subsystem3' + * '/If Action Subsystem3' * '/If Action Subsystem3' */ void IfActionSubsystem3(int8_t rtu_stepIn, int8_t *rty_step, uint8_t @@ -54,149 +55,103 @@ void IfActionSubsystem3(int8_t rtu_stepIn, int8_t *rty_step, uint8_t { int32_t i; - /* DataStoreWrite: '/Data Store Write3' */ + /* DataStoreWrite: '/Data Store Write3' */ for (i = 0; i < 9; i++) { rtd_com_loc[i] = 0U; } - /* End of DataStoreWrite: '/Data Store Write3' */ + /* End of DataStoreWrite: '/Data Store Write3' */ - /* SignalConversion generated from: '/stepIn' */ + /* SignalConversion generated from: '/stepIn' */ *rty_step = rtu_stepIn; } +/* + * Output and update for atomic system: + * '/MAX POSITION' + * '/MAX POSITION' + */ +void MAXPOSITION(const int16_t rtu_step[9], int16_t rty_y[9]) +{ + int32_t i; + + /* : y = step; */ + for (i = 0; i < 9; i++) { + rty_y[i] = rtu_step[i]; + } + + /* : fprintf('SIMULINK POSITION '); */ + printf("SIMULINK POSITION "); + fflush(stdout); + + /* : for i = 1:numel(step) */ + for (i = 0; i < 9; i++) { + /* : fprintf('%d ', int16(step(i))); */ + printf("%d ", rtu_step[i]); + fflush(stdout); + } + + /* : fprintf('\n'); */ + printf("\n"); + fflush(stdout); +} + +/* + * Output and update for atomic system: + * '/MAX POSITION1' + * '/MAX POSITION1' + */ +void MAXPOSITION1(const int8_t rtu_step[9], int8_t rty_y[9]) +{ + int32_t i; + + /* : y = step; */ + for (i = 0; i < 9; i++) { + rty_y[i] = rtu_step[i]; + } + + /* : fprintf('SIMULINK Stall_Slave '); */ + printf("SIMULINK Stall_Slave "); + fflush(stdout); + + /* : for i = 1:numel(step) */ + for (i = 0; i < 9; i++) { + /* : fprintf('%d ', int16(step(i))); */ + printf("%d ", (int16_t)rtu_step[i]); + fflush(stdout); + } + + /* : fprintf('\n'); */ + printf("\n"); + fflush(stdout); +} + /* Model step function */ void Model_actuator_step(void) { int32_t i; - uint16_t tmp; - int8_t rtb_Switch; + int16_t rtb_y_ff[9]; + int8_t rtb_y_b[9]; + bool rtb_RelationalOperator_j[9]; + bool tmp; + bool tmp_0; /* Switch: '/Switch' incorporates: - * Constant: '/Constant1' * DataStoreRead: '/Data Store Read' - * UnitDelay: '/Unit Delay' */ - if (rtDW.stepSig >= 1) { - rtb_Switch = rtDW.UnitDelay_DSTATE; - } else { - rtb_Switch = 1; + if (rtDW.stepSig < 1) { + /* Switch: '/Switch' incorporates: + * Constant: '/Constant1' + */ + rtDW.UnitDelay_DSTATE = 1; } /* End of Switch: '/Switch' */ /* SwitchCase: '/Switch Case' */ - switch (rtb_Switch) { + switch (rtDW.UnitDelay_DSTATE) { case 1: /* Outputs for IfAction SubSystem: '/Stop Mode' incorporates: - * ActionPort: '/Action Port' - */ - /* If: '/If1' incorporates: - * Inport: '/in_Busy_Ch0' - * Inport: '/in_Error_Connect_Ch0' - */ - if ((rtU.in_Busy_Ch0 == 0) && (rtU.in_Error_Connect_Ch0 == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - for (i = 0; i < 9; i++) { - /* DataStoreWrite: '/Data Store Write2' */ - rtDW.mode_loc[i] = 2U; - - /* DataStoreWrite: '/Data Store Write3' */ - rtDW.com_loc[i] = 1U; - } - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * Merge: '/Merge' - * 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' - */ - /* Merge: '/Merge' */ - IfActionSubsystem3(rtb_Switch, &rtB.Merge, rtDW.com_loc); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If1' */ - - /* MATLAB Function: '/stop mode' */ - /* : y = step; */ - /* : fprintf('Stop Mode\n'); */ - printf("Stop Mode\n"); - fflush(stdout); - - /* End of Outputs for SubSystem: '/Stop Mode' */ - break; - - case 2: - /* Outputs for IfAction SubSystem: '/Initial CPOS Min' incorporates: - * ActionPort: '/Action Port' - */ - /* If: '/If' incorporates: - * Inport: '/in_Busy_Ch0' - * Inport: '/in_Error_Connect_Ch0' - */ - if ((rtU.in_Busy_Ch0 == 0) && (rtU.in_Error_Connect_Ch0 == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem' incorporates: - * ActionPort: '/Action Port' - */ - for (i = 0; i < 9; i++) { - /* DataStoreWrite: '/Data Store Write' */ - rtDW.pos_loc[i] = 6000U; - - /* DataStoreWrite: '/Data Store Write1' */ - rtDW.com_loc[i] = 2U; - } - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * Merge: '/Merge' - * 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' - */ - /* DataStoreWrite: '/Data Store Write3' */ - for (i = 0; i < 9; i++) { - rtDW.com_loc[i] = 0U; - } - - /* End of DataStoreWrite: '/Data Store Write3' */ - - /* 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' */ - - /* MATLAB Function: '/Initial CPOS Min' */ - /* : y = step; */ - /* : fprintf('Initial CPOS Min\n'); */ - printf("Initial CPOS Min\n"); - fflush(stdout); - - /* End of Outputs for SubSystem: '/Initial CPOS Min' */ - break; - - case 3: - /* Outputs for IfAction SubSystem: '/Normal Mode' incorporates: * ActionPort: '/Action Port' */ /* If: '/If1' incorporates: @@ -205,47 +160,106 @@ void Model_actuator_step(void) */ if ((rtU.in_Busy_Ch0 == 0) && (rtU.in_Error_Connect_Ch0 == 0)) { /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' + * ActionPort: '/Action Port' */ for (i = 0; i < 9; i++) { - /* DataStoreWrite: '/Data Store Write' */ - rtDW.mode_loc[i] = 0U; + /* DataStoreWrite: '/Data Store Write2' */ + rtDW.mode_loc[i] = 2U; - /* DataStoreWrite: '/Data Store Write2' */ + /* DataStoreWrite: '/Data Store Write3' */ rtDW.com_loc[i] = 1U; } /* Merge: '/Merge' incorporates: - * Constant: '/Constant' + * Constant: '/Constant' * Merge: '/Merge' - * Sum: '/step inc' + * SignalConversion generated from: '/step' + * Sum: '/step inc' */ - rtB.Merge = (int8_t)(rtb_Switch + 1); + rtB.Merge = (int8_t)(rtDW.UnitDelay_DSTATE + 1); + + /* MATLAB Function: '/stop mode' */ + /* : y = step; */ + /* : fprintf('SIMULINK Stop Mode\n'); */ + printf("SIMULINK Stop Mode\n"); + fflush(stdout); /* End of Outputs for SubSystem: '/If Action Subsystem2' */ } else { /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' + * ActionPort: '/Action Port' */ /* Merge: '/Merge' */ - IfActionSubsystem3(rtb_Switch, &rtB.Merge, rtDW.com_loc); + IfActionSubsystem3(rtDW.UnitDelay_DSTATE, &rtB.Merge, rtDW.com_loc); /* End of Outputs for SubSystem: '/If Action Subsystem3' */ } /* End of If: '/If1' */ - - /* MATLAB Function: '/Normal Mode' */ - /* : y = step; */ - /* : fprintf('Normal Mode\n'); */ - printf("Normal Mode\n"); - fflush(stdout); - - /* End of Outputs for SubSystem: '/Normal Mode' */ + /* End of Outputs for SubSystem: '/Stop Mode' */ break; - case 4: - /* Outputs for IfAction SubSystem: '/Move to position Min' incorporates: + case 2: + /* Outputs for IfAction SubSystem: '/Initial CPOS Min' incorporates: + * ActionPort: '/Action Port' + */ + /* If: '/If' incorporates: + * Inport: '/in_Busy_Ch0' + * Inport: '/in_Error_Connect_Ch0' + */ + if ((rtU.in_Busy_Ch0 == 0) && (rtU.in_Error_Connect_Ch0 == 0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem' incorporates: + * ActionPort: '/Action Port' + */ + for (i = 0; i < 9; i++) { + /* DataStoreWrite: '/Data Store Write' */ + rtDW.pos_loc[i] = 6000U; + + /* DataStoreWrite: '/Data Store Write1' */ + rtDW.com_loc[i] = 2U; + } + + /* MATLAB Function: '/Initial CPOS Min' */ + /* : y = step; */ + /* : fprintf('SIMULINK Initial CPOS Min - 6000\n'); */ + printf("SIMULINK Initial CPOS Min - 6000\n"); + fflush(stdout); + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * Merge: '/Merge' + * SignalConversion generated from: '/step' + * Sum: '/step inc' + */ + rtB.Merge = (int8_t)(rtDW.UnitDelay_DSTATE + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + /* DataStoreWrite: '/Data Store Write3' */ + for (i = 0; i < 9; i++) { + rtDW.com_loc[i] = 0U; + } + + /* End of DataStoreWrite: '/Data Store Write3' */ + + /* Merge: '/Merge' incorporates: + * Merge: '/Merge' + * SignalConversion generated from: '/stepIn1' + */ + rtB.Merge = rtDW.UnitDelay_DSTATE; + + /* 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: @@ -254,170 +268,45 @@ void Model_actuator_step(void) */ if ((rtU.in_Busy_Ch0 == 0) && (rtU.in_Error_Connect_Ch0 == 0)) { /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' + * ActionPort: '/Action Port' */ for (i = 0; i < 9; i++) { - /* DataStoreWrite: '/Data Store Write1' */ - rtDW.stall_set_loc[i] = 1U; + /* DataStoreWrite: '/Data Store Write' */ + rtDW.mode_loc[i] = 0U; - /* DataStoreWrite: '/Data Store Write3' incorporates: - * Constant: '/Constant2' - */ - rtDW.lnoise_set_loc[i] = 0U; - - /* DataStoreWrite: '/Data Store Write2' */ - rtDW.com_loc[i] = 3U; - - /* DataStoreWrite: '/Data Store Write4' incorporates: - * Constant: '/Constant4' - */ - rtDW.autos_set_loc[i] = 0U; - - /* DataStoreWrite: '/Data Store Write5' incorporates: - * Constant: '/Constant5' - */ - rtDW.speed_set_loc[i] = 0U; - - /* DataStoreWrite: '/Data Store Write6' incorporates: - * Constant: '/Constant6' - */ - rtDW.coils_stop_set_loc[i] = 0U; - - /* DataStoreWrite: '/Data Store Write' */ - rtDW.pos_loc[i] = 0U; + /* DataStoreWrite: '/Data Store Write2' */ + rtDW.com_loc[i] = 1U; } + /* MATLAB Function: '/Normal Mode' */ + /* : y = step; */ + /* : fprintf('SIMULINK Normal Mode\n'); */ + printf("SIMULINK Normal Mode\n"); + fflush(stdout); + /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * Merge: '/Merge' - * Sum: '/step inc' + * Constant: '/Constant' + * SignalConversion generated from: '/step' + * Sum: '/step inc' */ - rtB.Merge = (int8_t)(rtb_Switch + 1); + rtB.Merge = (int8_t)(rtDW.UnitDelay_DSTATE + 1); /* End of Outputs for SubSystem: '/If Action Subsystem2' */ } else { /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' + * ActionPort: '/Action Port' */ - /* Merge: '/Merge' */ - IfActionSubsystem3(rtb_Switch, &rtB.Merge, rtDW.com_loc); + IfActionSubsystem3(rtDW.UnitDelay_DSTATE, &rtB.Merge, rtDW.com_loc); /* End of Outputs for SubSystem: '/If Action Subsystem3' */ } /* End of If: '/If1' */ - - /* MATLAB Function: '/Move to position Min' */ - /* : y = step; */ - /* : fprintf('Move to position Min\n'); */ - printf("Move to position Min\n"); - fflush(stdout); - - /* End of Outputs for SubSystem: '/Move to position Min' */ + /* End of Outputs for SubSystem: '/Normal Mode' */ break; - case 5: - /* Outputs for IfAction SubSystem: '/Check Stall Min' incorporates: - * ActionPort: '/Action Port' - */ - /* If: '/If1' incorporates: - * Inport: '/in_Busy_Ch0' - * Inport: '/in_Error_Connect_Ch0' - */ - if ((rtU.in_Busy_Ch0 == 0) && (rtU.in_Error_Connect_Ch0 == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - /* DataStoreWrite: '/Data Store Write1' incorporates: - * DataStoreWrite: '/Data Store Write1' - * Inport: '/in_CPOS_ALL_Ch0' - */ - for (i = 0; i < 9; i++) { - rtDW.Min_position_Ch0[i] = rtU.in_CPOS_ALL_Ch0[i]; - } - - /* End of DataStoreWrite: '/Data Store Write1' */ - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * Merge: '/Merge' - * 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' - */ - /* Merge: '/Merge' */ - IfActionSubsystem3(rtb_Switch, &rtB.Merge, rtDW.com_loc); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If1' */ - - /* MATLAB Function: '/Check Stall Min' */ - /* : y = step; */ - /* : fprintf('Check Stall Min\n'); */ - printf("Check Stall Min\n"); - fflush(stdout); - - /* 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: - * Inport: '/in_Busy_Ch0' - * Inport: '/in_Error_Connect_Ch0' - */ - if ((rtU.in_Busy_Ch0 == 0) && (rtU.in_Error_Connect_Ch0 == 0)) { - /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' - */ - for (i = 0; i < 9; i++) { - /* DataStoreWrite: '/Data Store Write' */ - rtDW.pos_loc[i] = 0U; - - /* DataStoreWrite: '/Data Store Write1' */ - rtDW.com_loc[i] = 2U; - } - - /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * Merge: '/Merge' - * 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' - */ - /* Merge: '/Merge' */ - IfActionSubsystem3(rtb_Switch, &rtB.Merge, rtDW.com_loc); - - /* End of Outputs for SubSystem: '/If Action Subsystem3' */ - } - - /* End of If: '/If1' */ - - /* MATLAB Function: '/Initial CPOS Max' */ - /* : y = step; */ - /* : fprintf('Initial CPOS Max\n'); */ - printf("Initial CPOS Max\n"); - fflush(stdout); - - /* End of Outputs for SubSystem: '/Initial CPOS Max' */ - break; - - case 7: - /* Outputs for IfAction SubSystem: '/Move to position Max' incorporates: + case 4: + /* Outputs for IfAction SubSystem: '/Move to position Min' incorporates: * ActionPort: '/Action Port' */ /* If: '/If1' incorporates: @@ -426,65 +315,292 @@ void Model_actuator_step(void) */ if ((rtU.in_Busy_Ch0 == 0) && (rtU.in_Error_Connect_Ch0 == 0)) { /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' + * ActionPort: '/Action Port' */ for (i = 0; i < 9; i++) { - /* DataStoreWrite: '/Data Store Write1' */ + /* DataStoreWrite: '/Data Store Write1' */ rtDW.stall_set_loc[i] = 1U; - /* DataStoreWrite: '/Data Store Write3' incorporates: - * Constant: '/Constant2' + /* DataStoreWrite: '/Data Store Write3' incorporates: + * Constant: '/Constant2' */ rtDW.lnoise_set_loc[i] = 0U; - /* DataStoreWrite: '/Data Store Write2' */ + /* DataStoreWrite: '/Data Store Write2' */ rtDW.com_loc[i] = 3U; - /* DataStoreWrite: '/Data Store Write4' incorporates: - * Constant: '/Constant4' + /* DataStoreWrite: '/Data Store Write4' incorporates: + * Constant: '/Constant4' */ rtDW.autos_set_loc[i] = 0U; - /* DataStoreWrite: '/Data Store Write5' incorporates: - * Constant: '/Constant5' + /* DataStoreWrite: '/Data Store Write5' incorporates: + * Constant: '/Constant5' */ rtDW.speed_set_loc[i] = 0U; - /* DataStoreWrite: '/Data Store Write6' incorporates: - * Constant: '/Constant6' + /* DataStoreWrite: '/Data Store Write6' incorporates: + * Constant: '/Constant6' */ rtDW.coils_stop_set_loc[i] = 0U; - /* DataStoreWrite: '/Data Store Write' */ - rtDW.pos_loc[i] = 6000U; + /* DataStoreWrite: '/Data Store Write' */ + rtDW.pos_loc[i] = 1U; } + /* MATLAB Function: '/Move to position Min' */ + /* : y = step; */ + /* : fprintf('SIMULINK Move to position Min - 1\n'); */ + printf("SIMULINK Move to position Min - 1\n"); + fflush(stdout); + /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * Merge: '/Merge' - * Sum: '/step inc' + * Constant: '/Constant' + * SignalConversion generated from: '/step' + * Sum: '/step inc' */ - rtB.Merge = (int8_t)(rtb_Switch + 1); + rtB.Merge = (int8_t)(rtDW.UnitDelay_DSTATE + 1); /* End of Outputs for SubSystem: '/If Action Subsystem2' */ } else { /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' + * ActionPort: '/Action Port' */ - /* Merge: '/Merge' */ - IfActionSubsystem3(rtb_Switch, &rtB.Merge, rtDW.com_loc); + IfActionSubsystem3(rtDW.UnitDelay_DSTATE, &rtB.Merge, rtDW.com_loc); /* End of Outputs for SubSystem: '/If Action Subsystem3' */ } /* End of If: '/If1' */ + /* End of Outputs for SubSystem: '/Move to position Min' */ + break; - /* MATLAB Function: '/Move to position Max' */ - /* : y = step; */ - /* : fprintf('Move to position Max\n'); */ - printf("Move to position Max\n"); - fflush(stdout); + case 5: + /* Outputs for IfAction SubSystem: '/Check Stall Min' incorporates: + * ActionPort: '/Action Port' + */ + /* RelationalOperator: '/Relational Operator1' incorporates: + * DataStoreWrite: '/Data Store Write4' + * Inport: '/in_Act_Stall_Slave_Ch0' + */ + for (i = 0; i < 9; i++) { + rtb_RelationalOperator_j[i] = (rtU.in_Act_Stall_Slave_Ch0[i] == 1); + } + /* End of RelationalOperator: '/Relational Operator1' */ + + /* Logic: '/Logical Operator2' */ + tmp = rtb_RelationalOperator_j[0]; + for (i = 0; i < 8; i++) { + tmp = (tmp || rtb_RelationalOperator_j[i + 1]); + } + + /* RelationalOperator: '/Relational Operator' incorporates: + * DataStoreWrite: '/Data Store Write1' + * Inport: '/in_CPOS_ALL_Ch0' + */ + for (i = 0; i < 9; i++) { + rtb_RelationalOperator_j[i] = (rtU.in_CPOS_ALL_Ch0[i] == 1); + } + + /* End of RelationalOperator: '/Relational Operator' */ + + /* Logic: '/Logical Operator1' */ + tmp_0 = rtb_RelationalOperator_j[0]; + for (i = 0; i < 8; i++) { + tmp_0 = (tmp_0 || rtb_RelationalOperator_j[i + 1]); + } + + /* If: '/If2' incorporates: + * DataTypeConversion: '/Data Type Conversion' + * DataTypeConversion: '/Data Type Conversion1' + * Inport: '/in_Busy_Ch0' + * Inport: '/in_Error_Connect_Ch0' + * Logic: '/Logical Operator' + * Logic: '/Logical Operator1' + * Logic: '/Logical Operator2' + */ + if ((rtU.in_Busy_Ch0 == 0) && (rtU.in_Error_Connect_Ch0 == 0) && (tmp || + tmp_0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + /* DataStoreWrite: '/Data Store Write1' incorporates: + * DataStoreWrite: '/Data Store Write1' + * Inport: '/in_CPOS_ALL_Ch0' + */ + for (i = 0; i < 9; i++) { + rtDW.Min_position_Ch0[i] = rtU.in_CPOS_ALL_Ch0[i]; + } + + /* End of DataStoreWrite: '/Data Store Write1' */ + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * Sum: '/step inc' + */ + rtB.Merge = (int8_t)(rtDW.UnitDelay_DSTATE + 1); + + /* MATLAB Function: '/MIN POSITION' incorporates: + * DataStoreWrite: '/Data Store Write1' + * Inport: '/in_CPOS_ALL_Ch0' + */ + /* : y = step; */ + /* : 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 ", rtU.in_CPOS_ALL_Ch0[i]); + fflush(stdout); + } + + /* : fprintf('\n'); */ + printf("\n"); + fflush(stdout); + + /* End of MATLAB Function: '/MIN POSITION' */ + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3(rtDW.UnitDelay_DSTATE, &rtB.Merge, rtDW.com_loc); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If2' */ + + /* MATLAB Function: '/MAX POSITION' incorporates: + * Inport: '/in_CPOS_ALL_Ch0' + */ + MAXPOSITION(rtU.in_CPOS_ALL_Ch0, rtb_y_ff); + + /* MATLAB Function: '/MAX POSITION1' incorporates: + * Inport: '/in_Act_Stall_Slave_Ch0' + */ + MAXPOSITION1(rtU.in_Act_Stall_Slave_Ch0, rtb_y_b); + + /* 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: + * Inport: '/in_Busy_Ch0' + * Inport: '/in_Error_Connect_Ch0' + */ + if ((rtU.in_Busy_Ch0 == 0) && (rtU.in_Error_Connect_Ch0 == 0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + for (i = 0; i < 9; i++) { + /* DataStoreWrite: '/Data Store Write' */ + rtDW.pos_loc[i] = 1U; + + /* DataStoreWrite: '/Data Store Write1' */ + rtDW.com_loc[i] = 2U; + } + + /* MATLAB Function: '/Initial CPOS Max' */ + /* : y = step; */ + /* : fprintf('SIMULINK Initial CPOS Max - 1\n'); */ + printf("SIMULINK Initial CPOS Max - 1\n"); + fflush(stdout); + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * SignalConversion generated from: '/step' + * Sum: '/step inc' + */ + rtB.Merge = (int8_t)(rtDW.UnitDelay_DSTATE + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3(rtDW.UnitDelay_DSTATE, &rtB.Merge, rtDW.com_loc); + + /* 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: + * Inport: '/in_Busy_Ch0' + * Inport: '/in_Error_Connect_Ch0' + */ + if ((rtU.in_Busy_Ch0 == 0) && (rtU.in_Error_Connect_Ch0 == 0)) { + /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: + * ActionPort: '/Action Port' + */ + for (i = 0; i < 9; i++) { + /* DataStoreWrite: '/Data Store Write1' */ + rtDW.stall_set_loc[i] = 1U; + + /* DataStoreWrite: '/Data Store Write3' incorporates: + * Constant: '/Constant2' + */ + rtDW.lnoise_set_loc[i] = 0U; + + /* DataStoreWrite: '/Data Store Write2' */ + rtDW.com_loc[i] = 3U; + + /* DataStoreWrite: '/Data Store Write4' incorporates: + * Constant: '/Constant4' + */ + rtDW.autos_set_loc[i] = 0U; + + /* DataStoreWrite: '/Data Store Write5' incorporates: + * Constant: '/Constant5' + */ + rtDW.speed_set_loc[i] = 0U; + + /* DataStoreWrite: '/Data Store Write6' incorporates: + * Constant: '/Constant6' + */ + rtDW.coils_stop_set_loc[i] = 0U; + + /* DataStoreWrite: '/Data Store Write' */ + rtDW.pos_loc[i] = 6000U; + } + + /* MATLAB Function: '/Move to position Max' */ + /* : y = step; */ + /* : fprintf('SIMULINK Move to position Max - 6000\n'); */ + printf("SIMULINK Move to position Max - 6000\n"); + fflush(stdout); + + /* Merge: '/Merge' incorporates: + * Constant: '/Constant' + * SignalConversion generated from: '/step' + * Sum: '/step inc' + */ + rtB.Merge = (int8_t)(rtDW.UnitDelay_DSTATE + 1); + + /* End of Outputs for SubSystem: '/If Action Subsystem2' */ + } else { + /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: + * ActionPort: '/Action Port' + */ + IfActionSubsystem3(rtDW.UnitDelay_DSTATE, &rtB.Merge, rtDW.com_loc); + + /* End of Outputs for SubSystem: '/If Action Subsystem3' */ + } + + /* End of If: '/If1' */ /* End of Outputs for SubSystem: '/Move to position Max' */ break; @@ -492,15 +608,53 @@ void Model_actuator_step(void) /* Outputs for IfAction SubSystem: '/Check Stall Max' incorporates: * ActionPort: '/Action Port' */ - /* If: '/If1' incorporates: + /* RelationalOperator: '/Relational Operator1' incorporates: + * DataStoreWrite: '/Data Store Write4' + * Inport: '/in_Act_Stall_Slave_Ch0' + */ + for (i = 0; i < 9; i++) { + rtb_RelationalOperator_j[i] = (rtU.in_Act_Stall_Slave_Ch0[i] == 1); + } + + /* End of RelationalOperator: '/Relational Operator1' */ + + /* Logic: '/Logical Operator2' */ + tmp = rtb_RelationalOperator_j[0]; + for (i = 0; i < 8; i++) { + tmp = (tmp || rtb_RelationalOperator_j[i + 1]); + } + + /* RelationalOperator: '/Relational Operator' incorporates: + * DataStoreWrite: '/Data Store Write1' + * Inport: '/in_CPOS_ALL_Ch0' + */ + for (i = 0; i < 9; i++) { + rtb_RelationalOperator_j[i] = (rtU.in_CPOS_ALL_Ch0[i] == 6000); + } + + /* End of RelationalOperator: '/Relational Operator' */ + + /* Logic: '/Logical Operator1' */ + tmp_0 = rtb_RelationalOperator_j[0]; + for (i = 0; i < 8; i++) { + tmp_0 = (tmp_0 || rtb_RelationalOperator_j[i + 1]); + } + + /* If: '/If2' incorporates: + * DataTypeConversion: '/Data Type Conversion' + * DataTypeConversion: '/Data Type Conversion1' * Inport: '/in_Busy_Ch0' * Inport: '/in_Error_Connect_Ch0' + * Logic: '/Logical Operator' + * Logic: '/Logical Operator1' + * Logic: '/Logical Operator2' */ - if ((rtU.in_Busy_Ch0 == 0) && (rtU.in_Error_Connect_Ch0 == 0)) { + if ((rtU.in_Busy_Ch0 == 0) && (rtU.in_Error_Connect_Ch0 == 0) && (tmp || + tmp_0)) { /* Outputs for IfAction SubSystem: '/If Action Subsystem2' incorporates: - * ActionPort: '/Action Port' + * ActionPort: '/Action Port' */ - /* DataStoreWrite: '/Data Store Write1' incorporates: + /* DataStoreWrite: '/Data Store Write1' incorporates: * DataStoreWrite: '/Data Store Write1' * Inport: '/in_CPOS_ALL_Ch0' */ @@ -508,71 +662,89 @@ void Model_actuator_step(void) rtDW.Max_position_Ch0[i] = rtU.in_CPOS_ALL_Ch0[i]; } - /* End of DataStoreWrite: '/Data Store Write1' */ + /* End of DataStoreWrite: '/Data Store Write1' */ /* Merge: '/Merge' incorporates: - * Constant: '/Constant' - * Merge: '/Merge' - * Sum: '/step inc' + * Constant: '/Constant' + * Sum: '/step inc' */ - rtB.Merge = (int8_t)(rtb_Switch + 1); + rtB.Merge = (int8_t)(rtDW.UnitDelay_DSTATE + 1); + /* MATLAB Function: '/MIN POSITION' incorporates: + * DataStoreWrite: '/Data Store Write1' + * Inport: '/in_CPOS_ALL_Ch0' + */ + /* : y = step; */ + /* : 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 ", rtU.in_CPOS_ALL_Ch0[i]); + fflush(stdout); + } + + /* : fprintf('\n'); */ + printf("\n"); + fflush(stdout); + + /* End of MATLAB Function: '/MIN POSITION' */ /* End of Outputs for SubSystem: '/If Action Subsystem2' */ } else { /* Outputs for IfAction SubSystem: '/If Action Subsystem3' incorporates: - * ActionPort: '/Action Port' + * ActionPort: '/Action Port' */ - /* Merge: '/Merge' */ - IfActionSubsystem3(rtb_Switch, &rtB.Merge, rtDW.com_loc); + IfActionSubsystem3(rtDW.UnitDelay_DSTATE, &rtB.Merge, rtDW.com_loc); /* End of Outputs for SubSystem: '/If Action Subsystem3' */ } - /* End of If: '/If1' */ + /* End of If: '/If2' */ - /* MATLAB Function: '/Check Stall Max' */ - /* : y = step; */ - /* : fprintf('Check Stall Max\n'); */ - printf("Check Stall Max\n"); - fflush(stdout); + /* MATLAB Function: '/MAX POSITION' incorporates: + * Inport: '/in_CPOS_ALL_Ch0' + */ + MAXPOSITION(rtU.in_CPOS_ALL_Ch0, rtb_y_ff); + + /* MATLAB Function: '/MAX POSITION1' incorporates: + * Inport: '/in_Act_Stall_Slave_Ch0' + */ + MAXPOSITION1(rtU.in_Act_Stall_Slave_Ch0, rtb_y_b); /* End of Outputs for SubSystem: '/Check Stall Max' */ break; case 9: /* Outputs for IfAction SubSystem: '/Homing' incorporates: - * ActionPort: '/Action Port' + * ActionPort: '/Action Port' */ - /* DataStoreWrite: '/Data Store Write3' */ + /* DataStoreWrite: '/Data Store Write3' */ for (i = 0; i < 9; i++) { rtDW.com_loc[i] = 0U; } - /* End of DataStoreWrite: '/Data Store Write3' */ + /* End of DataStoreWrite: '/Data Store Write3' */ /* Merge: '/Merge' incorporates: - * Constant: '/Constant2' - * SignalConversion generated from: '/step' + * Constant: '/Constant2' + * SignalConversion generated from: '/step' */ rtB.Merge = 1; - /* MATLAB Function: '/MAX POSITION' incorporates: - * DataStoreRead: '/Data Store Read2' + /* MATLAB Function: '/MAX POSITION' incorporates: + * DataStoreRead: '/Data Store Read2' */ /* : y = step; */ - /* : fprintf('MAX POSITION '); */ - printf("MAX POSITION "); + /* : fprintf('SIMULINK MAX POSITION '); */ + printf("SIMULINK MAX POSITION "); fflush(stdout); /* : for i = 1:numel(step) */ for (i = 0; i < 9; i++) { /* : fprintf('%d ', int16(step(i))); */ - tmp = rtDW.Max_position_Ch0[i]; - if (tmp > 32767) { - tmp = 32767U; - } - - printf("%d ", (int16_t)tmp); + printf("%d ", rtDW.Max_position_Ch0[i]); fflush(stdout); } @@ -580,25 +752,20 @@ void Model_actuator_step(void) printf("\n"); fflush(stdout); - /* End of MATLAB Function: '/MAX POSITION' */ + /* End of MATLAB Function: '/MAX POSITION' */ - /* MATLAB Function: '/MIN POSITION' incorporates: - * DataStoreRead: '/Data Store Read3' + /* MATLAB Function: '/MIN POSITION' incorporates: + * DataStoreRead: '/Data Store Read3' */ /* : y = step; */ - /* : fprintf('MIN POSITION '); */ - printf("MIN POSITION "); + /* : fprintf('SIMULINK MIN POSITION '); */ + printf("SIMULINK MIN POSITION "); fflush(stdout); /* : for i = 1:numel(step) */ for (i = 0; i < 9; i++) { /* : fprintf('%d ', int16(step(i))); */ - tmp = rtDW.Min_position_Ch0[i]; - if (tmp > 32767) { - tmp = 32767U; - } - - printf("%d ", (int16_t)tmp); + printf("%d ", rtDW.Min_position_Ch0[i]); fflush(stdout); } @@ -606,18 +773,18 @@ void Model_actuator_step(void) printf("\n"); fflush(stdout); - /* End of MATLAB Function: '/MIN POSITION' */ + /* End of MATLAB Function: '/MIN POSITION' */ /* End of Outputs for SubSystem: '/Homing' */ break; case 0: /* Outputs for IfAction SubSystem: '/Homing1' incorporates: - * ActionPort: '/Action Port' + * ActionPort: '/Action Port' */ /* Merge: '/Merge' incorporates: - * SignalConversion generated from: '/stepIn' + * SignalConversion generated from: '/stepIn' */ - rtB.Merge = rtb_Switch; + rtB.Merge = rtDW.UnitDelay_DSTATE; /* End of Outputs for SubSystem: '/Homing1' */ break; @@ -630,17 +797,17 @@ void Model_actuator_step(void) */ rtDW.stepSig = 1; - /* BusCreator: '/Bus Creator' incorporates: - * DataStoreRead: '/Data Store Read1' - * DataStoreRead: '/Data Store Read2' - * DataStoreRead: '/Data Store Read3' - * DataStoreRead: '/Data Store Read4' - * DataStoreRead: '/Data Store Read5' - * DataStoreRead: '/Data Store Read6' - * DataStoreRead: '/Data Store Read7' - * DataStoreRead: '/Data Store Read8' - * DataStoreRead: '/Data Store Read9' - * DataStoreWrite: '/Data Store Write' + /* BusCreator: '/Bus Creator' incorporates: + * DataStoreRead: '/Data Store Read1' + * DataStoreRead: '/Data Store Read2' + * DataStoreRead: '/Data Store Read3' + * DataStoreRead: '/Data Store Read4' + * DataStoreRead: '/Data Store Read5' + * DataStoreRead: '/Data Store Read6' + * DataStoreRead: '/Data Store Read7' + * DataStoreRead: '/Data Store Read8' + * DataStoreRead: '/Data Store Read9' + * DataStoreWrite: '/Data Store Write' */ for (i = 0; i < 9; i++) { controllerData.POS[i] = rtDW.pos_loc[i]; @@ -654,28 +821,16 @@ void Model_actuator_step(void) controllerData.Coils_Stop_SET[i] = rtDW.coils_stop_set_loc[i]; } - /* End of BusCreator: '/Bus Creator' */ + /* End of BusCreator: '/Bus Creator' */ /* Outport: '/Out1' incorporates: * DataStoreRead: '/Data Store Read10' */ rtY.Out1 = controllerData; - /* MATLAB Function: '/Finish case' incorporates: + /* Update for Switch: '/Switch' incorporates: * UnitDelay: '/Unit Delay' */ - /* : y = step; */ - /* : fprintf('Finish case: step = %d\n', step); */ - printf("Finish case: step = %d\n", rtDW.UnitDelay_DSTATE); - fflush(stdout); - - /* MATLAB Function: '/Start case' */ - /* : y = step; */ - /* : fprintf('Start case: step = %d\n', step); */ - printf("Start case: step = %d\n", rtb_Switch); - fflush(stdout); - - /* Update for UnitDelay: '/Unit Delay' */ rtDW.UnitDelay_DSTATE = rtB.Merge; } diff --git a/Model_actuator.h b/Model_actuator.h index 61d9a75..df98196 100644 --- a/Model_actuator.h +++ b/Model_actuator.h @@ -3,9 +3,9 @@ * * Code generated for Simulink model 'Model_actuator'. * - * Model version : 1.542 + * Model version : 1.550 * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 - * C/C++ source code generated on : Fri Dec 19 17:44:01 2025 + * C/C++ source code generated on : Tue Dec 23 15:12:50 2025 * * Target selection: ert.tlc * Embedded hardware selection: ARM Compatible->ARM Cortex-M @@ -45,8 +45,8 @@ typedef struct { /* Block states (default storage) for system '' */ typedef struct { - uint16_t Min_position_Ch0[9]; /* '/Data Store Memory12' */ - uint16_t Max_position_Ch0[9]; /* '/Data Store Memory13' */ + int16_t Min_position_Ch0[9]; /* '/Data Store Memory12' */ + int16_t Max_position_Ch0[9]; /* '/Data Store Memory13' */ uint16_t pos_loc[9]; /* '/Data Store Memory4' */ int8_t UnitDelay_DSTATE; /* '/Unit Delay' */ int8_t stepSig; /* '/Data Store Memory' */ @@ -62,18 +62,18 @@ typedef struct { /* External inputs (root inport signals with default storage) */ typedef struct { - uint16_t in_CPOS_ALL_Ch0[9]; /* '/in_CPOS_ALL_Ch0' */ - uint8_t in_Act_Emrf_Slave_Ch0[9]; /* '/in_Act_Emrf_Slave_Ch0' */ - uint8_t in_Mode_Slave_Ch0[9]; /* '/in_Mode_Slave_Ch0' */ - uint8_t in_Act_Err1_Supply_Ch0[9]; /* '/in_Act_Err1_Supply_Ch0' */ - uint8_t in_Act_Err2_Communication_Ch0[9]; + int16_t in_CPOS_ALL_Ch0[9]; /* '/in_CPOS_ALL_Ch0' */ + int8_t in_Act_Emrf_Slave_Ch0[9]; /* '/in_Act_Emrf_Slave_Ch0' */ + int8_t in_Mode_Slave_Ch0[9]; /* '/in_Mode_Slave_Ch0' */ + int8_t in_Act_Err1_Supply_Ch0[9]; /* '/in_Act_Err1_Supply_Ch0' */ + int8_t in_Act_Err2_Communication_Ch0[9]; /* '/in_Act_Err2_Communication_Ch0' */ - uint8_t in_Act_Err3_Temperature_Ch0[9]; + int8_t in_Act_Err3_Temperature_Ch0[9]; /* '/in_Act_Err3_Temperature_Ch0' */ - uint8_t in_Act_Err4_Permanent_Electrical_Ch0[9]; + int8_t in_Act_Err4_Permanent_Electrical_Ch0[9]; /* '/in_Act_Err4_Permanent_Electrical_Ch0' */ - uint8_t in_Act_Stall_Slave_Ch0[9]; /* '/in_Act_Stall_Slave_Ch0' */ - uint8_t in_Act_Reset_Ch0[9]; /* '/in_Act_Reset_Ch0' */ + int8_t in_Act_Stall_Slave_Ch0[9]; /* '/in_Act_Stall_Slave_Ch0' */ + int8_t in_Act_Reset_Ch0[9]; /* '/in_Act_Reset_Ch0' */ uint8_t in_Busy_Ch0; /* '/in_Busy_Ch0' */ uint8_t in_Error_Connect_Ch0; /* '/in_Error_Connect_Ch0' */ } ExtU; diff --git a/Model_actuator_private.h b/Model_actuator_private.h index 8f5ba10..487fecc 100644 --- a/Model_actuator_private.h +++ b/Model_actuator_private.h @@ -3,9 +3,9 @@ * * Code generated for Simulink model 'Model_actuator'. * - * Model version : 1.542 + * Model version : 1.550 * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 - * C/C++ source code generated on : Fri Dec 19 17:44:01 2025 + * C/C++ source code generated on : Tue Dec 23 15:12:50 2025 * * Target selection: ert.tlc * Embedded hardware selection: ARM Compatible->ARM Cortex-M @@ -24,10 +24,6 @@ extern void IfActionSubsystem3(int8_t rtu_stepIn, int8_t *rty_step, uint8_t rtd_com_loc[9]); -extern void IfActionSubsystem2(int8_t rtu_stepIn, int8_t *rty_step, uint8_t - rtd_autos_set_loc[9], uint8_t rtd_coils_stop_set_loc[9], uint8_t rtd_com_loc[9], - uint8_t rtd_lnoise_set_loc[9], uint8_t rtd_speed_set_loc[9], uint8_t - rtd_stall_set_loc[9]); #endif /* Model_actuator_private_h_ */ diff --git a/Model_actuator_types.h b/Model_actuator_types.h index 3773767..bbd4855 100644 --- a/Model_actuator_types.h +++ b/Model_actuator_types.h @@ -3,9 +3,9 @@ * * Code generated for Simulink model 'Model_actuator'. * - * Model version : 1.542 + * Model version : 1.550 * Simulink Coder version : 24.1 (R2024a) 19-Nov-2023 - * C/C++ source code generated on : Fri Dec 19 17:44:01 2025 + * C/C++ source code generated on : Tue Dec 23 15:12:50 2025 * * Target selection: ert.tlc * Embedded hardware selection: ARM Compatible->ARM Cortex-M