HEX_TO_DEC_Dint
This function block converts a hexadecimal signed 2s complement STRING into a base 10 output value as a DINT.
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_INPUT | ||||
| B | Enable | BOOL | The function will continue to execute every scan while Enable is held high and there are no errors. | FALSE |
| V | HexString | STRING | Input hexadecimal string. Can only contain values 0-9, A-F, and a-f. A maximum of 8 characters is allowed, because this would represent the maximum value of a DINT as STRING#'7FFFFFFF'. Minimum value of a DINT is represented by STRING#'80000000' | STRING#'' |
| VAR_OUTPUT | ||||
| B | Valid | BOOL | Indicates that the function is operating normally and the outputs of the function are valid. | |
| V | DecimalNum | DINT | Output value from hexadecimal conversion. | |
| B | Error | BOOL | Set high if an error has occurred during the execution of the function block. This output is cleared when 'Execute' or 'Enable' goes low. | |
| E | ErrorID | UINT | If Error is true, this output provides the Error ID. This output is reset when 'Execute' or 'Enable' goes low. | |
Notes
Converts both upper and lower case ASCII characters to a DINT value.
Error Description
See the
Function Block ErrorID List