FB_SoEReadAmplifierTemperature_ByDriveRef
With the FB_SoEReadAmplifierTemperature_ByDriveRef function block, the temperature of the drive (S-0-0384) can be read.
Inputs
VAR_INPUT
stDriveRef : ST_DriveRef;
bExecute : BOOL;
iDiagClass : USINT:= 1; (* 1: C1D (S-0-0011) is default, 2: C2D (S-0-0012), 3: C3D (S-0-0013) *)
tTimeout : TIME := DEFAULT_ADS_TIMEOUT;
END_VARName | Type | Description |
|---|---|---|
stDriveRef | ST_DriveRef | Reference to the drive. The reference to the drive can be linked directly to the PLC in the System Manager. To do this, an instance of the structure ST_PlcDriveRef must be allocated and the NetID must be converted from the byte array into a string (Type: ST_DriveRef). |
bExecute | BOOL | The function block is activated by a positive edge at this input. |
tTimeout | TIME | Maximum time allowed for the execution of the function block. |
Outputs
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
iAdsErrId : UINT;
iSercosErrId : UINT;
dwAttribute : DWORD;
fAmplifierTemperature : REAL;
END_VARName | Type | Description |
|---|---|---|
bBusy | BOOL | This output is set when the function block is activated, and remains set until feedback is received. |
bError | BOOL | This output is set after the bBusy output has been reset when an error occurs in the transmission of the command. |
iAdsErrId | UINT | Returns the ADS error code of the last executed command when the bError output is set. |
iSercosErrId | UINT | Returns the Sercos error of the last executed command in the event of a set bError output. |
dwAttribute | DWORD | Returns the attributes of the Sercos parameter. |
fAmplifierTemperature | REAL | Returns the drive temperature (e.g. 26.2 corresponds to 26.2 °C). |