The following PAC Control commands could incorrectly convert a string's numeric value:
Convert Hex String to Number
Convert IEEE Hex String to Number
Convert Mistic I/O Hex to Float
This problem is more likely to occur if the string's prior length was longer than the length of the string passed to the command.
A variable, sTemp, holds a string with eighteen characters.
sTemp = "11111111111111111"
Next, sTemp is assigned the string "0x400CCCCD", which has a string length of 8 and a value of 2.2 as floating point number.
If sTemp is passed to one of the problematic commands, a result of zero or an incorrect non-zero value may be returned.
Assign a blank string to the string variable that is longer than the string to be passed to the command. In the prior example, sTemp should be assigned a blank string of at least 9 characters.
sTemp = " "
Opto 22 has resolved this issue.