LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving and Restoring Pump Operating Hours in LabVIEW

Solved!
Go to solution

Which way would you recommend? Show me the step-by-step process? Would it be using Write To Measurement?

0 Kudos
Message 21 of 33
(289 Views)

Hi Felipe,

 


@Felipe_Alves17 wrote:

Which way would you recommend? 


We told you here, here, here, here, here to save inside the loop.

 

You even noticed this suggestion before…

Best regards,
GerdW


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

I put it inside the loop and it gave this error

0 Kudos
Message 23 of 33
(278 Views)

You probably want to close it after the loop, right?

0 Kudos
Message 24 of 33
(270 Views)

I already have a while loop running in my program, and it can't be interrupted. Within this same loop, I need to implement the hourmeter logic.

The goal is that, every time the pump is turned on, the system records the time it was on and increments that value to the total accumulated until the pump stops.

The problem I'm facing is that, because of the way the while loop is already structured, a conflict is occurring when trying to read and write this hourmeter logic within the same loop

 

 

Download All
0 Kudos
Message 25 of 33
(260 Views)

Hi Felipe,

 

why are there backward wires in the last image?

 

You cannot write to a file once you close it...

Best regards,
GerdW


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

I believe the image is disorganized, I apologize, here is the image

0 Kudos
Message 27 of 33
(242 Views)

@Felipe_Alves17 wrote:

I believe the image is disorganized, I apologize, here is the image


Still disorganized and you still close the file reference in the first iteration, making it invalid for the rest of the run.

0 Kudos
Message 28 of 33
(225 Views)

Did this image look better?

0 Kudos
Message 29 of 33
(218 Views)
Solution
Accepted by topic author Felipe_Alves17

Hi Felipe,

 


@Felipe_Alves17 wrote:

Did this image look better?


Nope, still backward wires!!!

 

See this as a suggestion:

  • When you close a file then you cannot use its reference in the next iteration! Solution: open the file again…
  • All wires going from left to right: did you ever read the style guide in the LabVIEW hellp???
  • As noted in the image: you need to implement error handling!!!
  • Please don't name VIs with "FINAL" when they clearly aren't finalized…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 30 of 33
(212 Views)