LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Append final value from indicator to text file

Solved!
Go to solution

Hello all,

 

In my vi, I am trying to append the final values in the indicator for B passes, B fails, L passes, and L fails to the end of my text file. I tired using a local reference and property node (just to try it out) but the values were incorrect. The vi I posted has sample forced values that represent the vi I am working on. I am simply out of ideas at this point. I am fairly new to LabVIEW.

0 Kudos
Message 1 of 7
(1,572 Views)

Hi Jeff,

 


@Jeffk2336 wrote:

In my vi, I am trying to append the final values in the indicator for B passes, B fails, L passes, and L fails to the end of my text file.

I am fairly new to LabVIEW.


To write to the end of a file (aka "append new data") you need to:

  1. Open the file
  2. Set FilePosition to "end of file"
  3. Write data
  4. Close file

(When you write the data in a loop you should open the file, set fileposition and close the file outside the loop!)

 

When you are "fairly new" to LabVIEW then you should take care of all those "Training resources" offered in the header of the LabVIEW board!

Best regards,
GerdW


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

@GerdW wrote:

Hi Jeff,

 


@Jeffk2336 wrote:

In my vi, I am trying to append the final values in the indicator for B passes, B fails, L passes, and L fails to the end of my text file.

I am fairly new to LabVIEW.


To write to the end of a file (aka "append new data") you need to:

  1. Open the file
  2. Set FilePosition to "end of file"
  3. Write data
  4. Close file

(When you write the data in a loop you should open the file, set fileposition and close the file outside the loop!)

 

When you are "fairly new" to LabVIEW then you should take care of all those "Training resources" offered in the header of the LabVIEW board!


Maybe I did not explain myself clearly. My issue is not appending the data (I am able to do that), it’s writing the final values that increment for passes and fails from the indicators. The vi attached outputs the incorrect values at the end of the text file. 

0 Kudos
Message 3 of 7
(1,521 Views)

Hi Jeff,

 

your VI is saved in LV2019, but right now I'm working with LV2017.

Could you attach a downconverted version of your VI?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(1,513 Views)

@GerdW wrote:

Hi Jeff,

 

your VI is saved in LV2019, but right now I'm working with LV2017.

Could you attach a downconverted version of your VI?


Did this convert correctly. I selected LabVIEW 17.0...?

0 Kudos
Message 5 of 7
(1,508 Views)
Solution
Accepted by topic author Jeffk2336

Proper data flow to the rescue...


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 7
(1,470 Views)

@crossrulz wrote:

Proper data flow to the rescue...


Thank you for taking the time to modify the vi. Among other things, I am finally able to get the passes and fails properly now to the file. 

0 Kudos
Message 7 of 7
(1,437 Views)