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
EnableBOOLFALSE
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
BusyBOOLFALSE
Operation is running (while output Error is FALSE)
AbbLConCA
ErrorBOOLFALSE
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
SpeedScaleMaxUINT20000
2: Output of SpeedRefFb if SpeedRef input is set to SpeedRefMax (100%). Default value: 20000. Must be >= 1
SpeedRefMaxUINT20000
- 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]
SpeedRefREAL0
- 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
ActSpeedFbINT0
5: Actual speed input from fieldbus. To be connected directly to the actual speed input from fieldbus.
TorqueScaleMaxUINT10000
6: Output of TorqueRefFb if TorqueRef input is set to TorqueScaleMax (100%). Default value: 10000. Must be >= 1
TorqueRefMaxUINT100
- 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]
TorqueRefREAL0
- 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
ActTorqueFbINT0
9: Actual torque input from fieldbus to be connected directly to the actual torque input from fieldbus
Output
ErrorID3: Error code
WarnActBOOLFALSE
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.
WarnIDLast5: Warning code of last active warning
SpeedRefFbINT0
- 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
ActSpeedREAL0
7: Actual speed in [rpm], [0.1Hz] or [%]. Scaling is done according to SpeedRefMax (100%) input
TorqueRefFbINT0
- 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
ActTorqueREAL0
9: Actual torque value in [%] or [Nm]. Scaling is done according to TorqueRefMax (100%) input
Methods:
A_StartAction
B_CyclicAction
C_CleaningAction
D_AbortAction
E_ResetAction
Structure: