LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create and read text file using LabVIEW 7.1 PDA module?

How to create and read text file using LabVIEW 7.1 PDA module? I can not create a text file and read it.

I attach my code here.
0 Kudos
Message 1 of 21
(7,960 Views)
Hi,

I am assuming that you are using Pocket PC. I tried to run the VI you sent on a Pocket PC 2003 Emulator. The code ran without any problems, not only was I able to create a text file but I was also able to read back from it. Could you please elaborate on what happens when you run this VI ?

Regards,
Ankita A.
0 Kudos
Message 2 of 21
(7,949 Views)
Hi,Ankita ,

Thank for your reply.

Do you open the result.txt? What it looks like?

After you read the data, what kind of graph you got?

This program generate a sin wave. Do you get the sin wave? Can you read the text file on your PC?

Could you send to me your text file - the sin wave?
0 Kudos
Message 3 of 21
(7,945 Views)
Hi,

I modified your VI so that it writes a sine wave to a text file and reads back from the text file. I tsetsed this VI on an Pocket PC 2003 emulator and it runs perfectly there.

Regards,
Ankita A.
0 Kudos
Message 4 of 21
(7,935 Views)
Ankita,

Thank you for your help.

I have run the code and find still some problem:

1. the generated text file is little bit weird. Look at the result.txt file attached.
2. after read back, the graph should be a sin wave. But it is NOT.
0 Kudos
Message 5 of 21
(7,929 Views)
HI,

I re-tested the code on an emulator as well as a pocket pc 2003 device. It runs fine. Please let me know if you still face problems.

Ankita
0 Kudos
Message 6 of 21
(7,920 Views)
How can you modify this code to record data from DAQmx and then be able to find the text file and read it? I've attached the current vi that I have been using to acquire data from the CF-6004. I am recording 500 samples per channel and I am recording 4 acquisitions. So that would be 4 blocks of 500 samples each separated by tabs saved in a .txt file on the PDA.
0 Kudos
Message 7 of 21
(7,647 Views)
macthenite,

Are you still having problems with this code? If so, what exactly is the problem?
Doug M
Applications Engineer
National Instruments
For those unfamiliar with NBC's The Office, my icon is NOT a picture of me 🙂
0 Kudos
Message 8 of 21
(7,626 Views)
Well my acquisition code runs perfect. The problem is reading it. I can't seem to read my data no matter what I do. My data gets saved as a string using the array to string vi but I've read that the string to array vi (which I need to convert back to array to read my data) does not work on the pda. I'm using version 8.0. So I was trying to modify the program posted in this discussion so that it would save data from my DAQ. I did that but I still can't read the data after its saved. I really don't know what else to do. All I need to do is read the data on the pda itself. I can't understand why I'm having such a hard time doing that. I found a possible solution on another discussion that talks about parsing the strings because of the bug in the "string to array" vi. However, that lead me to another problem because for some reason, the array indicators or graphs don't function on the pda. When i build the program to the pda or emulator, the array indicators are faded out on the front panel as if the function is not valid. Does this kind of help give a better picture of what I'm trying to do. Simply read data back. Thanks.
0 Kudos
Message 9 of 21
(7,620 Views)
macthenite,

could you post the text file you get after acquiring data? I assume when you say you want to read back your data, you want to reconstruct separate 1-D arrays for each channel?
Doug M
Applications Engineer
National Instruments
For those unfamiliar with NBC's The Office, my icon is NOT a picture of me 🙂
0 Kudos
Message 10 of 21
(7,617 Views)