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.
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.
VAR
audSlaveUserDataTmp: ARRAY [0..3] OF UDINT;
END_VARaudSlaveUserDataTmp := 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.