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: 

Queries about LabVIEW PDA

I have a problem with displaying measurment file on the waveform graph in the PDA. I understand that PDA have some function constraints and does not support "Read from measurment file"function. Is there any way to convert the measurment file to a file which the PDA waveform graph able tom display the result or should i replace the "write to measurment file" function to other function e.g write to spreadsheet? How do I include the header,time and date in a spreadsheet heading?
0 Kudos
Message 1 of 10
(13,516 Views)
It would probably be best to originally write your data in a tab-delimited format (including labels, time stamps, etc). Then, you can program the Read from Text File function in LabVIEW PDA to mimic the behavior of the Read from Spreadsheet File VI in LabVIEW.
 
Once you place the Open/Create/Replace File and Read from Text File VIs on your block diagram, you can write click on the Read from Text File VI and select the Read Lines option. Next, scan through each line for tab characters using the Scan String for Tokens VI, and finally build up a 2D array of all elements in your text file. This may sound a bit confusing, so I have attached a small example VI to this post below (PDAReadFromTextFile.vi). Don't forget to use the Close File VI when you are done reading from disk.
 
Keep in mind that PDAs do not support array indicators, so you must view any front panel data as individual strings (or one large concatenated string). The Index Array function on the Array palette should come in handy here.
 
I hope this helps!
 
Casey Weltzin
Applications Engineer
National Instruments

Message Edited by Caseyw on 05-29-2007 09:08 PM

Download All
0 Kudos
Message 2 of 10
(13,409 Views)
Thanks for your reply....but i am unable to open the vi as I am using LabVIEW 8.Do you mind of taking a screenshot of the block diagram.Thus, I can try to analyze the program. Thanks a lot......
0 Kudos
Message 3 of 10
(13,399 Views)
I apologize for attaching the incorrect version; you will find a LabVIEW 8.0 version of the PDAReadFromFile VI attached to this post.
 
Regards,
 
Casey Weltzin
Applications Engineer
National Instruments
0 Kudos
Message 4 of 10
(13,343 Views)
Thanks for the help but now i am  facing with another problem. I have attached 2 different spreadsheet.One is a default tab delimeter file and the other is a line feed constant delimeter. I create a pda vi to read those file and it works fine for the tab delimeter when displaying on a graph as a normal vi. The problem occur when i try the vi on the pda. It  display those negative value as 0. I try to debug and i find another problem, it cannot read decimal values. I creaet a line feed constant delimeter  becoz i wish to display a value for each line, but it seems like i oni can get the first value of the spreadsheet. I know that what I said is confusing, thats why i attached the files.Hope to get help...Thanks in advance
Download All
0 Kudos
Message 5 of 10
(13,184 Views)
When I run your attached VI on my PDA to read in your delimited (fa.txt) text file, everything seems to work great. Can you elaborate on the problem that you are seeing? I am able to read in negative numbers with no problems on my end.
 
When reading in the tab delimited file with your code, the data is placed in a 2D array with the first row holding all data. This row corresponds to a channel on the Waveform Graph, so the data plots just fine.
 
Reading in your linefeed delimited data would require a bit more processing than you currently use in your code. The way your VI is programmed now, each data point is read into a new row, with all data points stored in one column of a 2D array. These rows correspond to different channels on the Waveform Graph, so plotting the data results in a blank plot.
 
I hope this helps!
 
Casey Weltzin
Applications Engineer
National Instruments
0 Kudos
Message 6 of 10
(13,014 Views)
The VI is able to work on a desktop but the problem occur on a pda or an emulator. I am not sure y the negative value cannot be read in an emulator or a pda. 
0 Kudos
Message 7 of 10
(12,272 Views)
I have tried to reproduce the issue you are seeing, but I can read in negative values on my PocketPC 2003 emulator or PDA device without any problems. Which PDA / emulator are you using? Can you please attach a small piece of sample code that demonstrates the problem you are seeing?
 
Regards,
 
Casey Weltzin
Applications Engineer
National Instruments
0 Kudos
Message 8 of 10
(12,058 Views)
This is the 2 different I get from reading the same fa.txt.Hope this will help u to understand my problem better.Thanks LotSmiley Happy
Download All
0 Kudos
Message 9 of 10
(11,981 Views)
Thank you for posting your screenshots, these definitely help me to understand the behavior that you are seeing.   When I run the same code on my end, the negative values read in just fine. Could you please try indexing the array of data before passing it into your graph, and displaying a single element (one that should be negative) on the front panel? This will help us to see if the graph is simply not displaying negative numbers, or if the data is not being read in correctly.
 
Regards,
 
Casey Weltzin
Applications Engineer
National Instruments
0 Kudos
Message 10 of 10
(11,575 Views)