LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to creat two plots from one Excel sheet

I have a VI that is working for a 2D array from an Excel sheet. I am now trying to read from a 3D array to create two plots at the same time. Has anyone created a symular type of VI. My current VI is wrong. The two Excel files are two files I am using. They are 2d arrays but I do not know how to create a 3d array reader.

 

The first colun would be time.

The second would be the pressure.

The third woud be current.

 

I have a race condition. I can only import one Excell sheet at a time.

 

Thanks

 

Philip

Download All
0 Kudos
Message 1 of 10
(3,720 Views)

Use the Read From Spreadsheet VI. Data appears on the 'All rows' output will be formatted as an array where you can index individual columns. Make sure you use a comma as the delimeter if you are using csv files.

0 Kudos
Message 2 of 10
(3,700 Views)

I seperated the two VIS. Is there a wat to start both at the same time. The program works now if I click on the run for both VIS.

 

Philip

0 Kudos
Message 3 of 10
(3,693 Views)

I tried to split the VI in two seperate VIS. That did not work. The start time I was unable to synch the start time. So I am back to the one VI. I am reading Excel files. I tried to create a 3d column Excel file then readit. I do not understand your response exactly. Can you kind of walk me through  it.

 

Thanks

 

Philip

0 Kudos
Message 4 of 10
(3,684 Views)
I'm confused by your post. The subject says one sheet but then you say you have two files and the mention of a 3D array makes no sense at all to me.
0 Kudos
Message 5 of 10
(3,665 Views)

The block diagram is on one sheet only. " I was trying something" Sorry for the confusion.

 

Regards,

 

Philip

0 Kudos
Message 6 of 10
(3,646 Views)
A sheet refers to an excel file and you still have not explained 3D. Each of your files can be read separately and each would return a 2D array which could be plotted on two separate graphs. The working code for one is no different than the code for the other - just different file names. Make it a subVI and call it twice.
Message 7 of 10
(3,641 Views)

I am trying to read two different Excell sheets. Each sheet has two columns. The first column is time. The second is a pressure.  The second Ecell sheet has time for the first column. The next column is current.

 

Philip

0 Kudos
Message 8 of 10
(3,634 Views)
Your very first post says you have a working VI.

Are you using ActiveX to read the files? It's so much simpler to save them as tab or comma separated text files. Then you simply use Read From Spreadsheet File. You'll get a 2D.array back. Use the index array and build a cluster with the x array and y array and use an xy graph or calculate the dt and wire the y array to a regular waveform graph and set the x.range.offset to the calculated dt.
Message 9 of 10
(3,627 Views)

I was reading the same file at the same time. I also had a time delay of 1 second. This cause a delay in reading the file. I am reading two files then the problem was resolved. I became stumped last noght. After a good night sleep I was able to resolve the problem. Many Many thanks for your support.

 

Regards Philip

0 Kudos
Message 10 of 10
(3,619 Views)