F_SplitDpv1ReadResPkgPNET : USINT
The function "F_SplitDpv1ReadResPkg" parses a DPV1 telegram of a FB_Dpv1Read for one or multiple parameters of a drive or the controller unit of a Sinamics Profidrive (Profidrive specification 3.1) via Profinet. Since the profidrive uses the Motorola format and the IPC uses the Intel format, the function automatically swaps the bytes in the DPV1 telegram of parameters with data types bigger than one byte.
The function returns the current length of the DPV1 telegram in bytes (max. 240 bytes).
VAR_INPUT
VAR_INPUT
pDpv1ResData : POINTER TO ARRAY [1..iMAX_DPV1_SIZE] OF BYTE; (* DPV1 read response *)
END_VAR
pDpv1ResData: Pointer to an array of 240 bytes, which contains the DPV1 read response telegram. This telegram is being split in this function.
VAR_IN_OUT
VAR_IN_OUT
stDpv1Parameter : ARRAY [1..iMAX_DPV1_PARAMS] OF ST_Dpv1ParamAddrEx; (* list of parameters *)
stDpv1ValueHeaderEx : ARRAY [1..iMAX_DPV1_PARAMS] OF ST_Dpv1ValueHeaderEx; (* list of values *)
END_VAR
stDpv1Parameter: Array of 39 parameters, which have been added to the DPV1 read request telegram.
stDpv1ValueHeaderEx: Array of 39 parameter values, which have to been read from the drive.
Requirements
Development environment | Target platform | IO hardware | PLC libraries to include |
---|---|---|---|
TwinCAT v2.11.0, Build > 1553 TwinCAT v2.11.0 R2, Build > 2024 | PC (i386)
| Beckhoff EL6632 | TcIoFunctions.Lib ( Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib linked automatically ) |