"Requesting State Change" message?

Dan Strassberg wrote:

Is there a way to test each encoder individually to see if one is not getting
the proper feedback? I’d hate to spend the time pulling the whole thing apart
to learn that the magnets/encoders are fine.

go through several extend/retract cycles.

If an arm is consistantly giving values <1mm, you don’t need to touch that arm.

David Lang

1 Like

I finally got it into a calibration. I power cycled (vs just restarting) the machine. The. I did a retract all followed by and extend all. Finally, it noted that all belts were extended. Now I am working through the calibration.

It appears to be in a long fitness loop. Each loop the numbers go down slightly. It is at around 0.14. what values are we looking for?

Dan Strassberg wrote:

It appears to be in a long fitness loop. Each loop the numbers go down slightly. It is at around 0.14. what values are we looking for?

you are looking for a fitness > .45 (the higher the better)

David Lang

1 Like

It loops through several times. However, if you’re getting less than around 0.2 it is highly unlikely to get better.

At less than 0.2 it means there’s something significantly wrong that you need to fix first.

First thing is that calibration needs to be performed with the Z-Axis all the way down, which also probably means that you’ll need to take out any bit you may have in your router / spindle.

Next thing to double check are the Maslow_**Z values in your maslow.yaml file. Calibration relies on these values being reasonably close to correct for how you’ve set up your machine. There’s plenty of other threads here in the forums discussing these Z values. If you change any of these values remember to restart your maslow to force it to pick them up.

Frame flex can be a problem.

Check that your arms can retract the belts reasonably easily. You can increase the retraction force, but if the value is getting up really high (for M4.0 I would say over 2500, for an M4.1 I dunno, but probably less) it means that the arms that are struggling to retract need servicing. Difficulty retracting implies difficulty extending, which will affect calibration.

1 Like

After getting the machine to successfully start the CALIBRATE one time, I can no longer get it into calibration again. Here are the steps that I follow.

  1. Power cycle Maslow by pulling power cord and plugging it back in.
  2. Press RETRACT ALL
  3. Press EXTEND ALL
    3a. I don’t always get the state change from Extending Belts to Belts Extended
    3b. I found giving the belts a hard tug when the Stepper has stopped extending can help
  4. With the Maslow in Belts Extended, press CALIBRATE
  5. The output says Cablibrate but nothing happens. The machine will just sit

I have updated the machine to firmware v1.04 but it has not helped. My best guess is that it is an encoder. However, when I perform a RETRACT ALL, my largest number is around .1 which makes it seem that the magnets/encoders are reading correctly.

Does the Maslow watch the encoder while extending?

QUICK SUGGESTION
It might be helpful to have more output during the EXTEND ALL. Maybe, send an output text from each belt for every 250mm that the belts is extended (with a difference in steps vs measured distance). Also, an output from each belt when it extends its full length. This way when looking at the output, you can tell exactly which belt has fully extended and which has not. You could also tell if one of the belts encoders is not matching the stepper motor count.

I appreciate the responsiveness of people on this forum and of @bar himself. I know that given time, I will get this machine up and cutting wood. It’s just hard for me to find time to tinker, so I really wish I could get through these initial steps a little smoother. Thanks again!

2 Likes

Dan Strassberg wrote:

Does the Maslow watch the encoder while extending?

yes, the maslow watches the encoder and runs tht motors when extending. This is
why you need to get the belt to move to be able to extend

QUICK SUGGESTION
It might be helpful to have more output during the EXTEND ALL. Maybe, send an
output text from each belt for every 250mm that the belts is extended (with a
difference in steps vs measured distance). Also, an output from each belt
when it extends its full length. This way when looking at the output, you can
tell exactly which belt has fully extended and which has not. You could also
tell if one of the belts encoders is not matching the stepper motor count.

or every few seconds, outbut the current belt lengths

David Lang

I tried again. Power cycled the machine. Performed RETRACT ALL with offsets of [0.000, -0.054, -0.021, and -0.032]. Is this offset the difference between step counts and encoder measurement?

After the belts retracted, I got the message “Requesting state change from Retracting Belts to Belts Retracted”. I then pressed EXTEND ALL and eventually got “All belts extended to 2150.00mm” followed by “Requesting state change from Extending Belts to Belts Extended”. At this point, I press CALIBRATE and the only output that I get is “Calibrate”. There are no more state change requests. The fan is OFF and remains OFF. No belts extend or retract. NADA. I am starting to lean towards this is a software issue and no longer hardware.

Another suggestion… I am very literal, so when I see the message “Requesting state change from Extending Belts to Belts Extended”, I am uncertain if the request was accepted. Does this message get printed in the state change function? Is it before the state change or after? Should there be another message of “State successfully changed to Belts Extended”? Or should there be a spot on the screen that shows what the current state is at all times?

Is this console output the only window into the inner workings of the Maslow? Would it be possible to add a button of “Save current status” that outputs a CSV with lots of internal Maslow variables that would give a clearer window into what is currently going on that might cause the problem? My real world job is a controls engineer who specializes in troubleshooting complex systems. I know this is tough and have always found that when troubleshooting, I would rather have more info than needed vs less.

Dan Strassberg wrote:

I tried again. Power cycled the machine. Performed RETRACT ALL with offsets
of [0.000, -0.054, -0.021, and -0.032]. Is this offset the difference
between step counts and encoder measurement?

what do you mean by ‘step counts’ vs ‘encoder measurement’?

this is the the diffeence between where it thinks it is vs where it stops.

i.e. if it thinks the belt is out 50mm, but hits the current limit after 40mm,
there would be a 10mm offset (I don’t know which direction)

