LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save data

Hi,

I tried to save data (5 temperatures & 4 pressures) to excel file, but I couldn't. My vi file is attached here. Would you help me by modify the code including data saving part?

Thanks

0 Kudos
Message 1 of 6
(105 Views)

You do not have any saving in your code at all. Have you tried looking in the LabVIEW examples? This is an easy thing to accomplish. Go to the top menu and find examples. This will help move you along for the next time you are having an issue.

 

aeastet_0-1737050453863.png

 

Tim
GHSP
0 Kudos
Message 2 of 6
(89 Views)

Some general comments:

 

  • Never ever turn terminal labels into empty strings, ever! You can change the visibility on the front panel if needed. All terminals on the diagram should have a unique label.
  • Your thermometers and gauges can display their digital display (right-click....visible items...), eliminating 50% of the terminals. (You could even use arrays of indicators, simplifying things even more!
  • Index array is resizable and if you don't wire indices, you get the elements in order.
  • resizing formula nodes so you don't see their code is confusing. You should very rarely (=never!) even need formula nodes.
  • Now built a better state machine that allows saving.
  • Does it really (really!?) need to be excel or would tab delimited text be sufficient. You probably want to open the file before the loop, append new lines with each iteration (or on demand), and close the file when done. This would be much more convoluted in excel.

 

Here's how your code could look like:

 

altenbach_0-1737057023033.png

 

0 Kudos
Message 3 of 6
(67 Views)

Thanks Knight Of NI.

But the pressure should be multiply by 30 then divided by 10 : P= (measured data * 30)/10.

Thanks

 

0 Kudos
Message 4 of 6
(35 Views)

Hi alhaheeb,

 


@alhabeeb wrote:

But the pressure should be multiply by 30 then divided by 10 : P= (measured data * 30)/10.


So you want to multiply by 3 and add an offset of 0!?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 6
(26 Views)

@alhabeeb wrote:

Thanks Knight Of NI.

But the pressure should be multiply by 30 then divided by 10 : P= (measured data * 30)/10.


 

Sorry, I did not look too closely and multiplying then dividing is somewhat silly and anti-intuitive, especially if we do the temperatures first. Debugging and validating is important and always needed and we would have found the problem in the next step, of course. Since I don't have your hardware, that's up to you. 😄

 

Just use Gerd's suggestion above. Trivial!

0 Kudos
Message 6 of 6
(13 Views)