A method for controlling a slave device suitable for use in a system comprising a master device and slave devices grouped into a plurality of groups of slave devices, the method comprising: generating, by the master device, a control message containing a corresponding group data for each group of the plurality of groups of slave devices, wherein each group data contains group data items, and wherein each group data item of a group data corresponds to a slave device; transmitting, by the master device, the control message to a particular group; transmitting, by a slave device included in the particular group, the control message to a next group; and after the transmitting of the control message to the next group, the method comprising for at least one slave device in the particular group: extracting, by the slave device, a group data item from a group data of the control message, wherein the group data corresponds to the particular group; extracting, by the slave device, input data from the group data item; writing, by the slave device, output data onto the group data item, wherein a size of the output data varies depending on a predetermined data size; and transmitting, by the slave device, the group data to a further slave device of the same group after the extracting of the input data and the writing of the output data, wherein the group data is further transmitted to the master device by a further slave device of the same particular group after completing extracting of input data and writing of output data of the group data. generating, by the master device, a control message containing a corresponding group data for each group of the plurality of groups of slave devices, wherein each group data contains group data items, and wherein each group data item of a group data corresponds to a slave device; transmitting, by the master device, the control message to a particular group; transmitting, by a slave device included in the particular group, the control message to a next group; and after the transmitting of the control message to the next group, the method comprising for at least one slave device in the particular group: extracting, by the slave device, a group data item from a group data of the control message, wherein the group data corresponds to the particular group; extracting, by the slave device, input data from the group data item; writing, by the slave device, output data onto the group data item, wherein a size of the output data varies depending on a predetermined data size; and transmitting, by the slave device, the group data to a further slave device of the same group after the extracting of the input data and the writing of the output data, wherein the group data is further transmitted to the master device by a further slave device of the same particular group after completing extracting of input data and writing of output data of the group data. extracting, by the slave device, a group data item from a group data of the control message, wherein the group data corresponds to the particular group; extracting, by the slave device, input data from the group data item; writing, by the slave device, output data onto the group data item, wherein a size of the output data varies depending on a predetermined data size; and transmitting, by the slave device, the group data to a further slave device of the same group after the extracting of the input data and the writing of the output data, wherein the group data is further transmitted to the master device by a further slave device of the same particular group after completing extracting of input data and writing of output data of the group data.