Scale Instruction
SCALE_X scales the normalized real parameter VALUE where ( 0.0 <= VALUE <= 1.0 ) in the data type and value range specified by the MIN and MAX parameters:
OUT = VALUE ( MAX – MIN ) + MIN
For SCALE_X, parameters MIN, MAX, and OUT must be the same data type. NORM_X normalizes the parameter VALUE inside the value range specified by the MIN and MAX parameters:
OUT = ( VALUE – MIN ) / ( MAX – MIN ), where ( 0.0 <= OUT <= 1.0 )
Normalize Instruction
For NORM_X, parameters MIN, VALUE, and MAX must be the same data type.
Note: SCALE_X parameter VALUE should be restricted to ( 0.0 <= VALUE <= 1.0 )
If parameter VALUE is less than 0.0 or greater than 1.0:
The linear scaling operation can produce OUT values that are less than the parameter MIN value or above the parameter MAX value for OUT values that fit within the value range of the OUT data type. SCALE_X execution sets ENO = TRUE for these cases.
It is possible to generate scaled numbers that are not within the range of the OUT data type. For these cases, the parameter OUT value is set to an intermediate value equal to the least-significant portion of the scaled real number prior to final conversion to the OUT data type. SCALE_X execution sets ENO = FALSE in this case.
If parameter VALUE is less than MIN or greater than MAX, the linear scaling operation can produce normalized OUT values that are less than 0.0 or greater than 1.0. NORM_X execution sets ENO = TRUE in this case.
NORM_X and SCALE_X instructions. Explain the instructions with example.
- Register A :- For analog value (0 to 27648).
- Register B :- Out of NORM_X
- Register C :- Output value of SCALE_X instruction.
-END-



Comments
Post a Comment