LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving and Restoring Pump Operating Hours in LabVIEW

Solved!
Go to solution

I think I expressed myself poorly, I have a program running a while loop, and when I use another while loop, it hangs. This program you sent needs to finish the while loop to save, I can integrate your program into my while loop, but I can't terminate my while loop; I need something that saves the file without having to finish the while loop, I'm not sure if that makes sense.

 

In summary: I need to save the last engine data to a file without ending the while loop.

 

0 Kudos
Message 11 of 33
(323 Views)

Hi Felipe,

 

some days ago I suggested some steps: I also recommended to save data more often than just "on exit"...

 


@Felipe_Alves17 wrote:

I have a program running a while loop, and when I use another while loop, it hangs. This program you sent needs to finish the while loop to save, I can integrate your program into my while loop, but I can't terminate my while loop; I need something that saves the file without having to finish the while loop, I'm not sure if that makes sense.

No, doesn't make sense unless you show your code…

 

  • Who told you to use "another" loop?
  • Why can't you "terminate your loop"? There are ways to stop one loop when another one has stopped...

@Felipe_Alves17 wrote:

I need something that saves the file without having to finish the while loop


Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 33
(318 Views)

OP, I think you need to look at my code and understand it. The parts are there for you to do what you need. There's a function that writes the data to a file that you can put wherever you'd like. Review the code until you understand what ALL of the nodes are doing, why the While loop is there, all of that. Then you'll be able to understand how to solve your problem.

 

 
 

BertMcMahan_2-1755618101826.png

 

Message 13 of 33
(301 Views)

I'll show you the project, at the end is the logic you made

0 Kudos
Message 14 of 33
(293 Views)

I didn't see your recommendation to save frequently, I'll look into it.

0 Kudos
Message 15 of 33
(290 Views)

Hi Felipe,

 


@Felipe_Alves17 wrote:

I'll show you the project, at the end is the logic you made


This is not a "project", it is just a single VI.

(We miss the project to actually handle all the hardware stuff in the VI.)

 

And that VI is WAY TOO LARGE!

See the navigation window:

The white area is a FullHD screen, your block diagram spans several screens!

 

Which "end" are you talking about?

 

See this (cleaned up) part of your VI:

You have been told several times now that you can place the FileWrite anywhere, also inside the loop.

 

Be aware of: Setting a new value for the INI key does NOT write the value to the file! All INI file handling is done in memory, the file will only be updated with the CloseINIFile function!!! 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Download All
0 Kudos
Message 16 of 33
(297 Views)

This part of the screen that's blank is where I need to extract the data from the pump.

That's right, the code ended up being all on one screen due to the short delivery time, and I was on the move. They just asked me to put this hour meter in this program.

0 Kudos
Message 17 of 33
(282 Views)

Hi Felipe,

 


@Felipe_Alves17 wrote:

This part of the screen that's blank is where I need to extract the data from the pump.


???

Which "part of the screen"?

 


@Felipe_Alves17 wrote:

the code ended up being all on one screen due to the short delivery time, and I was on the move.

They just asked me to put this hour meter in this program.


Now you got enough information from us to solve your requirement, do you?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 18 of 33
(265 Views)

Unfortunately, it is not saving the value in the file, when I looked at Probe Watch I noticed that it is not executing after the shift register.

 

I'm testing other ways to try to solve this little problem, that's all that's missing...

0 Kudos
Message 19 of 33
(251 Views)

Hi Felipe,

 


@Felipe_Alves17 wrote:

Unfortunately, it is not saving the value in the file, when I looked at Probe Watch I noticed that it is not executing after the shift register.


THINK DATAFLOW!

It will execute this part of code AFTER the loop has finished…

Again: THINK DATAFLOW!

 


@Felipe_Alves17 wrote:

I'm testing other ways to try to solve this little problem, that's all that's missing...


We told you "other ways" several times now, but you don't seem to listen…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 20 of 33
(248 Views)