LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Switching between loops based on elapsed time.

Solved!
Go to solution

Well can you just explain the use of arrays here, I am really not sure what's happening in the VI. It's my first time with LabVIEW so everytime a new thing appaears it throws me off.

I also tried to use flat sequence for the time interval thing, here in the attached VI I have the while loop running for a minute, during this 1 minute period the feed valve and backwash switch back and forth after 6 seconds and 3 seconds respectively. This does provide me with the functionality that I want but now I cannot keep track of the time which I'll require.

0 Kudos
Message 21 of 25
(1,002 Views)
  • Run it
  • look at the diagram
  • place probes
  • use execution highlighting
  • right-click any primitive you are unsure and select "help".
  • Do some of my earlier suggestions.
Message 22 of 25
(995 Views)

Thanks!! But do you think that I didn't try all that. Anyways I'll try to understand.

0 Kudos
Message 23 of 25
(992 Views)

Hi,

The threetimedstates VI certainly provides me the functionality. Thanks a lot. But what it does that it resets the time for feed valve after a specified time i.e when the backwash valve is switched on. But I my system requires to collect data w.r.t elapsed time, that means lets say the feed valve runs for 30 minutes in which after every 1 minute backwash valve is switched on, so for for the first 1 minute of feed valve run I collect pressure value and then when feedvalve is switched back on the pressure is recorded for the next one minute but with time being 1 minute+ (i.e. taking into account of the time for which the feed valve was on previously). Now during that 30 minute I want to record pressure as a function of time. Now since the time is reset I won't be able to keep track of the pressure as a function of elapsed time. Can you suggest something in this regard.

 

0 Kudos
Message 24 of 25
(947 Views)

If you need to keep track of several elapsed times, use an array in the shift register with one element per timer and reset each element according to the needs. Almost no change in code needed.. 

0 Kudos
Message 25 of 25
(945 Views)