After the belts retracted, I got the message “Requesting state change from
Retracting Belts to Belts Retracted”. I then pressed EXTEND ALL and
eventually got “All belts extended to 2150.00mm” followed by “Requesting state
change from Extending Belts to Belts Extended”. At this point, I press
CALIBRATE and the only output that I get is “Calibrate”. There are no more
state change requests. The fan is OFF and remains OFF. No belts extend or
retract. NADA. I am starting to lean towards this is a software issue and no
longer hardware.

Another suggestion… I am very literal, so when I see the message
“Requesting state change from Extending Belts to Belts Extended”, I am
uncertain if the request was accepted. Does this message get printed in the
state change function? Is it before the state change or after? Should there
be another message of “State successfully changed to Belts Extended”? Or
should there be a spot on the screen that shows what the current state is at
all times?

I think the message should be ‘changing state from X to Y’ but haven’t dug into
the current code.

Is this console output the only window into the inner workings of the Maslow?
Would it be possible to add a button of “Save current status” that outputs a
CSV with lots of internal Maslow variables that would give a clearer window
into what is currently going on that might cause the problem? My real world
job is a controls engineer who specializes in troubleshooting complex systems.
I know this is tough and have always found that when troubleshooting, I would
rather have more info than needed vs less.

The code is available on github if you want to look into it and see what other
state could be useful.

David Lang

I assume the belt motors are stepper motors, so the Maslow is commanding the motor to rotate ‘x counts’. This should equal a certain amount of belt. The belt then grooves in the black wheel with the magnet glued in. This triggers the hall encoder sensor which calculates precisely how much belt is released [i.e., encoder measurement]. After a retract, the output displays the offset between what the Maslow believes was retracted vs the actual belt retraction.

That is all kind of an aside though. I still don’t understand why when I press CALIBRATE, nothing happens other than a print out of “Calibrate”. Am I doing things in the wrong order? Is there something build-wise that I should be looking at? Has anyone else experienced this issue? I feel fairly stuck at this point and am very unclear what direction I should go next.

Dan Strassberg wrote:

I assume the belt motors are stepper motors, so the Maslow is commanding the
motor to rotate ‘x counts’. This should equal a certain amount of belt. The
belt then grooves in the black wheel with the magnet glued in. This triggers
the hall encoder sensor which calculates precisely how much belt is released
[i.e., encoder measurement]. After a retract, the output displays the offset
between what the Maslow believes was retracted vs the actual belt retraction.

ahh, no, they are DC motors driven by a PWM pulse stream, not steppers.

That is all kind of an aside though. I still don’t understand why when I
press CALIBRATE, nothing happens other than a print out of “Calibrate”. Am I
doing things in the wrong order? Is there something build-wise that I should
be looking at? Has anyone else experienced this issue? I feel fairly stuck
at this point and am very unclear what direction I should go next.

I am not sure about that. I don’t see anything wrong with what you are doing.

David Lang

@danFromJersey as initially reported at the top of the thread, I’ve been getting this too. I think that, at least on occasion, reloading the maslow.local page made a difference, but it is still a problem.

1 Like

Well, I had some success. Finally!

I left the machine on after the ‘Belts Extended’ and pressing CALIBRATE. About 20 minutes later, I refreshed the browser page and pressed CALIBRATE again. This time it started. Big shrug on my end.

I tried looking at the source code on GitHub. It seems like the UserCommand “CAL” should kick off the maslow_start_calibration routine. I don’t think it is actually running this function properly, since this function should either spit out a fault OR set the state to Homing. Neither of these things seem to happen when I press CALIBRATE.

The calibrate seemed to complete with the following results

The results were stored in the yaml file. However, now when I try to jog the Maslow, I am told that it doesn’t know the belt lengths and I need to do a retract and extend. Is this the next step after calibration?

While this is progress, I know these numbers are not right. The distance between the bolts that are bl and br are 143.25" center to center which should be 3638.55 mm. This has the distance at 4" more than that. I will try to start with more accurate numbers in the yaml file and re-run the calibration.

Since it is VERY difficult to measure how out of square the corners are, what if we gave Maslow an initial measurement of bl to br, tl to tr, bl to tl and br to tr? This should form a fairly close quadrilateral that Maslow could adjust the angles of to try to find a best fit for the measurements during calibration.

if you measure all 6 distances (center to center as you note), you can use this
onshape page to get the coordinates (including out of square)

David Lang

Thanks.

I just measured those 6 distances and plugged it into Anthropic to figure out the coordinates of the corners. Let me try that with this program too to see if they match

Dan Strassberg wrote:

I just measured those 6 distances and plugged it into Anthropic to figure out
the coordinates of the corners. Let me try that with this program too to see
if they match

good to get confirmation.

David Lang

I very much need to make an updated walk-through video for the calibration process. That is high on my todo list for next week.

I think that the biggest issue is that you aren’t getting good response from the machine to your browser. Are you using the machine connected to your home wifi network or are you connected directly to the “maslow” wifi network?

Switching that up and maybe trying a different browser might help. There is something funky going on with the connection between the browser and the machine.

The Maslow is connected to my home network. I thought that it might be browser related. I use brave on both my phone and laptop.

For a few tries, I had to refresh the browser page to get the calibrate to start. The last 2 times, it started right after the extend all completed.

Now I am trying to make it through a successful calibration. At least I’m getting closer. I had one calibration where the fitness scores were around 0.92 but it kept endlessly looping for about 40 minutes so I ended up stopping it. Not sure what the truck for a successful calibration is yet. I tried measuring the corners and diagonals to get a good starting point.

If you got a fitness score of 0.92 that is actually pretty good. The minimum is 0.45 (the higher the better) I would suggest you look at your maslow,yaml go with the values you got with 0.92 fitness.

1 Like