diff --git a/01_Matlab/01_Libraries/01_Controller/BLDC_controller_Lib.slx b/01_Matlab/01_Libraries/01_Controller/BLDC_controller_Lib.slx index ebfbe60..44acdce 100644 Binary files a/01_Matlab/01_Libraries/01_Controller/BLDC_controller_Lib.slx and b/01_Matlab/01_Libraries/01_Controller/BLDC_controller_Lib.slx differ diff --git a/01_Matlab/BLDC_controller_ert_rtw/BLDC_controller.c b/01_Matlab/BLDC_controller_ert_rtw/BLDC_controller.c index 14c361c..b0095fc 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/BLDC_controller.c +++ b/01_Matlab/BLDC_controller_ert_rtw/BLDC_controller.c @@ -7,9 +7,9 @@ * * Code generated for Simulink model 'BLDC_controller'. * - * Model version : 1.879 + * Model version : 1.883 * Simulink Coder version : 8.13 (R2017b) 24-Jul-2017 - * C/C++ source code generated on : Thu Jun 6 22:50:24 2019 + * C/C++ source code generated on : Tue Jun 11 21:14:57 2019 * * Target selection: ert.tlc * Embedded hardware selection: ARM Compatible->ARM Cortex @@ -273,7 +273,7 @@ void BLDC_controller_step(RT_MODEL *const rtM) /* End of Outputs for SubSystem: '/Counter_Hold_and_Error_Calculation' */ } else { - if (rtDW->UnitDelay1_DSTATE < 1500) { + if (rtDW->UnitDelay1_DSTATE < rtP->z_maxCntRst) { /* Switch: '/Switch2' incorporates: * UnitDelay: '/UnitDelay1' */ @@ -282,7 +282,7 @@ void BLDC_controller_step(RT_MODEL *const rtM) /* Switch: '/Switch2' incorporates: * Constant: '/Constant1' */ - rtb_Abs2 = 1500; + rtb_Abs2 = rtP->z_maxCntRst; } rtb_Abs2++; @@ -303,7 +303,7 @@ void BLDC_controller_step(RT_MODEL *const rtM) * RelationalOperator: '/Relational Operator5' * Sum: '/Sum1' */ - if ((rtb_Abs2 > 1500) || (rtDW->Switch2 != rtDW->UnitDelay1)) { + if ((rtb_Abs2 > rtP->z_maxCntRst) || (rtDW->Switch2 != rtDW->UnitDelay1)) { rtb_Sum2 = 0; } else { rtb_Sum2 = rtP->cf_speedCoef * rtDW->Switch2 / rtDW->z_counterRawPrev; @@ -324,14 +324,14 @@ void BLDC_controller_step(RT_MODEL *const rtM) rtb_Sum2 = ((100 - rtP->cf_speedFilt) * rtDW->UnitDelay2_DSTATE + rtb_Sum2 * rtP->cf_speedFilt) / 100; - /* Abs: '/Abs5' */ + /* Abs: '/Abs5' */ if (rtb_Sum2 < 0) { rtb_Abs5 = -rtb_Sum2; } else { rtb_Abs5 = rtb_Sum2; } - /* End of Abs: '/Abs5' */ + /* End of Abs: '/Abs5' */ /* Relay: '/n_commDeacv' */ if (rtb_Abs5 >= rtP->n_commDeacvHi) { @@ -419,9 +419,12 @@ void BLDC_controller_step(RT_MODEL *const rtM) /* Switch: '/Switch_PhaAdv' incorporates: * Constant: '/a_elecPeriod1' + * Constant: '/n_motPhaAdvEna' + * Logic: '/Logical Operator2' * Outport: '/a_elecAngle' + * RelationalOperator: '/Relational Operator4' */ - if (rtP->b_phaAdvEna) { + if (rtP->b_phaAdvEna && (rtb_Abs5 > rtP->n_motPhaAdvEna)) { /* PreLookup: '/r_phaAdvDC_XA' */ rtb_BitwiseOperator = plook_u8s32u32n31_evenc_s(rtb_Abs1, rtP->r_phaAdvDC_XA[0], (uint32_T)rtP->r_phaAdvDC_XA[1] - @@ -662,6 +665,7 @@ void BLDC_controller_step(RT_MODEL *const rtM) /* Model initialize function */ void BLDC_controller_initialize(RT_MODEL *const rtM) { + P *rtP = ((P *) rtM->defaultParam); DW *rtDW = ((DW *) rtM->dwork); /* Start for Atomic SubSystem: '/BLDC_controller' */ @@ -672,14 +676,14 @@ void BLDC_controller_initialize(RT_MODEL *const rtM) /* SystemInitialize for Atomic SubSystem: '/BLDC_controller' */ /* InitializeConditions for UnitDelay: '/UnitDelay1' */ - rtDW->UnitDelay1_DSTATE = 1500; + rtDW->UnitDelay1_DSTATE = rtP->z_maxCntRst; /* SystemInitialize for IfAction SubSystem: '/Counter_Hold_and_Error_Calculation' */ /* InitializeConditions for UnitDelay: '/z_counter2' */ - rtDW->z_counter2_DSTATE = 1500; + rtDW->z_counter2_DSTATE = rtP->z_maxCntRst; /* SystemInitialize for Outport: '/z_counter' */ - rtDW->z_counterRawPrev = 1500; + rtDW->z_counterRawPrev = rtP->z_maxCntRst; /* End of SystemInitialize for SubSystem: '/Counter_Hold_and_Error_Calculation' */ /* End of SystemInitialize for SubSystem: '/BLDC_controller' */ diff --git a/01_Matlab/BLDC_controller_ert_rtw/BLDC_controller.h b/01_Matlab/BLDC_controller_ert_rtw/BLDC_controller.h index 6e0c616..bb52673 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/BLDC_controller.h +++ b/01_Matlab/BLDC_controller_ert_rtw/BLDC_controller.h @@ -7,9 +7,9 @@ * * Code generated for Simulink model 'BLDC_controller'. * - * Model version : 1.879 + * Model version : 1.883 * Simulink Coder version : 8.13 (R2017b) 24-Jul-2017 - * C/C++ source code generated on : Thu Jun 6 22:50:24 2019 + * C/C++ source code generated on : Tue Jun 11 21:14:57 2019 * * Target selection: ert.tlc * Embedded hardware selection: ARM Compatible->ARM Cortex @@ -146,6 +146,9 @@ struct P_ { int32_T n_commDeacvHi; /* Variable: n_commDeacvHi * Referenced by: '/n_commDeacv' */ + int32_T n_motPhaAdvEna; /* Variable: n_motPhaAdvEna + * Referenced by: '/n_motPhaAdvEna' + */ int32_T r_commDCDeacv; /* Variable: r_commDCDeacv * Referenced by: '/r_commDCDeacv' */ @@ -161,6 +164,14 @@ struct P_ { int16_T dz_counterLo; /* Variable: dz_counterLo * Referenced by: '/dz_counter' */ + int16_T z_maxCntRst; /* Variable: z_maxCntRst + * Referenced by: + * '/z_counter' + * '/z_counter2' + * '/z_maxCntRst' + * '/Constant1' + * '/UnitDelay1' + */ uint8_T z_ctrlTypSel; /* Variable: z_ctrlTypSel * Referenced by: '/z_ctrlTypSel1' */ diff --git a/01_Matlab/BLDC_controller_ert_rtw/BLDC_controller_data.c b/01_Matlab/BLDC_controller_ert_rtw/BLDC_controller_data.c index ecb95dc..a740573 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/BLDC_controller_data.c +++ b/01_Matlab/BLDC_controller_ert_rtw/BLDC_controller_data.c @@ -7,9 +7,9 @@ * * Code generated for Simulink model 'BLDC_controller'. * - * Model version : 1.879 + * Model version : 1.883 * Simulink Coder version : 8.13 (R2017b) 24-Jul-2017 - * C/C++ source code generated on : Thu Jun 6 22:50:24 2019 + * C/C++ source code generated on : Tue Jun 11 21:14:57 2019 * * Target selection: ert.tlc * Embedded hardware selection: ARM Compatible->ARM Cortex diff --git a/01_Matlab/BLDC_controller_ert_rtw/buildInfo.mat b/01_Matlab/BLDC_controller_ert_rtw/buildInfo.mat index 902c929..9d57764 100644 Binary files a/01_Matlab/BLDC_controller_ert_rtw/buildInfo.mat and b/01_Matlab/BLDC_controller_ert_rtw/buildInfo.mat differ diff --git a/01_Matlab/BLDC_controller_ert_rtw/codeInfo.mat b/01_Matlab/BLDC_controller_ert_rtw/codeInfo.mat index 1a6f103..f5baec5 100644 Binary files a/01_Matlab/BLDC_controller_ert_rtw/codeInfo.mat and b/01_Matlab/BLDC_controller_ert_rtw/codeInfo.mat differ diff --git a/01_Matlab/BLDC_controller_ert_rtw/codedescriptor.dmr b/01_Matlab/BLDC_controller_ert_rtw/codedescriptor.dmr index 10b9402..df1c910 100644 Binary files a/01_Matlab/BLDC_controller_ert_rtw/codedescriptor.dmr and b/01_Matlab/BLDC_controller_ert_rtw/codedescriptor.dmr differ diff --git a/01_Matlab/BLDC_controller_ert_rtw/ert_main.c b/01_Matlab/BLDC_controller_ert_rtw/ert_main.c index 56553ed..53be1bf 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/ert_main.c +++ b/01_Matlab/BLDC_controller_ert_rtw/ert_main.c @@ -7,9 +7,9 @@ * * Code generated for Simulink model 'BLDC_controller'. * - * Model version : 1.879 + * Model version : 1.883 * Simulink Coder version : 8.13 (R2017b) 24-Jul-2017 - * C/C++ source code generated on : Thu Jun 6 22:50:24 2019 + * C/C++ source code generated on : Tue Jun 11 21:14:57 2019 * * Target selection: ert.tlc * Embedded hardware selection: ARM Compatible->ARM Cortex @@ -49,6 +49,11 @@ static P rtP = { */ 30, + /* Variable: n_motPhaAdvEna + * Referenced by: '/n_motPhaAdvEna' + */ + 400, + /* Variable: r_commDCDeacv * Referenced by: '/r_commDCDeacv' */ @@ -74,6 +79,16 @@ static P rtP = { */ 20, + /* Variable: z_maxCntRst + * Referenced by: + * '/z_counter' + * '/z_counter2' + * '/z_maxCntRst' + * '/Constant1' + * '/UnitDelay1' + */ + 1500, + /* Variable: z_ctrlTypSel * Referenced by: '/z_ctrlTypSel1' */ diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_c.html b/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_c.html index 7f7a71b..0caaeb3 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_c.html +++ b/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_c.html @@ -21,9 +21,9 @@ 7 * 8 * Code generated for Simulink model 'BLDC_controller'. 9 * - 10 * Model version : 1.879 + 10 * Model version : 1.883 11 * Simulink Coder version : 8.13 (R2017b) 24-Jul-2017 - 12 * C/C++ source code generated on : Thu Jun 6 22:50:24 2019 + 12 * C/C++ source code generated on : Tue Jun 11 21:14:57 2019 13 * 14 * Target selection: ert.tlc 15 * Embedded hardware selection: ARM Compatible->ARM Cortex @@ -287,7 +287,7 @@ 273 274 /* End of Outputs for SubSystem: '<S14>/Counter_Hold_and_Error_Calculation' */ 275 } else { - 276 if (rtDW->UnitDelay1_DSTATE < 1500) { + 276 if (rtDW->UnitDelay1_DSTATE < rtP->z_maxCntRst) { 277 /* Switch: '<S17>/Switch2' incorporates: 278 * UnitDelay: '<S17>/UnitDelay1' 279 */ @@ -296,7 +296,7 @@ 282 /* Switch: '<S17>/Switch2' incorporates: 283 * Constant: '<S17>/Constant1' 284 */ - 285 rtb_Abs2 = 1500; + 285 rtb_Abs2 = rtP->z_maxCntRst; 286 } 287 288 rtb_Abs2++; @@ -317,7 +317,7 @@ 303 * RelationalOperator: '<S16>/Relational Operator5' 304 * Sum: '<S14>/Sum1' 305 */ - 306 if ((rtb_Abs2 > 1500) || (rtDW->Switch2 != rtDW->UnitDelay1)) { + 306 if ((rtb_Abs2 > rtP->z_maxCntRst) || (rtDW->Switch2 != rtDW->UnitDelay1)) { 307 rtb_Sum2 = 0; 308 } else { 309 rtb_Sum2 = rtP->cf_speedCoef * rtDW->Switch2 / rtDW->z_counterRawPrev; @@ -338,14 +338,14 @@ 324 rtb_Sum2 = ((100 - rtP->cf_speedFilt) * rtDW->UnitDelay2_DSTATE + rtb_Sum2 * 325 rtP->cf_speedFilt) / 100; 326 - 327 /* Abs: '<S14>/Abs5' */ + 327 /* Abs: '<S16>/Abs5' */ 328 if (rtb_Sum2 < 0) { 329 rtb_Abs5 = -rtb_Sum2; 330 } else { 331 rtb_Abs5 = rtb_Sum2; 332 } 333 - 334 /* End of Abs: '<S14>/Abs5' */ + 334 /* End of Abs: '<S16>/Abs5' */ 335 336 /* Relay: '<S14>/n_commDeacv' */ 337 if (rtb_Abs5 >= rtP->n_commDeacvHi) { @@ -433,278 +433,282 @@ 419 420 /* Switch: '<S8>/Switch_PhaAdv' incorporates: 421 * Constant: '<S8>/a_elecPeriod1' - 422 * Outport: '<Root>/a_elecAngle' - 423 */ - 424 if (rtP->b_phaAdvEna) { - 425 /* PreLookup: '<S8>/r_phaAdvDC_XA' */ - 426 rtb_BitwiseOperator = plook_u8s32u32n31_evenc_s(rtb_Abs1, - 427 rtP->r_phaAdvDC_XA[0], (uint32_T)rtP->r_phaAdvDC_XA[1] - - 428 rtP->r_phaAdvDC_XA[0], 10U, &rtb_r_phaAdvDC_XA_o2); - 429 - 430 /* Interpolation_n-D: '<S8>/a_phaAdv_M2' */ - 431 rtb_Abs2 = intrp1d_s16s32s32u8u32n31l_s(rtb_BitwiseOperator, - 432 rtb_r_phaAdvDC_XA_o2, rtP->a_phaAdv_M1); - 433 - 434 /* Sum: '<S8>/Sum3' incorporates: - 435 * Outport: '<Root>/a_elecAngle' - 436 * Product: '<S8>/Product2' - 437 */ - 438 rtb_Abs5 = (int16_T)(rtb_Abs2 * rtDW->Switch2) + rtY->a_elecAngle; - 439 - 440 /* Math: '<S8>/Math Function' */ - 441 rtDW->Switch_PhaAdv = rtb_Abs5 - div_nde_s32_floor(rtb_Abs5, 360) * 360; - 442 } else { - 443 rtDW->Switch_PhaAdv = rtY->a_elecAngle; - 444 } - 445 - 446 /* End of Switch: '<S8>/Switch_PhaAdv' */ - 447 /* End of Outputs for SubSystem: '<S2>/F02_Electrical_Angle_Calculation' */ - 448 } - 449 - 450 /* End of If: '<S2>/If1' */ - 451 - 452 /* SwitchCase: '<S9>/Switch Case' incorporates: - 453 * Constant: '<S7>/z_ctrlTypSel1' - 454 */ - 455 switch (rtP->z_ctrlTypSel) { - 456 case 1: - 457 /* Outputs for IfAction SubSystem: '<S9>/F03_01_Pure_Trapezoidal_Method' incorporates: - 458 * ActionPort: '<S18>/Action Port' - 459 */ - 460 /* PreLookup: '<S18>/a_trapElecAngle_XA' */ - 461 rtb_BitwiseOperator = plook_u8s32u32n31_evenc_s(rtDW->Switch_PhaAdv, 0, 60U, - 462 6U, &rtb_r_phaAdvDC_XA_o2); - 463 - 464 /* Interpolation_n-D: '<S18>/r_trapPhaA_M1' */ - 465 rtDW->Merge = intrp1d_s16s32s32u8u32n31l_s(rtb_BitwiseOperator, - 466 rtb_r_phaAdvDC_XA_o2, rtConstP.r_trapPhaA_M1_Table); - 467 - 468 /* Interpolation_n-D: '<S18>/r_trapPhaB_M1' */ - 469 rtDW->Merge1 = intrp1d_s16s32s32u8u32n31l_s(rtb_BitwiseOperator, - 470 rtb_r_phaAdvDC_XA_o2, rtConstP.r_trapPhaB_M1_Table); - 471 - 472 /* Interpolation_n-D: '<S18>/r_trapPhaC_M1' */ - 473 rtDW->Merge2 = intrp1d_s16s32s32u8u32n31l_s(rtb_BitwiseOperator, - 474 rtb_r_phaAdvDC_XA_o2, rtConstP.r_trapPhaC_M1_Table); - 475 - 476 /* End of Outputs for SubSystem: '<S9>/F03_01_Pure_Trapezoidal_Method' */ - 477 break; + 422 * Constant: '<S8>/n_motPhaAdvEna' + 423 * Logic: '<S8>/Logical Operator2' + 424 * Outport: '<Root>/a_elecAngle' + 425 * RelationalOperator: '<S8>/Relational Operator4' + 426 */ + 427 if (rtP->b_phaAdvEna && (rtb_Abs5 > rtP->n_motPhaAdvEna)) { + 428 /* PreLookup: '<S8>/r_phaAdvDC_XA' */ + 429 rtb_BitwiseOperator = plook_u8s32u32n31_evenc_s(rtb_Abs1, + 430 rtP->r_phaAdvDC_XA[0], (uint32_T)rtP->r_phaAdvDC_XA[1] - + 431 rtP->r_phaAdvDC_XA[0], 10U, &rtb_r_phaAdvDC_XA_o2); + 432 + 433 /* Interpolation_n-D: '<S8>/a_phaAdv_M2' */ + 434 rtb_Abs2 = intrp1d_s16s32s32u8u32n31l_s(rtb_BitwiseOperator, + 435 rtb_r_phaAdvDC_XA_o2, rtP->a_phaAdv_M1); + 436 + 437 /* Sum: '<S8>/Sum3' incorporates: + 438 * Outport: '<Root>/a_elecAngle' + 439 * Product: '<S8>/Product2' + 440 */ + 441 rtb_Abs5 = (int16_T)(rtb_Abs2 * rtDW->Switch2) + rtY->a_elecAngle; + 442 + 443 /* Math: '<S8>/Math Function' */ + 444 rtDW->Switch_PhaAdv = rtb_Abs5 - div_nde_s32_floor(rtb_Abs5, 360) * 360; + 445 } else { + 446 rtDW->Switch_PhaAdv = rtY->a_elecAngle; + 447 } + 448 + 449 /* End of Switch: '<S8>/Switch_PhaAdv' */ + 450 /* End of Outputs for SubSystem: '<S2>/F02_Electrical_Angle_Calculation' */ + 451 } + 452 + 453 /* End of If: '<S2>/If1' */ + 454 + 455 /* SwitchCase: '<S9>/Switch Case' incorporates: + 456 * Constant: '<S7>/z_ctrlTypSel1' + 457 */ + 458 switch (rtP->z_ctrlTypSel) { + 459 case 1: + 460 /* Outputs for IfAction SubSystem: '<S9>/F03_01_Pure_Trapezoidal_Method' incorporates: + 461 * ActionPort: '<S18>/Action Port' + 462 */ + 463 /* PreLookup: '<S18>/a_trapElecAngle_XA' */ + 464 rtb_BitwiseOperator = plook_u8s32u32n31_evenc_s(rtDW->Switch_PhaAdv, 0, 60U, + 465 6U, &rtb_r_phaAdvDC_XA_o2); + 466 + 467 /* Interpolation_n-D: '<S18>/r_trapPhaA_M1' */ + 468 rtDW->Merge = intrp1d_s16s32s32u8u32n31l_s(rtb_BitwiseOperator, + 469 rtb_r_phaAdvDC_XA_o2, rtConstP.r_trapPhaA_M1_Table); + 470 + 471 /* Interpolation_n-D: '<S18>/r_trapPhaB_M1' */ + 472 rtDW->Merge1 = intrp1d_s16s32s32u8u32n31l_s(rtb_BitwiseOperator, + 473 rtb_r_phaAdvDC_XA_o2, rtConstP.r_trapPhaB_M1_Table); + 474 + 475 /* Interpolation_n-D: '<S18>/r_trapPhaC_M1' */ + 476 rtDW->Merge2 = intrp1d_s16s32s32u8u32n31l_s(rtb_BitwiseOperator, + 477 rtb_r_phaAdvDC_XA_o2, rtConstP.r_trapPhaC_M1_Table); 478 - 479 case 2: - 480 /* Outputs for IfAction SubSystem: '<S9>/F03_02_Sinusoidal_Method' incorporates: - 481 * ActionPort: '<S19>/Action Port' - 482 */ - 483 /* PreLookup: '<S19>/a_sinElecAngle_XA' */ - 484 rtb_BitwiseOperator = plook_u8s32u32n31_evenc_s(rtDW->Switch_PhaAdv, 0, 10U, - 485 36U, &rtb_r_phaAdvDC_XA_o2); - 486 - 487 /* Interpolation_n-D: '<S19>/r_sinPhaA_M1' */ - 488 rtDW->Merge = intrp1d_s16s32s32u8u32n31l_s(rtb_BitwiseOperator, - 489 rtb_r_phaAdvDC_XA_o2, rtConstP.r_sinPhaA_M1_Table); - 490 - 491 /* Interpolation_n-D: '<S19>/r_sinPhaB_M1' */ - 492 rtDW->Merge1 = intrp1d_s16s32s32u8u32n31l_s(rtb_BitwiseOperator, - 493 rtb_r_phaAdvDC_XA_o2, rtConstP.r_sinPhaB_M1_Table); - 494 - 495 /* Interpolation_n-D: '<S19>/r_sinPhaC_M1' */ - 496 rtDW->Merge2 = intrp1d_s16s32s32u8u32n31l_s(rtb_BitwiseOperator, - 497 rtb_r_phaAdvDC_XA_o2, rtConstP.r_sinPhaC_M1_Table); - 498 - 499 /* End of Outputs for SubSystem: '<S9>/F03_02_Sinusoidal_Method' */ - 500 break; + 479 /* End of Outputs for SubSystem: '<S9>/F03_01_Pure_Trapezoidal_Method' */ + 480 break; + 481 + 482 case 2: + 483 /* Outputs for IfAction SubSystem: '<S9>/F03_02_Sinusoidal_Method' incorporates: + 484 * ActionPort: '<S19>/Action Port' + 485 */ + 486 /* PreLookup: '<S19>/a_sinElecAngle_XA' */ + 487 rtb_BitwiseOperator = plook_u8s32u32n31_evenc_s(rtDW->Switch_PhaAdv, 0, 10U, + 488 36U, &rtb_r_phaAdvDC_XA_o2); + 489 + 490 /* Interpolation_n-D: '<S19>/r_sinPhaA_M1' */ + 491 rtDW->Merge = intrp1d_s16s32s32u8u32n31l_s(rtb_BitwiseOperator, + 492 rtb_r_phaAdvDC_XA_o2, rtConstP.r_sinPhaA_M1_Table); + 493 + 494 /* Interpolation_n-D: '<S19>/r_sinPhaB_M1' */ + 495 rtDW->Merge1 = intrp1d_s16s32s32u8u32n31l_s(rtb_BitwiseOperator, + 496 rtb_r_phaAdvDC_XA_o2, rtConstP.r_sinPhaB_M1_Table); + 497 + 498 /* Interpolation_n-D: '<S19>/r_sinPhaC_M1' */ + 499 rtDW->Merge2 = intrp1d_s16s32s32u8u32n31l_s(rtb_BitwiseOperator, + 500 rtb_r_phaAdvDC_XA_o2, rtConstP.r_sinPhaC_M1_Table); 501 - 502 case 3: - 503 /* Outputs for IfAction SubSystem: '<S9>/F03_03_Sinusoidal3rd_Method' incorporates: - 504 * ActionPort: '<S20>/Action Port' - 505 */ - 506 /* PreLookup: '<S20>/a_sinElecAngle_XA' */ - 507 rtb_BitwiseOperator = plook_u8s32u32n31_evenc_s(rtDW->Switch_PhaAdv, 0, 10U, - 508 36U, &rtb_r_phaAdvDC_XA_o2); - 509 - 510 /* Interpolation_n-D: '<S20>/r_sin3PhaA_M1' */ - 511 rtDW->Merge = intrp1d_s16s32s32u8u32n31l_s(rtb_BitwiseOperator, - 512 rtb_r_phaAdvDC_XA_o2, rtConstP.r_sin3PhaA_M1_Table); - 513 - 514 /* Interpolation_n-D: '<S20>/r_sin3PhaB_M1' */ - 515 rtDW->Merge1 = intrp1d_s16s32s32u8u32n31l_s(rtb_BitwiseOperator, - 516 rtb_r_phaAdvDC_XA_o2, rtConstP.r_sin3PhaB_M1_Table); - 517 - 518 /* Interpolation_n-D: '<S20>/r_sin3PhaC_M1' */ - 519 rtDW->Merge2 = intrp1d_s16s32s32u8u32n31l_s(rtb_BitwiseOperator, - 520 rtb_r_phaAdvDC_XA_o2, rtConstP.r_sin3PhaC_M1_Table); - 521 - 522 /* End of Outputs for SubSystem: '<S9>/F03_03_Sinusoidal3rd_Method' */ - 523 break; - 524 } - 525 - 526 /* End of SwitchCase: '<S9>/Switch Case' */ - 527 - 528 /* Signum: '<S14>/Sign' */ - 529 if (rtDW->Switch2 < 0) { - 530 rtb_Sum2_h = -1; - 531 } else { - 532 rtb_Sum2_h = (int8_T)(rtDW->Switch2 > 0); - 533 } - 534 - 535 /* End of Signum: '<S14>/Sign' */ - 536 - 537 /* Signum: '<S14>/Sign1' incorporates: - 538 * Inport: '<Root>/r_DC' - 539 */ - 540 if (rtU->r_DC < 0) { - 541 rtb_Abs5 = -1; - 542 } else { - 543 rtb_Abs5 = (rtU->r_DC > 0); - 544 } - 545 - 546 /* End of Signum: '<S14>/Sign1' */ - 547 - 548 /* Switch: '<S10>/Switch1' incorporates: - 549 * Constant: '<S12>/vec_hallToPos' - 550 * Constant: '<S14>/CTRL_COMM' - 551 * Constant: '<S14>/r_commDCDeacv' - 552 * Constant: '<S7>/z_ctrlTypSel1' - 553 * Inport: '<Root>/r_DC' - 554 * Logic: '<S14>/Logical Operator2' - 555 * LookupNDDirect: '<S10>/z_commutMap_M1' - 556 * Product: '<S10>/Divide2' - 557 * Product: '<S10>/Divide4' - 558 * RelationalOperator: '<S14>/Relational Operator1' - 559 * RelationalOperator: '<S14>/Relational Operator3' - 560 * RelationalOperator: '<S14>/Relational Operator4' - 561 * Relay: '<S14>/dz_counter' - 562 * Relay: '<S14>/n_commDeacv' - 563 * Selector: '<S12>/Selector' - 564 * - 565 * About '<S10>/z_commutMap_M1': - 566 * 2-dimensional Direct Look-Up returning a Column - 567 */ - 568 if ((rtP->z_ctrlTypSel != 0) && (rtb_Abs1 > rtP->r_commDCDeacv) && (rtb_Sum2_h - 569 == rtb_Abs5) && rtDW->n_commDeacv_Mode && (!rtDW->dz_counter_Mode)) { - 570 rtb_Abs5 = rtU->r_DC * rtDW->Merge; - 571 rtb_Switch1_idx_1 = rtU->r_DC * rtDW->Merge1; - 572 rtb_Abs1 = rtU->r_DC * rtDW->Merge2; - 573 } else { - 574 if (rtConstP.vec_hallToPos_Value[rtb_Sum] > 5) { - 575 /* LookupNDDirect: '<S10>/z_commutMap_M1' - 576 * - 577 * About '<S10>/z_commutMap_M1': - 578 * 2-dimensional Direct Look-Up returning a Column - 579 */ - 580 rtb_Sum2_h = 5; - 581 } else if (rtConstP.vec_hallToPos_Value[rtb_Sum] < 0) { - 582 /* LookupNDDirect: '<S10>/z_commutMap_M1' - 583 * - 584 * About '<S10>/z_commutMap_M1': - 585 * 2-dimensional Direct Look-Up returning a Column - 586 */ - 587 rtb_Sum2_h = 0; - 588 } else { - 589 /* LookupNDDirect: '<S10>/z_commutMap_M1' incorporates: - 590 * Constant: '<S12>/vec_hallToPos' - 591 * Selector: '<S12>/Selector' - 592 * - 593 * About '<S10>/z_commutMap_M1': - 594 * 2-dimensional Direct Look-Up returning a Column - 595 */ - 596 rtb_Sum2_h = rtConstP.vec_hallToPos_Value[rtb_Sum]; - 597 } - 598 - 599 /* LookupNDDirect: '<S10>/z_commutMap_M1' incorporates: - 600 * Constant: '<S12>/vec_hallToPos' - 601 * Selector: '<S12>/Selector' - 602 * - 603 * About '<S10>/z_commutMap_M1': - 604 * 2-dimensional Direct Look-Up returning a Column - 605 */ - 606 rtb_Abs1 = rtb_Sum2_h * 3; - 607 rtb_Abs5 = rtU->r_DC * rtConstP.z_commutMap_M1_table[rtb_Abs1]; - 608 rtb_Switch1_idx_1 = rtConstP.z_commutMap_M1_table[1 + rtb_Abs1] * rtU->r_DC; - 609 rtb_Abs1 = rtConstP.z_commutMap_M1_table[2 + rtb_Abs1] * rtU->r_DC; - 610 } - 611 - 612 /* End of Switch: '<S10>/Switch1' */ - 613 - 614 /* Outport: '<Root>/DC_phaA' incorporates: - 615 * Constant: '<S10>/Constant1' - 616 * Product: '<S10>/Divide1' - 617 */ - 618 rtY->DC_phaA = rtb_Abs5 / 1000; - 619 - 620 /* Outport: '<Root>/DC_phaB' incorporates: - 621 * Constant: '<S10>/Constant1' - 622 * Product: '<S10>/Divide1' - 623 */ - 624 rtY->DC_phaB = rtb_Switch1_idx_1 / 1000; - 625 - 626 /* Update for UnitDelay: '<S11>/UnitDelay' incorporates: - 627 * Inport: '<Root>/b_hallA ' - 628 */ - 629 rtDW->UnitDelay_DSTATE = rtU->b_hallA; - 630 - 631 /* Update for UnitDelay: '<S11>/UnitDelay1' incorporates: - 632 * Inport: '<Root>/b_hallB' - 633 */ - 634 rtDW->UnitDelay1_DSTATE_i = rtU->b_hallB; - 635 - 636 /* Update for UnitDelay: '<S11>/UnitDelay2' incorporates: - 637 * Inport: '<Root>/b_hallC' - 638 */ - 639 rtDW->UnitDelay2_DSTATE_h = rtU->b_hallC; - 640 - 641 /* Update for UnitDelay: '<S17>/UnitDelay1' */ - 642 rtDW->UnitDelay1_DSTATE = rtb_Sum1_a; + 502 /* End of Outputs for SubSystem: '<S9>/F03_02_Sinusoidal_Method' */ + 503 break; + 504 + 505 case 3: + 506 /* Outputs for IfAction SubSystem: '<S9>/F03_03_Sinusoidal3rd_Method' incorporates: + 507 * ActionPort: '<S20>/Action Port' + 508 */ + 509 /* PreLookup: '<S20>/a_sinElecAngle_XA' */ + 510 rtb_BitwiseOperator = plook_u8s32u32n31_evenc_s(rtDW->Switch_PhaAdv, 0, 10U, + 511 36U, &rtb_r_phaAdvDC_XA_o2); + 512 + 513 /* Interpolation_n-D: '<S20>/r_sin3PhaA_M1' */ + 514 rtDW->Merge = intrp1d_s16s32s32u8u32n31l_s(rtb_BitwiseOperator, + 515 rtb_r_phaAdvDC_XA_o2, rtConstP.r_sin3PhaA_M1_Table); + 516 + 517 /* Interpolation_n-D: '<S20>/r_sin3PhaB_M1' */ + 518 rtDW->Merge1 = intrp1d_s16s32s32u8u32n31l_s(rtb_BitwiseOperator, + 519 rtb_r_phaAdvDC_XA_o2, rtConstP.r_sin3PhaB_M1_Table); + 520 + 521 /* Interpolation_n-D: '<S20>/r_sin3PhaC_M1' */ + 522 rtDW->Merge2 = intrp1d_s16s32s32u8u32n31l_s(rtb_BitwiseOperator, + 523 rtb_r_phaAdvDC_XA_o2, rtConstP.r_sin3PhaC_M1_Table); + 524 + 525 /* End of Outputs for SubSystem: '<S9>/F03_03_Sinusoidal3rd_Method' */ + 526 break; + 527 } + 528 + 529 /* End of SwitchCase: '<S9>/Switch Case' */ + 530 + 531 /* Signum: '<S14>/Sign' */ + 532 if (rtDW->Switch2 < 0) { + 533 rtb_Sum2_h = -1; + 534 } else { + 535 rtb_Sum2_h = (int8_T)(rtDW->Switch2 > 0); + 536 } + 537 + 538 /* End of Signum: '<S14>/Sign' */ + 539 + 540 /* Signum: '<S14>/Sign1' incorporates: + 541 * Inport: '<Root>/r_DC' + 542 */ + 543 if (rtU->r_DC < 0) { + 544 rtb_Abs5 = -1; + 545 } else { + 546 rtb_Abs5 = (rtU->r_DC > 0); + 547 } + 548 + 549 /* End of Signum: '<S14>/Sign1' */ + 550 + 551 /* Switch: '<S10>/Switch1' incorporates: + 552 * Constant: '<S12>/vec_hallToPos' + 553 * Constant: '<S14>/CTRL_COMM' + 554 * Constant: '<S14>/r_commDCDeacv' + 555 * Constant: '<S7>/z_ctrlTypSel1' + 556 * Inport: '<Root>/r_DC' + 557 * Logic: '<S14>/Logical Operator2' + 558 * LookupNDDirect: '<S10>/z_commutMap_M1' + 559 * Product: '<S10>/Divide2' + 560 * Product: '<S10>/Divide4' + 561 * RelationalOperator: '<S14>/Relational Operator1' + 562 * RelationalOperator: '<S14>/Relational Operator3' + 563 * RelationalOperator: '<S14>/Relational Operator4' + 564 * Relay: '<S14>/dz_counter' + 565 * Relay: '<S14>/n_commDeacv' + 566 * Selector: '<S12>/Selector' + 567 * + 568 * About '<S10>/z_commutMap_M1': + 569 * 2-dimensional Direct Look-Up returning a Column + 570 */ + 571 if ((rtP->z_ctrlTypSel != 0) && (rtb_Abs1 > rtP->r_commDCDeacv) && (rtb_Sum2_h + 572 == rtb_Abs5) && rtDW->n_commDeacv_Mode && (!rtDW->dz_counter_Mode)) { + 573 rtb_Abs5 = rtU->r_DC * rtDW->Merge; + 574 rtb_Switch1_idx_1 = rtU->r_DC * rtDW->Merge1; + 575 rtb_Abs1 = rtU->r_DC * rtDW->Merge2; + 576 } else { + 577 if (rtConstP.vec_hallToPos_Value[rtb_Sum] > 5) { + 578 /* LookupNDDirect: '<S10>/z_commutMap_M1' + 579 * + 580 * About '<S10>/z_commutMap_M1': + 581 * 2-dimensional Direct Look-Up returning a Column + 582 */ + 583 rtb_Sum2_h = 5; + 584 } else if (rtConstP.vec_hallToPos_Value[rtb_Sum] < 0) { + 585 /* LookupNDDirect: '<S10>/z_commutMap_M1' + 586 * + 587 * About '<S10>/z_commutMap_M1': + 588 * 2-dimensional Direct Look-Up returning a Column + 589 */ + 590 rtb_Sum2_h = 0; + 591 } else { + 592 /* LookupNDDirect: '<S10>/z_commutMap_M1' incorporates: + 593 * Constant: '<S12>/vec_hallToPos' + 594 * Selector: '<S12>/Selector' + 595 * + 596 * About '<S10>/z_commutMap_M1': + 597 * 2-dimensional Direct Look-Up returning a Column + 598 */ + 599 rtb_Sum2_h = rtConstP.vec_hallToPos_Value[rtb_Sum]; + 600 } + 601 + 602 /* LookupNDDirect: '<S10>/z_commutMap_M1' incorporates: + 603 * Constant: '<S12>/vec_hallToPos' + 604 * Selector: '<S12>/Selector' + 605 * + 606 * About '<S10>/z_commutMap_M1': + 607 * 2-dimensional Direct Look-Up returning a Column + 608 */ + 609 rtb_Abs1 = rtb_Sum2_h * 3; + 610 rtb_Abs5 = rtU->r_DC * rtConstP.z_commutMap_M1_table[rtb_Abs1]; + 611 rtb_Switch1_idx_1 = rtConstP.z_commutMap_M1_table[1 + rtb_Abs1] * rtU->r_DC; + 612 rtb_Abs1 = rtConstP.z_commutMap_M1_table[2 + rtb_Abs1] * rtU->r_DC; + 613 } + 614 + 615 /* End of Switch: '<S10>/Switch1' */ + 616 + 617 /* Outport: '<Root>/DC_phaA' incorporates: + 618 * Constant: '<S10>/Constant1' + 619 * Product: '<S10>/Divide1' + 620 */ + 621 rtY->DC_phaA = rtb_Abs5 / 1000; + 622 + 623 /* Outport: '<Root>/DC_phaB' incorporates: + 624 * Constant: '<S10>/Constant1' + 625 * Product: '<S10>/Divide1' + 626 */ + 627 rtY->DC_phaB = rtb_Switch1_idx_1 / 1000; + 628 + 629 /* Update for UnitDelay: '<S11>/UnitDelay' incorporates: + 630 * Inport: '<Root>/b_hallA ' + 631 */ + 632 rtDW->UnitDelay_DSTATE = rtU->b_hallA; + 633 + 634 /* Update for UnitDelay: '<S11>/UnitDelay1' incorporates: + 635 * Inport: '<Root>/b_hallB' + 636 */ + 637 rtDW->UnitDelay1_DSTATE_i = rtU->b_hallB; + 638 + 639 /* Update for UnitDelay: '<S11>/UnitDelay2' incorporates: + 640 * Inport: '<Root>/b_hallC' + 641 */ + 642 rtDW->UnitDelay2_DSTATE_h = rtU->b_hallC; 643 - 644 /* Update for UnitDelay: '<S14>/UnitDelay1' */ - 645 rtDW->UnitDelay1_DSTATE_c = rtb_Sum1_a; + 644 /* Update for UnitDelay: '<S17>/UnitDelay1' */ + 645 rtDW->UnitDelay1_DSTATE = rtb_Sum1_a; 646 - 647 /* Update for UnitDelay: '<S16>/UnitDelay2' */ - 648 rtDW->UnitDelay2_DSTATE = rtb_Sum2; + 647 /* Update for UnitDelay: '<S14>/UnitDelay1' */ + 648 rtDW->UnitDelay1_DSTATE_c = rtb_Sum1_a; 649 - 650 /* Outport: '<Root>/DC_phaC' incorporates: - 651 * Constant: '<S10>/Constant1' - 652 * Product: '<S10>/Divide1' - 653 */ - 654 rtY->DC_phaC = rtb_Abs1 / 1000; - 655 - 656 /* End of Outputs for SubSystem: '<Root>/BLDC_controller' */ - 657 - 658 /* Outport: '<Root>/n_mot' */ - 659 rtY->n_mot = rtb_Sum2; - 660 } - 661 - 662 /* Model initialize function */ - 663 void BLDC_controller_initialize(RT_MODEL *const rtM) - 664 { - 665 DW *rtDW = ((DW *) rtM->dwork); - 666 - 667 /* Start for Atomic SubSystem: '<Root>/BLDC_controller' */ - 668 /* Start for If: '<S2>/If1' */ - 669 rtDW->If1_ActiveSubsystem = -1; + 650 /* Update for UnitDelay: '<S16>/UnitDelay2' */ + 651 rtDW->UnitDelay2_DSTATE = rtb_Sum2; + 652 + 653 /* Outport: '<Root>/DC_phaC' incorporates: + 654 * Constant: '<S10>/Constant1' + 655 * Product: '<S10>/Divide1' + 656 */ + 657 rtY->DC_phaC = rtb_Abs1 / 1000; + 658 + 659 /* End of Outputs for SubSystem: '<Root>/BLDC_controller' */ + 660 + 661 /* Outport: '<Root>/n_mot' */ + 662 rtY->n_mot = rtb_Sum2; + 663 } + 664 + 665 /* Model initialize function */ + 666 void BLDC_controller_initialize(RT_MODEL *const rtM) + 667 { + 668 P *rtP = ((P *) rtM->defaultParam); + 669 DW *rtDW = ((DW *) rtM->dwork); 670 - 671 /* End of Start for SubSystem: '<Root>/BLDC_controller' */ - 672 - 673 /* SystemInitialize for Atomic SubSystem: '<Root>/BLDC_controller' */ - 674 /* InitializeConditions for UnitDelay: '<S17>/UnitDelay1' */ - 675 rtDW->UnitDelay1_DSTATE = 1500; + 671 /* Start for Atomic SubSystem: '<Root>/BLDC_controller' */ + 672 /* Start for If: '<S2>/If1' */ + 673 rtDW->If1_ActiveSubsystem = -1; + 674 + 675 /* End of Start for SubSystem: '<Root>/BLDC_controller' */ 676 - 677 /* SystemInitialize for IfAction SubSystem: '<S14>/Counter_Hold_and_Error_Calculation' */ - 678 /* InitializeConditions for UnitDelay: '<S15>/z_counter2' */ - 679 rtDW->z_counter2_DSTATE = 1500; + 677 /* SystemInitialize for Atomic SubSystem: '<Root>/BLDC_controller' */ + 678 /* InitializeConditions for UnitDelay: '<S17>/UnitDelay1' */ + 679 rtDW->UnitDelay1_DSTATE = rtP->z_maxCntRst; 680 - 681 /* SystemInitialize for Outport: '<S15>/z_counter' */ - 682 rtDW->z_counterRawPrev = 1500; - 683 - 684 /* End of SystemInitialize for SubSystem: '<S14>/Counter_Hold_and_Error_Calculation' */ - 685 /* End of SystemInitialize for SubSystem: '<Root>/BLDC_controller' */ - 686 } + 681 /* SystemInitialize for IfAction SubSystem: '<S14>/Counter_Hold_and_Error_Calculation' */ + 682 /* InitializeConditions for UnitDelay: '<S15>/z_counter2' */ + 683 rtDW->z_counter2_DSTATE = rtP->z_maxCntRst; + 684 + 685 /* SystemInitialize for Outport: '<S15>/z_counter' */ + 686 rtDW->z_counterRawPrev = rtP->z_maxCntRst; 687 - 688 /* - 689 * File trailer for generated code. - 690 * - 691 * [EOF] - 692 */ - 693 + 688 /* End of SystemInitialize for SubSystem: '<S14>/Counter_Hold_and_Error_Calculation' */ + 689 /* End of SystemInitialize for SubSystem: '<Root>/BLDC_controller' */ + 690 } + 691 + 692 /* + 693 * File trailer for generated code. + 694 * + 695 * [EOF] + 696 */ + 697

diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_data_c.html b/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_data_c.html index fb19588..68a2d09 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_data_c.html +++ b/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_data_c.html @@ -21,9 +21,9 @@ 7 * 8 * Code generated for Simulink model 'BLDC_controller'. 9 * - 10 * Model version : 1.879 + 10 * Model version : 1.883 11 * Simulink Coder version : 8.13 (R2017b) 24-Jul-2017 - 12 * C/C++ source code generated on : Thu Jun 6 22:50:24 2019 + 12 * C/C++ source code generated on : Tue Jun 11 21:14:57 2019 13 * 14 * Target selection: ert.tlc 15 * Embedded hardware selection: ARM Compatible->ARM Cortex diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_h.html b/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_h.html index ead75bf..2a7cbfc 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_h.html +++ b/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_h.html @@ -21,9 +21,9 @@ 7 * 8 * Code generated for Simulink model 'BLDC_controller'. 9 * - 10 * Model version : 1.879 + 10 * Model version : 1.883 11 * Simulink Coder version : 8.13 (R2017b) 24-Jul-2017 - 12 * C/C++ source code generated on : Thu Jun 6 22:50:24 2019 + 12 * C/C++ source code generated on : Tue Jun 11 21:14:57 2019 13 * 14 * Target selection: ert.tlc 15 * Embedded hardware selection: ARM Compatible->ARM Cortex @@ -160,104 +160,115 @@ 146 int32_T n_commDeacvHi; /* Variable: n_commDeacvHi 147 * Referenced by: '<S14>/n_commDeacv' 148 */ - 149 int32_T r_commDCDeacv; /* Variable: r_commDCDeacv - 150 * Referenced by: '<S14>/r_commDCDeacv' + 149 int32_T n_motPhaAdvEna; /* Variable: n_motPhaAdvEna + 150 * Referenced by: '<S8>/n_motPhaAdvEna' 151 */ - 152 int32_T r_phaAdvDC_XA[11]; /* Variable: r_phaAdvDC_XA - 153 * Referenced by: '<S8>/r_phaAdvDC_XA' + 152 int32_T r_commDCDeacv; /* Variable: r_commDCDeacv + 153 * Referenced by: '<S14>/r_commDCDeacv' 154 */ - 155 int16_T a_phaAdv_M1[11]; /* Variable: a_phaAdv_M1 - 156 * Referenced by: '<S8>/a_phaAdv_M2' + 155 int32_T r_phaAdvDC_XA[11]; /* Variable: r_phaAdvDC_XA + 156 * Referenced by: '<S8>/r_phaAdvDC_XA' 157 */ - 158 int16_T dz_counterHi; /* Variable: dz_counterHi - 159 * Referenced by: '<S14>/dz_counter' + 158 int16_T a_phaAdv_M1[11]; /* Variable: a_phaAdv_M1 + 159 * Referenced by: '<S8>/a_phaAdv_M2' 160 */ - 161 int16_T dz_counterLo; /* Variable: dz_counterLo + 161 int16_T dz_counterHi; /* Variable: dz_counterHi 162 * Referenced by: '<S14>/dz_counter' 163 */ - 164 uint8_T z_ctrlTypSel; /* Variable: z_ctrlTypSel - 165 * Referenced by: '<S7>/z_ctrlTypSel1' + 164 int16_T dz_counterLo; /* Variable: dz_counterLo + 165 * Referenced by: '<S14>/dz_counter' 166 */ - 167 boolean_T b_phaAdvEna; /* Variable: b_phaAdvEna - 168 * Referenced by: '<S8>/a_elecPeriod1' - 169 */ - 170 }; - 171 - 172 /* Parameters (auto storage) */ - 173 typedef struct P_ P; - 174 - 175 /* Real-time Model Data Structure */ - 176 struct tag_RTM { - 177 P *defaultParam; - 178 ExtU *inputs; - 179 ExtY *outputs; - 180 DW *dwork; + 167 int16_T z_maxCntRst; /* Variable: z_maxCntRst + 168 * Referenced by: + 169 * '<S15>/z_counter' + 170 * '<S15>/z_counter2' + 171 * '<S16>/z_maxCntRst' + 172 * '<S17>/Constant1' + 173 * '<S17>/UnitDelay1' + 174 */ + 175 uint8_T z_ctrlTypSel; /* Variable: z_ctrlTypSel + 176 * Referenced by: '<S7>/z_ctrlTypSel1' + 177 */ + 178 boolean_T b_phaAdvEna; /* Variable: b_phaAdvEna + 179 * Referenced by: '<S8>/a_elecPeriod1' + 180 */ 181 }; 182 - 183 /* Constant parameters (auto storage) */ - 184 extern const ConstP rtConstP; + 183 /* Parameters (auto storage) */ + 184 typedef struct P_ P; 185 - 186 /* Model entry point functions */ - 187 extern void BLDC_controller_initialize(RT_MODEL *const rtM); - 188 extern void BLDC_controller_step(RT_MODEL *const rtM); - 189 - 190 /*- - 191 * These blocks were eliminated from the model due to optimizations: - 192 * - 193 * Block '<S14>/Scope2' : Unused code path elimination - 194 * Block '<S8>/Scope' : Unused code path elimination - 195 */ + 186 /* Real-time Model Data Structure */ + 187 struct tag_RTM { + 188 P *defaultParam; + 189 ExtU *inputs; + 190 ExtY *outputs; + 191 DW *dwork; + 192 }; + 193 + 194 /* Constant parameters (auto storage) */ + 195 extern const ConstP rtConstP; 196 - 197 /*- - 198 * The generated code includes comments that allow you to trace directly - 199 * back to the appropriate location in the model. The basic format - 200 * is <system>/block_name, where system is the system number (uniquely - 201 * assigned by Simulink) and block_name is the name of the block. - 202 * - 203 * Note that this particular code originates from a subsystem build, - 204 * and has its own system numbers different from the parent model. - 205 * Refer to the system hierarchy for this subsystem below, and use the - 206 * MATLAB hilite_system command to trace the generated code back - 207 * to the parent model. For example, - 208 * - 209 * hilite_system('BLDCmotorControl_R2017b/BLDC_controller') - opens subsystem BLDCmotorControl_R2017b/BLDC_controller - 210 * hilite_system('BLDCmotorControl_R2017b/BLDC_controller/Kp') - opens and selects block Kp - 211 * - 212 * Here is the system hierarchy for this model + 197 /* Model entry point functions */ + 198 extern void BLDC_controller_initialize(RT_MODEL *const rtM); + 199 extern void BLDC_controller_step(RT_MODEL *const rtM); + 200 + 201 /*- + 202 * These blocks were eliminated from the model due to optimizations: + 203 * + 204 * Block '<S14>/Scope2' : Unused code path elimination + 205 * Block '<S8>/Scope' : Unused code path elimination + 206 */ + 207 + 208 /*- + 209 * The generated code includes comments that allow you to trace directly + 210 * back to the appropriate location in the model. The basic format + 211 * is <system>/block_name, where system is the system number (uniquely + 212 * assigned by Simulink) and block_name is the name of the block. 213 * - 214 * '<Root>' : 'BLDCmotorControl_R2017b' - 215 * '<S1>' : 'BLDCmotorControl_R2017b/BLDC_controller' - 216 * '<S2>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller' - 217 * '<S3>' : 'BLDCmotorControl_R2017b/BLDC_controller/signal_log1' - 218 * '<S4>' : 'BLDCmotorControl_R2017b/BLDC_controller/signal_log2' - 219 * '<S5>' : 'BLDCmotorControl_R2017b/BLDC_controller/signal_log3' - 220 * '<S6>' : 'BLDCmotorControl_R2017b/BLDC_controller/signal_log6' - 221 * '<S7>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F01_Preliminary_Calculations' - 222 * '<S8>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F02_Electrical_Angle_Calculation' - 223 * '<S9>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F03_Control_Method_Selection' - 224 * '<S10>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F04_Control_Type_Management' - 225 * '<S11>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F01_Preliminary_Calculations/F01_01_Edge_Detector' - 226 * '<S12>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F01_Preliminary_Calculations/F01_02_Position_Calculation' - 227 * '<S13>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F01_Preliminary_Calculations/F01_03_Direction_Detection' - 228 * '<S14>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F01_Preliminary_Calculations/F01_04_Speed_Calculation' - 229 * '<S15>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F01_Preliminary_Calculations/F01_04_Speed_Calculation/Counter_Hold_and_Error_Calculation' - 230 * '<S16>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F01_Preliminary_Calculations/F01_04_Speed_Calculation/Motor_Speed_Calculation' - 231 * '<S17>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F01_Preliminary_Calculations/F01_04_Speed_Calculation/rst_DelayLim' - 232 * '<S18>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F03_Control_Method_Selection/F03_01_Pure_Trapezoidal_Method' - 233 * '<S19>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F03_Control_Method_Selection/F03_02_Sinusoidal_Method' - 234 * '<S20>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F03_Control_Method_Selection/F03_03_Sinusoidal3rd_Method' - 235 * '<S21>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F03_Control_Method_Selection/signal_log1' - 236 * '<S22>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F03_Control_Method_Selection/signal_log2' - 237 * '<S23>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F03_Control_Method_Selection/signal_log6' - 238 */ - 239 #endif /* RTW_HEADER_BLDC_controller_h_ */ - 240 - 241 /* - 242 * File trailer for generated code. - 243 * - 244 * [EOF] - 245 */ - 246 + 214 * Note that this particular code originates from a subsystem build, + 215 * and has its own system numbers different from the parent model. + 216 * Refer to the system hierarchy for this subsystem below, and use the + 217 * MATLAB hilite_system command to trace the generated code back + 218 * to the parent model. For example, + 219 * + 220 * hilite_system('BLDCmotorControl_R2017b/BLDC_controller') - opens subsystem BLDCmotorControl_R2017b/BLDC_controller + 221 * hilite_system('BLDCmotorControl_R2017b/BLDC_controller/Kp') - opens and selects block Kp + 222 * + 223 * Here is the system hierarchy for this model + 224 * + 225 * '<Root>' : 'BLDCmotorControl_R2017b' + 226 * '<S1>' : 'BLDCmotorControl_R2017b/BLDC_controller' + 227 * '<S2>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller' + 228 * '<S3>' : 'BLDCmotorControl_R2017b/BLDC_controller/signal_log1' + 229 * '<S4>' : 'BLDCmotorControl_R2017b/BLDC_controller/signal_log2' + 230 * '<S5>' : 'BLDCmotorControl_R2017b/BLDC_controller/signal_log3' + 231 * '<S6>' : 'BLDCmotorControl_R2017b/BLDC_controller/signal_log6' + 232 * '<S7>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F01_Preliminary_Calculations' + 233 * '<S8>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F02_Electrical_Angle_Calculation' + 234 * '<S9>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F03_Control_Method_Selection' + 235 * '<S10>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F04_Control_Type_Management' + 236 * '<S11>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F01_Preliminary_Calculations/F01_01_Edge_Detector' + 237 * '<S12>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F01_Preliminary_Calculations/F01_02_Position_Calculation' + 238 * '<S13>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F01_Preliminary_Calculations/F01_03_Direction_Detection' + 239 * '<S14>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F01_Preliminary_Calculations/F01_04_Speed_Calculation' + 240 * '<S15>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F01_Preliminary_Calculations/F01_04_Speed_Calculation/Counter_Hold_and_Error_Calculation' + 241 * '<S16>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F01_Preliminary_Calculations/F01_04_Speed_Calculation/Motor_Speed_Calculation' + 242 * '<S17>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F01_Preliminary_Calculations/F01_04_Speed_Calculation/rst_DelayLim' + 243 * '<S18>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F03_Control_Method_Selection/F03_01_Pure_Trapezoidal_Method' + 244 * '<S19>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F03_Control_Method_Selection/F03_02_Sinusoidal_Method' + 245 * '<S20>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F03_Control_Method_Selection/F03_03_Sinusoidal3rd_Method' + 246 * '<S21>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F03_Control_Method_Selection/signal_log1' + 247 * '<S22>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F03_Control_Method_Selection/signal_log2' + 248 * '<S23>' : 'BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F03_Control_Method_Selection/signal_log6' + 249 */ + 250 #endif /* RTW_HEADER_BLDC_controller_h_ */ + 251 + 252 /* + 253 * File trailer for generated code. + 254 * + 255 * [EOF] + 256 */ + 257

diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_interface.html b/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_interface.html index 6360cbe..cab4ddf 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_interface.html +++ b/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_interface.html @@ -611,7 +611,7 @@ int32_T -r_commDCDeacv +n_motPhaAdvEna @@ -629,6 +629,24 @@ int32_T +r_commDCDeacv + + + +Defined externally + + + + +int32_T + + +1 + + + + + r_phaAdvDC_XA @@ -645,7 +663,7 @@ int32_T - + a_phaAdv_M1 @@ -663,7 +681,7 @@ int16_T - + dz_counterHi @@ -681,7 +699,7 @@ int16_T - + dz_counterLo @@ -698,6 +716,24 @@ int16_T 1 + + + +z_maxCntRst + + + +Defined externally + + + + +int16_T + + +1 + + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_metrics.html b/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_metrics.html index b39b53c..2795264 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_metrics.html +++ b/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_metrics.html @@ -100,7 +100,7 @@ Function Information : -404 +407   @@ -115,7 +115,7 @@ Function Information : -1,150 +1,165   @@ -169,13 +169,13 @@ BLDC_controller.c -254 +255 -693 +697 -06/06/2019 10:50 PM +06/11/2019 9:15 PM @@ -187,13 +187,13 @@ BLDC_controller.h -79 +81 -246 +257 -06/06/2019 10:50 PM +06/11/2019 9:15 PM @@ -211,7 +211,7 @@ rtwtypes.h 109 -06/06/2019 10:50 PM +06/11/2019 9:15 PM @@ -229,7 +229,7 @@ BLDC_controller_data.c 102 -06/06/2019 10:50 PM +06/11/2019 9:15 PM @@ -451,7 +451,7 @@ BLDC_controller_step 181 -511 +514 24 @@ -610,16 +610,16 @@ BLDC_controller_initialize -8 +16 -8 +16 -5 +6 -24 +25 1 @@ -727,16 +727,16 @@ BLDC_controller_initialize   -8 +16 -8 +16 -5 +6 -24 +25 1 @@ -763,7 +763,7 @@ BLDC_controller_step 181 -511 +514 24 diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_sid_map.js b/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_sid_map.js index 0b0d719..d530b3c 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_sid_map.js +++ b/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_sid_map.js @@ -99,6 +99,7 @@ function RTW_SidParentMap() { this.sidParentMap["BLDCmotorControl_R2017b:2687:1482"] = "BLDCmotorControl_R2017b:2687:6"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1666"] = "BLDCmotorControl_R2017b:2687:6"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1382"] = "BLDCmotorControl_R2017b:2687:6"; + this.sidParentMap["BLDCmotorControl_R2017b:2687:1678"] = "BLDCmotorControl_R2017b:2687:6"; this.sidParentMap["BLDCmotorControl_R2017b:2687:186"] = "BLDCmotorControl_R2017b:2687:6"; this.sidParentMap["BLDCmotorControl_R2017b:2687:187"] = "BLDCmotorControl_R2017b:2687:6"; this.sidParentMap["BLDCmotorControl_R2017b:2687:188"] = "BLDCmotorControl_R2017b:2687:6"; @@ -112,6 +113,7 @@ function RTW_SidParentMap() { this.sidParentMap["BLDCmotorControl_R2017b:2687:196"] = "BLDCmotorControl_R2017b:2687:6"; this.sidParentMap["BLDCmotorControl_R2017b:2687:197"] = "BLDCmotorControl_R2017b:2687:6"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1662"] = "BLDCmotorControl_R2017b:2687:6"; + this.sidParentMap["BLDCmotorControl_R2017b:2687:1677"] = "BLDCmotorControl_R2017b:2687:6"; this.sidParentMap["BLDCmotorControl_R2017b:2687:198"] = "BLDCmotorControl_R2017b:2687:6"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1376"] = "BLDCmotorControl_R2017b:2687:6"; this.sidParentMap["BLDCmotorControl_R2017b:2687:199"] = "BLDCmotorControl_R2017b:2687:6"; @@ -130,6 +132,7 @@ function RTW_SidParentMap() { this.sidParentMap["BLDCmotorControl_R2017b:2687:211"] = "BLDCmotorControl_R2017b:2687:6"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1483"] = "BLDCmotorControl_R2017b:2687:6"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1484"] = "BLDCmotorControl_R2017b:2687:6"; + this.sidParentMap["BLDCmotorControl_R2017b:2687:1679"] = "BLDCmotorControl_R2017b:2687:6"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1383"] = "BLDCmotorControl_R2017b:2687:6"; this.sidParentMap["BLDCmotorControl_R2017b:2687:212"] = "BLDCmotorControl_R2017b:2687:6"; this.sidParentMap["BLDCmotorControl_R2017b:2687:535"] = "BLDCmotorControl_R2017b:2687:215"; @@ -137,11 +140,13 @@ function RTW_SidParentMap() { this.sidParentMap["BLDCmotorControl_R2017b:2687:217"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1460"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1461"] = "BLDCmotorControl_R2017b:2687:215"; + this.sidParentMap["BLDCmotorControl_R2017b:2687:1680"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:221"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1464"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1465"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1466"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1467"] = "BLDCmotorControl_R2017b:2687:215"; + this.sidParentMap["BLDCmotorControl_R2017b:2687:1669"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:231"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:518"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:534"] = "BLDCmotorControl_R2017b:2687:215"; @@ -160,14 +165,17 @@ function RTW_SidParentMap() { this.sidParentMap["BLDCmotorControl_R2017b:2687:243"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1462"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1463"] = "BLDCmotorControl_R2017b:2687:215"; + this.sidParentMap["BLDCmotorControl_R2017b:2687:1681"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:578"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1473"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:536"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:538"] = "BLDCmotorControl_R2017b:2687:215"; + this.sidParentMap["BLDCmotorControl_R2017b:2687:1668"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:623"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:258"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:545"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1474"] = "BLDCmotorControl_R2017b:2687:215"; + this.sidParentMap["BLDCmotorControl_R2017b:2687:1670"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1475"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:262"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1476"] = "BLDCmotorControl_R2017b:2687:215"; @@ -179,6 +187,7 @@ function RTW_SidParentMap() { this.sidParentMap["BLDCmotorControl_R2017b:2687:512"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:547"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:521"] = "BLDCmotorControl_R2017b:2687:215"; + this.sidParentMap["BLDCmotorControl_R2017b:2687:1671"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:522"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:278"] = "BLDCmotorControl_R2017b:2687:215"; this.sidParentMap["BLDCmotorControl_R2017b:2687:279"] = "BLDCmotorControl_R2017b:2687:215"; @@ -302,7 +311,6 @@ function RTW_SidParentMap() { this.sidParentMap["BLDCmotorControl_R2017b:2687:61"] = "BLDCmotorControl_R2017b:2687:59"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1629"] = "BLDCmotorControl_R2017b:2687:59"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1366"] = "BLDCmotorControl_R2017b:2687:59"; - this.sidParentMap["BLDCmotorControl_R2017b:2687:1320"] = "BLDCmotorControl_R2017b:2687:59"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1321"] = "BLDCmotorControl_R2017b:2687:59"; this.sidParentMap["BLDCmotorControl_R2017b:2687:64"] = "BLDCmotorControl_R2017b:2687:59"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1340"] = "BLDCmotorControl_R2017b:2687:59"; @@ -319,6 +327,7 @@ function RTW_SidParentMap() { this.sidParentMap["BLDCmotorControl_R2017b:2687:1380"] = "BLDCmotorControl_R2017b:2687:59"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1455"] = "BLDCmotorControl_R2017b:2687:59"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1361"] = "BLDCmotorControl_R2017b:2687:59"; + this.sidParentMap["BLDCmotorControl_R2017b:2687:1675"] = "BLDCmotorControl_R2017b:2687:59"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1323"] = "BLDCmotorControl_R2017b:2687:59"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1517"] = "BLDCmotorControl_R2017b:2687:59"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1324"] = "BLDCmotorControl_R2017b:2687:59"; @@ -338,6 +347,7 @@ function RTW_SidParentMap() { this.sidParentMap["BLDCmotorControl_R2017b:2687:1374"] = "BLDCmotorControl_R2017b:2687:59"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1630"] = "BLDCmotorControl_R2017b:2687:59"; this.sidParentMap["BLDCmotorControl_R2017b:2687:106"] = "BLDCmotorControl_R2017b:2687:59"; + this.sidParentMap["BLDCmotorControl_R2017b:2687:1674"] = "BLDCmotorControl_R2017b:2687:59"; this.sidParentMap["BLDCmotorControl_R2017b:2687:786"] = "BLDCmotorControl_R2017b:2687:59"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1400"] = "BLDCmotorControl_R2017b:2687:59"; this.sidParentMap["BLDCmotorControl_R2017b:2687:108"] = "BLDCmotorControl_R2017b:2687:59"; @@ -360,6 +370,7 @@ function RTW_SidParentMap() { this.sidParentMap["BLDCmotorControl_R2017b:2687:1329"] = "BLDCmotorControl_R2017b:2687:59"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1651"] = "BLDCmotorControl_R2017b:2687:59"; this.sidParentMap["BLDCmotorControl_R2017b:2687:173"] = "BLDCmotorControl_R2017b:2687:59"; + this.sidParentMap["BLDCmotorControl_R2017b:2687:1676"] = "BLDCmotorControl_R2017b:2687:59"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1381"] = "BLDCmotorControl_R2017b:2687:59"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1487"] = "BLDCmotorControl_R2017b:2687:59"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1488"] = "BLDCmotorControl_R2017b:2687:59"; @@ -373,6 +384,7 @@ function RTW_SidParentMap() { this.sidParentMap["BLDCmotorControl_R2017b:2687:1640"] = "BLDCmotorControl_R2017b:2687:1401"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1430"] = "BLDCmotorControl_R2017b:2687:1401"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1639"] = "BLDCmotorControl_R2017b:2687:1401"; + this.sidParentMap["BLDCmotorControl_R2017b:2687:1672"] = "BLDCmotorControl_R2017b:2687:1401"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1637"] = "BLDCmotorControl_R2017b:2687:1401"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1433"] = "BLDCmotorControl_R2017b:2687:1401"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1434"] = "BLDCmotorControl_R2017b:2687:1401"; @@ -403,6 +415,7 @@ function RTW_SidParentMap() { this.sidParentMap["BLDCmotorControl_R2017b:2687:1625"] = "BLDCmotorControl_R2017b:2687:1401"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1450"] = "BLDCmotorControl_R2017b:2687:1401"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1451"] = "BLDCmotorControl_R2017b:2687:1401"; + this.sidParentMap["BLDCmotorControl_R2017b:2687:1673"] = "BLDCmotorControl_R2017b:2687:1401"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1651:1614"] = "BLDCmotorControl_R2017b:2687:1651"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1651:1615"] = "BLDCmotorControl_R2017b:2687:1651"; this.sidParentMap["BLDCmotorControl_R2017b:2687:1651:1616"] = "BLDCmotorControl_R2017b:2687:1651"; diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_survey.html b/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_survey.html index ac1194b..82b1d69 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_survey.html +++ b/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_survey.html @@ -40,7 +40,7 @@ MathWorks Model Version -1.879 +1.883 @@ -109,7 +109,7 @@ Simulink Coder Version Timestamp of Generated Source Code -Thu Jun 6 22:50:24 2019 +Tue Jun 11 21:14:57 2019 diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_trace.html b/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_trace.html index b989a7b..76b0a2f 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_trace.html +++ b/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_trace.html @@ -20,18 +20,20 @@ function rtwTraceHilite(file,ext,ln) { //-->

Traceability Report for BLDC_controller

Table of Contents

  1. Eliminated / Virtual Blocks
  2. Traceable Simulink Blocks / Stateflow Objects / MATLAB Functions

Eliminated / Virtual Blocks

Block NameComment
<S1>/b_hallA

Inport

<S1>/b_hallB

Inport

<S1>/b_hallC

Inport

<S1>/r_DC

Inport

<S1>/BLDC_controller

Virtual SubSystem

<S1>/From1

From

<S1>/From18

From

<S1>/From19

From

<S1>/From20

From

<S1>/From21

From

<S1>/From5

From

<S1>/From6

From

<S1>/From7

From

<S1>/From8

From

<S1>/Goto

Goto

<S1>/Goto1

Goto

<S1>/Goto18

Goto

<S1>/Goto19

Goto

<S1>/Goto2

Goto

<S1>/Goto20

Goto

<S1>/Goto21

Goto

<S1>/Goto22

Goto

<S1>/Goto3

Goto

<S1>/signal_log1

Virtual SubSystem

<S1>/signal_log2

Virtual SubSystem

<S1>/signal_log3

Virtual SubSystem

<S1>/signal_log6

Virtual SubSystem

<S1>/DC_phaA

Outport

<S1>/DC_phaB

Outport

<S1>/DC_phaC

Outport

<S1>/n_mot

Outport

<S1>/a_elecAngle

Outport

<S2>/b_hallA -

Inport

<S2>/b_hallB

Inport

<S2>/b_hallC

Inport

<S2>/r_DC

Inport

<S2>/F01_Preliminary_Calculations

Virtual SubSystem

<S2>/F03_Control_Method_Selection

Virtual SubSystem

<S2>/F04_Control_Type_Management

Virtual SubSystem

<S2>/From

From

<S2>/From1

From

<S2>/From10

From

<S2>/From11

From

<S2>/From2

From

<S2>/From3

From

<S2>/From4

From

<S2>/From5

From

<S2>/From6

From

<S2>/From7

From

<S2>/From8

From

<S2>/From9

From

<S2>/Goto

Goto

<S2>/Goto1

Goto

<S2>/Goto2

Goto

<S2>/Goto3

Goto

<S2>/Goto4

Goto

<S2>/Goto5

Goto

<S2>/Goto6

Goto

<S2>/Goto7

Goto

<S2>/Goto8

Goto

<S2>/Goto9

Goto

<S2>/Implemented_control_methods

Empty SubSystem

<S2>/Model_Info

Empty SubSystem

<S2>/DC_phaA

Outport

<S2>/DC_phaB

Outport

<S2>/DC_phaC

Outport

<S2>/n_mot

Outport

<S2>/a_elecAngle

Outport

<S3>/b_hallB

Inport

<S3>/Terminator_1

Terminator

<S4>/b_hallC

Inport

<S4>/Terminator_1

Terminator

<S5>/r_DC

Inport

<S5>/Terminator_1

Terminator

<S6>/b_hallA

Inport

<S6>/Terminator_1

Terminator

<S7>/b_hallA

Inport

<S7>/b_hallB

Inport

<S7>/b_hallC

Inport

<S7>/r_DC

Inport

<S7>/r_DCabs

Inport

<S7>/F01_01_Edge_Detector

Virtual SubSystem

<S7>/F01_02_Position_Calculation

Virtual SubSystem

<S7>/F01_04_Speed_Calculation

Virtual SubSystem

<S7>/From

From

<S7>/From1

From

<S7>/From10

From

<S7>/From11

From

<S7>/From12

From

<S7>/From13

From

<S7>/From14

From

<S7>/From15

From

<S7>/From16

From

<S7>/From17

From

<S7>/From18

From

<S7>/From2

From

<S7>/From3

From

<S7>/From36

From

<S7>/From38

From

<S7>/From4

From

<S7>/From5

From

<S7>/From6

From

<S7>/From7

From

<S7>/From8

From

<S7>/From9

From

<S7>/Goto

Goto

<S7>/Goto1

Goto

<S7>/Goto10

Goto

<S7>/Goto16

Goto

<S7>/Goto18

Goto

<S7>/Goto2

Goto

<S7>/Goto21

Goto

<S7>/Goto3

Goto

<S7>/Goto4

Goto

<S7>/Goto5

Goto

<S7>/Goto6

Goto

<S7>/Goto7

Goto

<S7>/Goto8

Goto

<S7>/Goto9

Goto

<S7>/z_ctrlTypSel

Outport

<S7>/z_pos

Outport

<S7>/z_dir

Outport

<S7>/z_counter

Outport

<S7>/z_counterRaw

Outport

<S7>/b_advCtrlEna

Outport

<S7>/n_mot

Outport

<S8>/r_DCabs

Inport

<S8>/z_pos

Inport

<S8>/z_dir

Inport

<S8>/z_counter

Inport

<S8>/z_counterRaw

Inport

<S8>/Constant2

Eliminated by code generation optimization

<S8>/From10

From

<S8>/From11

From

<S8>/From12

From

<S8>/From2

From

<S8>/From3

From

<S8>/From5

From

<S8>/From51

From

<S8>/From52

From

<S8>/From53

From

<S8>/From54

From

<S8>/From59

From

<S8>/From6

From

<S8>/From7

From

<S8>/From9

From

<S8>/Goto

Goto

<S8>/Goto1

Goto

<S8>/Goto2

Goto

<S8>/Goto3

Goto

<S8>/Goto5

Goto

<S8>/Goto7

Goto

<S8>/Goto8

Goto

<S8>/Goto9

Goto

<S8>/Mux

Mux

<S8>/Scope

Unused code path elimination

<S8>/a_elecPeriod2

Eliminated by code generation optimization

<S9>/z_ctrlTypSel

Inport

<S9>/a_elecAngleAdv

Inport

<S9>/From

From

<S9>/From10

From

<S9>/From13

From

<S9>/From14

From

<S9>/From15

From

<S9>/From16

From

<S9>/From17

From

<S9>/From18

From

<S9>/From19

From

<S9>/From20

From

<S9>/From4

From

<S9>/From5

From

<S9>/From6

From

<S9>/From7

From

<S9>/From8

From

<S9>/From9

From

<S9>/Goto

Goto

<S9>/Goto1

Goto

<S9>/Goto10

Goto

<S9>/Goto11

Goto

<S9>/Goto12

Goto

<S9>/Goto14

Goto

<S9>/Goto2

Goto

<S9>/Goto3

Goto

<S9>/Goto4

Goto

<S9>/Goto5

Goto

<S9>/Goto6

Goto

<S9>/Goto7

Goto

<S9>/Goto8

Goto

<S9>/Goto9

Goto

<S9>/signal_log1

Virtual SubSystem

<S9>/signal_log2

Virtual SubSystem

<S9>/signal_log6

Virtual SubSystem

<S9>/r_phaA

Outport

<S9>/r_phaB

Outport

<S9>/r_phaC

Outport

<S10>/r_DC

Inport

<S10>/r_phaA

Inport

<S10>/r_phaB

Inport

<S10>/r_phaC

Inport

<S10>/z_pos

Inport

<S10>/b_advCtrlEna

Inport

<S10>/Demux

Demux

<S10>/From

From

<S10>/From1

From

<S10>/From10

From

<S10>/From2

From

<S10>/From27

From

<S10>/From39

From

<S10>/From40

From

<S10>/From41

From

<S10>/From8

From

<S10>/From9

From

<S10>/Goto

Goto

<S10>/Goto1

Goto

<S10>/Goto10

Goto

<S10>/Goto2

Goto

<S10>/Goto4

Goto

<S10>/Goto6

Goto

<S10>/Goto7

Goto

<S10>/Goto8

Goto

<S10>/Goto9

Goto

<S10>/Mux2

Mux

<S10>/DC_phaA

Outport

<S10>/DC_phaB

Outport

<S10>/DC_phaC

Outport

<S11>/b_hallA

Inport

<S11>/b_hallB

Inport

<S11>/b_hallC

Inport

<S11>/b_edge

Outport

<S12>/b_hallA

Inport

<S12>/b_hallB

Inport

<S12>/b_hallC

Inport

<S12>/z_pos

Outport

<S13>/z_pos

Inport

<S13>/z_dir

Outport

<S13>/z_dirPrev

Outport

<S14>/r_DC

Inport

<S14>/r_DCabs

Inport

<S14>/z_ctrlTypSel

Inport

<S14>/b_edge

Inport

<S14>/z_dir

Inport

<S14>/z_dirPrev

Inport

<S14>/From

From

<S14>/From1

From

<S14>/From10

From

<S14>/From11

From

<S14>/From12

From

<S14>/From13

From

<S14>/From14

From

<S14>/From15

From

<S14>/From16

From

<S14>/From17

From

<S14>/From18

From

<S14>/From19

From

<S14>/From2

From

<S14>/From29

From

<S14>/From3

From

<S14>/From30

From

<S14>/From4

From

<S14>/From42

From

<S14>/From5

From

<S14>/From6

From

<S14>/From7

From

<S14>/From8

From

<S14>/From9

From

<S14>/Goto

Goto

<S14>/Goto1

Goto

<S14>/Goto10

Goto

<S14>/Goto15

Goto

<S14>/Goto16

Goto

<S14>/Goto17

Goto

<S14>/Goto18

Goto

<S14>/Goto2

Goto

<S14>/Goto22

Goto

<S14>/Goto5

Goto

<S14>/Goto6

Goto

<S14>/Goto8

Goto

<S14>/Goto9

Goto

<S14>/Motor_Speed_Calculation

Virtual SubSystem

<S14>/Mux1

Mux

<S14>/Mux2

Mux

<S14>/Scope2

Unused code path elimination

<S14>/rst_DelayLim

Masked SubSystem

<S14>/n_mot

Outport

<S14>/b_advCtrlEna

Outport

<S14>/z_counter

Outport

<S14>/z_counterRaw

Outport

<S15>/dz_counter

Outport

<S16>/z_dir

Inport

<S16>/z_dirPrev

Inport

<S16>/z_counter

Inport

<S16>/z_counterRaw

Inport

<S16>/From1

From

<S16>/From14

From

<S16>/From15

From

<S16>/From17

From

<S16>/From42

From

<S16>/From8

From

<S16>/Goto

Goto

<S16>/Goto1

Goto

<S16>/Goto2

Goto

<S16>/Goto22

Goto

<S16>/Goto3

Goto

<S16>/n_motRaw

Outport

<S16>/n_mot

Outport

<S17>/u

Inport

<S17>/rst

Inport

<S17>/y

Outport

<S18>/a_elecAngleAdv

Inport

<S18>/r_phaA_Trap

Outport

<S18>/r_phaB_Trap

Outport

<S18>/r_phaC_Trap

Outport

<S19>/a_elecAngleAdv

Inport

<S19>/r_phaA_Sin

Outport

<S19>/r_phaB_Sin

Outport

<S19>/r_phaC_Sin

Outport

<S20>/a_elecAngleAdv

Inport

<S20>/r_phaA_Sin3

Outport

<S20>/r_phaB_Sin3

Outport

<S20>/r_phaC_Sin3

Outport

<S21>/r_phaB

Inport

<S21>/Terminator_1

Terminator

<S22>/r_phaC

Inport

<S22>/Terminator_1

Terminator

<S23>/r_phaA

Inport

<S23>/Terminator_1

Terminator

Traceable Simulink Blocks / Stateflow Objects / MATLAB Functions

Subsystem: BLDCmotorControl_R2017b/BLDC_controller

No traceable objects in this Subsystem.

Subsystem: BLDCmotorControl_R2017b/BLDC_controller/signal_log1

No traceable objects in this Subsystem.

Subsystem: BLDCmotorControl_R2017b/BLDC_controller/signal_log2

No traceable objects in this Subsystem.

Subsystem: BLDCmotorControl_R2017b/BLDC_controller/signal_log3

No traceable objects in this Subsystem.

Subsystem: BLDCmotorControl_R2017b/BLDC_controller/signal_log6

No traceable objects in this Subsystem.

Subsystem: BLDCmotorControl_R2017b/BLDC_controller/BLDC_controller/F01_Preliminary_Calculations/F01_03_Direction_Detection

Object NameCode Location
<S13>/Action PortBLDC_controller.c:217
<S13>/Constant20BLDC_controller.c:231, 239
<S13>/Constant23BLDC_controller.c:232, 242
<S13>/Constant24BLDC_controller.c:233, 240
<S13>/Constant8BLDC_controller.c:234, 239
<S13>/Logical +

Inport

<S2>/b_hallB

Inport

<S2>/b_hallC

Inport

<S2>/r_DC

Inport

<S2>/F01_Preliminary_Calculations

Virtual SubSystem

<S2>/F03_Control_Method_Selection

Virtual SubSystem

<S2>/F04_Control_Type_Management

Virtual SubSystem

<S2>/From

From

<S2>/From1

From

<S2>/From10

From

<S2>/From11

From

<S2>/From2

From

<S2>/From3

From

<S2>/From4

From

<S2>/From5

From

<S2>/From6

From

<S2>/From7

From

<S2>/From8

From

<S2>/From9

From

<S2>/Goto

Goto

<S2>/Goto1

Goto

<S2>/Goto2

Goto

<S2>/Goto3

Goto

<S2>/Goto4

Goto

<S2>/Goto5

Goto

<S2>/Goto6

Goto

<S2>/Goto7

Goto

<S2>/Goto8

Goto

<S2>/Goto9

Goto

<S2>/Implemented_control_methods

Empty SubSystem

<S2>/Model_Info

Empty SubSystem

<S2>/DC_phaA

Outport

<S2>/DC_phaB

Outport

<S2>/DC_phaC

Outport

<S2>/n_mot

Outport

<S2>/a_elecAngle

Outport

<S3>/b_hallB

Inport

<S3>/Terminator_1

Terminator

<S4>/b_hallC

Inport

<S4>/Terminator_1

Terminator

<S5>/r_DC

Inport

<S5>/Terminator_1

Terminator

<S6>/b_hallA

Inport

<S6>/Terminator_1

Terminator

<S7>/b_hallA

Inport

<S7>/b_hallB

Inport

<S7>/b_hallC

Inport

<S7>/r_DC

Inport

<S7>/r_DCabs

Inport

<S7>/F01_01_Edge_Detector

Virtual SubSystem

<S7>/F01_02_Position_Calculation

Virtual SubSystem

<S7>/F01_04_Speed_Calculation

Virtual SubSystem

<S7>/From

From

<S7>/From1

From

<S7>/From10

From

<S7>/From11

From

<S7>/From12

From

<S7>/From13

From

<S7>/From14

From

<S7>/From15

From

<S7>/From16

From

<S7>/From17

From

<S7>/From18

From

<S7>/From19

From

<S7>/From2

From

<S7>/From3

From

<S7>/From36

From

<S7>/From38

From

<S7>/From4

From

<S7>/From5

From

<S7>/From6

From

<S7>/From7

From

<S7>/From8

From

<S7>/From9

From

<S7>/Goto

Goto

<S7>/Goto1

Goto

<S7>/Goto10

Goto

<S7>/Goto11

Goto

<S7>/Goto16

Goto

<S7>/Goto18

Goto

<S7>/Goto2

Goto

<S7>/Goto21

Goto

<S7>/Goto3

Goto

<S7>/Goto4

Goto

<S7>/Goto5

Goto

<S7>/Goto6

Goto

<S7>/Goto7

Goto

<S7>/Goto8

Goto

<S7>/Goto9

Goto

<S7>/z_ctrlTypSel

Outport

<S7>/z_pos

Outport

<S7>/z_dir

Outport

<S7>/z_counter

Outport

<S7>/z_counterRaw

Outport

<S7>/n_motAbs

Outport

<S7>/b_advCtrlEna

Outport

<S7>/n_mot

Outport

<S8>/r_DCabs

Inport

<S8>/z_pos

Inport

<S8>/z_dir

Inport

<S8>/z_counter

Inport

<S8>/z_counterRaw

Inport

<S8>/n_motAbs

Inport

<S8>/Constant2

Eliminated by code generation optimization

<S8>/From1

From

<S8>/From10

From

<S8>/From11

From

<S8>/From12

From

<S8>/From2

From

<S8>/From3

From

<S8>/From5

From

<S8>/From51

From

<S8>/From52

From

<S8>/From53

From

<S8>/From54

From

<S8>/From59

From

<S8>/From6

From

<S8>/From7

From

<S8>/From9

From

<S8>/Goto

Goto

<S8>/Goto1

Goto

<S8>/Goto2

Goto

<S8>/Goto3

Goto

<S8>/Goto4

Goto

<S8>/Goto5

Goto

<S8>/Goto7

Goto

<S8>/Goto8

Goto

<S8>/Goto9

Goto

<S8>/Mux

Mux

<S8>/Scope

Unused code path elimination

<S8>/a_elecPeriod2

Eliminated by code generation optimization

<S9>/z_ctrlTypSel

Inport

<S9>/a_elecAngleAdv

Inport

<S9>/From

From

<S9>/From10

From

<S9>/From13

From

<S9>/From14

From

<S9>/From15

From

<S9>/From16

From

<S9>/From17

From

<S9>/From18

From

<S9>/From19

From

<S9>/From20

From

<S9>/From4

From

<S9>/From5

From

<S9>/From6

From

<S9>/From7

From

<S9>/From8

From

<S9>/From9

From

<S9>/Goto

Goto

<S9>/Goto1

Goto

<S9>/Goto10

Goto

<S9>/Goto11

Goto

<S9>/Goto12

Goto

<S9>/Goto14

Goto

<S9>/Goto2

Goto

<S9>/Goto3

Goto

<S9>/Goto4

Goto

<S9>/Goto5

Goto

<S9>/Goto6

Goto

<S9>/Goto7

Goto

<S9>/Goto8

Goto

<S9>/Goto9

Goto

<S9>/signal_log1

Virtual SubSystem

<S9>/signal_log2

Virtual SubSystem

<S9>/signal_log6

Virtual SubSystem

<S9>/r_phaA

Outport

<S9>/r_phaB

Outport

<S9>/r_phaC

Outport

<S10>/r_DC

Inport

<S10>/r_phaA

Inport

<S10>/r_phaB

Inport

<S10>/r_phaC

Inport

<S10>/z_pos

Inport

<S10>/b_advCtrlEna

Inport

<S10>/Demux

Demux

<S10>/From

From

<S10>/From1

From

<S10>/From10

From

<S10>/From2

From

<S10>/From27

From

<S10>/From39

From

<S10>/From40

From

<S10>/From41

From

<S10>/From8

From

<S10>/From9

From

<S10>/Goto

Goto

<S10>/Goto1

Goto

<S10>/Goto10

Goto

<S10>/Goto2

Goto

<S10>/Goto4

Goto

<S10>/Goto6

Goto

<S10>/Goto7

Goto

<S10>/Goto8

Goto

<S10>/Goto9

Goto

<S10>/Mux2

Mux

<S10>/DC_phaA

Outport

<S10>/DC_phaB

Outport

<S10>/DC_phaC

Outport

<S11>/b_hallA

Inport

<S11>/b_hallB

Inport

<S11>/b_hallC

Inport

<S11>/b_edge

Outport

<S12>/b_hallA

Inport

<S12>/b_hallB

Inport

<S12>/b_hallC

Inport

<S12>/z_pos

Outport

<S13>/z_pos

Inport

<S13>/z_dir

Outport

<S13>/z_dirPrev

Outport

<S14>/r_DC

Inport

<S14>/r_DCabs

Inport

<S14>/z_ctrlTypSel

Inport

<S14>/b_edge

Inport

<S14>/z_dir

Inport

<S14>/z_dirPrev

Inport

<S14>/From

From

<S14>/From1

From

<S14>/From10

From

<S14>/From11

From

<S14>/From12

From

<S14>/From13

From

<S14>/From14

From

<S14>/From15

From

<S14>/From16

From

<S14>/From17

From

<S14>/From18

From

<S14>/From19

From

<S14>/From2

From

<S14>/From20

From

<S14>/From29

From

<S14>/From3

From

<S14>/From30

From

<S14>/From4

From

<S14>/From42

From

<S14>/From5

From

<S14>/From6

From

<S14>/From7

From

<S14>/From8

From

<S14>/From9

From

<S14>/Goto

Goto

<S14>/Goto1

Goto

<S14>/Goto10

Goto

<S14>/Goto15

Goto

<S14>/Goto16

Goto

<S14>/Goto17

Goto

<S14>/Goto18

Goto

<S14>/Goto2

Goto

<S14>/Goto22

Goto

<S14>/Goto3

Goto

<S14>/Goto5

Goto

<S14>/Goto6

Goto

<S14>/Goto8

Goto

<S14>/Goto9

Goto

<S14>/Motor_Speed_Calculation

Virtual SubSystem

<S14>/Mux1

Mux

<S14>/Mux2

Mux

<S14>/Scope2

Unused code path elimination

<S14>/rst_DelayLim

Masked SubSystem

<S14>/n_mot

Outport

<S14>/n_motAbs

Outport

<S14>/b_advCtrlEna

Outport

<S14>/z_counter

Outport

<S14>/z_counterRaw

Outport

<S15>/dz_counter

Outport

<S16>/z_dir

Inport

<S16>/z_dirPrev

Inport

<S16>/z_counter

Inport

<S16>/z_counterRaw

Inport

<S16>/From1

From

<S16>/From14

From

<S16>/From15

From

<S16>/From17

From

<S16>/From42

From

<S16>/From8

From

<S16>/Goto

Goto

<S16>/Goto1

Goto

<S16>/Goto2

Goto

<S16>/Goto22

Goto

<S16>/Goto3

Goto

<S16>/n_motRaw

Outport

<S16>/n_mot

Outport

<S16>/n_motAbs

Outport

<S17>/u

Inport

<S17>/rst

Inport

<S17>/y

Outport

<S18>/a_elecAngleAdv

Inport

<S18>/r_phaA_Trap

Outport

<S18>/r_phaB_Trap

Outport

<S18>/r_phaC_Trap

Outport

<S19>/a_elecAngleAdv

Inport

<S19>/r_phaA_Sin

Outport

<S19>/r_phaB_Sin

Outport

<S19>/r_phaC_Sin

Outport

<S20>/a_elecAngleAdv

Inport

<S20>/r_phaA_Sin3

Outport

<S20>/r_phaB_Sin3

Outport

<S20>/r_phaC_Sin3

Outport

<S21>/r_phaB

Inport

<S21>/Terminator_1

Terminator

<S22>/r_phaC

Inport

<S22>/Terminator_1

Terminator

<S23>/r_phaA

Inport

<S23>/Terminator_1

Terminator

Traceable Simulink Blocks / Stateflow Objects / MATLAB Functions

Subsystem: BLDCmotorControl_R2017b/BLDC_controller

No traceable objects in this Subsystem.

Subsystem: BLDCmotorControl_R2017b/BLDC_controller/signal_log1

No traceable objects in this Subsystem.

Subsystem: BLDCmotorControl_R2017b/BLDC_controller/signal_log2

No traceable objects in this Subsystem.

Subsystem: BLDCmotorControl_R2017b/BLDC_controller/signal_log3

No traceable objects in this Subsystem.

Subsystem: BLDCmotorControl_R2017b/BLDC_controller/signal_log6

No traceable objects in this Subsystem.

\ No newline at end of file +Operator6
BLDC_controller.c:237, 239<S13>/Sum2BLDC_controller.c:222, 227<S13>/Switch2BLDC_controller.c:230, 239, 240, 242, 245
BLDC_controller.h:50<S13>/UnitDelay1BLDC_controller.c:219, 220
BLDC_controller.h:49<S13>/UnitDelay2BLDC_controller.c:225, 228, 247, 251
BLDC_controller.h:51
\ No newline at end of file diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_traceInfo.js b/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_traceInfo.js index 1d7e5dc..d20fd5f 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_traceInfo.js +++ b/01_Matlab/BLDC_controller_ert_rtw/html/BLDC_controller_traceInfo.js @@ -3,15 +3,15 @@ function RTW_Sid2UrlHash() { /* /Abs1 */ this.urlHashMap["BLDCmotorControl_R2017b:2687:1660"] = "BLDC_controller.c:179,182,183,185,188"; /* /F02_Electrical_Angle_Calculation */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:215"] = "BLDC_controller.c:384,447"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:215"] = "BLDC_controller.c:384,450"; /* /If1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:434"] = "BLDC_controller.c:363,366,367,368,369,372,373,383,450,668,669&BLDC_controller.h:52"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:434"] = "BLDC_controller.c:363,366,367,368,369,372,373,383,453,672,673&BLDC_controller.h:52"; /* /F01_03_Direction_Detection */ this.urlHashMap["BLDCmotorControl_R2017b:2687:38"] = "BLDC_controller.c:216,253"; /* /If2 */ this.urlHashMap["BLDCmotorControl_R2017b:2687:1313"] = "BLDC_controller.c:206,215"; /* /z_ctrlTypSel1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:208"] = "BLDC_controller.c:364,368,453,455,552,568&BLDC_controller.h:165&ert_main.c:78"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:208"] = "BLDC_controller.c:364,368,456,458,555,571&BLDC_controller.h:176&ert_main.c:93"; /* /Action Port */ this.urlHashMap["BLDCmotorControl_R2017b:2687:221"] = "BLDC_controller.c:385"; /* /Constant16 */ @@ -22,14 +22,20 @@ function RTW_Sid2UrlHash() { this.urlHashMap["BLDCmotorControl_R2017b:2687:1466"] = "BLDC_controller.c:412,417"; /* /Divide5 */ this.urlHashMap["BLDCmotorControl_R2017b:2687:1467"] = "BLDC_controller.c:413,418"; + /* /Logical +Operator2 */ + this.urlHashMap["BLDCmotorControl_R2017b:2687:1668"] = "BLDC_controller.c:423,427"; /* /Math Function */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:623"] = "BLDC_controller.c:440,441"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:623"] = "BLDC_controller.c:443,444"; /* /Product2 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:545"] = "BLDC_controller.c:436,438"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:545"] = "BLDC_controller.c:439,441"; /* /Product6 */ this.urlHashMap["BLDCmotorControl_R2017b:2687:1474"] = "BLDC_controller.c:414,417"; /* /Relational +Operator4 */ + this.urlHashMap["BLDCmotorControl_R2017b:2687:1670"] = "BLDC_controller.c:425,427"; + /* /Relational Operator7 */ this.urlHashMap["BLDCmotorControl_R2017b:2687:1475"] = "BLDC_controller.c:395,400"; /* /Scope */ @@ -39,31 +45,33 @@ Operator7 */ /* /Sum2 */ this.urlHashMap["BLDCmotorControl_R2017b:2687:1477"] = "BLDC_controller.c:415,417,418"; /* /Sum3 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:546"] = "BLDC_controller.c:434,438"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:546"] = "BLDC_controller.c:437,441"; /* /Switch3 */ this.urlHashMap["BLDCmotorControl_R2017b:2687:1478"] = "BLDC_controller.c:387,400,401,403,408"; /* /Switch_PhaAdv */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:514"] = "BLDC_controller.c:420,424,441,443,446&BLDC_controller.h:39"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:514"] = "BLDC_controller.c:420,427,444,446,449&BLDC_controller.h:39"; /* /a_elecAngle1 */ this.urlHashMap["BLDCmotorControl_R2017b:2687:1479"] = "BLDC_controller.c:411,417,418"; /* /a_elecPeriod1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:512"] = "BLDC_controller.c:421,424&BLDC_controller.h:168&ert_main.c:83"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:512"] = "BLDC_controller.c:421,427&BLDC_controller.h:179&ert_main.c:98"; /* /a_elecPeriod2 */ this.urlHashMap["BLDCmotorControl_R2017b:2687:547"] = "msg=rtwMsg_CodeGenerationReducedBlock&block=BLDCmotorControl_R2017b:2687:547"; /* /a_phaAdv_M2 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:521"] = "BLDC_controller.c:430,431,432&BLDC_controller.h:156&ert_main.c:63"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:521"] = "BLDC_controller.c:433,434,435&BLDC_controller.h:159&ert_main.c:68"; + /* /n_motPhaAdvEna */ + this.urlHashMap["BLDCmotorControl_R2017b:2687:1671"] = "BLDC_controller.c:422,427&BLDC_controller.h:150&ert_main.c:53"; /* /r_phaAdvDC_XA */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:522"] = "BLDC_controller.c:425,426,427,428&BLDC_controller.h:153&ert_main.c:58"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:522"] = "BLDC_controller.c:428,429,430,431&BLDC_controller.h:156&ert_main.c:63"; /* /a_elecAngleAdv */ this.urlHashMap["BLDCmotorControl_R2017b:2687:278"] = "BLDC_controller.c:374,375"; /* /a_elecAngle */ this.urlHashMap["BLDCmotorControl_R2017b:2687:279"] = "BLDC_controller.c:378,380"; /* /F03_01_Pure_Trapezoidal_Method */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:285"] = "BLDC_controller.c:457,476"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:285"] = "BLDC_controller.c:460,479"; /* /F03_02_Sinusoidal_Method */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:305"] = "BLDC_controller.c:480,499"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:305"] = "BLDC_controller.c:483,502"; /* /F03_03_Sinusoidal3rd_Method */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:295"] = "BLDC_controller.c:503,522"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:295"] = "BLDC_controller.c:506,525"; /* /Merge */ this.urlHashMap["BLDCmotorControl_R2017b:2687:345"] = "BLDC_controller.h:41"; /* /Merge1 */ @@ -71,30 +79,30 @@ Operator7 */ /* /Merge2 */ this.urlHashMap["BLDCmotorControl_R2017b:2687:347"] = "BLDC_controller.h:43"; /* /Switch Case */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:348"] = "BLDC_controller.c:452,455,456,479,502,526"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:348"] = "BLDC_controller.c:455,458,459,482,505,529"; /* /Constant1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:370"] = "BLDC_controller.c:615,618,621,624,651,654"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:370"] = "BLDC_controller.c:618,621,624,627,654,657"; /* /Divide1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:373"] = "BLDC_controller.c:616,618,622,624,652,654"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:373"] = "BLDC_controller.c:619,621,625,627,655,657"; /* /Divide2 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:374"] = "BLDC_controller.c:556,607,608,609"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:374"] = "BLDC_controller.c:559,610,611,612"; /* /Divide4 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:375"] = "BLDC_controller.c:557,570,571,572"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:375"] = "BLDC_controller.c:560,573,574,575"; /* /Switch1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:401"] = "BLDC_controller.c:548,568,570,571,572,607,608,609,612"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:401"] = "BLDC_controller.c:551,571,573,574,575,610,611,612,615"; /* /z_commutMap_M1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:411"] = "BLDC_controller.c:555,565,574,575,577,580,581,582,584,587,589,593,596,599,603,606,607,608,609&BLDC_controller.h:108&BLDC_controller_data.c:86"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:411"] = "BLDC_controller.c:558,568,577,578,580,583,584,585,587,590,592,596,599,602,606,609,610,611,612&BLDC_controller.h:108&BLDC_controller_data.c:86"; /* /Bitwise Operator */ this.urlHashMap["BLDCmotorControl_R2017b:2687:1535"] = "BLDC_controller.c:190,198,199"; /* /UnitDelay */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:31"] = "BLDC_controller.c:194,199,626,629&BLDC_controller.h:53"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:31"] = "BLDC_controller.c:194,199,629,632&BLDC_controller.h:53"; /* /UnitDelay1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:32"] = "BLDC_controller.c:195,199,631,634&BLDC_controller.h:54"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:32"] = "BLDC_controller.c:195,199,634,637&BLDC_controller.h:54"; /* /UnitDelay2 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:33"] = "BLDC_controller.c:196,200,636,639&BLDC_controller.h:55"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:33"] = "BLDC_controller.c:196,200,639,642&BLDC_controller.h:55"; /* /Selector */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:14"] = "BLDC_controller.c:224,227,249,251,396,401,403,404,405,563,574,581,591,596,601"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:14"] = "BLDC_controller.c:224,227,249,251,396,401,403,404,405,566,577,584,594,599,604"; /* /Sum */ this.urlHashMap["BLDCmotorControl_R2017b:2687:15"] = "BLDC_controller.c:169,176,177,397,403,404,405"; /* /g_Ha */ @@ -102,7 +110,7 @@ Operator */ /* /g_Hb */ this.urlHashMap["BLDCmotorControl_R2017b:2687:18"] = "BLDC_controller.c:171,177,391,404,405"; /* /vec_hallToPos */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:22"] = "BLDC_controller.c:223,227,248,251,388,401,403,549,574,581,590,596,600&BLDC_controller.h:113&BLDC_controller_data.c:92"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:22"] = "BLDC_controller.c:223,227,248,251,388,401,403,552,577,584,593,599,603&BLDC_controller.h:113&BLDC_controller_data.c:92"; /* /Action Port */ this.urlHashMap["BLDCmotorControl_R2017b:2687:1314"] = "BLDC_controller.c:217"; /* /Constant20 */ @@ -132,44 +140,42 @@ Operator6 */ this.urlHashMap["BLDCmotorControl_R2017b:2687:1318"] = "BLDC_controller.c:225,228,247,251&BLDC_controller.h:51"; /* /Abs2 */ this.urlHashMap["BLDCmotorControl_R2017b:2687:1366"] = "BLDC_controller.c:345,346,347,349,352"; - /* /Abs5 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:1320"] = "BLDC_controller.c:327,328,329,331,334"; /* /CTRL_COMM */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:1321"] = "BLDC_controller.c:550,568"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:1321"] = "BLDC_controller.c:553,571"; /* /Constant6 */ this.urlHashMap["BLDCmotorControl_R2017b:2687:64"] = "BLDC_controller.c:203,254,262"; /* /Counter_Hold_and_Error_Calculation */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:1340"] = "BLDC_controller.c:256,274,677,684"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:1340"] = "BLDC_controller.c:256,274,681,688"; /* /If1 */ this.urlHashMap["BLDCmotorControl_R2017b:2687:1339"] = "BLDC_controller.c:202,215,291"; /* /Logical Operator2 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:1325"] = "BLDC_controller.c:554,568,569"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:1325"] = "BLDC_controller.c:557,571,572"; /* /Relational Operator1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:1524"] = "BLDC_controller.c:558,568,569"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:1524"] = "BLDC_controller.c:561,571,572"; /* /Relational Operator3 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:1326"] = "BLDC_controller.c:559,568"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:1326"] = "BLDC_controller.c:562,571"; /* /Relational Operator4 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:1327"] = "BLDC_controller.c:560,568"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:1327"] = "BLDC_controller.c:563,571"; /* /Scope2 */ this.urlHashMap["BLDCmotorControl_R2017b:2687:141"] = "msg=rtwMsg_reducedBlock&block=BLDCmotorControl_R2017b:2687:141"; /* /Sign */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:1525"] = "BLDC_controller.c:528,529,530,532,535"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:1525"] = "BLDC_controller.c:531,532,533,535,538"; /* /Sign1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:1526"] = "BLDC_controller.c:537,540,541,543,546"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:1526"] = "BLDC_controller.c:540,543,544,546,549"; /* /Sum1 */ this.urlHashMap["BLDCmotorControl_R2017b:2687:142"] = "BLDC_controller.c:209,254,265,288,293,294,304,306"; /* /UnitDelay1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:1507"] = "BLDC_controller.c:212,259,266,644,645&BLDC_controller.h:47"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:1507"] = "BLDC_controller.c:212,259,266,647,648&BLDC_controller.h:47"; /* /dz_counter */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:1518"] = "BLDC_controller.c:354,355,356,358,359,561,569&BLDC_controller.h:57,159,162&ert_main.c:68,73"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:1518"] = "BLDC_controller.c:354,355,356,358,359,564,572&BLDC_controller.h:57,162,165&ert_main.c:73,78"; /* /n_commDeacv */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:1328"] = "BLDC_controller.c:336,337,338,340,341,562,569&BLDC_controller.h:56,144,147&ert_main.c:43,48"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:1328"] = "BLDC_controller.c:336,337,338,340,341,565,572&BLDC_controller.h:56,144,147&ert_main.c:43,48"; /* /r_commDCDeacv */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:1329"] = "BLDC_controller.c:551,568&BLDC_controller.h:150&ert_main.c:53"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:1329"] = "BLDC_controller.c:554,571&BLDC_controller.h:153&ert_main.c:58"; /* /z_counterRawPrev */ this.urlHashMap["BLDCmotorControl_R2017b:2687:1341"] = "BLDC_controller.c:207,259,264&BLDC_controller.h:44"; /* /Action Port */ @@ -177,9 +183,11 @@ Operator4 */ /* /Sum4 */ this.urlHashMap["BLDCmotorControl_R2017b:2687:1454"] = "BLDC_controller.c:261,269&BLDC_controller.h:45"; /* /z_counter2 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:169"] = "BLDC_controller.c:267,269,271,272,678,679&BLDC_controller.h:48"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:169"] = "BLDC_controller.c:267,269,271,272,682,683&BLDC_controller.h:48,170&ert_main.c:85"; /* /z_counter */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:1358"] = "BLDC_controller.c:681,682"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:1358"] = "BLDC_controller.c:685,686&BLDC_controller.h:169&ert_main.c:84"; + /* /Abs5 */ + this.urlHashMap["BLDCmotorControl_R2017b:2687:1672"] = "BLDC_controller.c:327,328,329,331,334"; /* /Constant1 */ this.urlHashMap["BLDCmotorControl_R2017b:2687:1637"] = "BLDC_controller.c:297,307"; /* /Constant2 */ @@ -210,15 +218,15 @@ Operator5 */ /* /Switch1 */ this.urlHashMap["BLDCmotorControl_R2017b:2687:1638"] = "BLDC_controller.c:296,306,307,309,312"; /* /UnitDelay2 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:1446"] = "BLDC_controller.c:322,324,647,648&BLDC_controller.h:40"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:1446"] = "BLDC_controller.c:322,324,650,651&BLDC_controller.h:40"; /* /cf_spdCoef */ this.urlHashMap["BLDCmotorControl_R2017b:2687:1447"] = "BLDC_controller.c:298,309&BLDC_controller.h:138&ert_main.c:33"; /* /cf_speedFilt */ this.urlHashMap["BLDCmotorControl_R2017b:2687:1448"] = "BLDC_controller.c:317,324,325&BLDC_controller.h:141&ert_main.c:38"; /* /z_maxCntRst */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:1625"] = "BLDC_controller.c:299,306"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:1625"] = "BLDC_controller.c:299,306&BLDC_controller.h:171&ert_main.c:86"; /* /Constant1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:1651:1616"] = "BLDC_controller.c:204,276,283,285"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:1651:1616"] = "BLDC_controller.c:204,276,283,285&BLDC_controller.h:172&ert_main.c:87"; /* /Constant23 */ this.urlHashMap["BLDCmotorControl_R2017b:2687:1651:1617"] = "BLDC_controller.c:205,254,263"; /* /Relational @@ -229,37 +237,37 @@ Operator1 */ /* /Switch2 */ this.urlHashMap["BLDCmotorControl_R2017b:2687:1651:1620"] = "BLDC_controller.c:211,276,277,280,282,285"; /* /UnitDelay1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:1651:1621"] = "BLDC_controller.c:213,276,278,280,641,642,674,675&BLDC_controller.h:46"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:1651:1621"] = "BLDC_controller.c:213,276,278,280,644,645,678,679&BLDC_controller.h:46,173&ert_main.c:88"; /* /Action Port */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:287"] = "BLDC_controller.c:458"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:287"] = "BLDC_controller.c:461"; /* /a_trapElecAngle_XA */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:288"] = "BLDC_controller.c:460,461,462"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:288"] = "BLDC_controller.c:463,464,465"; /* /r_trapPhaA_M1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:289"] = "BLDC_controller.c:464,465,466&BLDC_controller.h:63&BLDC_controller_data.c:29"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:289"] = "BLDC_controller.c:467,468,469&BLDC_controller.h:63&BLDC_controller_data.c:29"; /* /r_trapPhaB_M1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:290"] = "BLDC_controller.c:468,469,470&BLDC_controller.h:68&BLDC_controller_data.c:34"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:290"] = "BLDC_controller.c:471,472,473&BLDC_controller.h:68&BLDC_controller_data.c:34"; /* /r_trapPhaC_M1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:291"] = "BLDC_controller.c:472,473,474&BLDC_controller.h:73&BLDC_controller_data.c:39"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:291"] = "BLDC_controller.c:475,476,477&BLDC_controller.h:73&BLDC_controller_data.c:39"; /* /Action Port */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:307"] = "BLDC_controller.c:481"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:307"] = "BLDC_controller.c:484"; /* /a_sinElecAngle_XA */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:308"] = "BLDC_controller.c:483,484,485"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:308"] = "BLDC_controller.c:486,487,488"; /* /r_sinPhaA_M1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:309"] = "BLDC_controller.c:487,488,489&BLDC_controller.h:78&BLDC_controller_data.c:44"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:309"] = "BLDC_controller.c:490,491,492&BLDC_controller.h:78&BLDC_controller_data.c:44"; /* /r_sinPhaB_M1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:310"] = "BLDC_controller.c:491,492,493&BLDC_controller.h:83&BLDC_controller_data.c:51"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:310"] = "BLDC_controller.c:494,495,496&BLDC_controller.h:83&BLDC_controller_data.c:51"; /* /r_sinPhaC_M1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:311"] = "BLDC_controller.c:495,496,497&BLDC_controller.h:88&BLDC_controller_data.c:58"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:311"] = "BLDC_controller.c:498,499,500&BLDC_controller.h:88&BLDC_controller_data.c:58"; /* /Action Port */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:297"] = "BLDC_controller.c:504"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:297"] = "BLDC_controller.c:507"; /* /a_sinElecAngle_XA */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:298"] = "BLDC_controller.c:506,507,508"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:298"] = "BLDC_controller.c:509,510,511"; /* /r_sin3PhaA_M1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:299"] = "BLDC_controller.c:510,511,512&BLDC_controller.h:93&BLDC_controller_data.c:65"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:299"] = "BLDC_controller.c:513,514,515&BLDC_controller.h:93&BLDC_controller_data.c:65"; /* /r_sin3PhaB_M1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:300"] = "BLDC_controller.c:514,515,516&BLDC_controller.h:98&BLDC_controller_data.c:72"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:300"] = "BLDC_controller.c:517,518,519&BLDC_controller.h:98&BLDC_controller_data.c:72"; /* /r_sin3PhaC_M1 */ - this.urlHashMap["BLDCmotorControl_R2017b:2687:301"] = "BLDC_controller.c:518,519,520&BLDC_controller.h:103&BLDC_controller_data.c:79"; + this.urlHashMap["BLDCmotorControl_R2017b:2687:301"] = "BLDC_controller.c:521,522,523&BLDC_controller.h:103&BLDC_controller_data.c:79"; this.getUrlHash = function(sid) { return this.urlHashMap[sid];} } RTW_Sid2UrlHash.instance = new RTW_Sid2UrlHash(); @@ -512,6 +520,8 @@ function RTW_rtwnameSIDMap() { this.sidHashMap["BLDCmotorControl_R2017b:2687:1666"] = {rtwname: "/From17"}; this.rtwnameHashMap["/From18"] = {sid: "BLDCmotorControl_R2017b:2687:1382"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:1382"] = {rtwname: "/From18"}; + this.rtwnameHashMap["/From19"] = {sid: "BLDCmotorControl_R2017b:2687:1678"}; + this.sidHashMap["BLDCmotorControl_R2017b:2687:1678"] = {rtwname: "/From19"}; this.rtwnameHashMap["/From2"] = {sid: "BLDCmotorControl_R2017b:2687:186"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:186"] = {rtwname: "/From2"}; this.rtwnameHashMap["/From3"] = {sid: "BLDCmotorControl_R2017b:2687:187"}; @@ -538,6 +548,8 @@ function RTW_rtwnameSIDMap() { this.sidHashMap["BLDCmotorControl_R2017b:2687:197"] = {rtwname: "/Goto1"}; this.rtwnameHashMap["/Goto10"] = {sid: "BLDCmotorControl_R2017b:2687:1662"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:1662"] = {rtwname: "/Goto10"}; + this.rtwnameHashMap["/Goto11"] = {sid: "BLDCmotorControl_R2017b:2687:1677"}; + this.sidHashMap["BLDCmotorControl_R2017b:2687:1677"] = {rtwname: "/Goto11"}; this.rtwnameHashMap["/Goto16"] = {sid: "BLDCmotorControl_R2017b:2687:198"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:198"] = {rtwname: "/Goto16"}; this.rtwnameHashMap["/Goto18"] = {sid: "BLDCmotorControl_R2017b:2687:1376"}; @@ -574,6 +586,8 @@ function RTW_rtwnameSIDMap() { this.sidHashMap["BLDCmotorControl_R2017b:2687:1483"] = {rtwname: "/z_counter"}; this.rtwnameHashMap["/z_counterRaw"] = {sid: "BLDCmotorControl_R2017b:2687:1484"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:1484"] = {rtwname: "/z_counterRaw"}; + this.rtwnameHashMap["/n_motAbs"] = {sid: "BLDCmotorControl_R2017b:2687:1679"}; + this.sidHashMap["BLDCmotorControl_R2017b:2687:1679"] = {rtwname: "/n_motAbs"}; this.rtwnameHashMap["/b_advCtrlEna"] = {sid: "BLDCmotorControl_R2017b:2687:1383"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:1383"] = {rtwname: "/b_advCtrlEna"}; this.rtwnameHashMap["/n_mot "] = {sid: "BLDCmotorControl_R2017b:2687:212"}; @@ -588,6 +602,8 @@ function RTW_rtwnameSIDMap() { this.sidHashMap["BLDCmotorControl_R2017b:2687:1460"] = {rtwname: "/z_counter"}; this.rtwnameHashMap["/z_counterRaw"] = {sid: "BLDCmotorControl_R2017b:2687:1461"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:1461"] = {rtwname: "/z_counterRaw"}; + this.rtwnameHashMap["/n_motAbs"] = {sid: "BLDCmotorControl_R2017b:2687:1680"}; + this.sidHashMap["BLDCmotorControl_R2017b:2687:1680"] = {rtwname: "/n_motAbs"}; this.rtwnameHashMap["/Action Port"] = {sid: "BLDCmotorControl_R2017b:2687:221"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:221"] = {rtwname: "/Action Port"}; this.rtwnameHashMap["/Constant16"] = {sid: "BLDCmotorControl_R2017b:2687:1464"}; @@ -598,6 +614,8 @@ function RTW_rtwnameSIDMap() { this.sidHashMap["BLDCmotorControl_R2017b:2687:1466"] = {rtwname: "/Divide4"}; this.rtwnameHashMap["/Divide5"] = {sid: "BLDCmotorControl_R2017b:2687:1467"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:1467"] = {rtwname: "/Divide5"}; + this.rtwnameHashMap["/From1"] = {sid: "BLDCmotorControl_R2017b:2687:1669"}; + this.sidHashMap["BLDCmotorControl_R2017b:2687:1669"] = {rtwname: "/From1"}; this.rtwnameHashMap["/From10"] = {sid: "BLDCmotorControl_R2017b:2687:231"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:231"] = {rtwname: "/From10"}; this.rtwnameHashMap["/From11"] = {sid: "BLDCmotorControl_R2017b:2687:518"}; @@ -634,6 +652,8 @@ function RTW_rtwnameSIDMap() { this.sidHashMap["BLDCmotorControl_R2017b:2687:1462"] = {rtwname: "/Goto2"}; this.rtwnameHashMap["/Goto3"] = {sid: "BLDCmotorControl_R2017b:2687:1463"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:1463"] = {rtwname: "/Goto3"}; + this.rtwnameHashMap["/Goto4"] = {sid: "BLDCmotorControl_R2017b:2687:1681"}; + this.sidHashMap["BLDCmotorControl_R2017b:2687:1681"] = {rtwname: "/Goto4"}; this.rtwnameHashMap["/Goto5"] = {sid: "BLDCmotorControl_R2017b:2687:578"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:578"] = {rtwname: "/Goto5"}; this.rtwnameHashMap["/Goto7"] = {sid: "BLDCmotorControl_R2017b:2687:1473"}; @@ -642,6 +662,8 @@ function RTW_rtwnameSIDMap() { this.sidHashMap["BLDCmotorControl_R2017b:2687:536"] = {rtwname: "/Goto8"}; this.rtwnameHashMap["/Goto9"] = {sid: "BLDCmotorControl_R2017b:2687:538"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:538"] = {rtwname: "/Goto9"}; + this.rtwnameHashMap["/Logical Operator2"] = {sid: "BLDCmotorControl_R2017b:2687:1668"}; + this.sidHashMap["BLDCmotorControl_R2017b:2687:1668"] = {rtwname: "/Logical Operator2"}; this.rtwnameHashMap["/Math Function"] = {sid: "BLDCmotorControl_R2017b:2687:623"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:623"] = {rtwname: "/Math Function"}; this.rtwnameHashMap["/Mux"] = {sid: "BLDCmotorControl_R2017b:2687:258"}; @@ -650,6 +672,8 @@ function RTW_rtwnameSIDMap() { this.sidHashMap["BLDCmotorControl_R2017b:2687:545"] = {rtwname: "/Product2"}; this.rtwnameHashMap["/Product6"] = {sid: "BLDCmotorControl_R2017b:2687:1474"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:1474"] = {rtwname: "/Product6"}; + this.rtwnameHashMap["/Relational Operator4"] = {sid: "BLDCmotorControl_R2017b:2687:1670"}; + this.sidHashMap["BLDCmotorControl_R2017b:2687:1670"] = {rtwname: "/Relational Operator4"}; this.rtwnameHashMap["/Relational Operator7"] = {sid: "BLDCmotorControl_R2017b:2687:1475"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:1475"] = {rtwname: "/Relational Operator7"}; this.rtwnameHashMap["/Scope"] = {sid: "BLDCmotorControl_R2017b:2687:262"}; @@ -672,6 +696,8 @@ function RTW_rtwnameSIDMap() { this.sidHashMap["BLDCmotorControl_R2017b:2687:547"] = {rtwname: "/a_elecPeriod2"}; this.rtwnameHashMap["/a_phaAdv_M2"] = {sid: "BLDCmotorControl_R2017b:2687:521"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:521"] = {rtwname: "/a_phaAdv_M2"}; + this.rtwnameHashMap["/n_motPhaAdvEna"] = {sid: "BLDCmotorControl_R2017b:2687:1671"}; + this.sidHashMap["BLDCmotorControl_R2017b:2687:1671"] = {rtwname: "/n_motPhaAdvEna"}; this.rtwnameHashMap["/r_phaAdvDC_XA"] = {sid: "BLDCmotorControl_R2017b:2687:522"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:522"] = {rtwname: "/r_phaAdvDC_XA"}; this.rtwnameHashMap["/a_elecAngleAdv"] = {sid: "BLDCmotorControl_R2017b:2687:278"}; @@ -918,8 +944,6 @@ function RTW_rtwnameSIDMap() { this.sidHashMap["BLDCmotorControl_R2017b:2687:1629"] = {rtwname: "/z_dirPrev"}; this.rtwnameHashMap["/Abs2"] = {sid: "BLDCmotorControl_R2017b:2687:1366"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:1366"] = {rtwname: "/Abs2"}; - this.rtwnameHashMap["/Abs5"] = {sid: "BLDCmotorControl_R2017b:2687:1320"}; - this.sidHashMap["BLDCmotorControl_R2017b:2687:1320"] = {rtwname: "/Abs5"}; this.rtwnameHashMap["/CTRL_COMM"] = {sid: "BLDCmotorControl_R2017b:2687:1321"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:1321"] = {rtwname: "/CTRL_COMM"}; this.rtwnameHashMap["/Constant6"] = {sid: "BLDCmotorControl_R2017b:2687:64"}; @@ -952,6 +976,8 @@ function RTW_rtwnameSIDMap() { this.sidHashMap["BLDCmotorControl_R2017b:2687:1455"] = {rtwname: "/From19"}; this.rtwnameHashMap["/From2"] = {sid: "BLDCmotorControl_R2017b:2687:1361"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:1361"] = {rtwname: "/From2"}; + this.rtwnameHashMap["/From20"] = {sid: "BLDCmotorControl_R2017b:2687:1675"}; + this.sidHashMap["BLDCmotorControl_R2017b:2687:1675"] = {rtwname: "/From20"}; this.rtwnameHashMap["/From29"] = {sid: "BLDCmotorControl_R2017b:2687:1323"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:1323"] = {rtwname: "/From29"}; this.rtwnameHashMap["/From3"] = {sid: "BLDCmotorControl_R2017b:2687:1517"}; @@ -990,6 +1016,8 @@ function RTW_rtwnameSIDMap() { this.sidHashMap["BLDCmotorControl_R2017b:2687:1630"] = {rtwname: "/Goto2"}; this.rtwnameHashMap["/Goto22"] = {sid: "BLDCmotorControl_R2017b:2687:106"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:106"] = {rtwname: "/Goto22"}; + this.rtwnameHashMap["/Goto3"] = {sid: "BLDCmotorControl_R2017b:2687:1674"}; + this.sidHashMap["BLDCmotorControl_R2017b:2687:1674"] = {rtwname: "/Goto3"}; this.rtwnameHashMap["/Goto5"] = {sid: "BLDCmotorControl_R2017b:2687:786"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:786"] = {rtwname: "/Goto5"}; this.rtwnameHashMap["/Goto6"] = {sid: "BLDCmotorControl_R2017b:2687:1400"}; @@ -1034,6 +1062,8 @@ function RTW_rtwnameSIDMap() { this.sidHashMap["BLDCmotorControl_R2017b:2687:1651"] = {rtwname: "/rst_DelayLim"}; this.rtwnameHashMap["/n_mot"] = {sid: "BLDCmotorControl_R2017b:2687:173"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:173"] = {rtwname: "/n_mot"}; + this.rtwnameHashMap["/n_motAbs"] = {sid: "BLDCmotorControl_R2017b:2687:1676"}; + this.sidHashMap["BLDCmotorControl_R2017b:2687:1676"] = {rtwname: "/n_motAbs"}; this.rtwnameHashMap["/b_advCtrlEna"] = {sid: "BLDCmotorControl_R2017b:2687:1381"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:1381"] = {rtwname: "/b_advCtrlEna"}; this.rtwnameHashMap["/z_counter"] = {sid: "BLDCmotorControl_R2017b:2687:1487"}; @@ -1060,6 +1090,8 @@ function RTW_rtwnameSIDMap() { this.sidHashMap["BLDCmotorControl_R2017b:2687:1430"] = {rtwname: "/z_counter"}; this.rtwnameHashMap["/z_counterRaw"] = {sid: "BLDCmotorControl_R2017b:2687:1639"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:1639"] = {rtwname: "/z_counterRaw"}; + this.rtwnameHashMap["/Abs5"] = {sid: "BLDCmotorControl_R2017b:2687:1672"}; + this.sidHashMap["BLDCmotorControl_R2017b:2687:1672"] = {rtwname: "/Abs5"}; this.rtwnameHashMap["/Constant1"] = {sid: "BLDCmotorControl_R2017b:2687:1637"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:1637"] = {rtwname: "/Constant1"}; this.rtwnameHashMap["/Constant2"] = {sid: "BLDCmotorControl_R2017b:2687:1433"}; @@ -1120,6 +1152,8 @@ function RTW_rtwnameSIDMap() { this.sidHashMap["BLDCmotorControl_R2017b:2687:1450"] = {rtwname: "/n_motRaw"}; this.rtwnameHashMap["/n_mot"] = {sid: "BLDCmotorControl_R2017b:2687:1451"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:1451"] = {rtwname: "/n_mot"}; + this.rtwnameHashMap["/n_motAbs"] = {sid: "BLDCmotorControl_R2017b:2687:1673"}; + this.sidHashMap["BLDCmotorControl_R2017b:2687:1673"] = {rtwname: "/n_motAbs"}; this.rtwnameHashMap["/u"] = {sid: "BLDCmotorControl_R2017b:2687:1651:1614"}; this.sidHashMap["BLDCmotorControl_R2017b:2687:1651:1614"] = {rtwname: "/u"}; this.rtwnameHashMap["/rst"] = {sid: "BLDCmotorControl_R2017b:2687:1651:1615"}; diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/codeMetrics.mat b/01_Matlab/BLDC_controller_ert_rtw/html/codeMetrics.mat index 6a9bd0f..3420198 100644 Binary files a/01_Matlab/BLDC_controller_ert_rtw/html/codeMetrics.mat and b/01_Matlab/BLDC_controller_ert_rtw/html/codeMetrics.mat differ diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/define.js b/01_Matlab/BLDC_controller_ert_rtw/html/define.js index bba83e1..7a7882d 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/define.js +++ b/01_Matlab/BLDC_controller_ert_rtw/html/define.js @@ -3,22 +3,22 @@ this.def = new Array(); this.def["rtM_"] = {file: "ert_main_c.html",line:29,type:"var"}; this.def["rtMPtr"] = {file: "ert_main_c.html",line:30,type:"var"}; this.def["rtP"] = {file: "ert_main_c.html",line:31,type:"var"}; -this.def["rtDW"] = {file: "ert_main_c.html",line:88,type:"var"}; -this.def["rtU"] = {file: "ert_main_c.html",line:89,type:"var"}; -this.def["rtY"] = {file: "ert_main_c.html",line:90,type:"var"}; -this.def["rt_OneStep"] = {file: "ert_main_c.html",line:104,type:"fcn"}; -this.def["main"] = {file: "ert_main_c.html",line:140,type:"fcn"}; +this.def["rtDW"] = {file: "ert_main_c.html",line:103,type:"var"}; +this.def["rtU"] = {file: "ert_main_c.html",line:104,type:"var"}; +this.def["rtY"] = {file: "ert_main_c.html",line:105,type:"var"}; +this.def["rt_OneStep"] = {file: "ert_main_c.html",line:119,type:"fcn"}; +this.def["main"] = {file: "ert_main_c.html",line:155,type:"fcn"}; this.def["plook_u8s32u32n31_evenc_s"] = {file: "BLDC_controller_c.html",line:93,type:"fcn"}; this.def["intrp1d_s16s32s32u8u32n31l_s"] = {file: "BLDC_controller_c.html",line:127,type:"fcn"}; this.def["div_nde_s32_floor"] = {file: "BLDC_controller_c.html",line:143,type:"fcn"}; this.def["BLDC_controller_step"] = {file: "BLDC_controller_c.html",line:150,type:"fcn"}; -this.def["BLDC_controller_initialize"] = {file: "BLDC_controller_c.html",line:663,type:"fcn"}; +this.def["BLDC_controller_initialize"] = {file: "BLDC_controller_c.html",line:666,type:"fcn"}; this.def["RT_MODEL"] = {file: "BLDC_controller_h.html",line:35,type:"type"}; this.def["DW"] = {file: "BLDC_controller_h.html",line:58,type:"type"}; this.def["ConstP"] = {file: "BLDC_controller_h.html",line:116,type:"type"}; this.def["ExtU"] = {file: "BLDC_controller_h.html",line:124,type:"type"}; this.def["ExtY"] = {file: "BLDC_controller_h.html",line:133,type:"type"}; -this.def["P"] = {file: "BLDC_controller_h.html",line:173,type:"type"}; +this.def["P"] = {file: "BLDC_controller_h.html",line:184,type:"type"}; this.def["rtConstP"] = {file: "BLDC_controller_data_c.html",line:27,type:"var"}; this.def["int8_T"] = {file: "rtwtypes_h.html",line:55,type:"type"}; this.def["uint8_T"] = {file: "rtwtypes_h.html",line:56,type:"type"}; diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/ert_main_c.html b/01_Matlab/BLDC_controller_ert_rtw/html/ert_main_c.html index 334e3ec..393a5c1 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/ert_main_c.html +++ b/01_Matlab/BLDC_controller_ert_rtw/html/ert_main_c.html @@ -21,9 +21,9 @@ 7 * 8 * Code generated for Simulink model 'BLDC_controller'. 9 * - 10 * Model version : 1.879 + 10 * Model version : 1.883 11 * Simulink Coder version : 8.13 (R2017b) 24-Jul-2017 - 12 * C/C++ source code generated on : Thu Jun 6 22:50:24 2019 + 12 * C/C++ source code generated on : Tue Jun 11 21:14:57 2019 13 * 14 * Target selection: ert.tlc 15 * Embedded hardware selection: ARM Compatible->ARM Cortex @@ -63,142 +63,157 @@ 49 */ 50 30, 51 - 52 /* Variable: r_commDCDeacv - 53 * Referenced by: '<S14>/r_commDCDeacv' + 52 /* Variable: n_motPhaAdvEna + 53 * Referenced by: '<S8>/n_motPhaAdvEna' 54 */ - 55 70, + 55 400, 56 - 57 /* Variable: r_phaAdvDC_XA - 58 * Referenced by: '<S8>/r_phaAdvDC_XA' + 57 /* Variable: r_commDCDeacv + 58 * Referenced by: '<S14>/r_commDCDeacv' 59 */ - 60 { 0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000 }, + 60 70, 61 - 62 /* Variable: a_phaAdv_M1 - 63 * Referenced by: '<S8>/a_phaAdv_M2' + 62 /* Variable: r_phaAdvDC_XA + 63 * Referenced by: '<S8>/r_phaAdvDC_XA' 64 */ - 65 { 0, 0, 0, 0, 0, 2, 3, 5, 9, 16, 25 }, + 65 { 0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000 }, 66 - 67 /* Variable: dz_counterHi - 68 * Referenced by: '<S14>/dz_counter' + 67 /* Variable: a_phaAdv_M1 + 68 * Referenced by: '<S8>/a_phaAdv_M2' 69 */ - 70 50, + 70 { 0, 0, 0, 0, 0, 2, 3, 5, 9, 16, 25 }, 71 - 72 /* Variable: dz_counterLo + 72 /* Variable: dz_counterHi 73 * Referenced by: '<S14>/dz_counter' 74 */ - 75 20, + 75 50, 76 - 77 /* Variable: z_ctrlTypSel - 78 * Referenced by: '<S7>/z_ctrlTypSel1' + 77 /* Variable: dz_counterLo + 78 * Referenced by: '<S14>/dz_counter' 79 */ - 80 3U, + 80 20, 81 - 82 /* Variable: b_phaAdvEna - 83 * Referenced by: '<S8>/a_elecPeriod1' - 84 */ - 85 1 - 86 }; /* Modifiable parameters */ - 87 - 88 static DW rtDW; /* Observable states */ - 89 static ExtU rtU; /* External inputs */ - 90 static ExtY rtY; /* External outputs */ + 82 /* Variable: z_maxCntRst + 83 * Referenced by: + 84 * '<S15>/z_counter' + 85 * '<S15>/z_counter2' + 86 * '<S16>/z_maxCntRst' + 87 * '<S17>/Constant1' + 88 * '<S17>/UnitDelay1' + 89 */ + 90 1500, 91 - 92 /* - 93 * Associating rt_OneStep with a real-time clock or interrupt service routine - 94 * is what makes the generated code "real-time". The function rt_OneStep is - 95 * always associated with the base rate of the model. Subrates are managed - 96 * by the base rate from inside the generated code. Enabling/disabling - 97 * interrupts and floating point context switches are target specific. This - 98 * example code indicates where these should take place relative to executing - 99 * the generated code step function. Overrun behavior should be tailored to - 100 * your application needs. This example simply sets an error status in the - 101 * real-time model and returns from rt_OneStep. - 102 */ - 103 void rt_OneStep(RT_MODEL *const rtM); - 104 void rt_OneStep(RT_MODEL *const rtM) - 105 { - 106 static boolean_T OverrunFlag = false; - 107 - 108 /* Disable interrupts here */ - 109 - 110 /* Check for overrun */ - 111 if (OverrunFlag) { - 112 return; - 113 } - 114 - 115 OverrunFlag = true; - 116 - 117 /* Save FPU context here (if necessary) */ - 118 /* Re-enable timer or interrupt here */ - 119 /* Set model inputs here */ - 120 - 121 /* Step the model */ - 122 BLDC_controller_step(rtM); - 123 - 124 /* Get model outputs here */ - 125 - 126 /* Indicate task complete */ - 127 OverrunFlag = false; - 128 - 129 /* Disable interrupts here */ - 130 /* Restore FPU context here (if necessary) */ - 131 /* Enable interrupts here */ - 132 } - 133 - 134 /* - 135 * The example "main" function illustrates what is required by your - 136 * application code to initialize, execute, and terminate the generated code. - 137 * Attaching rt_OneStep to a real-time clock is target specific. This example - 138 * illustrates how you do this relative to initializing the model. - 139 */ - 140 int_T main(int_T argc, const char *argv[]) - 141 { - 142 RT_MODEL *const rtM = rtMPtr; + 92 /* Variable: z_ctrlTypSel + 93 * Referenced by: '<S7>/z_ctrlTypSel1' + 94 */ + 95 3U, + 96 + 97 /* Variable: b_phaAdvEna + 98 * Referenced by: '<S8>/a_elecPeriod1' + 99 */ + 100 1 + 101 }; /* Modifiable parameters */ + 102 + 103 static DW rtDW; /* Observable states */ + 104 static ExtU rtU; /* External inputs */ + 105 static ExtY rtY; /* External outputs */ + 106 + 107 /* + 108 * Associating rt_OneStep with a real-time clock or interrupt service routine + 109 * is what makes the generated code "real-time". The function rt_OneStep is + 110 * always associated with the base rate of the model. Subrates are managed + 111 * by the base rate from inside the generated code. Enabling/disabling + 112 * interrupts and floating point context switches are target specific. This + 113 * example code indicates where these should take place relative to executing + 114 * the generated code step function. Overrun behavior should be tailored to + 115 * your application needs. This example simply sets an error status in the + 116 * real-time model and returns from rt_OneStep. + 117 */ + 118 void rt_OneStep(RT_MODEL *const rtM); + 119 void rt_OneStep(RT_MODEL *const rtM) + 120 { + 121 static boolean_T OverrunFlag = false; + 122 + 123 /* Disable interrupts here */ + 124 + 125 /* Check for overrun */ + 126 if (OverrunFlag) { + 127 return; + 128 } + 129 + 130 OverrunFlag = true; + 131 + 132 /* Save FPU context here (if necessary) */ + 133 /* Re-enable timer or interrupt here */ + 134 /* Set model inputs here */ + 135 + 136 /* Step the model */ + 137 BLDC_controller_step(rtM); + 138 + 139 /* Get model outputs here */ + 140 + 141 /* Indicate task complete */ + 142 OverrunFlag = false; 143 - 144 /* Unused arguments */ - 145 (void)(argc); - 146 (void)(argv); - 147 - 148 /* Pack model data into RTM */ - 149 rtM->defaultParam = &rtP; - 150 rtM->dwork = &rtDW; - 151 rtM->inputs = &rtU; - 152 rtM->outputs = &rtY; - 153 - 154 /* Initialize model */ - 155 BLDC_controller_initialize(rtM); - 156 - 157 /* Attach rt_OneStep to a timer or interrupt service routine with - 158 * period 6.0E-5 seconds (the model's base sample time) here. The - 159 * call syntax for rt_OneStep is - 160 * - 161 * rt_OneStep(rtM); - 162 */ - 163 printf("Warning: The simulation will run forever. " - 164 "Generated ERT main won't simulate model step behavior. " - 165 "To change this behavior select the 'MAT-file logging' option.\n"); - 166 fflush((NULL)); - 167 while (1) { - 168 /* Perform other application tasks here */ - 169 } - 170 - 171 /* The option 'Remove error status field in real-time model data structure' - 172 * is selected, therefore the following code does not need to execute. - 173 */ - 174 #if 0 - 175 - 176 /* Disable rt_OneStep() here */ - 177 #endif - 178 - 179 return 0; - 180 } - 181 - 182 /* - 183 * File trailer for generated code. - 184 * - 185 * [EOF] - 186 */ - 187 + 144 /* Disable interrupts here */ + 145 /* Restore FPU context here (if necessary) */ + 146 /* Enable interrupts here */ + 147 } + 148 + 149 /* + 150 * The example "main" function illustrates what is required by your + 151 * application code to initialize, execute, and terminate the generated code. + 152 * Attaching rt_OneStep to a real-time clock is target specific. This example + 153 * illustrates how you do this relative to initializing the model. + 154 */ + 155 int_T main(int_T argc, const char *argv[]) + 156 { + 157 RT_MODEL *const rtM = rtMPtr; + 158 + 159 /* Unused arguments */ + 160 (void)(argc); + 161 (void)(argv); + 162 + 163 /* Pack model data into RTM */ + 164 rtM->defaultParam = &rtP; + 165 rtM->dwork = &rtDW; + 166 rtM->inputs = &rtU; + 167 rtM->outputs = &rtY; + 168 + 169 /* Initialize model */ + 170 BLDC_controller_initialize(rtM); + 171 + 172 /* Attach rt_OneStep to a timer or interrupt service routine with + 173 * period 6.0E-5 seconds (the model's base sample time) here. The + 174 * call syntax for rt_OneStep is + 175 * + 176 * rt_OneStep(rtM); + 177 */ + 178 printf("Warning: The simulation will run forever. " + 179 "Generated ERT main won't simulate model step behavior. " + 180 "To change this behavior select the 'MAT-file logging' option.\n"); + 181 fflush((NULL)); + 182 while (1) { + 183 /* Perform other application tasks here */ + 184 } + 185 + 186 /* The option 'Remove error status field in real-time model data structure' + 187 * is selected, therefore the following code does not need to execute. + 188 */ + 189 #if 0 + 190 + 191 /* Disable rt_OneStep() here */ + 192 #endif + 193 + 194 return 0; + 195 } + 196 + 197 /* + 198 * File trailer for generated code. + 199 * + 200 * [EOF] + 201 */ + 202

diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/metrics.js b/01_Matlab/BLDC_controller_ert_rtw/html/metrics.js index 7f91f8d..e14989a 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/metrics.js +++ b/01_Matlab/BLDC_controller_ert_rtw/html/metrics.js @@ -3,8 +3,8 @@ function CodeMetrics() { this.metricsArray.var = new Array(); this.metricsArray.fcn = new Array(); this.metricsArray.fcn["BLDC_controller_initialize"] = {file: "D:\\git\\hoverboard-firmware-hack\\01_Matlab\\BLDC_controller_ert_rtw\\BLDC_controller.c", - stack: 8, - stackTotal: 8}; + stack: 16, + stackTotal: 16}; this.metricsArray.fcn["BLDC_controller_step"] = {file: "D:\\git\\hoverboard-firmware-hack\\01_Matlab\\BLDC_controller_ert_rtw\\BLDC_controller.c", stack: 60, stackTotal: 69}; diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/rtwtypes_h.html b/01_Matlab/BLDC_controller_ert_rtw/html/rtwtypes_h.html index 3be57e4..bed0437 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/rtwtypes_h.html +++ b/01_Matlab/BLDC_controller_ert_rtw/html/rtwtypes_h.html @@ -21,9 +21,9 @@ 7 * 8 * Code generated for Simulink model 'BLDC_controller'. 9 * - 10 * Model version : 1.879 + 10 * Model version : 1.883 11 * Simulink Coder version : 8.13 (R2017b) 24-Jul-2017 - 12 * C/C++ source code generated on : Thu Jun 6 22:50:24 2019 + 12 * C/C++ source code generated on : Tue Jun 11 21:14:57 2019 13 * 14 * Target selection: ert.tlc 15 * Embedded hardware selection: ARM Compatible->ARM Cortex diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/traceInfo.mat b/01_Matlab/BLDC_controller_ert_rtw/html/traceInfo.mat index 550ff60..5417177 100644 Binary files a/01_Matlab/BLDC_controller_ert_rtw/html/traceInfo.mat and b/01_Matlab/BLDC_controller_ert_rtw/html/traceInfo.mat differ diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_1828_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_1828_d.svg index 7acc3b4..79d0e8e 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_1828_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_1828_d.svg @@ -174,5 +174,5 @@ - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_1831_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_1831_d.svg index 1f66b1a..f36c97c 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_1831_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_1831_d.svg @@ -174,5 +174,5 @@ - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_1834_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_1834_d.svg index 8b5fb81..3338858 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_1834_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_1834_d.svg @@ -174,5 +174,5 @@ - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_1837_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_1837_d.svg index 947207e..f3d331a 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_1837_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_1837_d.svg @@ -174,5 +174,5 @@ - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_10_d.json b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_10_d.json index 8f64902..64d3777 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_10_d.json +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_10_d.json @@ -513,39 +513,87 @@ "parent":"BLDCmotorControl_R2017b:2687:10", "inspector":{ "params":[ + "NumberOfDimensions", "IndexMode", "IndexOptionArray", - "IndexOptions", "IndexParamArray", - "Indices", - "InputPortWidth", - "NumberOfDimensions", "OutputSizeArray", - "OutputSizes", - "SampleTime" + "InputPortWidth", + "SampleTime", + "IndexOptions", + "NumberOfDimensions", + "IndexMode", + "IndexOptionArray", + "IndexParamArray", + "OutputSizeArray", + "InputPortWidth", + "SampleTime", + "IndexOptions", + "NumberOfDimensions", + "IndexMode", + "IndexOptionArray", + "IndexParamArray", + "OutputSizeArray", + "InputPortWidth", + "SampleTime", + "IndexOptions", + "Indices", + "OutputSizes" ], "values":[ + "1", "Zero-based", [ "Index vector (port)" ], - "Index vector (port)", [ "[1 3]" ], - "[1 3]", - "length(vec_hallToPos)", - "1", [ "1" ], + "length(vec_hallToPos)", + "-1", + "Index vector (port)", "1", - "-1" + "Zero-based", + [ + "Index vector (port)" + ], + [ + "[1 3]" + ], + [ + "1" + ], + "length(vec_hallToPos)", + "-1", + "Index vector (port)", + "1", + "Zero-based", + [ + "Index vector (port)" + ], + [ + "[1 3]" + ], + [ + "1" + ], + "length(vec_hallToPos)", + "-1", + "Index vector (port)", + "[1 3]", + "1" ], "tabs":[ - "Parameter Attributes" + "Parameter Attributes", + "-Other" ], - "tabs_idx":0 + "tabs_idx":[ + 0, + 24 + ] }, "viewer":{ "jshandler":"webview/handlers/ElementHandler" diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_10_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_10_d.svg index bcd1264..b206aa9 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_10_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_10_d.svg @@ -700,5 +700,5 @@ - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1340_d.json b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1340_d.json index 7b4b197..9cd26aa 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1340_d.json +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1340_d.json @@ -79,6 +79,142 @@ "masktype":"" } }, + { + "sid":"BLDCmotorControl_R2017b:2687:169", + "className":"Simulink.UnitDelay", + "icon":"WebViewIcon2", + "name":"z_counter2", + "label":"z_counter2", + "parent":"BLDCmotorControl_R2017b:2687:1340", + "inspector":{ + "params":[ + "InitialCondition", + "InputProcessing", + "SampleTime", + "CodeGenStateStorageTypeQualifier", + "StateMustResolveToSignalObject", + "StateName", + "StateSignalObject", + "StateStorageClass" + ], + "values":[ + "z_maxCntRst", + "Elements as channels (sample based)", + "-1", + "", + "off", + "", + [ + ], + "Auto" + ], + "tabs":[ + "Main", + "-Other" + ], + "tabs_idx":[ + 0, + 3 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"UnitDelay", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1454", + "className":"Simulink.Sum", + "icon":"WebViewIcon2", + "name":"Sum4", + "label":"Sum4", + "parent":"BLDCmotorControl_R2017b:2687:1340", + "inspector":{ + "params":[ + "AccumDataTypeStr", + "OutDataTypeStr", + "CollapseDim", + "CollapseMode", + "IconShape", + "InputSameDT", + "Inputs", + "LockScale", + "OutMax", + "OutMin", + "RndMeth", + "SampleTime", + "SaturateOnIntegerOverflow" + ], + "values":[ + "Inherit: Same as first input", + "Inherit: Same as first input", + "1", + "All dimensions", + "rectangular", + "on", + "+-", + "off", + "[]", + "[]", + "Simplest", + "-1", + "off" + ], + "tabs":[ + "Signal Attributes", + "-Other" + ], + "tabs_idx":[ + 0, + 2 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Sum", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1344", + "className":"Simulink.ActionPort", + "icon":"WebViewIcon2", + "name":"Action Port", + "label":"Action Port", + "parent":"BLDCmotorControl_R2017b:2687:1340", + "inspector":{ + "params":[ + "InitializeStates", + "PropagateVarSize" + ], + "values":[ + "held", + "Only when execution is resumed" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"ActionPort", + "masktype":"" + } + }, { "sid":"BLDCmotorControl_R2017b:2687:1358", "className":"Simulink.Outport", @@ -159,85 +295,6 @@ "masktype":"" } }, - { - "sid":"BLDCmotorControl_R2017b:2687:169", - "className":"Simulink.UnitDelay", - "icon":"WebViewIcon2", - "name":"z_counter2", - "label":"z_counter2", - "parent":"BLDCmotorControl_R2017b:2687:1340", - "inspector":{ - "params":[ - "InitialCondition", - "InputProcessing", - "SampleTime", - "CodeGenStateStorageTypeQualifier", - "StateMustResolveToSignalObject", - "StateName", - "StateSignalObject", - "StateStorageClass" - ], - "values":[ - "z_maxCntRst", - "Elements as channels (sample based)", - "-1", - "", - "off", - "", - [ - ], - "Auto" - ], - "tabs":[ - "Main", - "-Other" - ], - "tabs_idx":[ - 0, - 3 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"UnitDelay", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1344", - "className":"Simulink.ActionPort", - "icon":"WebViewIcon2", - "name":"Action Port", - "label":"Action Port", - "parent":"BLDCmotorControl_R2017b:2687:1340", - "inspector":{ - "params":[ - "InitializeStates", - "PropagateVarSize" - ], - "values":[ - "held", - "Only when execution is resumed" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"ActionPort", - "masktype":"" - } - }, { "sid":"BLDCmotorControl_R2017b:2687:1341", "className":"Simulink.Inport", @@ -305,63 +362,6 @@ "masktype":"" } }, - { - "sid":"BLDCmotorControl_R2017b:2687:1454", - "className":"Simulink.Sum", - "icon":"WebViewIcon2", - "name":"Sum4", - "label":"Sum4", - "parent":"BLDCmotorControl_R2017b:2687:1340", - "inspector":{ - "params":[ - "AccumDataTypeStr", - "OutDataTypeStr", - "CollapseDim", - "CollapseMode", - "IconShape", - "InputSameDT", - "Inputs", - "LockScale", - "OutMax", - "OutMin", - "RndMeth", - "SampleTime", - "SaturateOnIntegerOverflow" - ], - "values":[ - "Inherit: Same as first input", - "Inherit: Same as first input", - "1", - "All dimensions", - "rectangular", - "on", - "+-", - "off", - "[]", - "[]", - "Simplest", - "-1", - "off" - ], - "tabs":[ - "Signal Attributes", - "-Other" - ], - "tabs_idx":[ - 0, - 2 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Sum", - "masktype":"" - } - }, { "sid":"BLDCmotorControl_R2017b:2687:1341#out:1", "className":"Simulink.Line", diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1340_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1340_d.svg index 628c614..241096a 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1340_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1340_d.svg @@ -59,54 +59,6 @@ - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - - z_counter - - - - - - - - @@ -119,35 +71,35 @@ - + - + - + - + - + - + - + - + @@ -173,122 +125,11 @@ - + - - int16 - - - - - - - - - - - - - - - - - - - - - - - - - - if { } - - - - - - - - - - - - - - - - - - - - - - Action Port - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - - z_counterRawPrev - - - - - - - - - - - - - - + int16 @@ -310,27 +151,27 @@ - + - + - + - + - + - + @@ -348,11 +189,170 @@ - + - + + int16 + + + + + + + + + + + + + + + + + + + + + + + + + + if { } + + + + + + + + + + + + + + + + + + + + + + Action Port + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + z_counter + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + z_counterRawPrev + + + + + + + + + + + + + + int16 @@ -446,5 +446,5 @@ - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1401_d.json b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1401_d.json index 2ff71bb..d208397 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1401_d.json +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1401_d.json @@ -448,6 +448,344 @@ "masktype":"" } }, + { + "sid":"BLDCmotorControl_R2017b:2687:1673", + "className":"Simulink.Outport", + "icon":"WebViewIcon2", + "name":"n_motAbs", + "label":"n_motAbs", + "parent":"BLDCmotorControl_R2017b:2687:1401", + "inspector":{ + "params":[ + "Port", + "IconDisplay", + "OutMin", + "OutMax", + "OutDataTypeStr", + "LockScale", + "Unit", + "PortDimensions", + "VarSizeSig", + "SampleTime", + "SignalType", + "BusOutputAsStruct", + "EnsureOutportIsVirtual", + "InitialOutput", + "MustResolveToSignalObject", + "OutputWhenDisabled", + "OutputWhenUnConnected", + "OutputWhenUnconnectedValue", + "SignalName", + "SignalObject", + "SourceOfInitialOutputValue", + "StorageClass", + "VectorParamsAs1DForOutWhenUnconnected" + ], + "values":[ + "3", + "Port number", + "[]", + "[]", + "Inherit: auto", + "off", + "inherit", + "-1", + "Inherit", + "-1", + "auto", + "off", + "off", + "[]", + "off", + "held", + "off", + "0", + "", + [ + ], + "Dialog", + "Auto", + "off" + ], + "tabs":[ + "Main", + "Signal Attributes", + "-Other" + ], + "tabs_idx":[ + 0, + 2, + 11 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Outport", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1625", + "className":"Simulink.Constant", + "icon":"WebViewIcon2", + "name":"z_maxCntRst", + "label":"z_maxCntRst", + "parent":"BLDCmotorControl_R2017b:2687:1401", + "inspector":{ + "params":[ + "Value", + "OutDataTypeStr", + "FramePeriod", + "LockScale", + "OutMax", + "OutMin", + "SampleTime", + "VectorParams1D" + ], + "values":[ + "z_maxCntRst", + "Inherit: Inherit via back propagation", + "inf", + "off", + "[]", + "[]", + "inf", + "on" + ], + "tabs":[ + "Main", + "Signal Attributes", + "-Other" + ], + "tabs_idx":[ + 0, + 1, + 2 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Constant", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1448", + "className":"Simulink.Constant", + "icon":"WebViewIcon2", + "name":"cf_speedFilt", + "label":"cf_speedFilt", + "parent":"BLDCmotorControl_R2017b:2687:1401", + "inspector":{ + "params":[ + "Value", + "OutDataTypeStr", + "FramePeriod", + "LockScale", + "OutMax", + "OutMin", + "SampleTime", + "VectorParams1D" + ], + "values":[ + "cf_speedFilt", + "int32", + "inf", + "off", + "[]", + "[]", + "inf", + "on" + ], + "tabs":[ + "Main", + "Signal Attributes", + "-Other" + ], + "tabs_idx":[ + 0, + 1, + 2 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Constant", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1638", + "className":"Simulink.Switch", + "icon":"WebViewIcon2", + "name":"Switch1", + "label":"Switch1", + "parent":"BLDCmotorControl_R2017b:2687:1401", + "inspector":{ + "params":[ + "OutDataTypeStr", + "AllowDiffInputSizes", + "Criteria", + "InputSameDT", + "LockScale", + "OutMax", + "OutMin", + "RndMeth", + "SampleTime", + "SaturateOnIntegerOverflow", + "Threshold", + "ZeroCross" + ], + "values":[ + "Inherit: Inherit via back propagation", + "off", + "u2 ~= 0", + "off", + "off", + "[]", + "[]", + "Zero", + "-1", + "off", + "0", + "on" + ], + "tabs":[ + "Signal Attributes", + "-Other" + ], + "tabs_idx":[ + 0, + 1 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Switch", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1446", + "className":"Simulink.UnitDelay", + "icon":"WebViewIcon2", + "name":"UnitDelay2", + "label":"UnitDelay2", + "parent":"BLDCmotorControl_R2017b:2687:1401", + "inspector":{ + "params":[ + "InitialCondition", + "InputProcessing", + "SampleTime", + "CodeGenStateStorageTypeQualifier", + "StateMustResolveToSignalObject", + "StateName", + "StateSignalObject", + "StateStorageClass" + ], + "values":[ + "0", + "Elements as channels (sample based)", + "-1", + "", + "off", + "", + [ + ], + "Auto" + ], + "tabs":[ + "Main", + "-Other" + ], + "tabs_idx":[ + 0, + 3 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"UnitDelay", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1444", + "className":"Simulink.Sum", + "icon":"WebViewIcon2", + "name":"Sum2", + "label":"Sum2", + "parent":"BLDCmotorControl_R2017b:2687:1401", + "inspector":{ + "params":[ + "AccumDataTypeStr", + "OutDataTypeStr", + "CollapseDim", + "CollapseMode", + "IconShape", + "InputSameDT", + "Inputs", + "LockScale", + "OutMax", + "OutMin", + "RndMeth", + "SampleTime", + "SaturateOnIntegerOverflow" + ], + "values":[ + "Inherit: Same as first input", + "Inherit: Same as first input", + "1", + "All dimensions", + "rectangular", + "on", + "+-", + "off", + "[]", + "[]", + "Simplest", + "-1", + "off" + ], + "tabs":[ + "Signal Attributes", + "-Other" + ], + "tabs_idx":[ + 0, + 2 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Sum", + "masktype":"" + } + }, { "sid":"BLDCmotorControl_R2017b:2687:1450", "className":"Simulink.Outport", @@ -529,43 +867,27 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:1448", - "className":"Simulink.Constant", + "sid":"BLDCmotorControl_R2017b:2687:1650", + "className":"Simulink.Goto", "icon":"WebViewIcon2", - "name":"cf_speedFilt", - "label":"cf_speedFilt", + "name":"Goto3", + "label":"Goto3", "parent":"BLDCmotorControl_R2017b:2687:1401", "inspector":{ "params":[ - "Value", - "OutDataTypeStr", - "FramePeriod", - "LockScale", - "OutMax", - "OutMin", - "SampleTime", - "VectorParams1D" + "GotoTag", + "TagVisibility", + "IconDisplay" ], "values":[ - "cf_speedFilt", - "int32", - "inf", - "off", - "[]", - "[]", - "inf", - "on" + "z_counterRaw", + "local", + "Tag" ], "tabs":[ - "Main", - "Signal Attributes", - "-Other" + "Parameter Attributes" ], - "tabs_idx":[ - 0, - 1, - 2 - ] + "tabs_idx":0 }, "viewer":{ "jshandler":"webview/handlers/ElementHandler" @@ -573,224 +895,7 @@ "obj_viewer":[ ], "finder":{ - "blocktype":"Constant", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1446", - "className":"Simulink.UnitDelay", - "icon":"WebViewIcon2", - "name":"UnitDelay2", - "label":"UnitDelay2", - "parent":"BLDCmotorControl_R2017b:2687:1401", - "inspector":{ - "params":[ - "InitialCondition", - "InputProcessing", - "SampleTime", - "CodeGenStateStorageTypeQualifier", - "StateMustResolveToSignalObject", - "StateName", - "StateSignalObject", - "StateStorageClass" - ], - "values":[ - "0", - "Elements as channels (sample based)", - "-1", - "", - "off", - "", - [ - ], - "Auto" - ], - "tabs":[ - "Main", - "-Other" - ], - "tabs_idx":[ - 0, - 3 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"UnitDelay", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1638", - "className":"Simulink.Switch", - "icon":"WebViewIcon2", - "name":"Switch1", - "label":"Switch1", - "parent":"BLDCmotorControl_R2017b:2687:1401", - "inspector":{ - "params":[ - "OutDataTypeStr", - "AllowDiffInputSizes", - "Criteria", - "InputSameDT", - "LockScale", - "OutMax", - "OutMin", - "RndMeth", - "SampleTime", - "SaturateOnIntegerOverflow", - "Threshold", - "ZeroCross" - ], - "values":[ - "Inherit: Inherit via back propagation", - "off", - "u2 ~= 0", - "off", - "off", - "[]", - "[]", - "Zero", - "-1", - "off", - "0", - "on" - ], - "tabs":[ - "Signal Attributes", - "-Other" - ], - "tabs_idx":[ - 0, - 1 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Switch", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1444", - "className":"Simulink.Sum", - "icon":"WebViewIcon2", - "name":"Sum2", - "label":"Sum2", - "parent":"BLDCmotorControl_R2017b:2687:1401", - "inspector":{ - "params":[ - "AccumDataTypeStr", - "OutDataTypeStr", - "CollapseDim", - "CollapseMode", - "IconShape", - "InputSameDT", - "Inputs", - "LockScale", - "OutMax", - "OutMin", - "RndMeth", - "SampleTime", - "SaturateOnIntegerOverflow" - ], - "values":[ - "Inherit: Same as first input", - "Inherit: Same as first input", - "1", - "All dimensions", - "rectangular", - "on", - "+-", - "off", - "[]", - "[]", - "Simplest", - "-1", - "off" - ], - "tabs":[ - "Signal Attributes", - "-Other" - ], - "tabs_idx":[ - 0, - 2 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Sum", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1443", - "className":"Simulink.Sum", - "icon":"WebViewIcon2", - "name":"Sum1", - "label":"Sum1", - "parent":"BLDCmotorControl_R2017b:2687:1401", - "inspector":{ - "params":[ - "AccumDataTypeStr", - "OutDataTypeStr", - "CollapseDim", - "CollapseMode", - "IconShape", - "InputSameDT", - "Inputs", - "LockScale", - "OutMax", - "OutMin", - "RndMeth", - "SampleTime", - "SaturateOnIntegerOverflow" - ], - "values":[ - "Inherit: Same as first input", - "Inherit: Same as first input", - "1", - "All dimensions", - "rectangular", - "on", - "++", - "off", - "[]", - "[]", - "Simplest", - "-1", - "off" - ], - "tabs":[ - "Signal Attributes", - "-Other" - ], - "tabs_idx":[ - 0, - 2 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Sum", + "blocktype":"Goto", "masktype":"" } }, @@ -861,37 +966,25 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:1624", - "className":"Simulink.RelationalOperator", + "sid":"BLDCmotorControl_R2017b:2687:1645", + "className":"Simulink.From", "icon":"WebViewIcon2", - "name":"Relational Operator2", - "label":"Relational Operator2", + "name":"From42", + "label":"From42", "parent":"BLDCmotorControl_R2017b:2687:1401", "inspector":{ "params":[ - "OutDataTypeStr", - "InputSameDT", - "Operator", - "RndMeth", - "SampleTime", - "ZeroCross" + "GotoTag", + "IconDisplay" ], "values":[ - "boolean", - "off", - ">", - "Simplest", - "-1", - "on" + "z_dir", + "Tag" ], "tabs":[ - "Data Type", - "-Other" + "Parameter Attributes" ], - "tabs_idx":[ - 0, - 1 - ] + "tabs_idx":0 }, "viewer":{ "jshandler":"webview/handlers/ElementHandler" @@ -899,7 +992,7 @@ "obj_viewer":[ ], "finder":{ - "blocktype":"RelationalOperator", + "blocktype":"From", "masktype":"" } }, @@ -935,64 +1028,19 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:1628", - "className":"Simulink.RelationalOperator", + "sid":"BLDCmotorControl_R2017b:2687:1635", + "className":"Simulink.From", "icon":"WebViewIcon2", - "name":"Relational Operator5", - "label":"Relational Operator5", - "parent":"BLDCmotorControl_R2017b:2687:1401", - "inspector":{ - "params":[ - "OutDataTypeStr", - "InputSameDT", - "Operator", - "RndMeth", - "SampleTime", - "ZeroCross" - ], - "values":[ - "boolean", - "off", - "~=", - "Simplest", - "-1", - "on" - ], - "tabs":[ - "Data Type", - "-Other" - ], - "tabs_idx":[ - 0, - 1 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"RelationalOperator", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1650", - "className":"Simulink.Goto", - "icon":"WebViewIcon2", - "name":"Goto3", - "label":"Goto3", + "name":"From15", + "label":"From15", "parent":"BLDCmotorControl_R2017b:2687:1401", "inspector":{ "params":[ "GotoTag", - "TagVisibility", "IconDisplay" ], "values":[ - "z_counterRaw", - "local", + "z_dir", "Tag" ], "tabs":[ @@ -1006,7 +1054,7 @@ "obj_viewer":[ ], "finder":{ - "blocktype":"Goto", + "blocktype":"From", "masktype":"" } }, @@ -1073,49 +1121,27 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:1437", - "className":"Simulink.Product", + "sid":"BLDCmotorControl_R2017b:2687:1648", + "className":"Simulink.Goto", "icon":"WebViewIcon2", - "name":"Divide3", - "label":"Divide3", + "name":"Goto1", + "label":"Goto1", "parent":"BLDCmotorControl_R2017b:2687:1401", "inspector":{ "params":[ - "OutDataTypeStr", - "CollapseDim", - "CollapseMode", - "InputSameDT", - "Inputs", - "LockScale", - "Multiplication", - "OutMax", - "OutMin", - "RndMeth", - "SampleTime", - "SaturateOnIntegerOverflow" + "GotoTag", + "TagVisibility", + "IconDisplay" ], "values":[ - "Inherit: Same as first input", - "1", - "All dimensions", - "off", - "**", - "off", - "Element-wise(.*)", - "[]", - "[]", - "Simplest", - "-1", - "off" + "z_dirPrev", + "local", + "Tag" ], "tabs":[ - "Signal Attributes", - "-Other" + "Parameter Attributes" ], - "tabs_idx":[ - 0, - 1 - ] + "tabs_idx":0 }, "viewer":{ "jshandler":"webview/handlers/ElementHandler" @@ -1123,7 +1149,7 @@ "obj_viewer":[ ], "finder":{ - "blocktype":"Product", + "blocktype":"Goto", "masktype":"" } }, @@ -1183,11 +1209,11 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:1637", + "sid":"BLDCmotorControl_R2017b:2687:1434", "className":"Simulink.Constant", "icon":"WebViewIcon2", - "name":"Constant1", - "label":"Constant1", + "name":"Constant3", + "label":"Constant3", "parent":"BLDCmotorControl_R2017b:2687:1401", "inspector":{ "params":[ @@ -1201,7 +1227,7 @@ "VectorParams1D" ], "values":[ - "0", + "100", "Inherit: Inherit via back propagation", "inf", "off", @@ -1231,61 +1257,6 @@ "masktype":"" } }, - { - "sid":"BLDCmotorControl_R2017b:2687:1436", - "className":"Simulink.Product", - "icon":"WebViewIcon2", - "name":"Divide2", - "label":"Divide2", - "parent":"BLDCmotorControl_R2017b:2687:1401", - "inspector":{ - "params":[ - "OutDataTypeStr", - "CollapseDim", - "CollapseMode", - "InputSameDT", - "Inputs", - "LockScale", - "Multiplication", - "OutMax", - "OutMin", - "RndMeth", - "SampleTime", - "SaturateOnIntegerOverflow" - ], - "values":[ - "Inherit: Same as first input", - "1", - "All dimensions", - "off", - "*/", - "off", - "Element-wise(.*)", - "[]", - "[]", - "Simplest", - "-1", - "off" - ], - "tabs":[ - "Signal Attributes", - "-Other" - ], - "tabs_idx":[ - 0, - 1 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Product", - "masktype":"" - } - }, { "sid":"BLDCmotorControl_R2017b:2687:1433", "className":"Simulink.Constant", @@ -1336,25 +1307,43 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:1645", - "className":"Simulink.From", + "sid":"BLDCmotorControl_R2017b:2687:1637", + "className":"Simulink.Constant", "icon":"WebViewIcon2", - "name":"From42", - "label":"From42", + "name":"Constant1", + "label":"Constant1", "parent":"BLDCmotorControl_R2017b:2687:1401", "inspector":{ "params":[ - "GotoTag", - "IconDisplay" + "Value", + "OutDataTypeStr", + "FramePeriod", + "LockScale", + "OutMax", + "OutMin", + "SampleTime", + "VectorParams1D" ], "values":[ - "z_dir", - "Tag" + "0", + "Inherit: Inherit via back propagation", + "inf", + "off", + "[]", + "[]", + "inf", + "on" ], "tabs":[ - "Parameter Attributes" + "Main", + "Signal Attributes", + "-Other" ], - "tabs_idx":0 + "tabs_idx":[ + 0, + 1, + 2 + ] }, "viewer":{ "jshandler":"webview/handlers/ElementHandler" @@ -1362,7 +1351,154 @@ "obj_viewer":[ ], "finder":{ - "blocktype":"From", + "blocktype":"Constant", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1443", + "className":"Simulink.Sum", + "icon":"WebViewIcon2", + "name":"Sum1", + "label":"Sum1", + "parent":"BLDCmotorControl_R2017b:2687:1401", + "inspector":{ + "params":[ + "AccumDataTypeStr", + "OutDataTypeStr", + "CollapseDim", + "CollapseMode", + "IconShape", + "InputSameDT", + "Inputs", + "LockScale", + "OutMax", + "OutMin", + "RndMeth", + "SampleTime", + "SaturateOnIntegerOverflow" + ], + "values":[ + "Inherit: Same as first input", + "Inherit: Same as first input", + "1", + "All dimensions", + "rectangular", + "on", + "++", + "off", + "[]", + "[]", + "Simplest", + "-1", + "off" + ], + "tabs":[ + "Signal Attributes", + "-Other" + ], + "tabs_idx":[ + 0, + 2 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Sum", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1628", + "className":"Simulink.RelationalOperator", + "icon":"WebViewIcon2", + "name":"Relational Operator5", + "label":"Relational Operator5", + "parent":"BLDCmotorControl_R2017b:2687:1401", + "inspector":{ + "params":[ + "OutDataTypeStr", + "InputSameDT", + "Operator", + "RndMeth", + "SampleTime", + "ZeroCross" + ], + "values":[ + "boolean", + "off", + "~=", + "Simplest", + "-1", + "on" + ], + "tabs":[ + "Data Type", + "-Other" + ], + "tabs_idx":[ + 0, + 1 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"RelationalOperator", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1672", + "className":"Simulink.Abs", + "icon":"WebViewIcon2", + "name":"Abs5", + "label":"Abs5", + "parent":"BLDCmotorControl_R2017b:2687:1401", + "inspector":{ + "params":[ + "OutDataTypeStr", + "LockScale", + "OutMax", + "OutMin", + "RndMeth", + "SampleTime", + "SaturateOnIntegerOverflow", + "ZeroCross" + ], + "values":[ + "Inherit: Inherit via back propagation", + "off", + "[]", + "[]", + "Zero", + "-1", + "off", + "on" + ], + "tabs":[ + "Signal Attributes", + "-Other" + ], + "tabs_idx":[ + 0, + 1 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Abs", "masktype":"" } }, @@ -1434,25 +1570,49 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:1646", - "className":"Simulink.From", + "sid":"BLDCmotorControl_R2017b:2687:1437", + "className":"Simulink.Product", "icon":"WebViewIcon2", - "name":"From8", - "label":"From8", + "name":"Divide3", + "label":"Divide3", "parent":"BLDCmotorControl_R2017b:2687:1401", "inspector":{ "params":[ - "GotoTag", - "IconDisplay" + "OutDataTypeStr", + "CollapseDim", + "CollapseMode", + "InputSameDT", + "Inputs", + "LockScale", + "Multiplication", + "OutMax", + "OutMin", + "RndMeth", + "SampleTime", + "SaturateOnIntegerOverflow" ], "values":[ - "z_counter", - "Tag" + "Inherit: Same as first input", + "1", + "All dimensions", + "off", + "**", + "off", + "Element-wise(.*)", + "[]", + "[]", + "Simplest", + "-1", + "off" ], "tabs":[ - "Parameter Attributes" + "Signal Attributes", + "-Other" ], - "tabs_idx":0 + "tabs_idx":[ + 0, + 1 + ] }, "viewer":{ "jshandler":"webview/handlers/ElementHandler" @@ -1460,7 +1620,7 @@ "obj_viewer":[ ], "finder":{ - "blocktype":"From", + "blocktype":"Product", "masktype":"" } }, @@ -1532,142 +1692,11 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:1434", - "className":"Simulink.Constant", - "icon":"WebViewIcon2", - "name":"Constant3", - "label":"Constant3", - "parent":"BLDCmotorControl_R2017b:2687:1401", - "inspector":{ - "params":[ - "Value", - "OutDataTypeStr", - "FramePeriod", - "LockScale", - "OutMax", - "OutMin", - "SampleTime", - "VectorParams1D" - ], - "values":[ - "100", - "Inherit: Inherit via back propagation", - "inf", - "off", - "[]", - "[]", - "inf", - "on" - ], - "tabs":[ - "Main", - "Signal Attributes", - "-Other" - ], - "tabs_idx":[ - 0, - 1, - 2 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Constant", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1648", - "className":"Simulink.Goto", - "icon":"WebViewIcon2", - "name":"Goto1", - "label":"Goto1", - "parent":"BLDCmotorControl_R2017b:2687:1401", - "inspector":{ - "params":[ - "GotoTag", - "TagVisibility", - "IconDisplay" - ], - "values":[ - "z_dirPrev", - "local", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Goto", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1625", - "className":"Simulink.Constant", - "icon":"WebViewIcon2", - "name":"z_maxCntRst", - "label":"z_maxCntRst", - "parent":"BLDCmotorControl_R2017b:2687:1401", - "inspector":{ - "params":[ - "Value", - "OutDataTypeStr", - "FramePeriod", - "LockScale", - "OutMax", - "OutMin", - "SampleTime", - "VectorParams1D" - ], - "values":[ - "z_maxCntRst", - "Inherit: Inherit via back propagation", - "inf", - "off", - "[]", - "[]", - "inf", - "on" - ], - "tabs":[ - "Main", - "Signal Attributes", - "-Other" - ], - "tabs_idx":[ - 0, - 1, - 2 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Constant", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1635", + "sid":"BLDCmotorControl_R2017b:2687:1646", "className":"Simulink.From", "icon":"WebViewIcon2", - "name":"From15", - "label":"From15", + "name":"From8", + "label":"From8", "parent":"BLDCmotorControl_R2017b:2687:1401", "inspector":{ "params":[ @@ -1675,7 +1704,7 @@ "IconDisplay" ], "values":[ - "z_dir", + "z_counter", "Tag" ], "tabs":[ @@ -1693,6 +1722,104 @@ "masktype":"" } }, + { + "sid":"BLDCmotorControl_R2017b:2687:1624", + "className":"Simulink.RelationalOperator", + "icon":"WebViewIcon2", + "name":"Relational Operator2", + "label":"Relational Operator2", + "parent":"BLDCmotorControl_R2017b:2687:1401", + "inspector":{ + "params":[ + "OutDataTypeStr", + "InputSameDT", + "Operator", + "RndMeth", + "SampleTime", + "ZeroCross" + ], + "values":[ + "boolean", + "off", + ">", + "Simplest", + "-1", + "on" + ], + "tabs":[ + "Data Type", + "-Other" + ], + "tabs_idx":[ + 0, + 1 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"RelationalOperator", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1436", + "className":"Simulink.Product", + "icon":"WebViewIcon2", + "name":"Divide2", + "label":"Divide2", + "parent":"BLDCmotorControl_R2017b:2687:1401", + "inspector":{ + "params":[ + "OutDataTypeStr", + "CollapseDim", + "CollapseMode", + "InputSameDT", + "Inputs", + "LockScale", + "Multiplication", + "OutMax", + "OutMin", + "RndMeth", + "SampleTime", + "SaturateOnIntegerOverflow" + ], + "values":[ + "Inherit: Same as first input", + "1", + "All dimensions", + "off", + "*/", + "off", + "Element-wise(.*)", + "[]", + "[]", + "Simplest", + "-1", + "off" + ], + "tabs":[ + "Signal Attributes", + "-Other" + ], + "tabs_idx":[ + 0, + 1 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Product", + "masktype":"" + } + }, { "sid":"BLDCmotorControl_R2017b:2687:1627", "className":"Simulink.Logic", @@ -3112,5 +3239,56 @@ ], "finder":[ ] + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1672#out:1", + "className":"Simulink.Line", + "icon":"WebViewIcon4", + "name":"", + "label":"", + "parent":"BLDCmotorControl_R2017b:2687:1401", + "inspector":{ + "params":[ + "SignalNameFromLabel", + "MustResolveToSignal", + "ShowPropagatedSignal", + "DataLogging", + "TestPoint", + "SignalObjectPackage", + "StorageClass", + "Description", + "documentLink" + ], + "values":[ + "", + "off", + "off", + "off", + "off", + "Simulink", + "Auto", + "", + "" + ], + "tabs":[ + "Parameter Attributes", + "Logging and Accessibility", + "Code Generation", + "Documentation" + ], + "tabs_idx":[ + 0, + 3, + 5, + 7 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":[ + ] } ] \ No newline at end of file diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1401_d.png b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1401_d.png index 5a87051..3723e19 100644 Binary files a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1401_d.png and b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1401_d.png differ diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1401_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1401_d.svg index 0e4e389..8c7d755 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1401_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1401_d.svg @@ -266,7 +266,7 @@ - + @@ -354,10 +354,10 @@ - + - + @@ -367,29 +367,29 @@ - + 2 - + - + - + - + n_mot @@ -434,11 +434,11 @@ - - + + - + @@ -448,30 +448,93 @@ - - 1 + + 3 - + - - + + - + - - n_motRaw + + n_motAbs + + + + + + + + + + + + + + + + + + + + + + + + + + z_maxCntRst + + + + + + + + + + + + + + + + + + + + + + z_maxCntRst + + + + + + + + + + + + + + + int16 @@ -492,11 +555,11 @@ - + - + cf_speedFilt @@ -514,11 +577,11 @@ - + - + cf_speedFilt @@ -529,11 +592,203 @@ - + - + + int32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + T + + + + + + + + F + + + + + + + + + + + + + + + + + + + + + int32 @@ -547,7 +802,7 @@ - + @@ -555,35 +810,35 @@ - + - + - + - + - + - + - + - + @@ -609,203 +864,11 @@ - + - - int32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - T - - - - - - - - F - - - - - - - - - - - - - - - - - - - - - + int32 @@ -827,27 +890,27 @@ - + - + - + - + - + - + @@ -865,11 +928,11 @@ - + - + int32 @@ -881,68 +944,77 @@ - - - + + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + 1 - - + + - - - + + + - - + + - - int32 + + n_motRaw + + + + + + + + + + + + + + + + + + + + + + + + + + [z_counterRaw] + + + + + + + @@ -963,11 +1035,11 @@ - + - + [z_counter] @@ -996,11 +1068,11 @@ - + - + [z_dir] @@ -1019,60 +1091,44 @@ - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + [z_dir] + - - + + - - + + - - + + - - boolean + + int8 @@ -1093,11 +1149,11 @@ - + - + [z_dirPrev] @@ -1115,11 +1171,11 @@ - + - + int8 @@ -1129,11 +1185,460 @@ + + + + + + + + + + + + + + + + + + [z_dir] + + + + + + + + + + + + + + + + + + + + + + int8 + + + + + + + + + + + + + + + + + + + + + + + + + + [z_counterRaw] + + + + + + + + + + + + + + + + + + + + + + int16 + + + + + + + + + + + + + + + + + + + + + + + + + + [n_motRaw] + + + + + + + + + + + + + + + + + + + + + + int32 + + + + + + + + + + + + + + + + + + + + + + + + + + [z_dirPrev] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + int32 + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + + + + + + + + + + + + + + + + + + + + + + int32 + + + + + + + + + + + + + + + + + + + + + + + + + + 100 + + + + + + + + + + + + + + + + + + + + + + int32 + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + int32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + int32 + + + + + + + + - + @@ -1141,19 +1646,19 @@ - + - + - + - + @@ -1179,11 +1684,11 @@ - + - + boolean @@ -1195,405 +1700,75 @@ - - - + + + - - + + - - - - - - - - [z_counterRaw] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [z_counterRaw] - - - - - - - - - - - - - - - - - - - - - - int16 - - - - - - - - - - - - - - - - - - - - - - - - - - [n_motRaw] - - - - - - - - - - - - - - - - - - - - - - int32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - int32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - int32 - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - int32 - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - - + + - + - - + + - + - - - + + - - - - + - - - - - - - - - - - int32 - - - - - - - - - - - - - - - - - - - - - - - - - 100 - - - + + - + - - + + - + int32 @@ -1603,54 +1778,6 @@ - - - - - - - - - - - - - - - - - - [z_dir] - - - - - - - - - - - - - - - - - - - - - - int8 - - - - - - - - @@ -1663,11 +1790,11 @@ - + - + 4 @@ -1685,11 +1812,11 @@ - + - + z_counterRaw @@ -1700,11 +1827,11 @@ - + - + int16 @@ -1716,44 +1843,52 @@ - - - + + + - - + + - - + + - - [z_counter] + + + + + + + + + + - - + + - + - - + + - - int16 + + int32 @@ -1774,11 +1909,11 @@ - + - + 2 @@ -1796,11 +1931,11 @@ - + - + z_dirPrev @@ -1811,11 +1946,11 @@ - + - + int8 @@ -1827,139 +1962,43 @@ - - - + + + - - + + - - + + - - 100 + + [z_counter] - - + + - + - - + + - - int32 - - - - - - - - - - - - - - - - - - - - - - - - - - [z_dirPrev] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - z_maxCntRst - - - - - - - - - - - - - - - - - - - - - - z_maxCntRst - - - - - - - - - - - - - - + int16 @@ -1971,44 +2010,133 @@ - - - + + + - - + + - + - - + + - - [z_dir] + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - - int8 + + boolean + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + int32 @@ -2029,19 +2157,19 @@ - + - + - + - + @@ -2056,11 +2184,11 @@ - + - + boolean @@ -2201,11 +2329,11 @@ - + - + rpm_signed @@ -2282,11 +2410,18 @@ - + - + + + + + + + + @@ -2296,10 +2431,23 @@ - + + + + + + + + + + + + + + @@ -2473,11 +2621,11 @@ - + - + rpm_signed @@ -2541,7 +2689,21 @@ + + + + + + + + + + + + + + - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1651_d.json b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1651_d.json index a3dacb9..59ce0f7 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1651_d.json +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1651_d.json @@ -420,6 +420,49 @@ "masktype":"" } }, + { + "sid":"BLDCmotorControl_R2017b:2687:1651:1618", + "className":"Simulink.RelationalOperator", + "icon":"WebViewIcon2", + "name":"Relational Operator1", + "label":"Relational Operator1", + "parent":"BLDCmotorControl_R2017b:2687:1651", + "inspector":{ + "params":[ + "OutDataTypeStr", + "InputSameDT", + "Operator", + "RndMeth", + "SampleTime", + "ZeroCross" + ], + "values":[ + "boolean", + "off", + "<", + "Simplest", + "-1", + "on" + ], + "tabs":[ + "Data Type", + "-Other" + ], + "tabs_idx":[ + 0, + 1 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"RelationalOperator", + "masktype":"" + } + }, { "sid":"BLDCmotorControl_R2017b:2687:1651:1616", "className":"Simulink.Constant", @@ -469,49 +512,6 @@ "masktype":"" } }, - { - "sid":"BLDCmotorControl_R2017b:2687:1651:1618", - "className":"Simulink.RelationalOperator", - "icon":"WebViewIcon2", - "name":"Relational Operator1", - "label":"Relational Operator1", - "parent":"BLDCmotorControl_R2017b:2687:1651", - "inspector":{ - "params":[ - "OutDataTypeStr", - "InputSameDT", - "Operator", - "RndMeth", - "SampleTime", - "ZeroCross" - ], - "values":[ - "boolean", - "off", - "<", - "Simplest", - "-1", - "on" - ], - "tabs":[ - "Data Type", - "-Other" - ], - "tabs_idx":[ - 0, - 1 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"RelationalOperator", - "masktype":"" - } - }, { "sid":"BLDCmotorControl_R2017b:2687:1651:1620#out:1", "className":"Simulink.Line", diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1651_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1651_d.svg index 1534f45..eb4158e 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1651_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_1651_d.svg @@ -689,59 +689,11 @@ - - - - - - - - - - - - - - - - - - z_cntMaxLim - - - - - - - - - - - - - - - - - - - - - - int16 - - - - - - - - - + @@ -749,19 +701,19 @@ - + - + - + - + @@ -787,11 +739,11 @@ - + - + boolean @@ -801,6 +753,54 @@ + + + + + + + + + + + + + + + + + + z_cntMaxLim + + + + + + + + + + + + + + + + + + + + + + int16 + + + + + + + + @@ -955,5 +955,5 @@ - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_215_d.json b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_215_d.json index eb5eda7..3f7667c 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_215_d.json +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_215_d.json @@ -2424,6 +2424,272 @@ "masktype":"" } }, + { + "sid":"BLDCmotorControl_R2017b:2687:1671", + "className":"Simulink.Constant", + "icon":"WebViewIcon2", + "name":"n_motPhaAdvEna", + "label":"n_motPhaAdvEna", + "parent":"BLDCmotorControl_R2017b:2687:215", + "inspector":{ + "params":[ + "Value", + "OutDataTypeStr", + "FramePeriod", + "LockScale", + "OutMax", + "OutMin", + "SampleTime", + "VectorParams1D" + ], + "values":[ + "n_motPhaAdvEna", + "Inherit: Inherit via back propagation", + "inf", + "off", + "[]", + "[]", + "inf", + "on" + ], + "tabs":[ + "Main", + "Signal Attributes", + "-Other" + ], + "tabs_idx":[ + 0, + 1, + 2 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Constant", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1670", + "className":"Simulink.RelationalOperator", + "icon":"WebViewIcon2", + "name":"Relational Operator4", + "label":"Relational Operator4", + "parent":"BLDCmotorControl_R2017b:2687:215", + "inspector":{ + "params":[ + "OutDataTypeStr", + "InputSameDT", + "Operator", + "RndMeth", + "SampleTime", + "ZeroCross" + ], + "values":[ + "boolean", + "off", + ">", + "Simplest", + "-1", + "on" + ], + "tabs":[ + "Data Type", + "-Other" + ], + "tabs_idx":[ + 0, + 1 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"RelationalOperator", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1681", + "className":"Simulink.Goto", + "icon":"WebViewIcon2", + "name":"Goto4", + "label":"Goto4", + "parent":"BLDCmotorControl_R2017b:2687:215", + "inspector":{ + "params":[ + "GotoTag", + "TagVisibility", + "IconDisplay" + ], + "values":[ + "n_motAbs", + "local", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Goto", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1669", + "className":"Simulink.From", + "icon":"WebViewIcon2", + "name":"From1", + "label":"From1", + "parent":"BLDCmotorControl_R2017b:2687:215", + "inspector":{ + "params":[ + "GotoTag", + "IconDisplay" + ], + "values":[ + "n_motAbs", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"From", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1680", + "className":"Simulink.Inport", + "icon":"WebViewIcon2", + "name":"n_motAbs", + "label":"n_motAbs", + "parent":"BLDCmotorControl_R2017b:2687:215", + "inspector":{ + "params":[ + "Port", + "IconDisplay", + "OutMin", + "OutMax", + "OutDataTypeStr", + "LockScale", + "Unit", + "PortDimensions", + "VarSizeSig", + "SampleTime", + "SignalType", + "BusOutputAsStruct", + "InputConnect", + "Interpolate", + "LatchByDelayingOutsideSignal", + "LatchInputForFeedbackSignals", + "OutputFunctionCall" + ], + "values":[ + "6", + "Port number", + "[]", + "[]", + "Inherit: auto", + "off", + "inherit", + "-1", + "Inherit", + "-1", + "auto", + "off", + "", + "on", + "off", + "off", + "off" + ], + "tabs":[ + "Main", + "Signal Attributes", + "-Other" + ], + "tabs_idx":[ + 0, + 2, + 11 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Inport", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1668", + "className":"Simulink.Logic", + "icon":"WebViewIcon2", + "name":"Logical Operator2", + "label":"Logical Operator2", + "parent":"BLDCmotorControl_R2017b:2687:215", + "inspector":{ + "params":[ + "OutDataTypeStr", + "AllPortsSameDT", + "IconShape", + "Inputs", + "Operator", + "SampleTime" + ], + "values":[ + "boolean", + "off", + "rectangular", + "2", + "AND", + "-1" + ], + "tabs":[ + "Data Type", + "-Other" + ], + "tabs_idx":[ + 0, + 1 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Logic", + "masktype":"" + } + }, { "sid":"BLDCmotorControl_R2017b:2687:521#out:1", "className":"Simulink.Line", @@ -2934,57 +3200,6 @@ "finder":[ ] }, - { - "sid":"BLDCmotorControl_R2017b:2687:512#out:1", - "className":"Simulink.Line", - "icon":"WebViewIcon4", - "name":"", - "label":"", - "parent":"BLDCmotorControl_R2017b:2687:215", - "inspector":{ - "params":[ - "SignalNameFromLabel", - "MustResolveToSignal", - "ShowPropagatedSignal", - "DataLogging", - "TestPoint", - "SignalObjectPackage", - "StorageClass", - "Description", - "documentLink" - ], - "values":[ - "", - "off", - "off", - "off", - "off", - "Simulink", - "Auto", - "", - "" - ], - "tabs":[ - "Parameter Attributes", - "Logging and Accessibility", - "Code Generation", - "Documentation" - ], - "tabs_idx":[ - 0, - 3, - 5, - 7 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":[ - ] - }, { "sid":"BLDCmotorControl_R2017b:2687:522#out:2", "className":"Simulink.Line", @@ -4412,5 +4627,311 @@ ], "finder":[ ] + }, + { + "sid":"BLDCmotorControl_R2017b:2687:512#out:1", + "className":"Simulink.Line", + "icon":"WebViewIcon4", + "name":"", + "label":"", + "parent":"BLDCmotorControl_R2017b:2687:215", + "inspector":{ + "params":[ + "SignalNameFromLabel", + "MustResolveToSignal", + "ShowPropagatedSignal", + "DataLogging", + "TestPoint", + "SignalObjectPackage", + "StorageClass", + "Description", + "documentLink" + ], + "values":[ + "", + "off", + "off", + "off", + "off", + "Simulink", + "Auto", + "", + "" + ], + "tabs":[ + "Parameter Attributes", + "Logging and Accessibility", + "Code Generation", + "Documentation" + ], + "tabs_idx":[ + 0, + 3, + 5, + 7 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":[ + ] + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1671#out:1", + "className":"Simulink.Line", + "icon":"WebViewIcon4", + "name":"", + "label":"", + "parent":"BLDCmotorControl_R2017b:2687:215", + "inspector":{ + "params":[ + "SignalNameFromLabel", + "MustResolveToSignal", + "ShowPropagatedSignal", + "DataLogging", + "TestPoint", + "SignalObjectPackage", + "StorageClass", + "Description", + "documentLink" + ], + "values":[ + "", + "off", + "off", + "off", + "off", + "Simulink", + "Auto", + "", + "" + ], + "tabs":[ + "Parameter Attributes", + "Logging and Accessibility", + "Code Generation", + "Documentation" + ], + "tabs_idx":[ + 0, + 3, + 5, + 7 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":[ + ] + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1669#out:1", + "className":"Simulink.Line", + "icon":"WebViewIcon4", + "name":"", + "label":"", + "parent":"BLDCmotorControl_R2017b:2687:215", + "inspector":{ + "params":[ + "SignalNameFromLabel", + "MustResolveToSignal", + "ShowPropagatedSignal", + "DataLogging", + "TestPoint", + "SignalObjectPackage", + "StorageClass", + "Description", + "documentLink" + ], + "values":[ + "", + "off", + "off", + "off", + "off", + "Simulink", + "Auto", + "", + "" + ], + "tabs":[ + "Parameter Attributes", + "Logging and Accessibility", + "Code Generation", + "Documentation" + ], + "tabs_idx":[ + 0, + 3, + 5, + 7 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":[ + ] + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1670#out:1", + "className":"Simulink.Line", + "icon":"WebViewIcon4", + "name":"", + "label":"", + "parent":"BLDCmotorControl_R2017b:2687:215", + "inspector":{ + "params":[ + "SignalNameFromLabel", + "MustResolveToSignal", + "ShowPropagatedSignal", + "DataLogging", + "TestPoint", + "SignalObjectPackage", + "StorageClass", + "Description", + "documentLink" + ], + "values":[ + "", + "off", + "off", + "off", + "off", + "Simulink", + "Auto", + "", + "" + ], + "tabs":[ + "Parameter Attributes", + "Logging and Accessibility", + "Code Generation", + "Documentation" + ], + "tabs_idx":[ + 0, + 3, + 5, + 7 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":[ + ] + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1668#out:1", + "className":"Simulink.Line", + "icon":"WebViewIcon4", + "name":"", + "label":"", + "parent":"BLDCmotorControl_R2017b:2687:215", + "inspector":{ + "params":[ + "SignalNameFromLabel", + "MustResolveToSignal", + "ShowPropagatedSignal", + "DataLogging", + "TestPoint", + "SignalObjectPackage", + "StorageClass", + "Description", + "documentLink" + ], + "values":[ + "", + "off", + "off", + "off", + "off", + "Simulink", + "Auto", + "", + "" + ], + "tabs":[ + "Parameter Attributes", + "Logging and Accessibility", + "Code Generation", + "Documentation" + ], + "tabs_idx":[ + 0, + 3, + 5, + 7 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":[ + ] + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1680#out:1", + "className":"Simulink.Line", + "icon":"WebViewIcon4", + "name":"", + "label":"", + "parent":"BLDCmotorControl_R2017b:2687:215", + "inspector":{ + "params":[ + "SignalNameFromLabel", + "MustResolveToSignal", + "ShowPropagatedSignal", + "DataLogging", + "TestPoint", + "SignalObjectPackage", + "StorageClass", + "Description", + "documentLink" + ], + "values":[ + "", + "off", + "off", + "off", + "off", + "Simulink", + "Auto", + "", + "" + ], + "tabs":[ + "Parameter Attributes", + "Logging and Accessibility", + "Code Generation", + "Documentation" + ], + "tabs_idx":[ + 0, + 3, + 5, + 7 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":[ + ] } ] \ No newline at end of file diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_215_d.png b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_215_d.png index 0873809..77ccd5c 100644 Binary files a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_215_d.png and b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_215_d.png differ diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_215_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_215_d.svg index e751871..65419c3 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_215_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_215_d.svg @@ -1,10 +1,10 @@ - + - + @@ -14,7 +14,7 @@ - + @@ -22,7 +22,7 @@ - + Phase Advance map as a function of the Duty Cycle. @@ -33,15 +33,15 @@ - + - + - + Phase Advance / Field weakening @@ -57,7 +57,7 @@ - + @@ -103,7 +103,7 @@ - + @@ -118,7 +118,7 @@ - + @@ -166,7 +166,7 @@ - + @@ -181,7 +181,7 @@ - + @@ -295,7 +295,7 @@ - + @@ -343,7 +343,7 @@ - + @@ -360,7 +360,7 @@ - + @@ -391,7 +391,7 @@ - + @@ -488,7 +488,7 @@ - + @@ -536,7 +536,7 @@ - + @@ -584,7 +584,7 @@ - + @@ -632,7 +632,7 @@ - + @@ -680,7 +680,7 @@ - + @@ -728,7 +728,7 @@ - + @@ -744,10 +744,10 @@ - + - + @@ -757,29 +757,29 @@ - + b_phaAdvEna - + - + - + - + boolean @@ -792,186 +792,186 @@ - - + + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + T - + - + F - - + + - + - + - + int32 @@ -984,116 +984,116 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 1-D T(k,f) @@ -1101,7 +1101,7 @@ - + k1 @@ -1109,44 +1109,44 @@ - + f1 - + - + - + - + a_phaAdv_M2 - + - + - + int16 @@ -1159,10 +1159,10 @@ - + - + @@ -1172,7 +1172,7 @@ - + @@ -1180,7 +1180,7 @@ - + @@ -1188,7 +1188,7 @@ - + @@ -1196,7 +1196,7 @@ - + @@ -1204,7 +1204,7 @@ - + @@ -1212,7 +1212,7 @@ - + @@ -1220,7 +1220,7 @@ - + @@ -1228,7 +1228,7 @@ - + @@ -1236,7 +1236,7 @@ - + @@ -1244,7 +1244,7 @@ - + @@ -1252,7 +1252,7 @@ - + @@ -1260,7 +1260,7 @@ - + @@ -1268,7 +1268,7 @@ - + @@ -1276,7 +1276,7 @@ - + @@ -1284,7 +1284,7 @@ - + @@ -1292,7 +1292,7 @@ - + @@ -1300,7 +1300,7 @@ - + @@ -1308,7 +1308,7 @@ - + @@ -1316,7 +1316,7 @@ - + @@ -1324,7 +1324,7 @@ - + @@ -1332,7 +1332,7 @@ - + @@ -1347,52 +1347,52 @@ - + - + - + - + r_phaAdvDC_XA - + - + - + ufix32_En31 - + - + - + uint8 @@ -1405,10 +1405,10 @@ - + - + @@ -1418,29 +1418,29 @@ - + [r_DCabs] - + - + - + - + int32 @@ -1453,10 +1453,10 @@ - + - + @@ -1466,29 +1466,29 @@ - + [a_elecAngle] - + - + - + - + int32 @@ -1533,7 +1533,7 @@ - + @@ -1548,7 +1548,7 @@ - + @@ -1597,10 +1597,10 @@ - + - + @@ -1610,14 +1610,14 @@ - + [a_elecAngleAdv] - + @@ -1630,10 +1630,10 @@ - + - + @@ -1643,29 +1643,29 @@ - + a_elecPeriod - + - + - + - + int32 @@ -1678,66 +1678,66 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + int32 @@ -1750,10 +1750,10 @@ - + - + @@ -1763,29 +1763,29 @@ - + [a_elecAngle] - + - + - + - + int32 @@ -1798,50 +1798,50 @@ - + - + - + - + - + - + - + - + - + - + int16 @@ -1854,10 +1854,10 @@ - + - + @@ -1867,29 +1867,29 @@ - + [z_dir] - + - + - + - + int8 @@ -1902,10 +1902,10 @@ - + - + @@ -1915,14 +1915,14 @@ - + [a_phaAdv_M1] - + @@ -1935,10 +1935,10 @@ - + - + @@ -1948,7 +1948,7 @@ - + @@ -1956,7 +1956,7 @@ - + @@ -1971,22 +1971,22 @@ - + - + - + - + int32 @@ -2031,7 +2031,7 @@ - + @@ -2046,7 +2046,7 @@ - + @@ -2127,7 +2127,7 @@ - + @@ -2142,7 +2142,7 @@ - + @@ -2247,7 +2247,7 @@ - + @@ -2295,7 +2295,7 @@ - + @@ -2351,7 +2351,7 @@ - + @@ -2399,7 +2399,7 @@ - + @@ -2447,7 +2447,7 @@ - + @@ -2536,7 +2536,7 @@ - + @@ -2608,7 +2608,7 @@ - + @@ -2656,7 +2656,7 @@ - + @@ -2848,7 +2848,7 @@ - + @@ -2896,7 +2896,7 @@ - + @@ -2944,7 +2944,7 @@ - + @@ -3000,7 +3000,7 @@ - + @@ -3048,7 +3048,7 @@ - + @@ -3153,7 +3153,7 @@ - + @@ -3201,7 +3201,7 @@ - + @@ -3214,35 +3214,370 @@ + + + + + + + + + + + + + + + + + + n_motPhaAdvEna + + + + + + + + + + + + + + + + + + + + + + n_motPhaAdvEna + + + + + + + + + + + + + + + int32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + boolean + + + + + + + + + + + + + + + + + + + + + + + + + + [n_motAbs] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [n_motAbs] + + + + + + + + + + + + + + + + + + + + + + int32 + + + + + + + + + + + + + + + + + + + + + + + + + + 6 + + + + + + + + + + + + + + + + + + + + + + n_motAbs + + + + + + + + + + + + + + + int32 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + boolean + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + @@ -3251,11 +3586,11 @@ - + - + @@ -3374,28 +3709,14 @@ - - - - - - - - - - - - - - - + - + @@ -3405,11 +3726,11 @@ - + - + @@ -3419,11 +3740,11 @@ - + - + @@ -3447,11 +3768,11 @@ - + - + @@ -3461,11 +3782,11 @@ - + - + @@ -3475,11 +3796,11 @@ - + - + @@ -3489,11 +3810,11 @@ - + - + @@ -3503,11 +3824,11 @@ - + - + @@ -3517,11 +3838,11 @@ - + - + @@ -3531,11 +3852,11 @@ - + - + @@ -3820,7 +4141,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_26_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_26_d.svg index 2b2dd7e..39e88b8 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_26_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_26_d.svg @@ -15,7 +15,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -175,7 +175,7 @@ - + @@ -492,7 +492,7 @@ - + @@ -704,5 +704,5 @@ - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_282_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_282_d.svg index ab593f1..b88d85f 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_282_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_282_d.svg @@ -419,30 +419,30 @@ - + - + - + action - + - + - + action @@ -649,15 +649,15 @@ - + - + - + int16 @@ -670,16 +670,16 @@ - - + + - + - - action + + int16 @@ -691,16 +691,16 @@ - - + + - + - - int16 + + action @@ -712,15 +712,15 @@ - + - + - + int16 @@ -885,15 +885,15 @@ - + - + - + int16 @@ -927,16 +927,16 @@ - - + + - + - - int16 + + action @@ -948,16 +948,16 @@ - - + + - + - - action + + int16 @@ -2435,15 +2435,15 @@ - + - + - + int16 @@ -2456,16 +2456,16 @@ - - + + - + - - action + + int16 @@ -2477,15 +2477,15 @@ - + - + - + int16 @@ -2498,16 +2498,16 @@ - - + + - + - - int16 + + action @@ -3046,5 +3046,5 @@ - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_285_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_285_d.svg index abe09e9..4f5e03e 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_285_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_285_d.svg @@ -971,10 +971,10 @@ - + - + @@ -1092,5 +1092,5 @@ - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_295_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_295_d.svg index 6c26caf..26eb7eb 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_295_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_295_d.svg @@ -1691,10 +1691,10 @@ - + - + @@ -1812,5 +1812,5 @@ - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_305_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_305_d.svg index 3adc4b6..7fec90d 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_305_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_305_d.svg @@ -1801,10 +1801,10 @@ - + - + @@ -1812,5 +1812,5 @@ - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_349_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_349_d.svg index 542f737..dedf4d7 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_349_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_349_d.svg @@ -174,5 +174,5 @@ - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_352_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_352_d.svg index 5e3de62..3e0906d 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_352_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_352_d.svg @@ -174,5 +174,5 @@ - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_355_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_355_d.svg index 94b9fba..f98d40f 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_355_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_355_d.svg @@ -174,5 +174,5 @@ - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_361_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_361_d.svg index 0460932..a5ae659 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_361_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_361_d.svg @@ -1211,15 +1211,30 @@ - + + + + + + int32 + + + + + + + + + + - + int32 @@ -1230,26 +1245,11 @@ - + - - int32 - - - - - - - - - - - - - - + int32 @@ -2434,5 +2434,5 @@ - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_38_d.json b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_38_d.json index 73fd654..ec24043 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_38_d.json +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_38_d.json @@ -583,102 +583,6 @@ "masktype":"" } }, - { - "sid":"BLDCmotorControl_R2017b:2687:1318", - "className":"Simulink.UnitDelay", - "icon":"WebViewIcon2", - "name":"UnitDelay2", - "label":"UnitDelay2", - "parent":"BLDCmotorControl_R2017b:2687:38", - "inspector":{ - "params":[ - "InitialCondition", - "InputProcessing", - "SampleTime", - "CodeGenStateStorageTypeQualifier", - "StateMustResolveToSignalObject", - "StateName", - "StateSignalObject", - "StateStorageClass" - ], - "values":[ - "0", - "Elements as channels (sample based)", - "-1", - "", - "off", - "", - [ - ], - "Auto" - ], - "tabs":[ - "Main", - "-Other" - ], - "tabs_idx":[ - 0, - 3 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"UnitDelay", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1631", - "className":"Simulink.UnitDelay", - "icon":"WebViewIcon2", - "name":"UnitDelay1", - "label":"UnitDelay1", - "parent":"BLDCmotorControl_R2017b:2687:38", - "inspector":{ - "params":[ - "InitialCondition", - "InputProcessing", - "SampleTime", - "CodeGenStateStorageTypeQualifier", - "StateMustResolveToSignalObject", - "StateName", - "StateSignalObject", - "StateStorageClass" - ], - "values":[ - "0", - "Elements as channels (sample based)", - "-1", - "", - "off", - "", - [ - ], - "Auto" - ], - "tabs":[ - "Main", - "-Other" - ], - "tabs_idx":[ - 0, - 3 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"UnitDelay", - "masktype":"" - } - }, { "sid":"BLDCmotorControl_R2017b:2687:1632", "className":"Simulink.Outport", @@ -759,6 +663,102 @@ "masktype":"" } }, + { + "sid":"BLDCmotorControl_R2017b:2687:1631", + "className":"Simulink.UnitDelay", + "icon":"WebViewIcon2", + "name":"UnitDelay1", + "label":"UnitDelay1", + "parent":"BLDCmotorControl_R2017b:2687:38", + "inspector":{ + "params":[ + "InitialCondition", + "InputProcessing", + "SampleTime", + "CodeGenStateStorageTypeQualifier", + "StateMustResolveToSignalObject", + "StateName", + "StateSignalObject", + "StateStorageClass" + ], + "values":[ + "0", + "Elements as channels (sample based)", + "-1", + "", + "off", + "", + [ + ], + "Auto" + ], + "tabs":[ + "Main", + "-Other" + ], + "tabs_idx":[ + 0, + 3 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"UnitDelay", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1318", + "className":"Simulink.UnitDelay", + "icon":"WebViewIcon2", + "name":"UnitDelay2", + "label":"UnitDelay2", + "parent":"BLDCmotorControl_R2017b:2687:38", + "inspector":{ + "params":[ + "InitialCondition", + "InputProcessing", + "SampleTime", + "CodeGenStateStorageTypeQualifier", + "StateMustResolveToSignalObject", + "StateName", + "StateSignalObject", + "StateStorageClass" + ], + "values":[ + "0", + "Elements as channels (sample based)", + "-1", + "", + "off", + "", + [ + ], + "Auto" + ], + "tabs":[ + "Main", + "-Other" + ], + "tabs_idx":[ + 0, + 3 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"UnitDelay", + "masktype":"" + } + }, { "sid":"BLDCmotorControl_R2017b:2687:1314", "className":"Simulink.ActionPort", diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_38_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_38_d.svg index 7c5e329..3251a1b 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_38_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_38_d.svg @@ -780,76 +780,44 @@ - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + 2 + - - + + - - - + + + - - + + - - int8 + + z_dirPrev @@ -862,7 +830,7 @@ - + @@ -870,35 +838,35 @@ - + - + - + - + - + - + - + - + @@ -924,11 +892,11 @@ - + - + int8 @@ -940,44 +908,76 @@ - - - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - 2 - - - + + - - - + + + - + - - z_dirPrev + + int8 @@ -990,7 +990,7 @@ - + @@ -1264,5 +1264,5 @@ - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_457_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_457_d.svg index a2fead9..b084ae2 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_457_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_457_d.svg @@ -10,5 +10,5 @@ - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_589_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_589_d.svg index 8722987..ecb52cb 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_589_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_589_d.svg @@ -10,5 +10,5 @@ - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_59_d.json b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_59_d.json index d59df4d..badde55 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_59_d.json +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_59_d.json @@ -871,123 +871,54 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:1487", - "className":"Simulink.Outport", - "icon":"WebViewIcon2", - "name":"z_counter", - "label":"z_counter", + "sid":"BLDCmotorControl_R2017b:2687:1651", + "className":"Simulink.SubSystem", + "icon":"WebViewIcon6", + "name":"rst_DelayLim", + "label":"rst_DelayLim", "parent":"BLDCmotorControl_R2017b:2687:59", "inspector":{ "params":[ - "Port", - "IconDisplay", - "OutMin", - "OutMax", - "OutDataTypeStr", - "LockScale", - "Unit", - "PortDimensions", - "VarSizeSig", - "SampleTime", - "SignalType", - "BusOutputAsStruct", - "EnsureOutportIsVirtual", - "InitialOutput", - "MustResolveToSignalObject", - "OutputWhenDisabled", - "OutputWhenUnConnected", - "OutputWhenUnconnectedValue", - "SignalName", - "SignalObject", - "SourceOfInitialOutputValue", - "StorageClass", - "VectorParamsAs1DForOutWhenUnconnected" + "z_cntMaxLim" ], "values":[ - "3", - "Port number", - "[]", - "[]", - "Inherit: auto", - "off", - "inherit", - "-1", - "Inherit", - "-1", - "auto", - "off", - "off", - "0", - "off", - "reset", - "off", - "0", - "", - [ - ], - "Dialog", - "Auto", - "off" + "z_maxCntRst" ], "tabs":[ - "Main", - "Signal Attributes", - "-Other" ], "tabs_idx":[ - 0, - 2, - 11 ] }, "viewer":{ - "jshandler":"webview/handlers/ElementHandler" + "jshandler":"webview/handlers/ContainerHandler" }, "obj_viewer":[ ], "finder":{ - "blocktype":"Outport", + "blocktype":"SubSystem", "masktype":"" } }, { - "sid":"BLDCmotorControl_R2017b:2687:1329", - "className":"Simulink.Constant", + "sid":"BLDCmotorControl_R2017b:2687:1525", + "className":"Simulink.Signum", "icon":"WebViewIcon2", - "name":"r_commDCDeacv", - "label":"r_commDCDeacv", + "name":"Sign", + "label":"Sign", "parent":"BLDCmotorControl_R2017b:2687:59", "inspector":{ "params":[ - "Value", - "OutDataTypeStr", - "FramePeriod", - "LockScale", - "OutMax", - "OutMin", - "SampleTime", - "VectorParams1D" + "ZeroCross", + "SampleTime" ], "values":[ - "r_commDCDeacv", - "Inherit: Inherit via back propagation", - "inf", - "off", - "[]", - "[]", - "inf", - "on" + "on", + "-1" ], "tabs":[ - "Main", - "Signal Attributes", - "-Other" + "Parameter Attributes" ], - "tabs_idx":[ - 0, - 1, - 2 - ] + "tabs_idx":0 }, "viewer":{ "jshandler":"webview/handlers/ElementHandler" @@ -995,142 +926,7 @@ "obj_viewer":[ ], "finder":{ - "blocktype":"Constant", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1328", - "className":"Simulink.Relay", - "icon":"WebViewIcon2", - "name":"n_commDeacv", - "label":"n_commDeacv", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "OnSwitchValue", - "OffSwitchValue", - "OnOutputValue", - "OffOutputValue", - "OutDataTypeStr", - "InputProcessing", - "LockScale", - "OutMax", - "OutMin", - "SampleTime", - "ZeroCross" - ], - "values":[ - "n_commDeacvHi", - "n_commAcvLo", - "1", - "0", - "boolean", - "Elements as channels (sample based)", - "off", - "[]", - "[]", - "-1", - "on" - ], - "tabs":[ - "Main", - "Signal Attributes", - "-Other" - ], - "tabs_idx":[ - 0, - 4, - 5 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Relay", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1488", - "className":"Simulink.Outport", - "icon":"WebViewIcon2", - "name":"z_counterRaw", - "label":"z_counterRaw", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "Port", - "IconDisplay", - "OutMin", - "OutMax", - "OutDataTypeStr", - "LockScale", - "Unit", - "PortDimensions", - "VarSizeSig", - "SampleTime", - "SignalType", - "BusOutputAsStruct", - "EnsureOutportIsVirtual", - "InitialOutput", - "MustResolveToSignalObject", - "OutputWhenDisabled", - "OutputWhenUnConnected", - "OutputWhenUnconnectedValue", - "SignalName", - "SignalObject", - "SourceOfInitialOutputValue", - "StorageClass", - "VectorParamsAs1DForOutWhenUnconnected" - ], - "values":[ - "4", - "Port number", - "[]", - "[]", - "Inherit: auto", - "off", - "inherit", - "-1", - "Inherit", - "-1", - "auto", - "off", - "off", - "0", - "off", - "reset", - "off", - "0", - "", - [ - ], - "Dialog", - "Auto", - "off" - ], - "tabs":[ - "Main", - "Signal Attributes", - "-Other" - ], - "tabs_idx":[ - 0, - 2, - 11 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Outport", + "blocktype":"Signum", "masktype":"" } }, @@ -1177,37 +973,6 @@ "masktype":"" } }, - { - "sid":"BLDCmotorControl_R2017b:2687:842", - "className":"Simulink.Mux", - "icon":"WebViewIcon2", - "name":"Mux2", - "label":"Mux2", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "Inputs", - "DisplayOption" - ], - "values":[ - "2", - "bar" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Mux", - "masktype":"" - } - }, { "sid":"BLDCmotorControl_R2017b:2687:1524", "className":"Simulink.RelationalOperator", @@ -1251,394 +1016,6 @@ "masktype":"" } }, - { - "sid":"BLDCmotorControl_R2017b:2687:1339", - "className":"Simulink.If", - "icon":"WebViewIcon2", - "name":"If1", - "label":"If1", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "NumInputs", - "IfExpression", - "ElseIfExpressions", - "ShowElse", - "ZeroCross", - "SampleTime" - ], - "values":[ - "1", - "u1 ~= 0", - "", - "off", - "on", - "-1" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"If", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1400", - "className":"Simulink.Goto", - "icon":"WebViewIcon2", - "name":"Goto6", - "label":"Goto6", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "GotoTag", - "TagVisibility", - "IconDisplay" - ], - "values":[ - "n_motRaw", - "local", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Goto", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1630", - "className":"Simulink.Goto", - "icon":"WebViewIcon2", - "name":"Goto2", - "label":"Goto2", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "GotoTag", - "TagVisibility", - "IconDisplay" - ], - "values":[ - "z_dirPrev", - "local", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Goto", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1374", - "className":"Simulink.Goto", - "icon":"WebViewIcon2", - "name":"Goto18", - "label":"Goto18", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "GotoTag", - "TagVisibility", - "IconDisplay" - ], - "values":[ - "r_DC", - "local", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Goto", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1533", - "className":"Simulink.From", - "icon":"WebViewIcon2", - "name":"From9", - "label":"From9", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "GotoTag", - "IconDisplay" - ], - "values":[ - "b_edge", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"From", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1395", - "className":"Simulink.From", - "icon":"WebViewIcon2", - "name":"From8", - "label":"From8", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "GotoTag", - "IconDisplay" - ], - "values":[ - "z_counter", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"From", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1521", - "className":"Simulink.From", - "icon":"WebViewIcon2", - "name":"From6", - "label":"From6", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "GotoTag", - "IconDisplay" - ], - "values":[ - "z_dir", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"From", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1324", - "className":"Simulink.From", - "icon":"WebViewIcon2", - "name":"From30", - "label":"From30", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "GotoTag", - "IconDisplay" - ], - "values":[ - "z_ctrlTypSel", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"From", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1371", - "className":"Simulink.Goto", - "icon":"WebViewIcon2", - "name":"Goto16", - "label":"Goto16", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "GotoTag", - "TagVisibility", - "IconDisplay" - ], - "values":[ - "z_ctrlTypSel", - "local", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Goto", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1455", - "className":"Simulink.From", - "icon":"WebViewIcon2", - "name":"From19", - "label":"From19", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "GotoTag", - "IconDisplay" - ], - "values":[ - "dz_counter", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"From", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1380", - "className":"Simulink.From", - "icon":"WebViewIcon2", - "name":"From18", - "label":"From18", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "GotoTag", - "IconDisplay" - ], - "values":[ - "b_advCtrlEna", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"From", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1665", - "className":"Simulink.From", - "icon":"WebViewIcon2", - "name":"From17", - "label":"From17", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "GotoTag", - "IconDisplay" - ], - "values":[ - "r_DCabs", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"From", - "masktype":"" - } - }, { "sid":"BLDCmotorControl_R2017b:2687:1401", "className":"Simulink.SubSystem", @@ -1737,11 +1114,507 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:1642", + "sid":"BLDCmotorControl_R2017b:2687:1339", + "className":"Simulink.If", + "icon":"WebViewIcon2", + "name":"If1", + "label":"If1", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "NumInputs", + "IfExpression", + "ElseIfExpressions", + "ShowElse", + "ZeroCross", + "SampleTime" + ], + "values":[ + "1", + "u1 ~= 0", + "", + "off", + "on", + "-1" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"If", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1526", + "className":"Simulink.Signum", + "icon":"WebViewIcon2", + "name":"Sign1", + "label":"Sign1", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "ZeroCross", + "SampleTime" + ], + "values":[ + "on", + "-1" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Signum", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1374", + "className":"Simulink.Goto", + "icon":"WebViewIcon2", + "name":"Goto18", + "label":"Goto18", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "GotoTag", + "TagVisibility", + "IconDisplay" + ], + "values":[ + "r_DC", + "local", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Goto", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1372", + "className":"Simulink.Goto", + "icon":"WebViewIcon2", + "name":"Goto17", + "label":"Goto17", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "GotoTag", + "TagVisibility", + "IconDisplay" + ], + "values":[ + "b_advCtrlEna", + "local", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Goto", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1664", + "className":"Simulink.Goto", + "icon":"WebViewIcon2", + "name":"Goto10", + "label":"Goto10", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "GotoTag", + "TagVisibility", + "IconDisplay" + ], + "values":[ + "r_DCabs", + "local", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Goto", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1518", + "className":"Simulink.Relay", + "icon":"WebViewIcon2", + "name":"dz_counter", + "label":"dz_counter", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "OnSwitchValue", + "OffSwitchValue", + "OnOutputValue", + "OffOutputValue", + "OutDataTypeStr", + "InputProcessing", + "LockScale", + "OutMax", + "OutMin", + "SampleTime", + "ZeroCross" + ], + "values":[ + "dz_counterHi", + "dz_counterLo", + "0", + "1", + "boolean", + "Elements as channels (sample based)", + "off", + "[]", + "[]", + "-1", + "on" + ], + "tabs":[ + "Main", + "Signal Attributes", + "-Other" + ], + "tabs_idx":[ + 0, + 4, + 5 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Relay", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1400", + "className":"Simulink.Goto", + "icon":"WebViewIcon2", + "name":"Goto6", + "label":"Goto6", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "GotoTag", + "TagVisibility", + "IconDisplay" + ], + "values":[ + "n_motRaw", + "local", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Goto", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1533", "className":"Simulink.From", "icon":"WebViewIcon2", - "name":"From15", - "label":"From15", + "name":"From9", + "label":"From9", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "GotoTag", + "IconDisplay" + ], + "values":[ + "b_edge", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"From", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1395", + "className":"Simulink.From", + "icon":"WebViewIcon2", + "name":"From8", + "label":"From8", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "GotoTag", + "IconDisplay" + ], + "values":[ + "z_counter", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"From", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:972", + "className":"Simulink.From", + "icon":"WebViewIcon2", + "name":"From7", + "label":"From7", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "GotoTag", + "IconDisplay" + ], + "values":[ + "n_motRaw", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"From", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1630", + "className":"Simulink.Goto", + "icon":"WebViewIcon2", + "name":"Goto2", + "label":"Goto2", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "GotoTag", + "TagVisibility", + "IconDisplay" + ], + "values":[ + "z_dirPrev", + "local", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Goto", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1488", + "className":"Simulink.Outport", + "icon":"WebViewIcon2", + "name":"z_counterRaw", + "label":"z_counterRaw", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "Port", + "IconDisplay", + "OutMin", + "OutMax", + "OutDataTypeStr", + "LockScale", + "Unit", + "PortDimensions", + "VarSizeSig", + "SampleTime", + "SignalType", + "BusOutputAsStruct", + "EnsureOutportIsVirtual", + "InitialOutput", + "MustResolveToSignalObject", + "OutputWhenDisabled", + "OutputWhenUnConnected", + "OutputWhenUnconnectedValue", + "SignalName", + "SignalObject", + "SourceOfInitialOutputValue", + "StorageClass", + "VectorParamsAs1DForOutWhenUnconnected" + ], + "values":[ + "5", + "Port number", + "[]", + "[]", + "Inherit: auto", + "off", + "inherit", + "-1", + "Inherit", + "-1", + "auto", + "off", + "off", + "0", + "off", + "reset", + "off", + "0", + "", + [ + ], + "Dialog", + "Auto", + "off" + ], + "tabs":[ + "Main", + "Signal Attributes", + "-Other" + ], + "tabs_idx":[ + 0, + 2, + 11 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Outport", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1371", + "className":"Simulink.Goto", + "icon":"WebViewIcon2", + "name":"Goto16", + "label":"Goto16", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "GotoTag", + "TagVisibility", + "IconDisplay" + ], + "values":[ + "z_ctrlTypSel", + "local", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Goto", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1485", + "className":"Simulink.From", + "icon":"WebViewIcon2", + "name":"From5", + "label":"From5", "parent":"BLDCmotorControl_R2017b:2687:59", "inspector":{ "params":[ @@ -1768,11 +1641,11 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:1485", + "sid":"BLDCmotorControl_R2017b:2687:1397", "className":"Simulink.From", "icon":"WebViewIcon2", - "name":"From5", - "label":"From5", + "name":"From42", + "label":"From42", "parent":"BLDCmotorControl_R2017b:2687:59", "inspector":{ "params":[ @@ -1780,7 +1653,112 @@ "IconDisplay" ], "values":[ - "z_counterRaw", + "z_dir", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"From", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1521", + "className":"Simulink.From", + "icon":"WebViewIcon2", + "name":"From6", + "label":"From6", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "GotoTag", + "IconDisplay" + ], + "values":[ + "z_dir", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"From", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1326", + "className":"Simulink.RelationalOperator", + "icon":"WebViewIcon2", + "name":"Relational Operator3", + "label":"Relational Operator3", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "OutDataTypeStr", + "InputSameDT", + "Operator", + "RndMeth", + "SampleTime", + "ZeroCross" + ], + "values":[ + "boolean", + "off", + "~=", + "Simplest", + "-1", + "on" + ], + "tabs":[ + "Data Type", + "-Other" + ], + "tabs_idx":[ + 0, + 1 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"RelationalOperator", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1665", + "className":"Simulink.From", + "icon":"WebViewIcon2", + "name":"From17", + "label":"From17", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "GotoTag", + "IconDisplay" + ], + "values":[ + "r_DCabs", "Tag" ], "tabs":[ @@ -1830,11 +1808,60 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:1523", + "sid":"BLDCmotorControl_R2017b:2687:1329", + "className":"Simulink.Constant", + "icon":"WebViewIcon2", + "name":"r_commDCDeacv", + "label":"r_commDCDeacv", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "Value", + "OutDataTypeStr", + "FramePeriod", + "LockScale", + "OutMax", + "OutMin", + "SampleTime", + "VectorParams1D" + ], + "values":[ + "r_commDCDeacv", + "Inherit: Inherit via back propagation", + "inf", + "off", + "[]", + "[]", + "inf", + "on" + ], + "tabs":[ + "Main", + "Signal Attributes", + "-Other" + ], + "tabs_idx":[ + 0, + 1, + 2 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Constant", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1642", "className":"Simulink.From", "icon":"WebViewIcon2", - "name":"From13", - "label":"From13", + "name":"From15", + "label":"From15", "parent":"BLDCmotorControl_R2017b:2687:59", "inspector":{ "params":[ @@ -1842,7 +1869,7 @@ "IconDisplay" ], "values":[ - "r_DC", + "z_counterRaw", "Tag" ], "tabs":[ @@ -1861,11 +1888,11 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:660", + "sid":"BLDCmotorControl_R2017b:2687:1455", "className":"Simulink.From", "icon":"WebViewIcon2", - "name":"From10", - "label":"From10", + "name":"From19", + "label":"From19", "parent":"BLDCmotorControl_R2017b:2687:59", "inspector":{ "params":[ @@ -1873,7 +1900,7 @@ "IconDisplay" ], "values":[ - "z_counter", + "dz_counter", "Tag" ], "tabs":[ @@ -1891,6 +1918,371 @@ "masktype":"" } }, + { + "sid":"BLDCmotorControl_R2017b:2687:1641", + "className":"Simulink.From", + "icon":"WebViewIcon2", + "name":"From14", + "label":"From14", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "GotoTag", + "IconDisplay" + ], + "values":[ + "z_dirPrev", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"From", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1323", + "className":"Simulink.From", + "icon":"WebViewIcon2", + "name":"From29", + "label":"From29", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "GotoTag", + "IconDisplay" + ], + "values":[ + "n_motAbs", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"From", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1487", + "className":"Simulink.Outport", + "icon":"WebViewIcon2", + "name":"z_counter", + "label":"z_counter", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "Port", + "IconDisplay", + "OutMin", + "OutMax", + "OutDataTypeStr", + "LockScale", + "Unit", + "PortDimensions", + "VarSizeSig", + "SampleTime", + "SignalType", + "BusOutputAsStruct", + "EnsureOutportIsVirtual", + "InitialOutput", + "MustResolveToSignalObject", + "OutputWhenDisabled", + "OutputWhenUnConnected", + "OutputWhenUnconnectedValue", + "SignalName", + "SignalObject", + "SourceOfInitialOutputValue", + "StorageClass", + "VectorParamsAs1DForOutWhenUnconnected" + ], + "values":[ + "4", + "Port number", + "[]", + "[]", + "Inherit: auto", + "off", + "inherit", + "-1", + "Inherit", + "-1", + "auto", + "off", + "off", + "0", + "off", + "reset", + "off", + "0", + "", + [ + ], + "Dialog", + "Auto", + "off" + ], + "tabs":[ + "Main", + "Signal Attributes", + "-Other" + ], + "tabs_idx":[ + 0, + 2, + 11 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Outport", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1380", + "className":"Simulink.From", + "icon":"WebViewIcon2", + "name":"From18", + "label":"From18", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "GotoTag", + "IconDisplay" + ], + "values":[ + "b_advCtrlEna", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"From", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1507", + "className":"Simulink.UnitDelay", + "icon":"WebViewIcon2", + "name":"UnitDelay1", + "label":"UnitDelay1", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "InitialCondition", + "InputProcessing", + "SampleTime", + "CodeGenStateStorageTypeQualifier", + "StateMustResolveToSignalObject", + "StateName", + "StateSignalObject", + "StateStorageClass" + ], + "values":[ + "0", + "Elements as channels (sample based)", + "-1", + "", + "off", + "", + [ + ], + "Auto" + ], + "tabs":[ + "Main", + "-Other" + ], + "tabs_idx":[ + 0, + 3 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"UnitDelay", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:659", + "className":"Simulink.Mux", + "icon":"WebViewIcon2", + "name":"Mux1", + "label":"Mux1", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "Inputs", + "DisplayOption" + ], + "values":[ + "2", + "bar" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Mux", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1362", + "className":"Simulink.Goto", + "icon":"WebViewIcon2", + "name":"Goto9", + "label":"Goto9", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "GotoTag", + "TagVisibility", + "IconDisplay" + ], + "values":[ + "dz_counter", + "local", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Goto", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1676", + "className":"Simulink.Outport", + "icon":"WebViewIcon2", + "name":"n_motAbs", + "label":"n_motAbs", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "Port", + "IconDisplay", + "OutMin", + "OutMax", + "OutDataTypeStr", + "LockScale", + "Unit", + "PortDimensions", + "VarSizeSig", + "SampleTime", + "SignalType", + "BusOutputAsStruct", + "EnsureOutportIsVirtual", + "InitialOutput", + "MustResolveToSignalObject", + "OutputWhenDisabled", + "OutputWhenUnConnected", + "OutputWhenUnconnectedValue", + "SignalName", + "SignalObject", + "SourceOfInitialOutputValue", + "StorageClass", + "VectorParamsAs1DForOutWhenUnconnected" + ], + "values":[ + "2", + "Port number", + "[]", + "[]", + "Inherit: auto", + "off", + "inherit", + "-1", + "Inherit", + "-1", + "auto", + "off", + "off", + "[]", + "off", + "held", + "off", + "0", + "", + [ + ], + "Dialog", + "Auto", + "off" + ], + "tabs":[ + "Main", + "Signal Attributes", + "-Other" + ], + "tabs_idx":[ + 0, + 2, + 11 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Outport", + "masktype":"" + } + }, { "sid":"BLDCmotorControl_R2017b:2687:1340", "className":"Simulink.SubSystem", @@ -1989,52 +2381,50 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:786", - "className":"Simulink.Goto", + "sid":"BLDCmotorControl_R2017b:2687:1361", + "className":"Simulink.From", "icon":"WebViewIcon2", - "name":"Goto5", - "label":"Goto5", + "name":"From2", + "label":"From2", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "GotoTag", + "IconDisplay" + ], + "values":[ + "z_counterRawPrev", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"From", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:660", + "className":"Simulink.From", + "icon":"WebViewIcon2", + "name":"From10", + "label":"From10", "parent":"BLDCmotorControl_R2017b:2687:59", "inspector":{ "params":[ "GotoTag", - "TagVisibility", "IconDisplay" ], "values":[ "z_counter", - "local", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Goto", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1641", - "className":"Simulink.From", - "icon":"WebViewIcon2", - "name":"From14", - "label":"From14", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "GotoTag", - "IconDisplay" - ], - "values":[ - "z_dirPrev", "Tag" ], "tabs":[ @@ -2053,116 +2443,63 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:972", - "className":"Simulink.From", + "sid":"BLDCmotorControl_R2017b:2687:1381", + "className":"Simulink.Outport", "icon":"WebViewIcon2", - "name":"From7", - "label":"From7", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "GotoTag", - "IconDisplay" - ], - "values":[ - "n_motRaw", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"From", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1320", - "className":"Simulink.Abs", - "icon":"WebViewIcon2", - "name":"Abs5", - "label":"Abs5", + "name":"b_advCtrlEna", + "label":"b_advCtrlEna", "parent":"BLDCmotorControl_R2017b:2687:59", "inspector":{ "params":[ + "Port", + "IconDisplay", + "OutMin", + "OutMax", "OutDataTypeStr", "LockScale", - "OutMax", - "OutMin", - "RndMeth", + "Unit", + "PortDimensions", + "VarSizeSig", "SampleTime", - "SaturateOnIntegerOverflow", - "ZeroCross" + "SignalType", + "BusOutputAsStruct", + "EnsureOutportIsVirtual", + "InitialOutput", + "MustResolveToSignalObject", + "OutputWhenDisabled", + "OutputWhenUnConnected", + "OutputWhenUnconnectedValue", + "SignalName", + "SignalObject", + "SourceOfInitialOutputValue", + "StorageClass", + "VectorParamsAs1DForOutWhenUnconnected" ], "values":[ - "Inherit: Inherit via back propagation", + "3", + "Port number", + "[]", + "[]", + "Inherit: auto", "off", - "[]", - "[]", - "Zero", + "inherit", "-1", + "Inherit", + "-1", + "auto", + "off", + "off", + "[]", + "off", + "held", "off", - "on" - ], - "tabs":[ - "Signal Attributes", - "-Other" - ], - "tabs_idx":[ - 0, - 1 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Abs", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1518", - "className":"Simulink.Relay", - "icon":"WebViewIcon2", - "name":"dz_counter", - "label":"dz_counter", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "OnSwitchValue", - "OffSwitchValue", - "OnOutputValue", - "OffOutputValue", - "OutDataTypeStr", - "InputProcessing", - "LockScale", - "OutMax", - "OutMin", - "SampleTime", - "ZeroCross" - ], - "values":[ - "dz_counterHi", - "dz_counterLo", "0", - "1", - "boolean", - "Elements as channels (sample based)", - "off", - "[]", - "[]", - "-1", - "on" + "", + [ + ], + "Dialog", + "Auto", + "off" ], "tabs":[ "Main", @@ -2171,8 +2508,8 @@ ], "tabs_idx":[ 0, - 4, - 5 + 2, + 11 ] }, "viewer":{ @@ -2181,7 +2518,7 @@ "obj_viewer":[ ], "finder":{ - "blocktype":"Relay", + "blocktype":"Outport", "masktype":"" } }, @@ -2232,85 +2569,6 @@ "masktype":"" } }, - { - "sid":"BLDCmotorControl_R2017b:2687:1507", - "className":"Simulink.UnitDelay", - "icon":"WebViewIcon2", - "name":"UnitDelay1", - "label":"UnitDelay1", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "InitialCondition", - "InputProcessing", - "SampleTime", - "CodeGenStateStorageTypeQualifier", - "StateMustResolveToSignalObject", - "StateName", - "StateSignalObject", - "StateStorageClass" - ], - "values":[ - "0", - "Elements as channels (sample based)", - "-1", - "", - "off", - "", - [ - ], - "Auto" - ], - "tabs":[ - "Main", - "-Other" - ], - "tabs_idx":[ - 0, - 3 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"UnitDelay", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1397", - "className":"Simulink.From", - "icon":"WebViewIcon2", - "name":"From42", - "label":"From42", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "GotoTag", - "IconDisplay" - ], - "values":[ - "z_dir", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"From", - "masktype":"" - } - }, { "sid":"BLDCmotorControl_R2017b:2687:1629", "className":"Simulink.Inport", @@ -2379,11 +2637,44 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:1486", + "sid":"BLDCmotorControl_R2017b:2687:1674", + "className":"Simulink.Goto", + "icon":"WebViewIcon2", + "name":"Goto3", + "label":"Goto3", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "GotoTag", + "TagVisibility", + "IconDisplay" + ], + "values":[ + "n_motAbs", + "local", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Goto", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1675", "className":"Simulink.From", "icon":"WebViewIcon2", - "name":"From12", - "label":"From12", + "name":"From20", + "label":"From20", "parent":"BLDCmotorControl_R2017b:2687:59", "inspector":{ "params":[ @@ -2391,7 +2682,7 @@ "IconDisplay" ], "values":[ - "z_counter", + "n_motAbs", "Tag" ], "tabs":[ @@ -2410,21 +2701,19 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:1372", - "className":"Simulink.Goto", + "sid":"BLDCmotorControl_R2017b:2687:1523", + "className":"Simulink.From", "icon":"WebViewIcon2", - "name":"Goto17", - "label":"Goto17", + "name":"From13", + "label":"From13", "parent":"BLDCmotorControl_R2017b:2687:59", "inspector":{ "params":[ "GotoTag", - "TagVisibility", "IconDisplay" ], "values":[ - "b_advCtrlEna", - "local", + "r_DC", "Tag" ], "tabs":[ @@ -2438,138 +2727,7 @@ "obj_viewer":[ ], "finder":{ - "blocktype":"Goto", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1398", - "className":"Simulink.Goto", - "icon":"WebViewIcon2", - "name":"Goto15", - "label":"Goto15", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "GotoTag", - "TagVisibility", - "IconDisplay" - ], - "values":[ - "n_mot", - "local", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Goto", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1370", - "className":"Simulink.Inport", - "icon":"WebViewIcon2", - "name":"z_ctrlTypSel", - "label":"z_ctrlTypSel", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "Port", - "IconDisplay", - "OutMin", - "OutMax", - "OutDataTypeStr", - "LockScale", - "Unit", - "PortDimensions", - "VarSizeSig", - "SampleTime", - "SignalType", - "BusOutputAsStruct", - "InputConnect", - "Interpolate", - "LatchByDelayingOutsideSignal", - "LatchInputForFeedbackSignals", - "OutputFunctionCall" - ], - "values":[ - "3", - "Port number", - "[]", - "[]", - "Inherit: auto", - "off", - "inherit", - "-1", - "Inherit", - "-1", - "auto", - "off", - "", - "on", - "off", - "off", - "off" - ], - "tabs":[ - "Main", - "Signal Attributes", - "-Other" - ], - "tabs_idx":[ - 0, - 2, - 11 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Inport", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1525", - "className":"Simulink.Signum", - "icon":"WebViewIcon2", - "name":"Sign", - "label":"Sign", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "ZeroCross", - "SampleTime" - ], - "values":[ - "on", - "-1" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Signum", + "blocktype":"From", "masktype":"" } }, @@ -2641,19 +2799,21 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:1361", - "className":"Simulink.From", + "sid":"BLDCmotorControl_R2017b:2687:1398", + "className":"Simulink.Goto", "icon":"WebViewIcon2", - "name":"From2", - "label":"From2", + "name":"Goto15", + "label":"Goto15", "parent":"BLDCmotorControl_R2017b:2687:59", "inspector":{ "params":[ "GotoTag", + "TagVisibility", "IconDisplay" ], "values":[ - "z_counterRawPrev", + "n_mot", + "local", "Tag" ], "tabs":[ @@ -2667,45 +2827,71 @@ "obj_viewer":[ ], "finder":{ - "blocktype":"From", + "blocktype":"Goto", "masktype":"" } }, { - "sid":"BLDCmotorControl_R2017b:2687:1651", - "className":"Simulink.SubSystem", - "icon":"WebViewIcon6", - "name":"rst_DelayLim", - "label":"rst_DelayLim", + "sid":"BLDCmotorControl_R2017b:2687:1328", + "className":"Simulink.Relay", + "icon":"WebViewIcon2", + "name":"n_commDeacv", + "label":"n_commDeacv", "parent":"BLDCmotorControl_R2017b:2687:59", "inspector":{ "params":[ - "z_cntMaxLim" + "OnSwitchValue", + "OffSwitchValue", + "OnOutputValue", + "OffOutputValue", + "OutDataTypeStr", + "InputProcessing", + "LockScale", + "OutMax", + "OutMin", + "SampleTime", + "ZeroCross" ], "values":[ - "z_maxCntRst" + "n_commDeacvHi", + "n_commAcvLo", + "1", + "0", + "boolean", + "Elements as channels (sample based)", + "off", + "[]", + "[]", + "-1", + "on" ], "tabs":[ + "Main", + "Signal Attributes", + "-Other" ], "tabs_idx":[ + 0, + 4, + 5 ] }, "viewer":{ - "jshandler":"webview/handlers/ContainerHandler" + "jshandler":"webview/handlers/ElementHandler" }, "obj_viewer":[ ], "finder":{ - "blocktype":"SubSystem", + "blocktype":"Relay", "masktype":"" } }, { - "sid":"BLDCmotorControl_R2017b:2687:1381", - "className":"Simulink.Outport", + "sid":"BLDCmotorControl_R2017b:2687:1370", + "className":"Simulink.Inport", "icon":"WebViewIcon2", - "name":"b_advCtrlEna", - "label":"b_advCtrlEna", + "name":"z_ctrlTypSel", + "label":"z_ctrlTypSel", "parent":"BLDCmotorControl_R2017b:2687:59", "inspector":{ "params":[ @@ -2721,20 +2907,14 @@ "SampleTime", "SignalType", "BusOutputAsStruct", - "EnsureOutportIsVirtual", - "InitialOutput", - "MustResolveToSignalObject", - "OutputWhenDisabled", - "OutputWhenUnConnected", - "OutputWhenUnconnectedValue", - "SignalName", - "SignalObject", - "SourceOfInitialOutputValue", - "StorageClass", - "VectorParamsAs1DForOutWhenUnconnected" + "InputConnect", + "Interpolate", + "LatchByDelayingOutsideSignal", + "LatchInputForFeedbackSignals", + "OutputFunctionCall" ], "values":[ - "2", + "3", "Port number", "[]", "[]", @@ -2746,17 +2926,10 @@ "-1", "auto", "off", - "off", - "[]", - "off", - "held", - "off", - "0", "", - [ - ], - "Dialog", - "Auto", + "on", + "off", + "off", "off" ], "tabs":[ @@ -2776,16 +2949,47 @@ "obj_viewer":[ ], "finder":{ - "blocktype":"Outport", + "blocktype":"Inport", "masktype":"" } }, { - "sid":"BLDCmotorControl_R2017b:2687:1664", + "sid":"BLDCmotorControl_R2017b:2687:842", + "className":"Simulink.Mux", + "icon":"WebViewIcon2", + "name":"Mux2", + "label":"Mux2", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "Inputs", + "DisplayOption" + ], + "values":[ + "2", + "bar" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Mux", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:786", "className":"Simulink.Goto", "icon":"WebViewIcon2", - "name":"Goto10", - "label":"Goto10", + "name":"Goto5", + "label":"Goto5", "parent":"BLDCmotorControl_R2017b:2687:59", "inspector":{ "params":[ @@ -2794,7 +2998,7 @@ "IconDisplay" ], "values":[ - "r_DCabs", + "z_counter", "local", "Tag" ], @@ -2881,21 +3085,19 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:1362", - "className":"Simulink.Goto", + "sid":"BLDCmotorControl_R2017b:2687:1324", + "className":"Simulink.From", "icon":"WebViewIcon2", - "name":"Goto9", - "label":"Goto9", + "name":"From30", + "label":"From30", "parent":"BLDCmotorControl_R2017b:2687:59", "inspector":{ "params":[ "GotoTag", - "TagVisibility", "IconDisplay" ], "values":[ - "dz_counter", - "local", + "z_ctrlTypSel", "Tag" ], "tabs":[ @@ -2909,25 +3111,25 @@ "obj_viewer":[ ], "finder":{ - "blocktype":"Goto", + "blocktype":"From", "masktype":"" } }, { - "sid":"BLDCmotorControl_R2017b:2687:1526", - "className":"Simulink.Signum", + "sid":"BLDCmotorControl_R2017b:2687:1486", + "className":"Simulink.From", "icon":"WebViewIcon2", - "name":"Sign1", - "label":"Sign1", + "name":"From12", + "label":"From12", "parent":"BLDCmotorControl_R2017b:2687:59", "inspector":{ "params":[ - "ZeroCross", - "SampleTime" + "GotoTag", + "IconDisplay" ], "values":[ - "on", - "-1" + "z_counter", + "Tag" ], "tabs":[ "Parameter Attributes" @@ -2940,38 +3142,7 @@ "obj_viewer":[ ], "finder":{ - "blocktype":"Signum", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:659", - "className":"Simulink.Mux", - "icon":"WebViewIcon2", - "name":"Mux1", - "label":"Mux1", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "Inputs", - "DisplayOption" - ], - "values":[ - "2", - "bar" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Mux", + "blocktype":"From", "masktype":"" } }, @@ -3024,80 +3195,6 @@ "masktype":"" } }, - { - "sid":"BLDCmotorControl_R2017b:2687:1323", - "className":"Simulink.From", - "icon":"WebViewIcon2", - "name":"From29", - "label":"From29", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "GotoTag", - "IconDisplay" - ], - "values":[ - "n_mot", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"From", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1326", - "className":"Simulink.RelationalOperator", - "icon":"WebViewIcon2", - "name":"Relational Operator3", - "label":"Relational Operator3", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "OutDataTypeStr", - "InputSameDT", - "Operator", - "RndMeth", - "SampleTime", - "ZeroCross" - ], - "values":[ - "boolean", - "off", - "~=", - "Simplest", - "-1", - "on" - ], - "tabs":[ - "Data Type", - "-Other" - ], - "tabs_idx":[ - 0, - 1 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"RelationalOperator", - "masktype":"" - } - }, { "sid":"BLDCmotorControl_R2017b:2687:1325", "className":"Simulink.Logic", @@ -3906,57 +4003,6 @@ "finder":[ ] }, - { - "sid":"BLDCmotorControl_R2017b:2687:1323#out:1", - "className":"Simulink.Line", - "icon":"WebViewIcon4", - "name":"", - "label":"", - "parent":"BLDCmotorControl_R2017b:2687:59", - "inspector":{ - "params":[ - "SignalNameFromLabel", - "MustResolveToSignal", - "ShowPropagatedSignal", - "DataLogging", - "TestPoint", - "SignalObjectPackage", - "StorageClass", - "Description", - "documentLink" - ], - "values":[ - "", - "off", - "off", - "off", - "off", - "Simulink", - "Auto", - "", - "" - ], - "tabs":[ - "Parameter Attributes", - "Logging and Accessibility", - "Code Generation", - "Documentation" - ], - "tabs_idx":[ - 0, - 3, - 5, - 7 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":[ - ] - }, { "sid":"BLDCmotorControl_R2017b:2687:1324#out:1", "className":"Simulink.Line", @@ -4009,7 +4055,7 @@ ] }, { - "sid":"BLDCmotorControl_R2017b:2687:1320#out:1", + "sid":"BLDCmotorControl_R2017b:2687:1323#out:1", "className":"Simulink.Line", "icon":"WebViewIcon4", "name":"", @@ -5792,5 +5838,107 @@ ], "finder":[ ] + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1401#out:3", + "className":"Simulink.Line", + "icon":"WebViewIcon4", + "name":"", + "label":"", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "SignalNameFromLabel", + "MustResolveToSignal", + "ShowPropagatedSignal", + "DataLogging", + "TestPoint", + "SignalObjectPackage", + "StorageClass", + "Description", + "documentLink" + ], + "values":[ + "", + "off", + "off", + "off", + "off", + "Simulink", + "Auto", + "", + "" + ], + "tabs":[ + "Parameter Attributes", + "Logging and Accessibility", + "Code Generation", + "Documentation" + ], + "tabs_idx":[ + 0, + 3, + 5, + 7 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":[ + ] + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1675#out:1", + "className":"Simulink.Line", + "icon":"WebViewIcon4", + "name":"", + "label":"", + "parent":"BLDCmotorControl_R2017b:2687:59", + "inspector":{ + "params":[ + "SignalNameFromLabel", + "MustResolveToSignal", + "ShowPropagatedSignal", + "DataLogging", + "TestPoint", + "SignalObjectPackage", + "StorageClass", + "Description", + "documentLink" + ], + "values":[ + "", + "off", + "off", + "off", + "off", + "Simulink", + "Auto", + "", + "" + ], + "tabs":[ + "Parameter Attributes", + "Logging and Accessibility", + "Code Generation", + "Documentation" + ], + "tabs_idx":[ + 0, + 3, + 5, + 7 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":[ + ] } ] \ No newline at end of file diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_59_d.png b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_59_d.png index d8016ef..da76322 100644 Binary files a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_59_d.png and b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_59_d.png differ diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_59_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_59_d.svg index bd25462..aaf0f67 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_59_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_59_d.svg @@ -142,7 +142,7 @@ - + @@ -616,10 +616,10 @@ - + - + @@ -629,29 +629,29 @@ - + 1 - + - + - + - + n_mot @@ -664,10 +664,10 @@ - + - + @@ -677,29 +677,29 @@ - + [n_mot] - + - + - + - + int32 @@ -855,218 +855,116 @@ - - - + + + - - + + - + - - 3 - - - - - - - - - - - - - - + + u - + - - z_counter + + rst + + + + + + + + y - - - - - - - - - - - - - - - - - - - + - - r_commDCDeacv - - - - - - - - - - - - - - + + 1 - + - - r_commDCDeacv - - - - - - - + + z - + - - int32 + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - n_commDeacv + + - - + + - - + + - - boolean + + int16 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1077,44 +975,76 @@ - - - + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - 4 - - - + + - - - + + + - + - - z_counterRaw + + int8 @@ -1127,7 +1057,7 @@ - + @@ -1187,59 +1117,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - int32 - - - - - - - - - + @@ -1247,27 +1129,27 @@ - + - + - + - + - + - + @@ -1293,11 +1175,11 @@ - + - + boolean @@ -1307,535 +1189,11 @@ - - - - - - - - - - - - - - - - - - u1 - - - - - - - - if(u1 ~= 0) - - - - - - - - - - - - - - - - - - - - - - action - - - - - - - - - - - - - - - - - - - - - - - - - - [n_motRaw] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [z_dirPrev] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [r_DC] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [b_edge] - - - - - - - - - - - - - - - - - - - - - - uint8 - - - - - - - - - - - - - - - - - - - - - - - - - - [z_counter] - - - - - - - - - - - - - - - - - - - - - - int16 - - - - - - - - - - - - - - - - - - - - - - - - - - [z_dir] - - - - - - - - - - - - - - - - - - - - - - int8 - - - - - - - - - - - - - - - - - - - - - - - - - - [z_ctrlTypSel] - - - - - - - - - - - - - - - - - - - - - - uint8 - - - - - - - - - - - - - - - - - - - - - - - - - - [z_ctrlTypSel] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [dz_counter] - - - - - - - - - - - - - - - - - - - - - - int16 - - - - - - - - - - - - - - - - - - - - - - - - - - [b_advCtrlEna] - - - - - - - - - - - - - - - - - - - - - - boolean - - - - - - - - - - - - - - - - - - - - - - - - - - [r_DCabs] - - - - - - - - - - - - - - - - - - - - - - int32 - - - - - - - - - + @@ -1849,53 +1207,61 @@ - + - + z_dir - + - + z_dirPrev - + - + z_counter - + - + z_counterRaw - - + + - + n_motRaw - - + + - + n_mot + + + + + + + n_motAbs + @@ -1923,11 +1289,11 @@ - + - + Motor_Speed_Calculation @@ -1940,15 +1306,15 @@ - + - - + + - + int32 @@ -1961,15 +1327,36 @@ - + - - + + - + + int32 + + + + + + + + + + + + + + + + + + + + int32 @@ -1981,1661 +1368,62 @@ - - - - - - - - - - - - - - - - - - - - - - [z_counterRaw] - - - - - - - - - - - - - - - - - - - - - - int16 - - - - - - - - - - - - - - - - - - - - - - - - - - [z_counterRaw] - - - - - - - - - - - - - - - - - - - - - - int16 - - - - - - - - - - - - - - - - - - - - - - - - - - [b_advCtrlEna] - - - - - - - - - - - - - - - - - - - - - - boolean - - - - - - - - - - - - - - - - - - - - - - - - - - [r_DC] - - - - - - - - - - - - - - - - - - - - - - int32 - - - - - - - - - - - - - - - - - - - - - - - - - - [z_counter] - - - - - - - - - - - - - - - - - - - - - - int16 - - - - - - - - - - - - - - + - - + + + + + - - + + - - z_counterRawPrev + + u1 - - + + - - z_counter - - - - - - - - dz_counter - - - - - - - - if { } + + if(u1 ~= 0) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Counter_Hold_and_Error_Calculation + + - - - - - - - - + + - - + + - - int16 - - - - - - - - - - - - - - - - - - - - + action - - - - - - - - - - - - - - - - - int16 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [z_counter] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [z_dirPrev] - - - - - - - - - - - - - - - - - - - - - - int8 - - - - - - - - - - - - - - - - - - - - - - - - - - [n_motRaw] - - - - - - - - - - - - - - - - - - - - - - int32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - int32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - dz_counter - - - - - - - - - - - - - - - boolean - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - int16 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - int16 - - - - - - - - - - - - - - - - - - - - - - - - - - [z_dir] - - - - - - - - - - - - - - - - - - - - - - int8 - - - - - - - - - - - - - - - - - - - - - - - - - - 6 - - - - - - - - - - - - - - - - - - - - - - z_dirPrev - - - - - - - - - - - - - - - int8 - - - - - - - - - - - - - - - - - - - - - - - - - - [z_counter] - - - - - - - - - - - - - - - - - - - - - - int16 - - - - - - - - - - - - - - - - - - - - - - - - - - [b_advCtrlEna] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [n_mot] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3 - - - - - - - - - - - - - - - - - - - - - - z_ctrlTypSel - - - - - - - - - - - - - - - uint8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - int8 - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - - - - - - - - - - - - - - - - - - - - - - r_DCabs - - - - - - - - - - - - - - - int32 - - - - - - - - - - - - - - - - - - - - - - - - - - [z_counterRawPrev] - - - - - - - - - - - - - - - - - - - - - - int16 - - - - - - - - - - - - - - - - - - - - - - - - - - u - - - - - - - - rst - - - - - - - - y - - - - - - - - 1 - - - - - - - - z - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - int16 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2 - - - - - - - - - - - - - - - - - - - - - - b_advCtrlEna - - - - - - - - - - - - - - - - - - - - - - - - - - [r_DCabs] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - - r_DC - - - - - - - - - - - - - - - int32 - - - - - - - - - - - - - - - - - - - - - - - - - - [dz_counter] - - - - - - - - - - - @@ -3644,7 +1432,7 @@ - + @@ -3652,35 +1440,35 @@ - + - + - + - + - + - + - + - + @@ -3706,11 +1494,11 @@ - + - + int32 @@ -3722,44 +1510,29 @@ - - - + + + - - + + - - + + - - + + [r_DC] - - - - - - - - - - - - - - - - - int16 + + @@ -3770,43 +1543,253 @@ - - - + + + - - + + - - + + - - CTRL_COMM + + [b_advCtrlEna] - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + [r_DCabs] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dz_counter - + + + + + + + + + + boolean + + + + + + + + + + + + + + + + + + + + + + + + + + [n_motRaw] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [b_edge] + + + + + + + + + + + + + - - + + - + uint8 @@ -3818,43 +1801,91 @@ - - + + - + - + - - [n_mot] + + [z_counter] - + - + - - + + - + + int16 + + + + + + + + + + + + + + + + + + + + + + + + + + [n_motRaw] + + + + + + + + + + + + + + + + + + + + + int32 @@ -3864,11 +1895,269 @@ + + + + + + + + + + + + + + + + + + [z_dirPrev] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + + + + + + + + + + + + + + + + + + + + + z_counterRaw + + + + + + + + + + + + + + + + + + + + + + + + + + [z_ctrlTypSel] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [z_counterRaw] + + + + + + + + + + + + + + + + + + + + + + int16 + + + + + + + + + + + + + + + + + + + + + + + + + + [z_dir] + + + + + + + + + + + + + + + + + + + + + + int8 + + + + + + + + + + + + + + + + + + + + + + + + + + [z_dir] + + + + + + + + + + + + + + + + + + + + + + int8 + + + + + + + + - + @@ -3876,19 +2165,19 @@ - + - + - + - + @@ -3914,11 +2203,11 @@ - + - + boolean @@ -3928,6 +2217,1795 @@ + + + + + + + + + + + + + + + + + + [r_DCabs] + + + + + + + + + + + + + + + + + + + + + + int32 + + + + + + + + + + + + + + + + + + + + + + + + + + [b_advCtrlEna] + + + + + + + + + + + + + + + + + + + + + + boolean + + + + + + + + + + + + + + + + + + + + + + + + + + r_commDCDeacv + + + + + + + + + + + + + + + + + + + + + + r_commDCDeacv + + + + + + + + + + + + + + + int32 + + + + + + + + + + + + + + + + + + + + + + + + + + [z_counterRaw] + + + + + + + + + + + + + + + + + + + + + + int16 + + + + + + + + + + + + + + + + + + + + + + + + + + [dz_counter] + + + + + + + + + + + + + + + + + + + + + + int16 + + + + + + + + + + + + + + + + + + + + + + + + + + [z_dirPrev] + + + + + + + + + + + + + + + + + + + + + + int8 + + + + + + + + + + + + + + + + + + + + + + + + + + [n_motAbs] + + + + + + + + + + + + + + + + + + + + + + int32 + + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + + + + + + + + + + + + + + + + + + z_counter + + + + + + + + + + + + + + + + + + + + + + + + + + [b_advCtrlEna] + + + + + + + + + + + + + + + + + + + + + + boolean + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + int16 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + int16 + + + + + + + + + + + + + + + + + + + + + + + + + + [dz_counter] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + n_motAbs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + z_counterRawPrev + + + + + + + + z_counter + + + + + + + + dz_counter + + + + + + + + if { } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Counter_Hold_and_Error_Calculation + + + + + + + + + + + + + + + + + + + + + int16 + + + + + + + + + + + + + + + + + + + + + action + + + + + + + + + + + + + + + + + + + + + int16 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [z_counterRawPrev] + + + + + + + + + + + + + + + + + + + + + + int16 + + + + + + + + + + + + + + + + + + + + + + + + + + [z_counter] + + + + + + + + + + + + + + + + + + + + + + int16 + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + + + + + + + + + + + + + + + + + + + + + + b_advCtrlEna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + int16 + + + + + + + + + + + + + + + + + + + + + + + + + + 6 + + + + + + + + + + + + + + + + + + + + + + z_dirPrev + + + + + + + + + + + + + + + int8 + + + + + + + + + + + + + + + + + + + + + + + + + + [n_motAbs] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [n_motAbs] + + + + + + + + + + + + + + + + + + + + + + int32 + + + + + + + + + + + + + + + + + + + + + + + + + + [r_DC] + + + + + + + + + + + + + + + + + + + + + + int32 + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + r_DCabs + + + + + + + + + + + + + + + int32 + + + + + + + + + + + + + + + + + + + + + + + + + + [n_mot] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + n_commDeacv + + + + + + + + + + + + + + + boolean + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + + + + + + + + + + + + + + + + + + + + + + z_ctrlTypSel + + + + + + + + + + + + + + + uint8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + int32 + + + + + + + + + + + + + + + + + + + + + + + + + + [z_counter] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + r_DC + + + + + + + + + + + + + + + int32 + + + + + + + + + + + + + + + + + + + + + + + + + + [z_ctrlTypSel] + + + + + + + + + + + + + + + + + + + + + + uint8 + + + + + + + + + + + + + + + + + + + + + + + + + + [z_counter] + + + + + + + + + + + + + + + + + + + + + + int16 + + + + + + + + + + + + + + + + + + + + + + + + + + CTRL_COMM + + + + + + + + + + + + + + + + + + + + + + uint8 + + + + + + + + @@ -3940,19 +4018,19 @@ - + - + - + - + @@ -3967,11 +4045,11 @@ - + - + boolean @@ -4177,10 +4255,10 @@ - + - + @@ -4203,11 +4281,11 @@ - + - + @@ -4242,20 +4320,6 @@ - - - - - - - - - - - - - - @@ -4270,7 +4334,7 @@ - + @@ -4469,11 +4533,11 @@ - + - + @@ -4483,11 +4547,11 @@ - + - + @@ -4760,7 +4824,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_6_d.json b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_6_d.json index bf6236b..85ceaeb 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_6_d.json +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_6_d.json @@ -234,7 +234,7 @@ "VectorParamsAs1DForOutWhenUnconnected" ], "values":[ - "7", + "8", "Port number", "[]", "[]", @@ -1656,130 +1656,11 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:1383", - "className":"Simulink.Outport", - "icon":"WebViewIcon2", - "name":"b_advCtrlEna", - "label":"b_advCtrlEna", - "parent":"BLDCmotorControl_R2017b:2687:6", - "inspector":{ - "params":[ - "Port", - "IconDisplay", - "OutMin", - "OutMax", - "OutDataTypeStr", - "LockScale", - "Unit", - "PortDimensions", - "VarSizeSig", - "SampleTime", - "SignalType", - "BusOutputAsStruct", - "EnsureOutportIsVirtual", - "InitialOutput", - "MustResolveToSignalObject", - "OutputWhenDisabled", - "OutputWhenUnConnected", - "OutputWhenUnconnectedValue", - "SignalName", - "SignalObject", - "SourceOfInitialOutputValue", - "StorageClass", - "VectorParamsAs1DForOutWhenUnconnected" - ], - "values":[ - "6", - "Port number", - "[]", - "[]", - "Inherit: auto", - "off", - "inherit", - "-1", - "Inherit", - "-1", - "auto", - "off", - "off", - "[]", - "off", - "held", - "off", - "0", - "", - [ - ], - "Dialog", - "Auto", - "off" - ], - "tabs":[ - "Main", - "Signal Attributes", - "-Other" - ], - "tabs_idx":[ - 0, - 2, - 11 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Outport", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1313", - "className":"Simulink.If", - "icon":"WebViewIcon2", - "name":"If2", - "label":"If2", - "parent":"BLDCmotorControl_R2017b:2687:6", - "inspector":{ - "params":[ - "NumInputs", - "IfExpression", - "ElseIfExpressions", - "ShowElse", - "ZeroCross", - "SampleTime" - ], - "values":[ - "1", - "u1 ~= 0", - "", - "off", - "on", - "-1" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"If", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1384", + "sid":"BLDCmotorControl_R2017b:2687:1490", "className":"Simulink.Goto", "icon":"WebViewIcon2", - "name":"Goto3", - "label":"Goto3", + "name":"Goto6", + "label":"Goto6", "parent":"BLDCmotorControl_R2017b:2687:6", "inspector":{ "params":[ @@ -1788,7 +1669,7 @@ "IconDisplay" ], "values":[ - "b_advCtrlEna", + "z_counterRaw", "local", "Tag" ], @@ -1808,11 +1689,11 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:1490", + "sid":"BLDCmotorControl_R2017b:2687:1376", "className":"Simulink.Goto", "icon":"WebViewIcon2", - "name":"Goto6", - "label":"Goto6", + "name":"Goto18", + "label":"Goto18", "parent":"BLDCmotorControl_R2017b:2687:6", "inspector":{ "params":[ @@ -1821,7 +1702,40 @@ "IconDisplay" ], "values":[ - "z_counterRaw", + "r_DC", + "local", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Goto", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1677", + "className":"Simulink.Goto", + "icon":"WebViewIcon2", + "name":"Goto11", + "label":"Goto11", + "parent":"BLDCmotorControl_R2017b:2687:6", + "inspector":{ + "params":[ + "GotoTag", + "TagVisibility", + "IconDisplay" + ], + "values":[ + "n_motAbs", "local", "Tag" ], @@ -1873,39 +1787,6 @@ "masktype":"" } }, - { - "sid":"BLDCmotorControl_R2017b:2687:1489", - "className":"Simulink.Goto", - "icon":"WebViewIcon2", - "name":"Goto5", - "label":"Goto5", - "parent":"BLDCmotorControl_R2017b:2687:6", - "inspector":{ - "params":[ - "GotoTag", - "TagVisibility", - "IconDisplay" - ], - "values":[ - "z_counter", - "local", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Goto", - "masktype":"" - } - }, { "sid":"BLDCmotorControl_R2017b:2687:1666", "className":"Simulink.From", @@ -1937,6 +1818,179 @@ "masktype":"" } }, + { + "sid":"BLDCmotorControl_R2017b:2687:1633", + "className":"Simulink.From", + "icon":"WebViewIcon2", + "name":"From15", + "label":"From15", + "parent":"BLDCmotorControl_R2017b:2687:6", + "inspector":{ + "params":[ + "GotoTag", + "IconDisplay" + ], + "values":[ + "z_dirPrev", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"From", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1382", + "className":"Simulink.From", + "icon":"WebViewIcon2", + "name":"From18", + "label":"From18", + "parent":"BLDCmotorControl_R2017b:2687:6", + "inspector":{ + "params":[ + "GotoTag", + "IconDisplay" + ], + "values":[ + "b_advCtrlEna", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"From", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1383", + "className":"Simulink.Outport", + "icon":"WebViewIcon2", + "name":"b_advCtrlEna", + "label":"b_advCtrlEna", + "parent":"BLDCmotorControl_R2017b:2687:6", + "inspector":{ + "params":[ + "Port", + "IconDisplay", + "OutMin", + "OutMax", + "OutDataTypeStr", + "LockScale", + "Unit", + "PortDimensions", + "VarSizeSig", + "SampleTime", + "SignalType", + "BusOutputAsStruct", + "EnsureOutportIsVirtual", + "InitialOutput", + "MustResolveToSignalObject", + "OutputWhenDisabled", + "OutputWhenUnConnected", + "OutputWhenUnconnectedValue", + "SignalName", + "SignalObject", + "SourceOfInitialOutputValue", + "StorageClass", + "VectorParamsAs1DForOutWhenUnconnected" + ], + "values":[ + "7", + "Port number", + "[]", + "[]", + "Inherit: auto", + "off", + "inherit", + "-1", + "Inherit", + "-1", + "auto", + "off", + "off", + "[]", + "off", + "held", + "off", + "0", + "", + [ + ], + "Dialog", + "Auto", + "off" + ], + "tabs":[ + "Main", + "Signal Attributes", + "-Other" + ], + "tabs_idx":[ + 0, + 2, + 11 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Outport", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1377", + "className":"Simulink.From", + "icon":"WebViewIcon2", + "name":"From", + "label":"From", + "parent":"BLDCmotorControl_R2017b:2687:6", + "inspector":{ + "params":[ + "GotoTag", + "IconDisplay" + ], + "values":[ + "z_ctrlTypSel", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"From", + "masktype":"" + } + }, { "sid":"BLDCmotorControl_R2017b:2687:1482", "className":"Simulink.From", @@ -1969,184 +2023,11 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:1481", - "className":"Simulink.From", - "icon":"WebViewIcon2", - "name":"From12", - "label":"From12", - "parent":"BLDCmotorControl_R2017b:2687:6", - "inspector":{ - "params":[ - "GotoTag", - "IconDisplay" - ], - "values":[ - "z_counterRaw", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"From", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1484", - "className":"Simulink.Outport", - "icon":"WebViewIcon2", - "name":"z_counterRaw", - "label":"z_counterRaw", - "parent":"BLDCmotorControl_R2017b:2687:6", - "inspector":{ - "params":[ - "Port", - "IconDisplay", - "OutMin", - "OutMax", - "OutDataTypeStr", - "LockScale", - "Unit", - "PortDimensions", - "VarSizeSig", - "SampleTime", - "SignalType", - "BusOutputAsStruct", - "EnsureOutportIsVirtual", - "InitialOutput", - "MustResolveToSignalObject", - "OutputWhenDisabled", - "OutputWhenUnConnected", - "OutputWhenUnconnectedValue", - "SignalName", - "SignalObject", - "SourceOfInitialOutputValue", - "StorageClass", - "VectorParamsAs1DForOutWhenUnconnected" - ], - "values":[ - "5", - "Port number", - "[]", - "[]", - "Inherit: auto", - "off", - "inherit", - "-1", - "Inherit", - "-1", - "auto", - "off", - "off", - "0", - "off", - "reset", - "off", - "0", - "", - [ - ], - "Dialog", - "Auto", - "off" - ], - "tabs":[ - "Main", - "Signal Attributes", - "-Other" - ], - "tabs_idx":[ - 0, - 2, - 11 - ] - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Outport", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1382", - "className":"Simulink.From", - "icon":"WebViewIcon2", - "name":"From18", - "label":"From18", - "parent":"BLDCmotorControl_R2017b:2687:6", - "inspector":{ - "params":[ - "GotoTag", - "IconDisplay" - ], - "values":[ - "b_advCtrlEna", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"From", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1377", - "className":"Simulink.From", - "icon":"WebViewIcon2", - "name":"From", - "label":"From", - "parent":"BLDCmotorControl_R2017b:2687:6", - "inspector":{ - "params":[ - "GotoTag", - "IconDisplay" - ], - "values":[ - "z_ctrlTypSel", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"From", - "masktype":"" - } - }, - { - "sid":"BLDCmotorControl_R2017b:2687:1634", + "sid":"BLDCmotorControl_R2017b:2687:1384", "className":"Simulink.Goto", "icon":"WebViewIcon2", - "name":"Goto9", - "label":"Goto9", + "name":"Goto3", + "label":"Goto3", "parent":"BLDCmotorControl_R2017b:2687:6", "inspector":{ "params":[ @@ -2155,7 +2036,7 @@ "IconDisplay" ], "values":[ - "z_dirPrev", + "b_advCtrlEna", "local", "Tag" ], @@ -2255,11 +2136,91 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:1378", + "sid":"BLDCmotorControl_R2017b:2687:1484", + "className":"Simulink.Outport", + "icon":"WebViewIcon2", + "name":"z_counterRaw", + "label":"z_counterRaw", + "parent":"BLDCmotorControl_R2017b:2687:6", + "inspector":{ + "params":[ + "Port", + "IconDisplay", + "OutMin", + "OutMax", + "OutDataTypeStr", + "LockScale", + "Unit", + "PortDimensions", + "VarSizeSig", + "SampleTime", + "SignalType", + "BusOutputAsStruct", + "EnsureOutportIsVirtual", + "InitialOutput", + "MustResolveToSignalObject", + "OutputWhenDisabled", + "OutputWhenUnConnected", + "OutputWhenUnconnectedValue", + "SignalName", + "SignalObject", + "SourceOfInitialOutputValue", + "StorageClass", + "VectorParamsAs1DForOutWhenUnconnected" + ], + "values":[ + "5", + "Port number", + "[]", + "[]", + "Inherit: auto", + "off", + "inherit", + "-1", + "Inherit", + "-1", + "auto", + "off", + "off", + "0", + "off", + "reset", + "off", + "0", + "", + [ + ], + "Dialog", + "Auto", + "off" + ], + "tabs":[ + "Main", + "Signal Attributes", + "-Other" + ], + "tabs_idx":[ + 0, + 2, + 11 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Outport", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1678", "className":"Simulink.From", "icon":"WebViewIcon2", - "name":"From11", - "label":"From11", + "name":"From19", + "label":"From19", "parent":"BLDCmotorControl_R2017b:2687:6", "inspector":{ "params":[ @@ -2267,7 +2228,7 @@ "IconDisplay" ], "values":[ - "r_DC", + "n_motAbs", "Tag" ], "tabs":[ @@ -2285,39 +2246,6 @@ "masktype":"" } }, - { - "sid":"BLDCmotorControl_R2017b:2687:1376", - "className":"Simulink.Goto", - "icon":"WebViewIcon2", - "name":"Goto18", - "label":"Goto18", - "parent":"BLDCmotorControl_R2017b:2687:6", - "inspector":{ - "params":[ - "GotoTag", - "TagVisibility", - "IconDisplay" - ], - "values":[ - "r_DC", - "local", - "Tag" - ], - "tabs":[ - "Parameter Attributes" - ], - "tabs_idx":0 - }, - "viewer":{ - "jshandler":"webview/handlers/ElementHandler" - }, - "obj_viewer":[ - ], - "finder":{ - "blocktype":"Goto", - "masktype":"" - } - }, { "sid":"BLDCmotorControl_R2017b:2687:1661", "className":"Simulink.Inport", @@ -2385,6 +2313,86 @@ "masktype":"" } }, + { + "sid":"BLDCmotorControl_R2017b:2687:1679", + "className":"Simulink.Outport", + "icon":"WebViewIcon2", + "name":"n_motAbs", + "label":"n_motAbs", + "parent":"BLDCmotorControl_R2017b:2687:6", + "inspector":{ + "params":[ + "Port", + "IconDisplay", + "OutMin", + "OutMax", + "OutDataTypeStr", + "LockScale", + "Unit", + "PortDimensions", + "VarSizeSig", + "SampleTime", + "SignalType", + "BusOutputAsStruct", + "EnsureOutportIsVirtual", + "InitialOutput", + "MustResolveToSignalObject", + "OutputWhenDisabled", + "OutputWhenUnConnected", + "OutputWhenUnconnectedValue", + "SignalName", + "SignalObject", + "SourceOfInitialOutputValue", + "StorageClass", + "VectorParamsAs1DForOutWhenUnconnected" + ], + "values":[ + "6", + "Port number", + "[]", + "[]", + "Inherit: auto", + "off", + "inherit", + "-1", + "Inherit", + "-1", + "auto", + "off", + "off", + "0", + "off", + "reset", + "off", + "0", + "", + [ + ], + "Dialog", + "Auto", + "off" + ], + "tabs":[ + "Main", + "Signal Attributes", + "-Other" + ], + "tabs_idx":[ + 0, + 2, + 11 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Outport", + "masktype":"" + } + }, { "sid":"BLDCmotorControl_R2017b:2687:1375", "className":"Simulink.Inport", @@ -2453,11 +2461,11 @@ } }, { - "sid":"BLDCmotorControl_R2017b:2687:1633", + "sid":"BLDCmotorControl_R2017b:2687:1378", "className":"Simulink.From", "icon":"WebViewIcon2", - "name":"From15", - "label":"From15", + "name":"From11", + "label":"From11", "parent":"BLDCmotorControl_R2017b:2687:6", "inspector":{ "params":[ @@ -2465,7 +2473,7 @@ "IconDisplay" ], "values":[ - "z_dirPrev", + "r_DC", "Tag" ], "tabs":[ @@ -2483,6 +2491,142 @@ "masktype":"" } }, + { + "sid":"BLDCmotorControl_R2017b:2687:1489", + "className":"Simulink.Goto", + "icon":"WebViewIcon2", + "name":"Goto5", + "label":"Goto5", + "parent":"BLDCmotorControl_R2017b:2687:6", + "inspector":{ + "params":[ + "GotoTag", + "TagVisibility", + "IconDisplay" + ], + "values":[ + "z_counter", + "local", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Goto", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1481", + "className":"Simulink.From", + "icon":"WebViewIcon2", + "name":"From12", + "label":"From12", + "parent":"BLDCmotorControl_R2017b:2687:6", + "inspector":{ + "params":[ + "GotoTag", + "IconDisplay" + ], + "values":[ + "z_counterRaw", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"From", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1634", + "className":"Simulink.Goto", + "icon":"WebViewIcon2", + "name":"Goto9", + "label":"Goto9", + "parent":"BLDCmotorControl_R2017b:2687:6", + "inspector":{ + "params":[ + "GotoTag", + "TagVisibility", + "IconDisplay" + ], + "values":[ + "z_dirPrev", + "local", + "Tag" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"Goto", + "masktype":"" + } + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1313", + "className":"Simulink.If", + "icon":"WebViewIcon2", + "name":"If2", + "label":"If2", + "parent":"BLDCmotorControl_R2017b:2687:6", + "inspector":{ + "params":[ + "NumInputs", + "IfExpression", + "ElseIfExpressions", + "ShowElse", + "ZeroCross", + "SampleTime" + ], + "values":[ + "1", + "u1 ~= 0", + "", + "off", + "on", + "-1" + ], + "tabs":[ + "Parameter Attributes" + ], + "tabs_idx":0 + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":{ + "blocktype":"If", + "masktype":"" + } + }, { "sid":"BLDCmotorControl_R2017b:2687:1313#out:1", "className":"Simulink.Line", @@ -3861,7 +4005,7 @@ ] }, { - "sid":"BLDCmotorControl_R2017b:2687:59#out:2", + "sid":"BLDCmotorControl_R2017b:2687:59#out:3", "className":"Simulink.Line", "icon":"WebViewIcon4", "name":"", @@ -4014,7 +4158,7 @@ ] }, { - "sid":"BLDCmotorControl_R2017b:2687:59#out:3", + "sid":"BLDCmotorControl_R2017b:2687:59#out:4", "className":"Simulink.Line", "icon":"WebViewIcon4", "name":"", @@ -4065,7 +4209,7 @@ ] }, { - "sid":"BLDCmotorControl_R2017b:2687:59#out:4", + "sid":"BLDCmotorControl_R2017b:2687:59#out:5", "className":"Simulink.Line", "icon":"WebViewIcon4", "name":"", @@ -4318,5 +4462,107 @@ ], "finder":[ ] + }, + { + "sid":"BLDCmotorControl_R2017b:2687:59#out:2", + "className":"Simulink.Line", + "icon":"WebViewIcon4", + "name":"", + "label":"", + "parent":"BLDCmotorControl_R2017b:2687:6", + "inspector":{ + "params":[ + "SignalNameFromLabel", + "MustResolveToSignal", + "ShowPropagatedSignal", + "DataLogging", + "TestPoint", + "SignalObjectPackage", + "StorageClass", + "Description", + "documentLink" + ], + "values":[ + "", + "off", + "off", + "off", + "off", + "Simulink", + "Auto", + "", + "" + ], + "tabs":[ + "Parameter Attributes", + "Logging and Accessibility", + "Code Generation", + "Documentation" + ], + "tabs_idx":[ + 0, + 3, + 5, + 7 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":[ + ] + }, + { + "sid":"BLDCmotorControl_R2017b:2687:1678#out:1", + "className":"Simulink.Line", + "icon":"WebViewIcon4", + "name":"", + "label":"", + "parent":"BLDCmotorControl_R2017b:2687:6", + "inspector":{ + "params":[ + "SignalNameFromLabel", + "MustResolveToSignal", + "ShowPropagatedSignal", + "DataLogging", + "TestPoint", + "SignalObjectPackage", + "StorageClass", + "Description", + "documentLink" + ], + "values":[ + "", + "off", + "off", + "off", + "off", + "Simulink", + "Auto", + "", + "" + ], + "tabs":[ + "Parameter Attributes", + "Logging and Accessibility", + "Code Generation", + "Documentation" + ], + "tabs_idx":[ + 0, + 3, + 5, + 7 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":[ + ] } ] \ No newline at end of file diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_6_d.png b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_6_d.png index 1d9279c..a2556bf 100644 Binary files a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_6_d.png and b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_6_d.png differ diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_6_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_6_d.svg index 0b8a29f..df32340 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_6_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_6_d.svg @@ -203,10 +203,10 @@ - + - + @@ -216,29 +216,29 @@ - - 7 + + 8 - + - + - + - + n_mot @@ -1110,7 +1110,7 @@ - + @@ -1173,34 +1173,42 @@ - + - + n_mot - + - - b_advCtrlEna + + n_motAbs - + - - z_counter + + b_advCtrlEna - + - + + z_counter + + + + + + + z_counterRaw @@ -1230,11 +1238,11 @@ - + - + F01_04_Speed_Calculation @@ -1247,16 +1255,16 @@ - + - - + + - - int16 + + int32 @@ -1268,16 +1276,16 @@ - + - - + + - - int16 + + int32 @@ -1289,15 +1297,15 @@ - + - - + + - + boolean @@ -1310,16 +1318,37 @@ - + - - + + - - int32 + + int16 + + + + + + + + + + + + + + + + + + + + + int16 @@ -1332,7 +1361,7 @@ - + @@ -1341,46 +1370,46 @@ - + - + - + - + b_hallA - + - + b_hallB - + - + b_hallC - + - + z_pos @@ -1388,7 +1417,7 @@ - + @@ -1401,7 +1430,7 @@ - + @@ -1410,11 +1439,11 @@ - + - + F01_02_Position_Calculation @@ -1422,7 +1451,7 @@ - + @@ -1431,11 +1460,11 @@ - + - + int8 @@ -1449,7 +1478,7 @@ - + @@ -1463,11 +1492,11 @@ - + - + [b_edge] @@ -1485,11 +1514,11 @@ - + - + uint8 @@ -1502,27 +1531,27 @@ - + - + - + - + [n_mot] - + @@ -1535,42 +1564,42 @@ - + - + - + - + [n_mot] - + - + - - + + - + int32 @@ -1592,11 +1621,11 @@ - + - + 3 @@ -1614,11 +1643,11 @@ - + - + z_dir @@ -1640,11 +1669,11 @@ - + - + [z_dir] @@ -1662,11 +1691,11 @@ - + - + int8 @@ -1688,11 +1717,11 @@ - + - + 2 @@ -1710,11 +1739,11 @@ - + - + z_pos @@ -1736,11 +1765,11 @@ - + - + [z_pos] @@ -1758,11 +1787,11 @@ - + - + int8 @@ -1784,11 +1813,11 @@ - + - + [z_dir] @@ -1806,11 +1835,11 @@ - + - + int8 @@ -1832,11 +1861,11 @@ - + - + 1 @@ -1854,11 +1883,11 @@ - + - + z_ctrlTypSel @@ -1880,11 +1909,11 @@ - + - + [z_ctrlTypSel] @@ -1902,11 +1931,11 @@ - + - + uint8 @@ -1928,11 +1957,11 @@ - + - + [z_ctrlTypSel] @@ -1961,11 +1990,11 @@ - + - + z_ctrlTypSel @@ -1983,11 +2012,11 @@ - + - + uint8 @@ -1999,132 +2028,28 @@ - - - - - - - - - - - - - - - - 6 - - - - - - - - - - - - - - - - - - - - - - b_advCtrlEna - - - - - - - - - - - - - - - - - - - - - - - - - - u1 - - - - - - - - if(u1 ~= 0) - - - - - - - - - - - - - - - - - - - - - - action - - - - - - - - - - - - + + - + - + - - [b_advCtrlEna] + + [z_counterRaw] - + @@ -2136,28 +2061,61 @@ - - + + - + - + - - [z_counterRaw] + + [r_DC] - + + + + + + + + + + + + + + + + + + + + + + + + + + + + [n_motAbs] + + + + + + @@ -2179,11 +2137,11 @@ - + - + [r_DCabs] @@ -2200,39 +2158,6 @@ - - - - - - - - - - - - - - - - - - [z_counter] - - - - - - - - - - - - - - - @@ -2245,11 +2170,11 @@ - + - + [r_DCabs] @@ -2267,539 +2192,11 @@ - + - - int32 - - - - - - - - - - - - - - - - - - - - - - - - - - [z_counter] - - - - - - - - - - - - - - - - - - - - - - int16 - - - - - - - - - - - - - - - - - - - - - - - - - - [z_counterRaw] - - - - - - - - - - - - - - - - - - - - - - int16 - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - - - - - - - - - - - - - - - - - - - - - z_counterRaw - - - - - - - - - - - - - - - - - - - - - - - - - - [b_advCtrlEna] - - - - - - - - - - - - - - - - - - - - - - boolean - - - - - - - - - - - - - - - - - - - - - - - - - - [z_ctrlTypSel] - - - - - - - - - - - - - - - - - - - - - - uint8 - - - - - - - - - - - - - - - - - - - - - - - - - - [z_dirPrev] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 4 - - - - - - - - - - - - - - - - - - - - - - z_counter - - - - - - - - - - - - - - - - - - - - - - - - - - [r_DC] - - - - - - - - - - - - - - - - - - - - - - int32 - - - - - - - - - - - - - - - - - - - - - - - - - - [r_DC] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - - - - - - - - - - - - - - - - - - - - - r_DCabs - - - - - - - - - - - - - - - int32 - - - - - - - - - - - - - - - - - - - - - - - - - - 4 - - - - - - - - - - - - - - - - - - - - - - r_DC - - - - - - - - - - - - - - + int32 @@ -2821,11 +2218,11 @@ - + - + [z_dirPrev] @@ -2843,11 +2240,11 @@ - + - + int8 @@ -2857,6 +2254,767 @@ + + + + + + + + + + + + + + + + + + [b_advCtrlEna] + + + + + + + + + + + + + + + + + + + + + + boolean + + + + + + + + + + + + + + + + + + + + + + + + + + 7 + + + + + + + + + + + + + + + + + + + + + + b_advCtrlEna + + + + + + + + + + + + + + + + + + + + + + + + + + [z_ctrlTypSel] + + + + + + + + + + + + + + + + + + + + + + uint8 + + + + + + + + + + + + + + + + + + + + + + + + + + [z_counter] + + + + + + + + + + + + + + + + + + + + + + int16 + + + + + + + + + + + + + + + + + + + + + + + + + + [b_advCtrlEna] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + + + + + + + + + + + + + + + + + + z_counter + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + + + + + + + + + + + + + + + + + + + + + z_counterRaw + + + + + + + + + + + + + + + + + + + + + + + + + + [n_motAbs] + + + + + + + + + + + + + + + + + + + + + + int32 + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + + + + + + + + + + + + + + + + + + + + + r_DCabs + + + + + + + + + + + + + + + int32 + + + + + + + + + + + + + + + + + + + + + + + + + + 6 + + + + + + + + + + + + + + + + + + + + + + n_motAbs + + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + + + + + + + + + + + + + + + + + + r_DC + + + + + + + + + + + + + + + int32 + + + + + + + + + + + + + + + + + + + + + + + + + + [r_DC] + + + + + + + + + + + + + + + + + + + + + + int32 + + + + + + + + + + + + + + + + + + + + + + + + + + [z_counter] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [z_counterRaw] + + + + + + + + + + + + + + + + + + + + + + int16 + + + + + + + + + + + + + + + + + + + + + + + + + + [z_dirPrev] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + u1 + + + + + + + + if(u1 ~= 0) + + + + + + + + + + + + + + + + + + + + + + action + + + + + + + + @@ -3084,11 +3242,11 @@ - + - + @@ -3098,11 +3256,11 @@ - + - + @@ -3224,25 +3382,25 @@ - + - + - + - + - + @@ -3277,28 +3435,28 @@ - + - + - + - + - + - + @@ -3361,7 +3519,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_d.json b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_d.json index 008b633..01079ef 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_d.json +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_d.json @@ -2642,7 +2642,7 @@ ] }, { - "sid":"BLDCmotorControl_R2017b:2687:6#out:7", + "sid":"BLDCmotorControl_R2017b:2687:6#out:8", "className":"Simulink.Line", "icon":"WebViewIcon4", "name":"", @@ -3560,7 +3560,7 @@ ] }, { - "sid":"BLDCmotorControl_R2017b:2687:6#out:6", + "sid":"BLDCmotorControl_R2017b:2687:6#out:7", "className":"Simulink.Line", "icon":"WebViewIcon4", "name":"", @@ -3813,5 +3813,56 @@ ], "finder":[ ] + }, + { + "sid":"BLDCmotorControl_R2017b:2687:6#out:6", + "className":"Simulink.Line", + "icon":"WebViewIcon4", + "name":"", + "label":"", + "parent":"BLDCmotorControl_R2017b:2687", + "inspector":{ + "params":[ + "SignalNameFromLabel", + "MustResolveToSignal", + "ShowPropagatedSignal", + "DataLogging", + "TestPoint", + "SignalObjectPackage", + "StorageClass", + "Description", + "documentLink" + ], + "values":[ + "", + "off", + "off", + "off", + "off", + "Simulink", + "Auto", + "", + "" + ], + "tabs":[ + "Parameter Attributes", + "Logging and Accessibility", + "Code Generation", + "Documentation" + ], + "tabs_idx":[ + 0, + 3, + 5, + 7 + ] + }, + "viewer":{ + "jshandler":"webview/handlers/ElementHandler" + }, + "obj_viewer":[ + ], + "finder":[ + ] } ] \ No newline at end of file diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_d.png b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_d.png index 5e917ce..7247e24 100644 Binary files a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_d.png and b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_d.png differ diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_d.svg index 109a46b..4259e5f 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_2687_d.svg @@ -1,10 +1,10 @@ - + - + @@ -19,7 +19,7 @@ - + @@ -27,7 +27,7 @@ - + @@ -35,7 +35,7 @@ - + @@ -43,7 +43,7 @@ - + @@ -51,7 +51,7 @@ - + @@ -59,7 +59,7 @@ - + @@ -67,7 +67,7 @@ - + @@ -75,7 +75,7 @@ - + @@ -83,7 +83,7 @@ - + @@ -91,7 +91,7 @@ - + @@ -99,7 +99,7 @@ - + @@ -107,7 +107,7 @@ - + @@ -115,7 +115,7 @@ - + @@ -123,7 +123,7 @@ - + @@ -131,7 +131,7 @@ - + @@ -139,7 +139,7 @@ - + @@ -147,7 +147,7 @@ - + @@ -155,7 +155,7 @@ - + @@ -163,7 +163,7 @@ - + @@ -171,7 +171,7 @@ - + @@ -179,7 +179,7 @@ - + @@ -187,7 +187,7 @@ - + @@ -195,7 +195,7 @@ - + @@ -203,7 +203,7 @@ - + @@ -211,7 +211,7 @@ - + @@ -219,7 +219,7 @@ - + @@ -227,7 +227,7 @@ - + @@ -235,7 +235,7 @@ - + @@ -243,7 +243,7 @@ - + @@ -258,7 +258,7 @@ - + @@ -266,7 +266,7 @@ - + @@ -274,7 +274,7 @@ - + @@ -282,7 +282,7 @@ - + @@ -290,7 +290,7 @@ - + @@ -305,7 +305,7 @@ - + @@ -313,7 +313,7 @@ - + @@ -321,7 +321,7 @@ - + @@ -329,7 +329,7 @@ - + @@ -337,7 +337,7 @@ - + @@ -352,7 +352,7 @@ - + @@ -360,7 +360,7 @@ - + @@ -368,7 +368,7 @@ - + @@ -376,7 +376,7 @@ - + @@ -384,7 +384,7 @@ - + @@ -410,7 +410,7 @@ - + @@ -456,7 +456,7 @@ - + @@ -504,7 +504,7 @@ - + @@ -519,7 +519,7 @@ - + @@ -666,7 +666,7 @@ - + @@ -714,7 +714,7 @@ - + @@ -729,7 +729,7 @@ - + @@ -777,7 +777,7 @@ - + @@ -792,7 +792,7 @@ - + @@ -808,8 +808,8 @@ - - + + @@ -817,14 +817,14 @@ - - + + - + @@ -832,7 +832,7 @@ - + @@ -840,7 +840,7 @@ - + @@ -848,7 +848,7 @@ - + @@ -856,7 +856,7 @@ - + @@ -864,7 +864,7 @@ - + @@ -872,50 +872,58 @@ - + - + z_pos - + - + z_dir - + - + z_counter - + - + z_counterRaw - + - - b_advCtrlEna + + n_motAbs - + - + + b_advCtrlEna + + + + + + + n_mot @@ -928,8 +936,8 @@ - - + + @@ -941,15 +949,15 @@ - + - - + + - + F01_Preliminary_Calculations @@ -966,11 +974,11 @@ - - + + - + boolean @@ -983,16 +991,16 @@ - + - - + + - - int16 + + int32 @@ -1004,15 +1012,15 @@ - + - - + + - + int16 @@ -1025,15 +1033,15 @@ - + - - + + - + int8 @@ -1046,16 +1054,16 @@ - - + + - - + + - - int32 + + int8 @@ -1067,16 +1075,16 @@ - - + + - - + + - - int8 + + uint8 @@ -1088,16 +1096,37 @@ - + - - + + - - uint8 + + int32 + + + + + + + + + + + + + + + + + + + + + int16 @@ -1110,7 +1139,7 @@ - + @@ -1124,11 +1153,11 @@ - + - + [b_hallA] @@ -1146,11 +1175,11 @@ - - + + - + uint8 @@ -1172,11 +1201,11 @@ - + - + [b_hallB] @@ -1194,11 +1223,11 @@ - - + + - + uint8 @@ -1220,11 +1249,11 @@ - + - + [b_hallC] @@ -1242,11 +1271,11 @@ - - + + - + uint8 @@ -1263,54 +1292,54 @@ - + - + - + - + z_ctrlTypSel - + - + a_elecAngleAdv - + - + r_phaA - + - + r_phaB - + - + r_phaC @@ -1318,7 +1347,7 @@ - + @@ -1331,7 +1360,7 @@ - + @@ -1340,37 +1369,16 @@ - - + + - + F03_Control_Method_Selection - - - - - - - - - - - - - - - - - int16 - - - - @@ -1378,15 +1386,15 @@ - + - - + + - + int16 @@ -1399,15 +1407,36 @@ - + - - + + - + + int16 + + + + + + + + + + + + + + + + + + + + int16 @@ -1420,88 +1449,96 @@ - - - - - - - - - - - + + + + + + + + + + + - - + + - + r_DCabs - - + + - + z_pos - - + + - + z_dir - - + + - + z_counter - - + + - + z_counterRaw - - + + - + + n_motAbs + + + + + + + a_elecAngleAdv - - + + - + a_elecAngle - - + + - + if { } @@ -1509,55 +1546,34 @@ - + - - + + - - - - - - - - - - - - - - - - F02_Electrical_Angle_Calculation - - - - - - - + + - - + + - - int32 + + F02_Electrical_Angle_Calculation @@ -1569,16 +1585,16 @@ - - + + - - + + - - action + + int32 @@ -1594,16 +1610,37 @@ - - + + - + int32 + + + + + + + + + + + + + + + + + action + + + + @@ -1612,7 +1649,7 @@ - + @@ -1626,19 +1663,19 @@ - + - + u1 - + - + if(u1 ~= CTRL_COMM) @@ -1656,11 +1693,11 @@ - - + + - + action @@ -1677,86 +1714,86 @@ - + - + - + - + r_DC - + - + r_phaA - + - + r_phaB - + - + r_phaC - + - + z_pos - + - + b_advCtrlEna - + - + DC_phaA - + - + DC_phaB - + - + DC_phaC @@ -1764,7 +1801,7 @@ - + @@ -1777,7 +1814,7 @@ - + @@ -1786,37 +1823,16 @@ - - + + - + F04_Control_Type_Management - - - - - - - - - - - - - - - - - int32 - - - - @@ -1824,15 +1840,15 @@ - + - - + + - + int32 @@ -1845,15 +1861,36 @@ + + + + + + + + + + int32 + + + + + + + + + + + - - + + - + int32 @@ -1867,7 +1904,7 @@ - + @@ -1881,11 +1918,11 @@ - + - + [r_DC] @@ -1903,11 +1940,11 @@ - - + + - + int32 @@ -1929,11 +1966,11 @@ - + - + [DC_phaA] @@ -1962,11 +1999,11 @@ - + - + [DC_phaB] @@ -1995,11 +2032,11 @@ - + - + [DC_phaC] @@ -2019,27 +2056,27 @@ - + - + - + - + [n_mot] - + @@ -2061,11 +2098,11 @@ - + - + [n_mot] @@ -2083,11 +2120,11 @@ - - + + - + int32 @@ -2109,11 +2146,11 @@ - + - + [DC_phaA] @@ -2131,11 +2168,11 @@ - - + + - + int32 @@ -2157,11 +2194,11 @@ - + - + 2 @@ -2179,11 +2216,11 @@ - - + + - + DC_phaB @@ -2205,11 +2242,11 @@ - + - + [DC_phaB] @@ -2227,11 +2264,11 @@ - - + + - + int32 @@ -2253,11 +2290,11 @@ - + - + 3 @@ -2275,11 +2312,11 @@ - - + + - + DC_phaC @@ -2301,11 +2338,11 @@ - + - + [DC_phaC] @@ -2323,11 +2360,11 @@ - - + + - + int32 @@ -2349,11 +2386,11 @@ - + - + [r_DC] @@ -2382,11 +2419,11 @@ - + - + 4 @@ -2404,11 +2441,11 @@ - - + + - + r_DC @@ -2419,11 +2456,11 @@ - - + + - + int32 @@ -2445,11 +2482,11 @@ - + - + [a_elecAngle] @@ -2478,11 +2515,11 @@ - + - + 5 @@ -2500,11 +2537,11 @@ - - + + - + a_elecAngle @@ -2526,11 +2563,11 @@ - + - + [a_elecAngle] @@ -2548,11 +2585,11 @@ - - + + - + int32 @@ -2581,11 +2618,11 @@ - - + + - + Implemented_control_methods @@ -2621,11 +2658,11 @@ - + - + [r_DCabs] @@ -2643,11 +2680,11 @@ - - + + - + int32 @@ -2666,51 +2703,51 @@ - + - + MODEL INFO - + - - Version: 1.879 - - - - - - - - Author: Emanuel Feru - - - - - - - - Last modified by: 37ef - - - - - - - - Last update: + + Version: 1.883 + + + + + Author: Emanuel Feru + + + + + + + + Last modified by: eferu + + + + + + + + Last update: + + + - + Copyright © 2019 Emanuel FERU @@ -2725,29 +2762,29 @@ - + - + - + - + - + - + @@ -2771,11 +2808,11 @@ - + - + [r_DC] @@ -2793,11 +2830,11 @@ - - + + - + int32 @@ -2819,11 +2856,11 @@ - + - + [r_DCabs] @@ -2852,11 +2889,11 @@ - + - + [r_DCabs] @@ -2874,11 +2911,11 @@ - - + + - + int32 @@ -2900,35 +2937,35 @@ - + - + - + - + - + - + - + - + @@ -2954,11 +2991,11 @@ - - + + - + int32 @@ -3084,17 +3121,7 @@ - - - - - - - - - - - + @@ -3104,11 +3131,21 @@ - + - + + + + + + + + + + + @@ -3117,25 +3154,25 @@ - + - + - + - + - + @@ -3179,11 +3216,11 @@ - + - + @@ -3420,7 +3457,7 @@ - + @@ -3437,11 +3474,11 @@ - + - + @@ -3451,11 +3488,11 @@ - + - + @@ -3490,7 +3527,21 @@ + + + + + + + + + + + + + + - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_29_d.svg b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_29_d.svg index 7f32647..4d87601 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_29_d.svg +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_29_d.svg @@ -1212,15 +1212,15 @@ - + - + - + int32 @@ -1233,15 +1233,15 @@ - + - + - + int32 @@ -1254,57 +1254,15 @@ - - - - - - - - - - int32 - - - - - - - - - - - - - - - - - - - - - int32 - - - - - - - - - - - - + - + int32 @@ -1312,33 +1270,33 @@ - + - + - + - + - + - + - + @@ -1346,6 +1304,48 @@ + + + + + + + + + + + + + + + + + int32 + + + + + + + + + + + + + + + + + + + + + int32 + + + + @@ -2047,5 +2047,5 @@ - + diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_29_icons.png b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_29_icons.png index b46cb8d..c06c4af 100644 Binary files a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_29_icons.png and b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_29_icons.png differ diff --git a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_h_1.json b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_h_1.json index dd3cf27..ab7a8b6 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_h_1.json +++ b/01_Matlab/BLDC_controller_ert_rtw/html/webview/support/slwebview_files/BLDCmotorControl_R2017b_h_1.json @@ -158,7 +158,7 @@ ":2687:419#out:1", ":2687:6#out:2", ":2687:6#out:3", - ":2687:6#out:7", + ":2687:6#out:8", ":2687:6#out:1", ":2687:434#out:1", ":2687:215#out:1", @@ -176,11 +176,12 @@ ":2687:215#out:2", ":2687:537#out:1", ":2687:1379#out:1", - ":2687:6#out:6", + ":2687:6#out:7", ":2687:6#out:4", ":2687:6#out:5", ":2687:1660#out:1", - ":2687:1667#out:1" + ":2687:1667#out:1", + ":2687:6#out:6" ], "sameAsElement":true }, @@ -237,25 +238,28 @@ ":2687:184", ":2687:206", ":2687:208", - ":2687:1383", - ":2687:1313", - ":2687:1384", ":2687:1490", - ":2687:1662", - ":2687:1489", - ":2687:1666", - ":2687:1482", - ":2687:1481", - ":2687:1484", - ":2687:1382", - ":2687:1377", - ":2687:1634", - ":2687:1483", - ":2687:1378", ":2687:1376", - ":2687:1661", - ":2687:1375", + ":2687:1677", + ":2687:1662", + ":2687:1666", ":2687:1633", + ":2687:1382", + ":2687:1383", + ":2687:1377", + ":2687:1482", + ":2687:1384", + ":2687:1483", + ":2687:1484", + ":2687:1678", + ":2687:1661", + ":2687:1679", + ":2687:1375", + ":2687:1378", + ":2687:1489", + ":2687:1481", + ":2687:1634", + ":2687:1313", ":2687:1313#out:1", ":2687:189#out:1", ":2687:188#out:1", @@ -283,15 +287,17 @@ ":2687:1377#out:1", ":2687:1378#out:1", ":2687:1382#out:1", - ":2687:59#out:2", + ":2687:59#out:3", ":2687:1482#out:1", ":2687:1481#out:1", - ":2687:59#out:3", ":2687:59#out:4", + ":2687:59#out:5", ":2687:38#out:2", ":2687:1633#out:1", ":2687:1661#out:1", - ":2687:1666#out:1" + ":2687:1666#out:1", + ":2687:59#out:2", + ":2687:1678#out:1" ], "sameAsElement":true }, @@ -390,9 +396,9 @@ ":2687:52", ":2687:43", ":2687:44", - ":2687:1318", - ":2687:1631", ":2687:1632", + ":2687:1631", + ":2687:1318", ":2687:1314", ":2687:1318#out:1", ":2687:49#out:1", @@ -447,58 +453,60 @@ ":2687:92", ":2687:61", ":2687:100", - ":2687:1487", - ":2687:1329", - ":2687:1328", - ":2687:1488", + ":2687:1651", + ":2687:1525", ":2687:1327", - ":2687:842", ":2687:1524", + ":2687:1401", ":2687:1339", - ":2687:1400", - ":2687:1630", + ":2687:1526", ":2687:1374", + ":2687:1372", + ":2687:1664", + ":2687:1518", + ":2687:1400", ":2687:1533", ":2687:1395", - ":2687:1521", - ":2687:1324", - ":2687:1371", - ":2687:1455", - ":2687:1380", - ":2687:1665", - ":2687:1401", - ":2687:1642", - ":2687:1485", - ":2687:1517", - ":2687:1523", - ":2687:660", - ":2687:1340", - ":2687:786", - ":2687:1641", ":2687:972", - ":2687:1320", - ":2687:1518", - ":2687:1366", - ":2687:1507", + ":2687:1630", + ":2687:1488", + ":2687:1371", + ":2687:1485", ":2687:1397", - ":2687:1629", - ":2687:1486", - ":2687:1372", - ":2687:1398", - ":2687:1370", - ":2687:1525", - ":2687:1663", - ":2687:1361", - ":2687:1651", - ":2687:1381", - ":2687:1664", - ":2687:1373", - ":2687:1362", - ":2687:1526", - ":2687:659", - ":2687:1321", - ":2687:1323", + ":2687:1521", ":2687:1326", + ":2687:1665", + ":2687:1517", + ":2687:1329", + ":2687:1642", + ":2687:1455", + ":2687:1641", + ":2687:1323", + ":2687:1487", + ":2687:1380", + ":2687:1507", + ":2687:659", + ":2687:1362", + ":2687:1676", + ":2687:1340", + ":2687:1361", + ":2687:660", + ":2687:1381", + ":2687:1366", + ":2687:1629", + ":2687:1674", + ":2687:1675", + ":2687:1523", + ":2687:1663", + ":2687:1398", + ":2687:1328", + ":2687:1370", + ":2687:842", + ":2687:786", + ":2687:1373", + ":2687:1324", + ":2687:1486", + ":2687:1321", ":2687:1325", ":2687:1366#out:1", ":2687:1518#out:1", @@ -515,9 +523,8 @@ ":2687:81#out:1", ":2687:61#out:1", ":2687:1651#out:1", - ":2687:1323#out:1", ":2687:1324#out:1", - ":2687:1320#out:1", + ":2687:1323#out:1", ":2687:1321#out:1", ":2687:1665#out:1", ":2687:1329#out:1", @@ -551,7 +558,9 @@ ":2687:1326#out:1", ":2687:1327#out:1", ":2687:1524#out:1", - ":2687:1663#out:1" + ":2687:1663#out:1", + ":2687:1401#out:3", + ":2687:1675#out:1" ], "sameAsElement":true }, @@ -571,11 +580,11 @@ "backingUrl":"support/slwebview_files/BLDCmotorControl_R2017b_2687_1340_d.json", "elements":[ ":2687:1359", - ":2687:1358", ":2687:169", - ":2687:1344", - ":2687:1341", ":2687:1454", + ":2687:1344", + ":2687:1358", + ":2687:1341", ":2687:1341#out:1", ":2687:169#out:1", ":2687:1454#out:1" @@ -605,33 +614,35 @@ ":2687:1438", ":2687:1451", ":2687:1440", - ":2687:1450", + ":2687:1673", + ":2687:1625", ":2687:1448", - ":2687:1446", ":2687:1638", + ":2687:1446", ":2687:1444", - ":2687:1443", + ":2687:1450", + ":2687:1650", ":2687:1649", ":2687:1647", - ":2687:1624", + ":2687:1645", ":2687:1636", - ":2687:1628", - ":2687:1650", + ":2687:1635", ":2687:1623", ":2687:1439", - ":2687:1437", - ":2687:1435", - ":2687:1637", - ":2687:1436", - ":2687:1433", - ":2687:1645", - ":2687:1639", - ":2687:1646", - ":2687:1640", - ":2687:1434", ":2687:1648", - ":2687:1625", - ":2687:1635", + ":2687:1435", + ":2687:1434", + ":2687:1433", + ":2687:1637", + ":2687:1443", + ":2687:1628", + ":2687:1672", + ":2687:1639", + ":2687:1437", + ":2687:1640", + ":2687:1646", + ":2687:1624", + ":2687:1436", ":2687:1627", ":2687:1439#out:1", ":2687:1448#out:1", @@ -659,7 +670,8 @@ ":2687:1431#out:1", ":2687:1640#out:1", ":2687:1430#out:1", - ":2687:1639#out:1" + ":2687:1639#out:1", + ":2687:1672#out:1" ], "sameAsElement":true }, @@ -685,8 +697,8 @@ ":2687:1651:1622", ":2687:1651:1614", ":2687:1651:1620", - ":2687:1651:1616", ":2687:1651:1618", + ":2687:1651:1616", ":2687:1651:1620#out:1", ":2687:1651:1618#out:1", ":2687:1651:1616#out:1", @@ -766,6 +778,12 @@ ":2687:1473", ":2687:1476", ":2687:1465", + ":2687:1671", + ":2687:1670", + ":2687:1681", + ":2687:1669", + ":2687:1680", + ":2687:1668", ":2687:521#out:1", ":2687:543#out:1", ":2687:216#out:1", @@ -776,7 +794,6 @@ ":2687:235#out:1", ":2687:231#out:1", ":2687:241#out:1", - ":2687:512#out:1", ":2687:522#out:2", ":2687:522#out:1", ":2687:534#out:1", @@ -804,7 +821,13 @@ ":2687:1471#out:1", ":2687:1476#out:1", ":2687:1466#out:1", - ":2687:1467#out:1" + ":2687:1467#out:1", + ":2687:512#out:1", + ":2687:1671#out:1", + ":2687:1669#out:1", + ":2687:1670#out:1", + ":2687:1668#out:1", + ":2687:1680#out:1" ], "sameAsElement":true }, diff --git a/01_Matlab/BLDC_controller_ert_rtw/rtwtypes.h b/01_Matlab/BLDC_controller_ert_rtw/rtwtypes.h index d0bdf6a..6835bce 100644 --- a/01_Matlab/BLDC_controller_ert_rtw/rtwtypes.h +++ b/01_Matlab/BLDC_controller_ert_rtw/rtwtypes.h @@ -7,9 +7,9 @@ * * Code generated for Simulink model 'BLDC_controller'. * - * Model version : 1.879 + * Model version : 1.883 * Simulink Coder version : 8.13 (R2017b) 24-Jul-2017 - * C/C++ source code generated on : Thu Jun 6 22:50:24 2019 + * C/C++ source code generated on : Tue Jun 11 21:14:57 2019 * * Target selection: ert.tlc * Embedded hardware selection: ARM Compatible->ARM Cortex diff --git a/01_Matlab/BLDC_controller_ert_rtw/rtwtypeschksum.mat b/01_Matlab/BLDC_controller_ert_rtw/rtwtypeschksum.mat index 34054ad..b0b4ace 100644 Binary files a/01_Matlab/BLDC_controller_ert_rtw/rtwtypeschksum.mat and b/01_Matlab/BLDC_controller_ert_rtw/rtwtypeschksum.mat differ diff --git a/01_Matlab/BLDCmotorControl_R2017b.slx b/01_Matlab/BLDCmotorControl_R2017b.slx index 81cacd7..2aafa05 100644 Binary files a/01_Matlab/BLDCmotorControl_R2017b.slx and b/01_Matlab/BLDCmotorControl_R2017b.slx differ diff --git a/01_Matlab/init_model.m b/01_Matlab/init_model.m index 60dda1f..5356132 100644 --- a/01_Matlab/init_model.m +++ b/01_Matlab/init_model.m @@ -72,6 +72,7 @@ dz_counterLo = 20; % [-] Counter gradient Low. Below this value the con %% F02_Electrical_Angle_Calculation b_phaAdvEna = 1; % [-] Phase advance enable parameter: 0 = disable, 1 = enable +n_motPhaAdvEna = 400; % [rpm] Phase advance enable motor speed threshold % The map below was experimentaly calibrated on the real motor. Objectives: minimum noise and minimum torque ripple a_phaAdv_M1 = [0 0 0 0 0 2 3 5 9 16 25]; % [deg] Phase advance angle diff --git a/01_Matlab/slprj/ert/BLDC_controller/tmwinternal/CompileInfo.xml b/01_Matlab/slprj/ert/BLDC_controller/tmwinternal/CompileInfo.xml new file mode 100644 index 0000000..c4ed07e --- /dev/null +++ b/01_Matlab/slprj/ert/BLDC_controller/tmwinternal/CompileInfo.xml @@ -0,0 +1,67 @@ + + + + + AAFJTQAAAAAOAAAAOAAAAAYAAAAIAAAAAgAAAAAAAAAFAAAACAAAAAAAAAABAAAAAQAAAAAAAAAFAAQAAQAAAAEAAAAAAAAA + false + false + false + + + 0 + + + + 1 + + + + 2 + + + + 3 + + false + false + false + false + false + false + false + false + false + false + + + 0 + + + + 1 + + + + 2 + + + + 3 + + + + 4 + + 0 + true + + + false + + + AAFJTQAAAAAOAAAAgAAAAAYAAAAIAAAAAgAAAAAAAAAFAAAACAAAAAEAAAABAAAAAQAAAAAAAAAFAAQADgAAAAEAAAAOAAAAQ29tcEZ1bmN0aW9ucwAAAA4AAAAwAAAABgAAAAgAAAAGAAAAAAAAAAUAAAAIAAAAAAAAAAAAAAABAAAAAAAAAAkAAAAAAAAA + false + false + + + diff --git a/01_Matlab/slprj/ert/BLDC_controller/tmwinternal/binfo.mat b/01_Matlab/slprj/ert/BLDC_controller/tmwinternal/binfo.mat new file mode 100644 index 0000000..b63f765 Binary files /dev/null and b/01_Matlab/slprj/ert/BLDC_controller/tmwinternal/binfo.mat differ diff --git a/01_Matlab/slprj/ert/BLDC_controller/tmwinternal/minfo.mat b/01_Matlab/slprj/ert/BLDC_controller/tmwinternal/minfo.mat new file mode 100644 index 0000000..6061c7f Binary files /dev/null and b/01_Matlab/slprj/ert/BLDC_controller/tmwinternal/minfo.mat differ diff --git a/01_Matlab/slprj/ert/BLDC_controller/tmwinternal/tr b/01_Matlab/slprj/ert/BLDC_controller/tmwinternal/tr new file mode 100644 index 0000000..8632d42 Binary files /dev/null and b/01_Matlab/slprj/ert/BLDC_controller/tmwinternal/tr differ diff --git a/01_Matlab/slprj/ert/BLDCmotorControl_R2017b/tmwinternal/sinfo.mat b/01_Matlab/slprj/ert/BLDCmotorControl_R2017b/tmwinternal/sinfo.mat new file mode 100644 index 0000000..895fc68 Binary files /dev/null and b/01_Matlab/slprj/ert/BLDCmotorControl_R2017b/tmwinternal/sinfo.mat differ diff --git a/01_Matlab/slprj/ert/_sharedutils/shared_file.dmr b/01_Matlab/slprj/ert/_sharedutils/shared_file.dmr new file mode 100644 index 0000000..cd73d96 Binary files /dev/null and b/01_Matlab/slprj/ert/_sharedutils/shared_file.dmr differ diff --git a/01_Matlab/slprj/ert/_sharedutils/tflSUInfo.mat b/01_Matlab/slprj/ert/_sharedutils/tflSUInfo.mat new file mode 100644 index 0000000..b6a1273 Binary files /dev/null and b/01_Matlab/slprj/ert/_sharedutils/tflSUInfo.mat differ diff --git a/01_Matlab/slprj/sl_proj.tmw b/01_Matlab/slprj/sl_proj.tmw new file mode 100644 index 0000000..1d13cf1 --- /dev/null +++ b/01_Matlab/slprj/sl_proj.tmw @@ -0,0 +1,2 @@ +Simulink Coder project marker file. Please don't change it. +slprjVersion: 9.0_037 \ No newline at end of file diff --git a/Inc/BLDC_controller.h b/Inc/BLDC_controller.h index 01b6ed6..bb52673 100644 --- a/Inc/BLDC_controller.h +++ b/Inc/BLDC_controller.h @@ -7,9 +7,9 @@ * * Code generated for Simulink model 'BLDC_controller'. * - * Model version : 1.879 + * Model version : 1.883 * Simulink Coder version : 8.13 (R2017b) 24-Jul-2017 - * C/C++ source code generated on : Thu Jun 6 17:49:29 2019 + * C/C++ source code generated on : Tue Jun 11 21:14:57 2019 * * Target selection: ert.tlc * Embedded hardware selection: ARM Compatible->ARM Cortex @@ -146,6 +146,9 @@ struct P_ { int32_T n_commDeacvHi; /* Variable: n_commDeacvHi * Referenced by: '/n_commDeacv' */ + int32_T n_motPhaAdvEna; /* Variable: n_motPhaAdvEna + * Referenced by: '/n_motPhaAdvEna' + */ int32_T r_commDCDeacv; /* Variable: r_commDCDeacv * Referenced by: '/r_commDCDeacv' */ @@ -161,6 +164,14 @@ struct P_ { int16_T dz_counterLo; /* Variable: dz_counterLo * Referenced by: '/dz_counter' */ + int16_T z_maxCntRst; /* Variable: z_maxCntRst + * Referenced by: + * '/z_counter' + * '/z_counter2' + * '/z_maxCntRst' + * '/Constant1' + * '/UnitDelay1' + */ uint8_T z_ctrlTypSel; /* Variable: z_ctrlTypSel * Referenced by: '/z_ctrlTypSel1' */ diff --git a/Inc/rtwtypes.h b/Inc/rtwtypes.h index ca29438..6835bce 100644 --- a/Inc/rtwtypes.h +++ b/Inc/rtwtypes.h @@ -7,9 +7,9 @@ * * Code generated for Simulink model 'BLDC_controller'. * - * Model version : 1.879 + * Model version : 1.883 * Simulink Coder version : 8.13 (R2017b) 24-Jul-2017 - * C/C++ source code generated on : Thu Jun 6 17:49:29 2019 + * C/C++ source code generated on : Tue Jun 11 21:14:57 2019 * * Target selection: ert.tlc * Embedded hardware selection: ARM Compatible->ARM Cortex diff --git a/Src/BLDC_controller.c b/Src/BLDC_controller.c index 3e5b04a..b0095fc 100644 --- a/Src/BLDC_controller.c +++ b/Src/BLDC_controller.c @@ -7,9 +7,9 @@ * * Code generated for Simulink model 'BLDC_controller'. * - * Model version : 1.879 + * Model version : 1.883 * Simulink Coder version : 8.13 (R2017b) 24-Jul-2017 - * C/C++ source code generated on : Thu Jun 6 17:49:29 2019 + * C/C++ source code generated on : Tue Jun 11 21:14:57 2019 * * Target selection: ert.tlc * Embedded hardware selection: ARM Compatible->ARM Cortex @@ -273,7 +273,7 @@ void BLDC_controller_step(RT_MODEL *const rtM) /* End of Outputs for SubSystem: '/Counter_Hold_and_Error_Calculation' */ } else { - if (rtDW->UnitDelay1_DSTATE < 1500) { + if (rtDW->UnitDelay1_DSTATE < rtP->z_maxCntRst) { /* Switch: '/Switch2' incorporates: * UnitDelay: '/UnitDelay1' */ @@ -282,7 +282,7 @@ void BLDC_controller_step(RT_MODEL *const rtM) /* Switch: '/Switch2' incorporates: * Constant: '/Constant1' */ - rtb_Abs2 = 1500; + rtb_Abs2 = rtP->z_maxCntRst; } rtb_Abs2++; @@ -303,7 +303,7 @@ void BLDC_controller_step(RT_MODEL *const rtM) * RelationalOperator: '/Relational Operator5' * Sum: '/Sum1' */ - if ((rtb_Abs2 > 1500) || (rtDW->Switch2 != rtDW->UnitDelay1)) { + if ((rtb_Abs2 > rtP->z_maxCntRst) || (rtDW->Switch2 != rtDW->UnitDelay1)) { rtb_Sum2 = 0; } else { rtb_Sum2 = rtP->cf_speedCoef * rtDW->Switch2 / rtDW->z_counterRawPrev; @@ -324,14 +324,14 @@ void BLDC_controller_step(RT_MODEL *const rtM) rtb_Sum2 = ((100 - rtP->cf_speedFilt) * rtDW->UnitDelay2_DSTATE + rtb_Sum2 * rtP->cf_speedFilt) / 100; - /* Abs: '/Abs5' */ + /* Abs: '/Abs5' */ if (rtb_Sum2 < 0) { rtb_Abs5 = -rtb_Sum2; } else { rtb_Abs5 = rtb_Sum2; } - /* End of Abs: '/Abs5' */ + /* End of Abs: '/Abs5' */ /* Relay: '/n_commDeacv' */ if (rtb_Abs5 >= rtP->n_commDeacvHi) { @@ -419,9 +419,12 @@ void BLDC_controller_step(RT_MODEL *const rtM) /* Switch: '/Switch_PhaAdv' incorporates: * Constant: '/a_elecPeriod1' + * Constant: '/n_motPhaAdvEna' + * Logic: '/Logical Operator2' * Outport: '/a_elecAngle' + * RelationalOperator: '/Relational Operator4' */ - if (rtP->b_phaAdvEna) { + if (rtP->b_phaAdvEna && (rtb_Abs5 > rtP->n_motPhaAdvEna)) { /* PreLookup: '/r_phaAdvDC_XA' */ rtb_BitwiseOperator = plook_u8s32u32n31_evenc_s(rtb_Abs1, rtP->r_phaAdvDC_XA[0], (uint32_T)rtP->r_phaAdvDC_XA[1] - @@ -662,6 +665,7 @@ void BLDC_controller_step(RT_MODEL *const rtM) /* Model initialize function */ void BLDC_controller_initialize(RT_MODEL *const rtM) { + P *rtP = ((P *) rtM->defaultParam); DW *rtDW = ((DW *) rtM->dwork); /* Start for Atomic SubSystem: '/BLDC_controller' */ @@ -672,14 +676,14 @@ void BLDC_controller_initialize(RT_MODEL *const rtM) /* SystemInitialize for Atomic SubSystem: '/BLDC_controller' */ /* InitializeConditions for UnitDelay: '/UnitDelay1' */ - rtDW->UnitDelay1_DSTATE = 1500; + rtDW->UnitDelay1_DSTATE = rtP->z_maxCntRst; /* SystemInitialize for IfAction SubSystem: '/Counter_Hold_and_Error_Calculation' */ /* InitializeConditions for UnitDelay: '/z_counter2' */ - rtDW->z_counter2_DSTATE = 1500; + rtDW->z_counter2_DSTATE = rtP->z_maxCntRst; /* SystemInitialize for Outport: '/z_counter' */ - rtDW->z_counterRawPrev = 1500; + rtDW->z_counterRawPrev = rtP->z_maxCntRst; /* End of SystemInitialize for SubSystem: '/Counter_Hold_and_Error_Calculation' */ /* End of SystemInitialize for SubSystem: '/BLDC_controller' */ diff --git a/Src/BLDC_controller_data.c b/Src/BLDC_controller_data.c index cf2472c..eb4c746 100644 --- a/Src/BLDC_controller_data.c +++ b/Src/BLDC_controller_data.c @@ -7,9 +7,9 @@ * * Code generated for Simulink model 'BLDC_controller'. * - * Model version : 1.879 + * Model version : 1.883 * Simulink Coder version : 8.13 (R2017b) 24-Jul-2017 - * C/C++ source code generated on : Thu Jun 6 17:49:29 2019 + * C/C++ source code generated on : Tue Jun 11 21:14:57 2019 * * Target selection: ert.tlc * Embedded hardware selection: ARM Compatible->ARM Cortex @@ -115,6 +115,11 @@ P rtP = { */ 30, + /* Variable: n_motPhaAdvEna + * Referenced by: '/n_motPhaAdvEna' + */ + 400, + /* Variable: r_commDCDeacv * Referenced by: '/r_commDCDeacv' */ @@ -140,6 +145,16 @@ P rtP = { */ 20, + /* Variable: z_maxCntRst + * Referenced by: + * '/z_counter' + * '/z_counter2' + * '/z_maxCntRst' + * '/Constant1' + * '/UnitDelay1' + */ + 1500, + /* Variable: z_ctrlTypSel * Referenced by: '/z_ctrlTypSel1' */ diff --git a/build/firmware.bin b/build/firmware.bin index 43390a4..b8a915f 100644 Binary files a/build/firmware.bin and b/build/firmware.bin differ diff --git a/build/firmware.elf b/build/firmware.elf index 9d67938..978a9f6 100644 Binary files a/build/firmware.elf and b/build/firmware.elf differ