Skip to content

Commit

Permalink
AMCBLDC – Fix voltage supply on ergocub robot (robotology#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiraz authored and valegagge committed May 5, 2023
1 parent 4d5eda8 commit 8db9930
Show file tree
Hide file tree
Showing 54 changed files with 71 additions and 76 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

constexpr embot::app::theCANboardInfo::applicationInfo applInfo
{
embot::prot::can::versionOfAPPLICATION {1, 0, 8},
embot::prot::can::versionOfAPPLICATION {1, 0, 9},
embot::prot::can::versionOfCANPROTOCOL {2, 0}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 5.1
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:58:32 2023
// C/C++ source code generated on : Thu Feb 23 16:33:28 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down Expand Up @@ -54,7 +54,7 @@ ConfigurationParameters InitConfParams = {
0.0F,
0.0F,
0.0F,
24.0F,
44.0F,
24.0F
},

Expand Down Expand Up @@ -232,7 +232,7 @@ void AMC_BLDC_step_FOC(void) // Sample time: [3.65714285714286E-5s, 0.0s]
AMC_BLDC_DW.RTBInsertedForAdapter_Inserte_i[AMC_BLDC_DW.RTBInsertedForAdapter_Insert_bw];

// ModelReference: '<Root>/FOC' incorporates:
// Inport generated from: '<Root>/In Bus Element5'
// Inport generated from: '<Root>/In Bus Element6'
// Outport generated from: '<Root>/Out Bus Element'

control_foc(&AMC_BLDC_U.SensorsData_p, &rtb_BusConversion_InsertedFor_F,
Expand Down Expand Up @@ -274,7 +274,7 @@ void AMC_BLDC_step_FOC(void) // Sample time: [3.65714285714286E-5s, 0.0s]
// End of RateTransition generated from: '<Root>/Adapter1'

// RateTransition generated from: '<Root>/Adapter3' incorporates:
// Inport generated from: '<Root>/In Bus Element5'
// Inport generated from: '<Root>/In Bus Element6'

rtw_mutex_lock();
wrBufIdx = static_cast<int8_T>(AMC_BLDC_DW.RTBInsertedForAdapter_Inserte_g + 1);
Expand Down Expand Up @@ -602,7 +602,7 @@ void AMC_BLDC_initialize(void)
filter_current_Init();

// SystemInitialize for ModelReference: '<Root>/FOC' incorporates:
// Inport generated from: '<Root>/In Bus Element5'
// Inport generated from: '<Root>/In Bus Element6'
// Outport generated from: '<Root>/Out Bus Element'

control_foc_Init();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 5.1
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:58:32 2023
// C/C++ source code generated on : Thu Feb 23 16:33:28 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 5.1
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:58:32 2023
// C/C++ source code generated on : Thu Feb 23 16:33:28 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 5.1
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:58:32 2023
// C/C++ source code generated on : Thu Feb 23 16:33:28 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:57:41 2023
// C/C++ source code generated on : Thu Feb 23 16:32:38 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:57:41 2023
// C/C++ source code generated on : Thu Feb 23 16:32:38 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:57:41 2023
// C/C++ source code generated on : Thu Feb 23 16:32:38 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:57:41 2023
// C/C++ source code generated on : Thu Feb 23 16:32:38 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:57:46 2023
// C/C++ source code generated on : Thu Feb 23 16:32:45 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:57:46 2023
// C/C++ source code generated on : Thu Feb 23 16:32:45 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:57:46 2023
// C/C++ source code generated on : Thu Feb 23 16:32:45 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:57:46 2023
// C/C++ source code generated on : Thu Feb 23 16:32:45 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//
// Code generated for Simulink model 'control_foc'.
//
// Model version : 4.0
// Model version : 4.1
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:57:51 2023
// C/C++ source code generated on : Thu Feb 23 16:32:52 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down Expand Up @@ -285,7 +285,8 @@ void FOCInnerLoop(const Flags *rtu_Flags, const ConfigurationParameters
// Gain: '<S1>/Gain3' incorporates:
// Product: '<S1>/Divide1'

rtb_algDD_o2_n = rtb_algDD_o1_p / rtb_Product * 100.0F;
rtb_algDD_o2_n = rtb_algDD_o1_p / rtu_ConfigurationParameters->motorconfig.Vcc
* 100.0F;

// Outputs for Atomic SubSystem: '<S1>/Park Transform'
// Product: '<S51>/PProd Out' incorporates:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//
// Code generated for Simulink model 'control_foc'.
//
// Model version : 4.0
// Model version : 4.1
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:57:51 2023
// C/C++ source code generated on : Thu Feb 23 16:32:52 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//
// Code generated for Simulink model 'control_foc'.
//
// Model version : 4.0
// Model version : 4.1
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:57:51 2023
// C/C++ source code generated on : Thu Feb 23 16:32:52 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//
// Code generated for Simulink model 'control_foc'.
//
// Model version : 4.0
// Model version : 4.1
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:57:51 2023
// C/C++ source code generated on : Thu Feb 23 16:32:52 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand All @@ -20,14 +20,8 @@
#define RTW_HEADER_control_foc_h_
#include "rtwtypes.h"
#include "control_foc_types.h"

extern "C"
{

#include "rtGetInf.h"

}

extern "C"
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//
// Code generated for Simulink model 'control_foc'.
//
// Model version : 4.0
// Model version : 4.1
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:57:51 2023
// C/C++ source code generated on : Thu Feb 23 16:32:52 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//
// Code generated for Simulink model 'control_foc'.
//
// Model version : 4.0
// Model version : 4.1
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:57:51 2023
// C/C++ source code generated on : Thu Feb 23 16:32:52 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//
// Code generated for Simulink model 'control_foc'.
//
// Model version : 4.0
// Model version : 4.1
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:57:51 2023
// C/C++ source code generated on : Thu Feb 23 16:32:52 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:57:58 2023
// C/C++ source code generated on : Thu Feb 23 16:33:01 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:57:58 2023
// C/C++ source code generated on : Thu Feb 23 16:33:01 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:57:58 2023
// C/C++ source code generated on : Thu Feb 23 16:33:01 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:57:58 2023
// C/C++ source code generated on : Thu Feb 23 16:33:01 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:58:07 2023
// C/C++ source code generated on : Thu Feb 23 16:33:11 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:58:07 2023
// C/C++ source code generated on : Thu Feb 23 16:33:11 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:58:07 2023
// C/C++ source code generated on : Thu Feb 23 16:33:11 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:58:07 2023
// C/C++ source code generated on : Thu Feb 23 16:33:11 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:58:17 2023
// C/C++ source code generated on : Thu Feb 23 16:33:19 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:58:17 2023
// C/C++ source code generated on : Thu Feb 23 16:33:19 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:58:17 2023
// C/C++ source code generated on : Thu Feb 23 16:33:19 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:58:17 2023
// C/C++ source code generated on : Thu Feb 23 16:33:19 2023
//
// Target selection: ert.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex-M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C++ source code generated on : Fri Feb 10 13:58:07 2023
// C++ source code generated on : Fri Dec 9 15:00:27 2022

#include "rtwtypes.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:57:51 2023
// C/C++ source code generated on : Fri Dec 9 15:00:09 2022
//
#include "rtwtypes.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// Model version : 4.0
// Simulink Coder version : 9.8 (R2022b) 13-May-2022
// C/C++ source code generated on : Fri Feb 10 13:57:51 2023
// C/C++ source code generated on : Fri Dec 9 15:00:09 2022
//
#ifndef RTW_HEADER_rtGetInf_h_
#define RTW_HEADER_rtGetInf_h_
Expand Down
Loading

0 comments on commit 8db9930

Please sign in to comment.