4.2.2. Slaves—ABB IRB 120/IRB 140

In the case of controllers ABB IRC5 Compact of robotic manipulators ABB IRB 120 and ABB IRB 140, the designed algorithms were implemented in RAPID language, which is the native language for ABB robot programming [30]. Communication with master object was realized through the activated TCP/IP channel (Box 3).



Each operation time duration was measured in each production cycle and, on the basis of the decoded information from the received socket sent by the master object (custom function *DecodeSocket*), an actual speed for that operation was modified (custom function *ChangeSpeed*). This modified speed was used for the presently evaluated operation in the next production cycle. If there is a need for feedforward form of reaction on speed change then a custom function *FeedforwardChange* can be used (Box 4).

**Box 4.** Socket communication in RAPID.


The function *DecodeSocket* provided information extraction from received socket (*s\_receive\_string*). This information consisted of operation identifier (*op\_id*) and time of its duration (*t\_in*) for the master object. Built-in functions of RAPID language for string processing *StrPart*, *StrMatch*, *StrLen* and *StrToVal* were used.

The custom function *ChangeSpeed* provided the modification of speed used for the current operation execution in the array of all operations speeds. These speed values were used in the next production cycle. A numerical array was also used for storing percentage proportion deviations between durations of the operation performed by master and slave objects. This array can be optionally used for feedforward synchronization. The operation duration time evaluated by a slave object (*n\_time*) was measured in seconds (Box 5).

**Box 5.** The function ChangeSpeed in RAPID.

```
speed{op_id}:= speed{op_id} × (n_time × 1000/t_in);
diff{op_id}:= (1-(n_time × 1000/t_in)) × 100;
```
The optional function *FeedforwardChange* provides an evaluation of whether the indicator of current operation change is supraliminal and, at the same time, is sufficiently similar to the indicator of the previous operation change. In the case of positive evaluation, all records in the operation speed array, except those of the current and previous operation, are modified utilizing a dynamically modified array of operation indexes (Box 6).

