FC_ScaleAnalogOutput - General Information
Type: |
Function |
Available as of: |
V1.0.0.0 |
Versions: |
Current version |
This chapter provides information on:
oTask
Scale a value in a configured range to an analog output value.
The function FC_ScaleAnalogOutput() takes the value transferred at input i_lrValue within the range described by i_lrMinValue and i_lrMaxValue and scales it into an analog output value.
The result acts as return value of the function.
Input |
Data type |
Description |
---|---|---|
i_lrValue |
LREAL |
Value to be scaled. |
i_lrMinValue |
LREAL |
Minimum of the input value. |
i_lrMaxValue |
LREAL |
Maximum of the input value. |
Output |
Data type |
Description |
---|---|---|
q_etDiag |
General library-independent statement on the diagnostic. A value unequal to GD.ET_Diag.Ok corresponds to a diagnostic message. |
|
q_etDiagExt |
POU-specific output on the diagnostic. q_etDiag = GD.ET_Diag.Ok -> Status message q_etDiag <> GD.ET_Diag.Ok -> Diagnostic message |
Data type |
Description |
---|---|
WORD |
Result of the scaling. |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
0 |
Ok |
|
InputParameterInvalid |
8 |
An input value is out of range. |
|
UnexpectedProgramBehavior |
5 |
A feedback value is invalid. |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Ok |
The scaling was successful.
Enumeration name: |
UnexpectedFeedback |
Enumeration value: |
5 |
Description: |
A feedback value is invalid. |
The scaling was unsuccessful.
Enumeration name: |
ValueRange |
Enumeration value: |
8 |
Description: |
A feedback value is invalid. |
Issue |
Cause |
Solution |
---|---|---|
The scaling was unsuccessful. |
The value transferred at input i_lrMinValue is greater than the value transferred at input i_lrMaxValue. |
Ensure that the value transferred at input i_lrMinValue is less than the value transferred at input i_lrMaxValue. |
The value transferred at input i_lrValue is outside the range defined by i_lrMinValue and i_lrMaxValue. |
Ensure that the value transferred at input i_lrValue is within the defined range. |