Relevant Methods (Data Area Registration)

General

In the following, all relevant methods for the registration of the data areas of the PROFIBUS_DPV1_Slave interface are listed:

Method

Description

IsRegisteredDataModule

It is checked whether the transferred data module is registered.

Return value 0: No data module is registered on a certain slot and index.

Return value 1: A data module is registered on a certain slot and index.

Return value 2: The slot is invalid.

Return value 3: The index is invalid.

RegisterAsyncDataModule

The transferred data module is registered.

Registers a data module with a slot and an index

Return value 0: The data module is registered.

Return value 1: The slot is invalid.

Return value 2: The index is invalid.

Return value 3: The pointer to the data area is 0.

Return value 4: The length is invalid.

Return value 5: The data module already exists.

UnregisterAllAsyncDataModules

All registered data modules are unregistered.

UnregisterAsyncDataModule

The transferred data module is unregistered.

Return value 0: The data module has been unregistered.

Return value 1: The slot is invalid.

Return value 2: The index is invalid.

Return value 3: The pointer to the data area is 0.

Return value 4: The data module is not registered.

GetAsyncDataModule

The data of a defined registered data module is read and returned.

Return value 0: The data module has been read out successfully.

Return value 1: The slot is invalid.

Return value 2: The index is invalid.

Return value 3: No data module is registered with this slot and index.

Interface Declaration

Method

Interface declaration

IsRegisteredDataModule

METHOD IsRegisteredDataModule : UDINT
VAR_INPUT
   i_bySlot : BYTE;
   i_byIndex : BYTE;
END_VAR

RegisterAsyncDataModule

METHOD RegisterAsyncDataModule : UDINT
VAR_INPUT
   i_rstAsyncDataModule : ST_PROFIBUSDPV1AsyncDataModule;
END_VAR

UnregisterAllAsyncDataModules

METHOD UnregisterAllAsyncDataModules : UDINT

UnregisterAsyncDataModule

METHOD UnregisterAsyncDataModule : UDINT
VAR_INPUT
   i_rstAsyncDataModule : ST_PROFIBUSDPV1AsyncDataModule;
END_VAR

GetAsyncDataModule

METHOD GetAsyncDataModule : UDINT
VAR_INPUT
   i_rstAsyncDataModule : ST_PROFIBUSDPV1AsyncDataModule;
END_VAR