Frac(source), Hex (expression), Hextodec (expression) – Campbell Scientific CR9000X Measurement and Control System User Manual
Page 305

Section 8. Processing and Math Instructions
Remarks
The Floor function rounds a Number down to an integer value. To round a
value up to an integer, use the Ceiling function. To perform arithmetic rounding
on a value, use the Round function.
FRAC(Source)
The FRAC function returns the fractional part of a number.
Syntax
FRAC(source)
Remarks
Returns the fractional portion of the number within the parentheses.
Hex (Expression)
The Hex function returns a hexadecimal string representation of an expression.
Syntax
variable = Hex (Expression)
Remarks
The expression can be any valid numeric expression.
The Hex function can be set equal to a variable to store the Hexadecimal
representation of Expression into that variable. The variable should be declared
as a String in the program, and the String output type should be used in output
instructions.
Hex Function Example
See the example for the HextoDecimal function.
HexToDec (Expression)
The HexToDec function is used to convert a hexadecimal value to a decimal.
Syntax
variable = HexToDecimal (Expression)
Remarks
The expression should be a string representation of a Hex number.
The HexToDec function can be set equal to a variable to store the decimal
representation of the Hex Expression into that variable. Conversion from a
hexadecimal value to a decimal value can also be accomplished by prefacing
any hexadecimal string with &H.
HexToDec Function Example
In the following example, a value entered into the Expression variable is
converted into a hexadecimal value by the Hex function. The HexToDec
function is then used to convert the hexadecimal string back to a decimal value.
8-19