Reading parameters from the device

In the following example, two parameters are read from the drive:

VAR

// Initialisation of the struct ST_ParamV2

_astParam : ARRAY[1..2] OF ST_ParamV2 :=

//Parameter Power-applied hours

[(uiIndex:=8328, usiSubIndex:=1, RequestService:=E_ParamReadWrite.Read),

//Parameter Drive running hours

(uiIndex:=8328, usiSubIndex:=2, RequestService:=E_ParamReadWrite.Read)];

// Values of the parameters

_dwParameter1,_dwParameter2 : DWORD;

END_VAR

// Initial parameter read

_ReadWriteInitialParameter(Axis:=Axis1,Execute:=TRUE,Parameter:=_astParam);

_dwParameter1 := _astParam[1].udiParamData;

_dwParameter2 := _astParam[2].udiParamData;