F_SplitDpv1WriteResPkg

F_SplitDpv1WriteResPkg 1:

The F_SplitDpv1WriteResPkg function evaluates a DPV1 telegram of a FB_Dpv1Write of one or more parameters of a drive or the controller unit of a Sinamics Profidrive (Profidrive Specification 3.1). As Profidrives use the Motorola format and IPCs the Intel format, the function automatically swaps the byte order in the DPV1 telegram of parameters with data types with more than one byte.

The function returns the actual length of the DPV1 telegram in bytes (max. 240 bytes).

FUNCTION F_SplitDpv1WriteResPkg : USINT

F_SplitDpv1WriteResPkg 2: Inputs

VAR_INPUT
    pDpv1ResData : POINTER TO ARRAY [1..iMAX_DPV1_SIZE] OF BYTE; (* DPV1 read response *)
END_VAR

Name

Type

Description

pDpv1ResData

ARRAY OF BYTE

Pointer to an array of 240 bytes containing the DPV1 write answer telegram. This telegram is evaluated by the function.

F_SplitDpv1WriteResPkg 3: Inputs/outputs

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

Name

Type

Description

stDpv1Parameter

ST_Dpv1ParamAddrEx).

Array of 39 parameters that were added to the DPV1 write telegram.

stDpv1ValueHeaderEx

ST_Dpv1ValueHeaderEx

Array of 39 parameter values read from the drive.

Requirements

Development environment

Target platform

IO hardware

PLC libraries to be integrated (category group)

TwinCAT v3.1.0

PC or CX (x86)

Beckhoff FC310x PCI, CX1500-M310, EL6731

Tc2_IoFunctions (IO)