2024-11-18 05:23 AM
Hi everyone
I need to capture the step response from a temperature regulator circuit (for estimating regulator parameters) and I want to use Cube Monitor for that.
No I get the example successfully running with a simple acquisition, but I stuck with further adjustions.
As far I see, Cube Monitor can't handle booleans, so I simply switch to integer variables and just compare them with 0, it looks like this here in my main code:
#ifdef ACQUIRE_STEP_RESPONSE
while(waitForStartingStepRespone == 0){
}
setHrtimPwmToAll(stepresponseStepSetting);
while(waitForEndingStepRespone == 0){
}
setHrtimPwmToAll(0.0);
#endif
So I just set the variable waitForStartingStepResponse to 0 by hitting a button. I read this article here ( https://wiki.st.com/stm32mcu/wiki/STM32CubeMonitor:How_to_write_a_variable_from_flow ) which seems to adress my case, but I do not get the "understanding what happens behind", so I still have no idea what to do. How do I get the adress of my variable, is there no similar simple way as to read a variable, where all variables are already listed in the variables node?
Would ne nice if somebody can tell me what I have to do.
2024-11-27 06:03 AM
Hello @White_Fox
I'm not sure to clearly understand your need, did you have a look to https://community.st.com/t5/stm32cubemonitor-mcus/setting-up-variables/m-p/239395 ? May be this could help
2024-12-06 07:13 AM
Well, I found another solution: As I can read variables with Cube Monitor, I just establish a new variable with my pwm value (just to log when the step kicks in), and have a waiting time for 30 secconds at the beginning. During this 30 secconds, I have time to start the Cube Monitor and log my temperature sensor output signal and the new pwm variable.
Just an ugly solution, but it works fine enough to get the regulator parameters.
But thanks for the link...I will take a look on it.