ST_Dpv1ParamAddrEx

TYPE ST_Dpv1ParamAddrEx

ST_Dpv1ParamAddrEx contains the data of one Profidrive parameter.

TYPE ST_Dpv1ParamAddrEx :
STRUCT
    (* parameter *)
    iAttribute      : USINT;        (* 0x10: Value; 0x20: Description; 0x30: Text; 0x80..F0: manufacturer specific; else: reserved *)
    iNumOfElements  : USINT;        (* 1..234: number of elements; 0: Special Function; else: reserved *)
    iParameterNumber    : UINT;         (* 1..65535: parameter number; 0: reserved *)
    iSubIndex       : UINT;         (* 0..65535: subindex *)
    iDataAddr       : UDINT;        (* address of buffer/address of plc variable *)
    iDataSize       : UDINT;        (* size of buffer/size of plc variable *)
    eFormat         : E_PD_Datatype;    (* 0x01..0x36: datatype; 0x40: ZERO; 0x41: BYTE; 0x42: WORD; 0x43: DWORD; 0x44: Error; else reserved *)
    iNumOfValues    : UINT;         (* 0..234: number of values; else: reserved *)
    iErrorValue     : UDINT;        (* DPV1 error value *)
    stError         : ST_PD_Dpv1Error;(* DPV1 error flag, DPV1 error enum *)
END_STRUCT
END_TYPE

TYPE E_PD_Datatype

E_PD_Datatype contains the different datatypes of Profidrive parameters.

TYPE E_PD_Datatype : (
    ePD_UNDEFINED      :=  0,
    ePD_BOOL       :=  1, (* 0/1 (not impl.) *)
    ePD_INT08      :=  2, (* -128 .. 127 *)
    ePD_INT16      :=  3, (* -32768 .. 32767 *)
    ePD_INT32      :=  4, (* -2147483648 .. 2147483647 *)
    ePD_UINT08     :=  5, (* 0 .. 255 *)
    ePD_UINT16     :=  6, (* 0 .. 65535 *)
    ePD_UINT32     :=  7, (* 0 .. 4294967295 *)
    ePD_FLOAT      :=  8, (* IEEE 754 *)
    ePD_VSTRING    :=  9, (* ISO/IEC 646, variable length
*)
    ePD_OCTSTRING      := 10, (* bytearray, variable length
*)
    ePD_TIMEOFDAY_WDI  := 12, (* 6 Bytes:
                    4 bytes ms
                    + 2 bytes day since 1.1.1984
*)
    ePD_TIMEDIFF       := 13, (* 4|6 Bytes:
                    4 bytes ms
                    + optional 2 bytes days
*)
    ePD_N2_16BIT       := 33,
    ePD_N4_32BIT       := 34,
    ePD_V2_BITSEQ      := 35,
    ePD_L2_NIBBLE      := 36,
    ePD_R2_RECIP_TC    := 37,
    ePD_T2_TC_16BIT    := 38,
    ePD_T2_TC_32BIT    := 39,
    ePD_D2_TC      := 40,
    ePD_E2_FIXPT_16    := 41,
    ePD_C2_FIXPT_32    := 42,
    ePD_X2_NV_16       := 43,
    ePD_X4_NV_32       := 44,
    ePD_DATE       := 50, (* 7 Bytes:
                    2 bytes ms
                    + 2 bits (res.), 6 bits
(minutes)
                    + 1 bit (0: StdTime/1:
DaylightSavingTime), 2 bits (res.), 5 bits (hours)
                    + 3 bits (DayOfWeek), 5 bits
(DayOfMonth)
                    + 2 bits (res.), 6 bits
(month)
                    + 1 bit (res.), 7 bits (year)
*)
    ePD_TIMEOFDAY_NODI := 52, (* 0 .. 268435455 ms *)
    ePD_TIMEDIFF_WDI   := 53, (* 6 Bytes:
                    4 bytes ms
                    + 2 bytes days *)
    ePD_TIMEDIFF_NODI  := 54, (* 0 .. 4294967295 ms *)
    ePD_ZERO       := 64,
    ePD_BYTE       := 65,
    ePD_WORD       := 66,
    ePD_DWORD      := 67,
    ePD_ERROR      := 68
);
END_TYPE

TYPE ST_PD_Dpv1Error

TYPE ST_PD_Dpv1Error :
STRUCT
    bError     : BOOL;
    eErrorId   : E_PD_Dpv1Error;
END_STRUCT
END_TYPE

TYPE E_PD_Dpv1Error

E_PD_Dpv1Error contains the different Profidrive DPV1 access errors.

