From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open file (pda)

Hello.
 
I have a problem from many days ago. I am not able to open correctly a file that contains numbers, I want to change this file
into a matrix in order to operate with them.
The program works fine with Labview, but  it doesn't work when I run it with the Pocket PC and it doesn't give me any error.
This program reads the file and sums (+) the first two values.
 
Does anyone have any idea about this problem? Any help would be appreciated.
 
Greta
0 Kudos
Message 1 of 9
(4,660 Views)
Hi Greta,
 
There is a bug with the "spreadsheet string to array" function in Pocket PC. The problem is not with the file IO. You can read the content of the file, but you have to parse the string yourself and insert the numbers into a 2D array. I attached the VI that reads the content of the file into the string.
 
Regards,
miko
Regards,
miko
Message 2 of 9
(4,654 Views)

Hi Miko.

This means that I cannot work with arrays 2D in Pocket pc? I must work with strings?

Thanks, G

0 Kudos
Message 3 of 9
(4,638 Views)
Hi Greta,
You can work with 2D arrays in Pocket PC. It's just that the "spreadsheet string to array" function does not output the correct array. You have to manually convert and parse the spreadsheet string into a 2D array. I attached an example VI that does the conversion.
Regards,
miko
Message 4 of 9
(4,631 Views)

Hi Miko!

Thank you very much. Thank you very much. Thank you very much.

Not like thanking for as much work.

Greta

0 Kudos
Message 5 of 9
(4,629 Views)

Hi Miko!

Now it has arisen me another problem.  
I have another program (Sub_in out.vi) that determines if a (x,y) it is inside or outside of an area. In the 2D array there are the values of the area.

It works correctly in Labview but neither it works me with the Pocket PC. 
All the used functions are in the module.  
Do you know that it can be?

Thanks, Greta

0 Kudos
Message 6 of 9
(4,613 Views)

Greta,

There seems to be a bug with indexing columns of a 2D array. The workaround is to use a for loop to get the columns. Run the "2D Include Test" VI in the attached zip file.

Regards,
miko
Message 7 of 9
(4,597 Views)

Niko, thank you very much.

Greta
 
Smiley Happy
0 Kudos
Message 8 of 9
(4,594 Views)
Hello, I stumbled upon this discussion and it is helping me a bit. I can now see that the vi is reading the data I saved into the text file, however, when the string is parsed to form the 2D array, i cannot see anything. On the PDA screen, the array indicator is green, as if the inidicator is an invalid function on the pda. Please help.
0 Kudos
Message 9 of 9
(4,401 Views)