LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading excel in real time

Hello,

 

My group is trying to collect data from an Ohaus scale to do some testing on steady state flow. We have to make a control experiment using Labview.

 

Currently we are only able to get the scale to collect data onto excel in real time. We need to have Labview pull this data from excel and read it so that we can use the weights and create a control that will adjust the flow of the water based on the weight in the tank.

 

I have been searching and attempting to edit my own but I am unable to find anyway to have labview read from an excel file as it is being written to. Anyone know how?

 

Thanks,

 

Charb

0 Kudos
Message 1 of 5
(2,725 Views)

Hi Charb,

 

Currently we are only able to get the scale to collect data onto excel

There surely are better ways to read the data from your scale. I would focus on trying to explore them instead of reading data from Excel…

Btw. it would really help if you would tell us the exact type of scale!

 

anyway to have labview read from an excel file as it is being written to.

Please explain the term "excel file"!

As long as any other exe is writing a file this file is (or: should be) blocked for other executables trying to access it. That's how the OS tries to keep the file intact…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,716 Views)

Hello,

 

We have an Ohuas Defender 7000 that we are attempting to us a USB cable to collect data from it. We have only been able to get it to output into an xls file.

 

We are using the RS232 port on the scale to collect data.

 

We are complete novices when it comes to this stuff so if you need clarification I am happy to try and clarify.

 

Thank you

0 Kudos
Message 3 of 5
(2,705 Views)

Start with reading the manual.

T71 Instructiion Manual - ohaus

 

Serial communication starts on page 63

Message 4 of 5
(2,695 Views)

We need to know a bit more, such as:

  • What do you mean by "Excel"?  Do you mean a file with the extension .xls or .xlsx, typically read (only) by Microsoft Excel?  Or do you mean a text file with the extension .csv, a "Comma-Separated Values" file that can be read/written by LabVIEW's Read/Write Delimited Spreadsheet File?
  • What do you mean by "Real-Time"?  Are you doing something like "continuous data collection", and want to write out an Excel row every second or so, and maybe base the next stimulus on a computation from Column K of the current and previous rows?

We use Excel ("real" Excel) Spreadsheets to "control" our behavioral studies, with columns indicating the settings for a particular Trial, and each Row representing the next sequential Trial.  A trial might take 20-80 seconds, and at the conclusion of a Trial, we write a half-dozen entries into the final columns of the Row that summarize the outcome(s) of the Trial.  This is certainly do-able, though it really helps to have the Report Generation Toolkit and be willing to "learn by experimenting" ...

 

Bob Schor

0 Kudos
Message 5 of 5
(2,642 Views)