cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble with changing variable values from a flow for step response

White_Fox
Associate III

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.

2 REPLIES 2
Richard.Chvr
ST Employee

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

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi @Richard.Chvr 

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.