DrvScaling
(FB)
FUNCTION_BLOCK DrvScaling EXTENDS AbbLConCA
This function block is used to scale the speed or torque reference inputs based on the maximum value defined.

Function Block DrvScaling can be used to scale the variables from fieldbus equivalent values to values used in the program. With the scaling also a conversion from INT to REAL is performed.
Fieldbus variables are mostly given in fieldbus equivalent values as INT values. Reference1 and Actual Value1 (speed) are mostly given in the range of -20000 .. + 20000. Reference2 and Actual Value2 (torque) are mostly given in the range of -10000 .. + 10000.
In the program it´s often useful to work with real physical values such as “rpm”, “Hz”, “%” or “Nm” as REAL values. The Function Block provides scaling for two scaling settings: Speed (Reference1 and Actual Value1) and Torque (Reference2 and Actual Value2).
The Scaling maximum and the according reference maximum can be set at the inputs of the Function Block. This is independent of the drives profile used and could also be utilized for transparent mode or any drive independent linear scaling. The linear calculation limits the outputs only at the maximum of the INT range at -32768 and +32767. If the scaling would result in a higher value the ‘WarnAct’ and ‘WarnIDLast’ output are indicating the overflow.
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
Enable
BOOL
FALSE
A rising edge (Enable = TRUE) starts the operation, the output Busy goes to TRUE. All other inputs are read and considered continuously. A falling edge (Enable = FALSE) aborts the operation. During Aborting the Busy is still TRUE. Afterward all outputs are reset.
AbbLConCA
Output
Busy
BOOL
FALSE
Operation is running (while output Error is FALSE)
AbbLConCA
Error
BOOL
FALSE
Operation is stopped with error (while output Busy is FALSE). This output is TRUE for at least one cycle or until Enable is set to FALSE. The output ErrorID gives more details about the error.
AbbLConCA
Input
SpeedScaleMax
UINT
20000
2: Output of SpeedRefFb if SpeedRef input is set to SpeedRefMax (100%). Default value: 20000. Must be >= 1
SpeedRefMax
UINT
20000
- 3: Value which corresponds to 100% of input SpeedRef. Default value: 20000 . Must be >= 1.
E.g. speed scaling parameter from the drive. ACS580= Par.30.12, ACS880= Par30.12 Units [rpm], [0.1Hz]
SpeedRef
REAL
0
- 4: Speed reference, Units [rpm], [0..1Hz], will be scaled according to formula rSpeedRefScaled := ( SpeedRef / SpeedRefMax ) * SpeedScaleMax and scaled value rSpeedRefScaled is within valid range: -32768..32767,
then it will be transferred to output SpeedRefFb. If the scaled value rSpeedRefScaled is out of valid range, WarnAct will be set with warning code in WarnIDLast
ActSpeedFb
INT
0
5: Actual speed input from fieldbus. To be connected directly to the actual speed input from fieldbus.
TorqueScaleMax
UINT
10000
6: Output of TorqueRefFb if TorqueRef input is set to TorqueScaleMax (100%). Default value: 10000. Must be >= 1
TorqueRefMax
UINT
100
- 7: Value which corresponds to 100% of input TorqueRef.
Working with Nm = scaling parameter from the drive e.g. ACS580= Par.30.20, ACS880= Par30.20. Must be >= 1. Units [%], [Nm]
TorqueRef
REAL
0
- 8: Torque reference, units [%] or [Nm], will be scaled according to formula rTorqueRefScaled := ( TorqueRef / TorqueRefMax ) * TorqueScaleMax and scaled value rTorqueRefScaled is within valid range: -32768..32767,
then it will be transferred to output TorqueRefFb. If the scaled value rTorqueRefScaled is out of valid range, WarnAct will be set with warning code in WarnIDLast
ActTorqueFb
INT
0
9: Actual torque input from fieldbus to be connected directly to the actual torque input from fieldbus
Output
ErrorID
3: Error code
WarnAct
BOOL
FALSE
4: Active warning. Operation is running with warning . This output is TRUE for at least one cycle or until Enable is set to FALSE. The output WarnIDLast gives more details about the warning.
WarnIDLast
5: Warning code of last active warning
SpeedRefFb
INT
0
- 6: Speed reference to fieldbus. This output should be connected directly to the fieldbus of drive. Speed reference is scaled according to formula rSpeedRefScaled := ( SpeedRef / SpeedRefMax ) * SpeedScaleMax.
If scaled value rSpeedRefScaled is within valid range: -32768..32767, then rSpeedRefScaled will be transferred to output SpeedRefFb. If rSpeedRefScaled > 32767, then max value 32767 is transferred to SpeedRefFb If rSpeedRefScaled < -32768, then min value -32768 is transferred to SpeedRefFb
ActSpeed
REAL
0
7: Actual speed in [rpm], [0.1Hz] or [%]. Scaling is done according to SpeedRefMax (100%) input
TorqueRefFb
INT
0
- 8: Torque reference to fieldbus. This output should be connected directly to the fieldbus of drive. Torque reference is scaled according to formula rTorqueRefScaled := ( TorqueRef / TorqueRefMax ) * TorqueScaleMax.
If scaled value rTorqueRefScaled is within valid range: -32768..32767, then rTorqueRefScaled will be transferred to output TorqueRefFb. If rTorqueRefScaled > 32767, then max value 32767 is transferred to TorqueRefFb If rTorqueRefScaled < -32768, then min value -32768 is transferred to TorqueRefFb
ActTorque
REAL
0
9: Actual torque value in [%] or [Nm]. Scaling is done according to TorqueRefMax (100%) input