" Failed to execute rpc_request" error when executing sequence

Side note to my issue ( but not sure if related)

I keep getting this error whenever i tab back to the web app. It doesnt happen when im executing a sequence or anything else. only when i go back to the web app after being away from it for say 30+ seconds


If you see that message, you should refresh the page and make sure the connection is reestablished before trying to do anything. The Device widget should say connected to mqtt://mqtt.farmbot.io under NETWORK.

1 Like

@Cjaramillogrows
Sequences are looking good, in case you would drag new plants in your farm designer, you would need to import the coordinates manually again I think. But you’ve got it the right way so far.

@Gabriel

Today I also got this message for the first time. Everything was still working fine, I was connected properly to MQTT. Maybe this is a temporary issue?

@Ascend
Duly noted. FB wont automatically update the coordinates if i place a new plant down right?

@Gabriel so i think I’ve pin pointed exactly where the execute error comes into play.

See img for reference:

It happens exactly 1-2 seconds after the pump is turned and it begins to move to the, move Absolute position.

When the error occurs the Move Absolute command will complete and then the sequences freezes. at this point i just E-stop and re-sync and then 0,0,0 and re-execute sequences.

out of 5 sequence executions this happened on the 4th command but i do want to note that it doesn’t always happen on the 4/5 sequence execution. When i did another set of 5/5 sequences it happened at 1/5 and 5/5.

I’m going to try and execute the sequence without the wait command because it seems like thats when the error occurs.

Will be report after change is made and more tests.

Update:

@Gabriel


it was the wait command that was causing the error. (I don’t exactly know why though)

I made the chained sequence very lean with only three chained sequences - Grab Tool - Plant seed ( based on imported coordinates) - then put tool away.

I copied the chained sequence and had one with the wait command and one without the wait command in the Plant basil 1 sequence. Ran the sequence 12 times in total. 6 with and 6 without the wait command.

The 4th sequence out of 6 with the wait command encountered the error.
I further tested if 4 plant basil sequences could be chained without the wait command and I received no error at all.
I did the same thing for the chained sequence with the wait command and error reproduced.


Not sure if this is something the FB devs are aware of this.


all in all everything has worked good so far now that I’ve figured out why the error was happening.

Now my last issue:

When the chained sequence is being executed with more than 1 plant seed sequence I noticed that the FBs X and Y zero position becomes off little by little with each successful plant seed sequence. The more seeds I plant the more the X and Y zero position gets off set.


After a few plant seed sequences


What my X axis should be zero’d at

and same goes for my Y axis - after a few command runs the zero position begins to become off set from what it should be.


Again thanks for the help @Gabriel and @Ascend! :thumbsup:

-CMJ

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:
https://genesis.farmbot.io/v1.2/docs/plug-everything-in

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

@Ascend

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.