LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel Function

Solved!
Go to solution

I'm trying to subtract the output of Inlet Temperature from Outlet Temperature to get the Water Temperature Rise as it's own column on the excel spreadsheet. How would I go about this? Disregard the unconnected boolean expression.

Download All
0 Kudos
Message 1 of 14
(3,465 Views)

Hi sam,

 

calculate the difference and add it as additional column…

 

What is the specific problem? How is Excel involved in this problem?

Best regards,
GerdW


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

Something like this?

Temp_Ex2.png

========================
=== Engineer Ambiguously ===
========================
Message 3 of 14
(3,422 Views)

What I'm trying to do is use the output from two sensors "Outlet Temperature" and "Inlet Temperature" and subtract them which works fine on the LabView program, but I want to output it to the delimited spreadsheet as a separate column. The issue is not the math or math function, it is how to output the value onto the spreadsheet.

 

Thanks. 

0 Kudos
Message 4 of 14
(3,313 Views)

Hi Sam,

 


@sambpk wrote:

I know how to "apply simple math", what I'm trying to do is use the output from two sensors "Outlet Temperature" and "Inlet Temperature" and subtract them which works fine on the LabView program, but I want to output it to excel as a separate column. The issue is not the math or math function, it is how to output the value onto the excel sheet.


It wasn't clear from your first message what is the exact problem you are looking for…

It also doesn't help to talk about "Excel" when you are creating simple (delimited) text files!

 

What about the help from RTSLVU with adding the result of the subtract function as one more element to the array before saving the data to a file?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 14
(3,308 Views)
Solution
Accepted by sambpk
  • First of all, no part of your program has anything to do with excel. All you are writing is a comma delimited table that excel understands how to interpret. (this will automatically break in countries that use comma as decimal delimiter, so be careful. It will also break if the header labels contain a comma)
  • The correct function to append (or prepend) items to an array is "built array", not "insert into array". ("Insert into array" is a much more complicated function, useful if you want to insert somewhere in the middle).
  • You don't need to wire indices of "index array" if you want the elements in order.
  • Never ever remove labels from terminals (stop button in this case). If you don't want to show the label on the front panel, change the visibility. Labels always need to show on the diagram to avoid confusion.
  • Personally, I would open the file before the loop and use lowlevel function to append new rows while keeping the file open. Close the file after the loop. This is much more efficient than your file IO, which opens and closes the file with each access. (not shown)

 

 

Here's how it could look like:

 

altenbach_1-1594046517539.png

 

Message 6 of 14
(3,300 Views)

 Thank you, I appreciate you explaining all that to me. I just started using this program / language a few days and am not quite familiar with the ins and outs. Your post was helpful.

0 Kudos
Message 7 of 14
(3,295 Views)

Hi there @GerdW,

 

This is my first week using this program and I wasn't aware of the difference between excel / delimited spreadsheets. Thank you for helping / explaining this. The solution did help, but it messed up my time stamp so I'm working on fixing that issue. 

0 Kudos
Message 8 of 14
(3,294 Views)

@sambpk wrote:

The solution did help, but it messed up my time stamp so I'm working on fixing that issue. 


We cannot tell what you are replying to, but my code did not touch your time formatting. RTSLVU is formatting time as DBL and also places it into the first column, in disagreement with the header strings, so don't use that. 😉

 

 

0 Kudos
Message 9 of 14
(3,287 Views)

 I'm hitting reply, but it's not tagging who I reply too.. I'll figure it out soon, I wasn't talking to you about the time stamp. I accepted your reply as the solution because it worked. Thank you for your time.

0 Kudos
Message 10 of 14
(3,281 Views)