" Failed to execute rpc_request" error when executing sequence

Quick fix would be a short homing sequence after every seed plant. This would take more time but should prevent a crash between the vacuum nozzle and the seed bank.

Still I wonder why there are movement/positioning issues, when everything is monitored by encoders. So I will try to troubleshoot this from my sight (not using encoders myself):

  • Motor drives too far and encoder does not recognize that. Moved motor steps are with an offset (max missed steps) equal to the encoder steps.

Could you check the following things to check the encoder functionality:
->Hardware setting like max speed, max missed steps, encoder missed step decay and encoder scaling.

-> While moving or running one of your sequences, keep an eye on those values of the top two lines in the green box (motor coordinates, scaled encoder). If you need to you can enable them in the red box.

I assume that those values should be almost equal, but I don’t know if the encoder output is displayed in the right format (steps or mm?).

Speaking of homing and calibration - I don’t know what i’m looking for when trying these out. I messed around with them earlier but like i said, i don’t know what i’m looking for. :worried:
I understand its supposed to run the length of the track but once it reaches the end of the track it doesn’t stop at all. The motors just go on forever, literally.
I have to E-stop and if not they just seem to go on and the shaking it pretty violent from the motors. Ive never let it run for more than 30-45 seconds as I’m afraid ill burn something out if i wait to see what happens.

I’d really like to figure out how to set them up properly if they will make things better and more accurate for me.

But actually @Ascend, Im not using encoder at all, they’re turned off. :open_mouth:
(also, i saw your thread reference with Whitecaps in it. Should we merge this portion of the conversation over to the other thread?)

here is my hardware settings.

Oh right, that would explain a lot :smiley:
Well, Farmbot is not designed to move that precisely because motors and electronics are not made for such a big machine (more like small 3d printers :slight_smile:).

In fact there are only two options to improve your movement accuracy:

  • Home to your endstops after sequences or right before a step in which you will need accurate positions. This will obviously only work if you have mechanical enstops mounted (not included in kit) or having the encoders enabled.

-Enable your encoders and use the setting “Use encoders for positioning”. With this setting your motors will try to correct the position for a number of times that you can set in the settings (“max retries”).

In every way you should enable your encoders and use the homing function in the Device tab and sequence editor as needed.

With enabled encoders, your calibration will work too. If you calibrate an axis, the bot drives the axis one after another in both directions until they stall (you described it in your post). If the axis was on both ends, the bot writes the measured values from the encoder into the “Axis length” field of your settings. This value is as far as I know only used for software endstops which are disabled by default (Stop at min/max). So calibration is not necessary (just safes the bot if you want to drive the bot much too far into the end :smiley:).

I hope this does not confuse you :stuck_out_tongue_closed_eyes:

1 Like

Haha. yeah sorry i should of stated that earlier :laughing:

So ascend, Can you lead me through this process of calibration and homing?

Ive got to be doing something wrong or have a setting off.

this is what i do and what happens when i calibrate.

Ill move the X axis to the very end of the track - opposite from where i would manually set the X 0 position.

Ill click “Calibrate X” and the FB happily moves along the X axis to the end of the track - it gets there and then continues to pulse the motors until i E-stop it.

I’ve messed around by lowering the MAX RETRIES to 1, i have also changed the MAX MISSED STEPS down to 1, 2, 5 and 10 but the FB doesn’t seem to respond to the fact that its hitting the end of the track.
Same thing goes for Homing.
i have also lowered timeout after settings down to 15, 20, 30.

Also to note, when i have encoders enabled ad use encoders for positioning and give the FB a command like move 100mm, it will move along the track at the same speed as when you click the homing button, it wont stop at 100mm like the command is given AND i cannot issue it any more command unless i E-stop and if i look at the Control Tab where "SCALED ENCODER (STEPS) & RAW ENCODER DATA is at. i see nothing but zeros. :open_mouth:

I’m going to try and get some video for a more visual explanation and reference to my issue but, got anything on this?

Sounds like your arduino does not get any signals from the encoders. We should first make sure that they are working properly before you are able to home/calibrate properly.

