Type |
ED |
Devices supporting the parameter |
Encoder network (Sync. Module and Synchronization slave) |
Traceable |
Yes |
Synchronization Slave
You can use the synchronization slave to send application-specific data to the synchronization master via the encoder network. For this purpose, 16 bytes are available which can either be written as separate UDINT values using the parameters SlaveUserData[0] ... SlaveUserData[3] or consistently via the function FC_SyncWriteSlaveUserData().
Data can not be directly written into the array SlaveUserData. You have to access it with a local copy of the same size via the index.
Example SyncS_Slave.SlaveUserData
VAR
audSlaveUserDataTmp: ARRAY [0..3] OF UDINT;
END_VAR
audSlaveUserDataTmp[0] :=1;
audSlaveUserDataTmp[1] :=25;
SyncS_Slave.SlaveUserData:= audSlaveUserDataTmp;
The data are written into the SyncMod_Module and can be read via the parameter SyncMod_Module.SlaveUserData.
Example SyncMod_Module.SlaveUserData
VAR
audSlaveUserDataTmp: ARRAY [0..3] OF UDINT;
END_VAR
audSlaveUserDataTmp := SyncMod_Module.SlaveUserData;
IF audSlaveUserDataTmp[0] == 1 THEN
...
IF audSlaveUserDataTmp[2] == 25 THEN
...
SlaveUserData[0] ... SlaveUserData[3] display application-specific data from the synchronization slave that were sent at the time of the SlaveDataTimestamp. The function FC_SyncReadSlaveUserData() is available for consistent reading.