TYPE E_PD_Dpv1Error : (
    ePD_Err_ParamNumber           :=   0,    (* Invalid
parameter number *)
    ePD_Err_ParamReadOnly         :=   1,    (* Write to
parameter not permitted *)
    ePD_Err_ValueOutOfRange       :=   2,    (* Value out of
range *)
    ePD_Err_InvalidSubIndex       :=   3,    (* Invalid
subindex *)
    ePD_Err_NoArray           :=   4,    (* Parameter is
not an array parameter *)
    ePD_Err_WrongDataType         :=   5,    (* Wrong data type
*)
    ePD_Err_OnlyResetPermitted    :=   6,    (* Setting not
permitted, only resetting *)
    ePD_Err_DescNotChangable      :=   7,    (* Description
element not changeable *)
    ePD_Err_DescNotFound          :=   9,    (* Description
data not available *)
    ePD_Err_NoPermissionToChange      :=  11,    (* No permission
to change the value *)
    ePD_Err_NoTextArray           :=  15,    (* No text array
available *)
    ePD_Err_JobNotExecutable      :=  17,    (* Job not
executable *)
    ePD_Err_ValueInvalid          :=  20,    (* Value invalid
*)
    ePD_Err_ResponseToLong        :=  21,    (* Response is too
long *)
    ePD_Err_ParamAddrInvalid      :=  22,    (* Parameter
address is invalid *)
    ePD_Err_FormatInvalid         :=  23,    (* Format is
invalid *)
    ePD_Err_NumOfValuesInvalid    :=  24,    (* Number of
values is not consistent *)
    ePD_Err_DriveObjNotExisting       :=  25,    (* Drive object
not existing *)
    ePD_Err_ParamDeactivated      := 101,    (* Parameter at
the moment deactivated *)
    ePD_Err_ParamNoWrIfEnabled    := 107,    (* No write access
to parameter while control is enabled *)
    ePD_Err_ParamInvalidUnit      := 108,    (* Invalid unit of
parameter *)
    ePD_Err_ParamNoWrIfNotInitFbk     := 109,    (* Write access to
parameter only during feedback configuration *)
    ePD_Err_ParamWrIfInitMtr      := 110,    (* Write access to
parameter only during motor configuration *)
    ePD_Err_ParamWrIfInitDrv      := 111,    (* Write access to
parameter only during drive configuration *)
    ePD_Err_ParamWrIfFastInit     := 112,    (* Write access to
parameter only during fast configuration *)
    ePD_Err_ParamWrIfReady        := 113,    (* Write access to
parameter only during ready *)
    ePD_Err_ParamWrIfInitParamReset   := 114,    (* Write access to
parameter only during parameter reset *)
    ePD_Err_ParamWrIfInitSafety       := 115,    (* Write access to
parameter only during safety configuration *)
    ePD_Err_ParamWrIfInitTechApp      := 116,    (* Write access to
parameter only during tech. application/Units *)
    ePD_Err_ParamWrIfInit         := 117,    (* Write access to
parameter only during configuration *)
    ePD_Err_ParamWrIfInitDwnLd    := 118,    (* Write access to
parameter only during download *)
    ePD_Err_ParamNoWrtIfDwnLd     := 119,    (* No write access
to parameter during download *)
    ePD_Err_ParamWrIfInitDrvCfg       := 120,    (* Write access to
parameter only during drive configuration *)
    ePD_Err_ParamWrIfInitSetDrvType   := 121,    (* Write access to
parameter only during drive type configuration *)
    ePD_Err_ParamWrIfInitDatasetCfg   := 122,    (* Write access to
parameter only during data set base configuration *)
    ePD_Err_ParamWrIfInitDevCfg       := 123,    (* Write access to
parameter only during device configuration *)
    ePD_Err_ParamWrIfInitDevDwnLd     := 124,    (* Write access to
parameter only during device download *)
    ePD_Err_ParamWrIfInitDevPrmReset  := 125,    (* Write access to
parameter only during device parameter reset *)
    ePD_Err_ParamWrIfInitDevReady     := 126,    (* Write access to
parameter only during device ready *)
    ePD_Err_ParamWrIfInitDevice       := 127,    (* Write access to
parameter only during device configuration *)
    ePD_Err_ParamNoWriteIfDwnLd       := 129,    (* No write access
to parameter during download *)
    ePD_Err_CtrlTakeOverBlocked       := 130,    (* Control take
over blocked *)
    ePD_Err_ParamBicoSetInvalid       := 131,    (* Desired BICO
setup not possible *)
    ePD_Err_ParamChangeBlocked    := 132,    (* Parameter
change blocked *)
    ePD_Err_ParamNoAccessDefined      := 133,    (* No access
method defined *)
    ePD_Err_BelowDefinedMinimum       := 200,    (* Below defined
minimum *)
    ePD_Err_AboveDefinedMaximum       := 201,    (* Above defined
maximum *)
    ePD_Err_WriteNotPermitted     := 204     (* Write not
permitted *)
);
END_TYPE