Community

Efficient Servo Telemetry

We would like to track a multiple of parameters at the start, during and end of a motion. Things like actual position, commanded position, position error, current(torque). It seems inefficient doing this with a bunch of individual API calls. Would it be better to read in the entire servo information using MemoryBlockGet?
I presume this is how RapidCode gets its information?
If this is a viable approach how often is reasonable to read the memory?

Are you looking to just poll this info periodically during your motion, or do you want continuous data for each piece of data?
When reading, how important is it that you read time synchronized information versus being off by a sample or so?

If you are polling periodically, and don’t need time synchronized info, you can just make the individual calls. This is what we do in RapidSetup since the calls are “fast enough”.

If you do need time synchronized info, you can set up a Recorder, let it run for a short duration, and extract the info for a single time slice.

And if you want continuous data throughout the move, you can set up a Recorder and let it record the whole move.

Here is our Recorder sample: https://rapidcode.roboticsys.com/recorder_cs.html
And here is our Recorder API: https://rapidcode.roboticsys.com/class_motion_controller.html#MotionController-Recorder

While we do allow for bulk memory reads, we do not have a mechanism to parse the chunk of memory once its out of RapidCode. The Recorder is our way of letting you do bulk reads by specifying what information you want.