What is index in the syncwrite parameter?

I’m trying the dynamixel workbench function, which is syncwrite.
but I don’t understand the purpose of index in the yncwrite parameter.

bool syncWrite (uint8_t index, uint8_t * id, uint8_t id_num, int32_t * data, uint8_t data_num_for_each_id, const char ** log = NULL);

can anyone tell me what these parameters are used for?
because the function worked perfectly when i put 0 in the index

thank you very much for your attention

Sorry, it has been a long time since I played at all with Dynamixel Workbench. I only played with it some back when I was doing some ROS stuff, which has been a couple of years now.

So hopefully someone who uses it or someone from Robotis will give a more complete answer.

I assume you looked at their documentation on the workbench, like:

If I remember correctly to use the workbench wrappers of the SyncWrite, you need to tell it what logical fields you are wanting to write data to, by using the addSyncWriteHandler function to tell it what you are wanting to write, maybe something like: “Goal_Position”

I think you can add a certain number of these (like 5) and the index is the index to which one of these SyncWriteHandlers you are wanting to work with.

Sorry I am not giving many details here as I have not used it in a long time, and when not doing ROS, I preferred other libraries.

Good luck and again hopefully someone has used this recently will give a better explanation

thank you very much, i quite understand your explanation, i really helped