First make sure that your encoders are connected properly like this picture describes:

EDIT: Here is the link, there you can click on it and it is shown in a big format :slight_smile:

Some people got in trouble understanding whats meant with this picture. If something is unclear, feel free to ask :slight_smile:

Next thing - I assume that your motors were shipped with the encoders mounted. Make sure that the wire is connected (just want to make sure :smiley:)

Roger that! ill check to make sure.

Will report back soon!

1 Like


hmm, Im going through re-wiring my FB and i noticed that i had only 1 X axis encoder connected (while the other X2 encoder cord was wrapped up and ziptied for cord managment, not even sure why i did that or didnt notice) and i looked at the picture where the End Stop pins are at and i only see X1 and not X2

is this normal?

This is normal, at the moment X2 encoder is not beeing used. It should be enough to connect X1.
Basically you would only need to connect 5V(red) to + in endstop are and Ground (black) to -. Also connect Encoder A and Encoder B (white and green). AQ and BQ are not necessarily needed at the moment, but if it is not too confusing you can plug them also in.

Now with encoders enabled you should be able to see value changes when moving an axis :slight_smile:

got it!

Just wanted to make sure.

thanks! you da man! :+1:

Oh forgot something … make sure that you use the right black wire! Here is a hint from the guidance page:

Plugging in the correct black wire
The encoder cables have two black wires. The thinner black wire is the ground wire, which needs to be plugged into the RAMPS board. The slightly thicker black wire is connected to the cable’s shielding, which does not need to be connected to RAMPS.

1 Like

:dizzy_face: oh wow. ive had everyone of my ground wires wrong!

Could i have damaged something from that?

EDIT: I can test each encoder indivually correct? As in i just hook up the X axis power and encoders for now - test to see if calibration is working as well as encoders and then proceed onto Y and then Z?

or should i just connect all of them and test

Nope its okay, this had no affect at all since you connected the wire-shielding.
But this was the problem I guess :slight_smile:

1 Like

progress! this is good, this is very good! Im filled with excitement at the thought of finally figuring this out. Thanks :slight_smile:

1 Like

Alright, now you can try again to calibrate. This time the bot should stop after reaching the ends.
Also you can create sequences with “Find Home” steps included. This should fix those movement Issues hopefully :slight_smile:

Great! I’ve got my Y axis calibration working!! Success!!

So now the only issue is my X axis calibration or move command from control panel are not working.

Ill issue an move command or calibration and i recieve this error

she tries to move but maybe makes it like 1mm and then error.

The log “Unhandled Message: R08 F22 P141 V9 Q53\r” seems to be normal. I’ve also got this today (Yes, I installed one encoder today :blush:). “V9” means Value 9 -> 9 Steps. Looks like your X1 encoder is making trouble.

So you can’t move your farmbot in the control tab? If you push your gantry so that the X-Axis motors are running forward, what are the encoder values behaving? Maybe we need to invert the signals for this axis?

Ahh ok!

one encoder down 2 more to go!?! :clap:

Also! Inverted the encoders for the X axis and now im getting movement BUT, im getting some odd characteristics from the movement now.

For example: I command 100mm movement down the track but instead of a steady glide along the X axis it will move (not specific but to give an idea) 25mm stop for a second, move again, stop and move again until its reached the 100mm move point.

Made such good progress today, feeling real good!

If the motor stops during a movement, the encoder is detecting missed steps. It’s starting again and finally getting to the destination by using the movement retries feature (which you have set to 3 in the screenshot above). If the axis glides smoothly when you move it by hand, try increasing the number of steps used for acceleration (from 300 to 500) or decreasing the max speed.

1 Like

Well decreasing the speed has helped a bit more but im still getting the stop and go issue.

i tried increasing the speed but that actually made it worse.
its just not consistent. Sometimes ill get smooth gliding movement and other times i can see the FB move - stop - move - stop -move and stop. I have my max retires set to only 3 and with the acceleration speed set to where its at, it usually (say 75-80% of the time) takes two 1-2 retries before the farmbot completes the rest of the move command smoothly.

Continuation of the “top n go” movement issue in This thread.