LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pb of conversion between string and number with Pocket PC

Hi,

I'm developing an application with Labview PDA Module 7.1 on Pocket PC.
Here's the details of the PPC : Dell X50V, Windows 2003 Edition 2 (4.21.1088).

I'm trying to convert datas, received in hexa strings (4 bytes), into numbers then to include them in a string field.(cf VI enclosed).

The conversion into number works correctly but when I try to convert this number into a string, I get incorrect values when the number is between 0x80000000 (ie 2147483648 in decimal) et 0xFFFFFFFF (ie 4294967295).

This function works correctly on the PC but fails on the Pocket PC (I get -1 when the input value is 0xFFFFFFFF). I've tried both "Number to Decimal String" and "Format into String", but it didn't make any difference.

Thanks for your help.

David
0 Kudos
Message 1 of 2
(2,506 Views)
Hello,

In LabVIEW PDA, the "Format into String.vi" adds a space ("/s" in codes display) after the last character in the output string.

There are 2 workarounds which are demonstrated in the attached VI.
1) Take a subset of the "resulting string" that eliminates the "/s".
2) Use another VI depending on what kind of data type you want to format. In this case, I am inputting a number so I can use the "Number to Fractional String.vi".
Isabelle
Ingénieur d'applications
National Instruments France
0 Kudos
Message 2 of 2
(2,487 Views)