LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does 'Read Lines' option for 'Read from Text File' function work on PDA?

Hello,
 
    In a LabVIEW application, i have used 'Read from Text File' function (with the 'Read Lines' option checked) to read data from a file. This worked fine on desktop. But on PDA, this did not work - It looks like 'Read Lines' option is not effective on PDA. When I changed the input to 'Read from Text File' function to read 'n' number of characters & unchecked the 'Read Lines' option, the file reading is done ok. But my requirement is that i want to read a line at a time.
 
    Has anyone faced this problem ('Read Lines' option not working on PDA) before? Is there a solution or work-around?
 
Thanks & Regards,
Subhashini
 
0 Kudos
Message 1 of 19
(4,325 Views)

Hi Subhashini,

I have no problem using the "read lines" option on a Read from Text File VI with LabVIEW PDA.  Make sure that you are using the PDA Error Handler VI to notify you of any errors. Also, are you reading a from a file with a .txt extension?  Also, what version of LabVIEW PDA are you using?

0 Kudos
Message 2 of 19
(4,274 Views)

Hello Meghan,

    Thanks for ur response. Can u please send me an example (or a snapshot) showing how u have used the 'Read from Text File' VI & the 'Read Lines' option with LabVIEW PDA? This will be of help for me (if iam doing any mistake) because i tried many times & i found that the 'Read Lines' option does not work on PDA while it works fine on desktop. Yes, am reading from a file with a .txt extension. Version of LabVIEW that we are using: LabVIEW 8.5 Professional Development System for Windows Vista/XP/2000 and LabVIEW 8.5 PDA Module for Windows Mobile.

Thanks & Regards,

Subhashini

 

0 Kudos
Message 3 of 19
(4,008 Views)
Hi Subhashini,
 
A screenshot of the VI is attached below.  Please let me know if this helps, thanks!
0 Kudos
Message 4 of 19
(3,927 Views)

Hello Meghan,

    Thanks. I tried again with the 'Read Lines' option checked (without wiring the 'count' input to 'Read from text file') but just doesn't work. Moreover, with the 'Read Lines' option checked, wiring the 'count' input gives an error for me. I have now used the 'Datalog' functions which work fine for me, but only thing is that the format is different from that of text file.

Thanks & Regards,

Subhashini

 

0 Kudos
Message 5 of 19
(3,755 Views)
Hi Subhashini,
 
What is the error that you are receiving?  Also, what exactly are you wiring into the count input? 
0 Kudos
Message 6 of 19
(3,746 Views)

Hello Meghan,

    Thanks. Its a wiring error. In any case, even without wiring the count input, with the 'Read Lines' option checked, the App should have read a line at a time, right?

Thanks & Regards,

Subhashini

 

0 Kudos
Message 7 of 19
(3,737 Views)
Hi Subhashini,
 
You are correct, the Read Text File VI should still read 1 line of the text file if the count input is unwired.  However, you should not be getting a broken wire when wiring the count into the count terminal.  I would suspect that you are attempting to pass an incorrect datatype.  Would you mind posting a screenshot of your block diagram with the broken wire?  I would like to see exactly what is going on.  Thanks again.
0 Kudos
Message 8 of 19
(3,719 Views)
Hello Meghan,
 
    I found that the broken wire error is actually correct - The output 'text' of 'Read from text File' is a string & input 'count' is non-zero say 68. When i now check the 'Read Lines' option, the output 'text' wire indicates a broken wire & error is "The type of source is 1-D array of string. The type of sink is string" which is ok. Sorry abt this.
 
    But 'Read from text File' with 'Read Lines' option checked does not work on PDA.
 
Thanks & Regards,
Subhashini
 
0 Kudos
Message 9 of 19
(3,669 Views)
Hello Meghan,
 
    I have got some details of the problem when 'Read Lines' option is checked on PDA. Actually, a line is read at a time BUT the problem is that when 'Read Lines' option is checked on PDA, the 'Read from text File' function does not give an error even after 'End of file' is encountered - so the 'Read Loop' never exits. I have attached a sample VI (& a text file) which gives the problem on my PDA (acer n300 Windows Mobile 5.0). U can please run this on ur PDA & check. Could it be that iam missing some setting that has to be done on my PDA?
 
    Please also note that when 'Read Lines' option is NOT checked, the 'Read from text File' function does give an error when 'End of file' is encountered.
 
Thanks & Regards,
Subhashini
0 Kudos
Message 10 of 19
(3,643 Views)