добавлена обратная связь по скорости

This commit is contained in:
Razvalyaev 2025-05-12 09:16:26 +03:00
parent 8c6e7fd7f1
commit fb310675aa
3 changed files with 4 additions and 1 deletions

View File

@ -8,6 +8,7 @@
**************************************************************************/ **************************************************************************/
#include "stm32f4xx_matlab_gpio.h" #include "stm32f4xx_matlab_gpio.h"
#include "modbus.h" #include "modbus.h"
#include "pwm.h"
/** /**
* @brief Запись буфера выходов S-Function из GPIO. * @brief Запись буфера выходов S-Function из GPIO.
@ -79,4 +80,6 @@ void SFUNC_to_GPIO(real_T* in)
{ {
MB_Reset_Coil_Local(coils_regs, COIL_PWM_PHASE_MODE); MB_Reset_Coil_Local(coils_regs, COIL_PWM_PHASE_MODE);
} }
hpwm.PWM_Sine_Hz = in[i++];
} }

View File

@ -53,7 +53,7 @@
#define PORT_NUMB 3 ///< amount of ports #define PORT_NUMB 3 ///< amount of ports
// Parameters of S_Function // Parameters of S_Function
#define NPARAMS 1 ///< number of input parametrs (only Ts) #define NPARAMS 1 ///< number of input parametrs (only Ts)
#define IN_PORT_WIDTH (9) ///< width of input ports #define IN_PORT_WIDTH (10) ///< width of input ports
#define IN_PORT_NUMB 1 ///< number of input ports #define IN_PORT_NUMB 1 ///< number of input ports
#define OUT_PORT_WIDTH PORT_WIDTH ///< width of output ports #define OUT_PORT_WIDTH PORT_WIDTH ///< width of output ports
#define OUT_PORT_NUMB PORT_NUMB ///< number of output ports #define OUT_PORT_NUMB PORT_NUMB ///< number of output ports

Binary file not shown.