| cmdPERRATT | Index |
Command Code:
The Packet:
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | ||||||
| address | 5 | cmdPERRATT | MSG | INPUT | SPXREF | SPXATT |
| MSG - | Base reflex message |
| INPUT - | Input parameter |
| SPXREF - | Scratch pad index of Reference Value |
| SPXATT - | Scratch pad index of Attenuation Factor (factor is power of 2) |
Description:
This command compares an input parameter to a reference value and calculates the error. It attenuates this error by dividing it by a power of 2. The reference and attenuation factor come from the scratch pad. It generates a raw input of either MSG+0 or MSG+1 based on the result:
MSG+0 -- error is less than 0
MSG+1 -- error is greater than or equal to 0
The parameter for the new raw input is the absolute value of the attenuated error.
See the discussion of Scratch Pad usage for more details.