MasterUserData[0]...[3]

General

Type

AD

Devices supporting the parameter

Encoder network (Synchronization master and Synchronization slave)

Traceable

Yes

Functional Description

Synchronization Master

You can use the synchronization master to send application-specific data to all synchronization slaves via the encoder network. For this purpose, 16 bytes are available which can either be written as separate UDINT values using the parameters MasterUserData[0] ... MasterUserData[3] or consistently via the function FC_SyncWriteMasterUserData().

Data can not be directly written into the array MasterUserData. You have to access it with a local copy of the same size via the index.

Example SyncM_Master.MasterUserData

VAR
   audMasterUserDataTmp: ARRAY [0..3] OF UDINT;
END_VAR
audMasterUserDataTmp[0] :=1;
audMasterUserDataTmp[1] :=25;
SyncM_Master.MasterUserData := audMasterUserDataTmp;

The data is written in the sync. master and can be read via the parameter with the same name at the sync. slave.

Example SyncS_Slave.MasterUserData

VAR
   audSlaveUserDataTmp: ARRAY [0..3] OF UDINT;
END_VAR
audSlaveUserDataTmp := SyncS_Slave.MasterUserData;
IF audSlaveUserDataTmp[0] == 1 THEN
   ...
IF audSlaveUserDataTmp[2] == 25 THEN
   ...

Synchronization Slave

MasterUserData[0] ... MasterUserData[3] display the application-specific data from the synchronization master that were sent at the time of the MasterDataTimestamp. The function FC_SyncReadMasterUserData() is available for consistent reading.