LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

converting excel file to waveform graph in PDA

I've attached the result below as an image. As i couldnt alt-print scrn it, i captured it in my phone, so it's kind of blur. Hope u're able to see the values. Btw, for the GetDataFromLVM.vi, is there any difference between the "Read from text file" and "Read from binary file" ? Cause both could be used, and displayed the same result. Which is the correct one? 

Thanks!

0 Kudos
Message 11 of 32
(12,604 Views)

Thank you for attaching your screenshot; it definitely helps me see what is happening on your end. If I try running the GetDataFromLVM.vi file that was attached to this forum post earlier (also adding a while loop and case structure to keep the VI from immediately closing), negative data points in my LVM file show up just fine.

What is the exact PDA that you are using? I tested the GetDataFromLVM code using a Compaq iPAQ running PocketPC 2003. Can you please try indexing the array of data read out of your LVM file, and displaying a single element (one that should be negative) on the front panel? This will help us to discover whether the problem is in the data read from the LVM file itself, or the graph. I am sure that we can continue working together to resolve this problem.

To answer your question about the Read from Text File and Read from Binary File VIs, both functions are capable of reading in your data in string format (and they do this by default). The Read from Text File has an additional option to read in entire lines that you can access by right clicking on the icon in the block diagram. The Read from Binary File VI can be used to read in data of different formats (besides the string default). For example, you can use the Read From Binary File function to read in an array of I16 values, U8 values, etc.

Regards,

Casey Weltzin
Applications Engineer
National Instruments

0 Kudos
Message 12 of 32
(12,544 Views)

I'm using the hp iPAQ Pocket Pc h5500 series, 2003 version too.

I've tried debugging the PDA, but whenever i click debug by right-clicking "My Application", i couldnt click on the highlight execution button in the vi. It's kind of disabled. And i still have some queries on the GetDataFromLVM.vi. For the index inputs(row/col) of the "Index array" function, how do u know whether to wire it to 0 or 1? Is there any way to know which element is the negative one? I've read the labview Help, but i still dont understand it.

Sorry, and thanks for all the help! Smiley Indifferent  

0 Kudos
Message 13 of 32
(12,524 Views)
Thank you for your prompt replies; I think we are getting closer and closer to finding a solution here. Does the problem with reading in negative values occur on your emulator as well? Can I assume that you have tried this using the PocketPC 2003 emulator? If this is indeed occurring on your emulator, I should be able to reproduce it on my end.
 
Regarding modifying the GetDataFromLVM VI (to index a negative data point), remember that once the data is read from file (and manipulated) it ends up as a 2D array of numeric values. When we refer to indexing, this means picking one specific value out of the entire 2D array. For example, assume your text file looked like the following:
 
<header information>
1.0    2.0    3.0   <this is channel 1>
4.0    -5.0   6.0   <this is channel 2>
 
Once the data is read in, we would expect that the element in row 1, column 1 (the indices start at  zero) is negative. Therefore, using the Index Array function along with the input parameters row=1, col=1 would allow us to obtain this value, and then display it to the front panel (to make sure that it is negative). In short, you can tell which elements should be negative by looking at the text file that you are reading in.
 
I hope this helps!
 
Casey Weltzin
Applications Engineer
National Instruments
0 Kudos
Message 14 of 32
(12,294 Views)
Yes, the problem occurs in the emulator as well, it is also the 2003 version.
 
Thanks for the explanation, i understand your example but when i try to apply that concept to the GetDataFromLVM.vi, i got lost. Why do u have to re-size the index array and increase the no. of elements? And then how do i plot only the negative values? Do i have to open the file and see which row/col contains the neg value?
 
Thanks!
0 Kudos
Message 15 of 32
(11,854 Views)

If the problem is also occuring in your emulator, I should be able to reproduce it on my end. I will work to do this as soon as possible; if for some reason the behavior doesn't occur on my end, then we will have to talk more about what is different between our systems.

The Index Array VI simply lets you take a look at a specific element within your array. For example, if I input "2" for row and "3" for column when using the Index Array function, the output of the function will reflect the element at index 2,3 (the 3rd row and 4th column because they start at zero). You will have to open up your text file and find a data point that you expect to be negative, and then read in that element within your application using the Index Array VI.

I am sure that we can continue to work together to find out what is happening here; have a great day!

Regards,

Casey Weltzin
Applications Engineer
National Instruments

0 Kudos
Message 16 of 32
(11,641 Views)
Could you please try running the attached NegativeDataTest.vi on your Pocket PC 2003 SE Emulator? This simple program writes a text file (containing negative values), then reads it back in and displays the data on a chart. It works great for me, and I am curious to see if it fails in your emulator.
 
Regards,
 
Casey Weltzin
Applications Engineer
National Instruments
0 Kudos
Message 17 of 32
(11,629 Views)
Thanks again for the explanation, i understand it now. But for the NegativeDataTest, i'm using the LabVIEW 8.0, so i cant open the vi.
 
Can u take a screenshot of the block diagram so maybe i can try to build it?
 
Thanks alot!
 
 
0 Kudos
Message 18 of 32
(11,583 Views)
I apologize for uploading the wrong version of my VI! I have now attached a LabVIEW 8.0 version of the VI to this post, so you should be able to open it without problems. Please let me know once you have had the time to try it out so that we can do some more troubleshooting. Have a great day!
 
Casey Weltzin
Applications Engineer
National Instruments
0 Kudos
Message 19 of 32
(11,505 Views)
Thanks for the vi, but the result is still the same. It cant display negative values. Take a look at the screenshot i've attached below. Is it because i've missed some installation steps?
 
 
0 Kudos
Message 20 of 32
(11,412 Views)