LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reinitialising a vi?

You have so many loops. Can you point out exactly which one terminates early under some conditions?

 

As a first step you need to eliminate the following local variables on the lower left:

 

  • control of 2nd pump
  • track by volume(default
  • VISA resource name
The control terminals of those are right there on the diagram, just branch the wire! 😄

 

 

The code is still a complete nightmare, with about 80% too much code for what it needs to do. For a small example, see your honorary mention in the rube goldberg thread. 😄

 

Why are you writing to the "Numeric Output" global from two different places in parallel?

0 Kudos
Message 11 of 14
(435 Views)

I openly confess that the code is a mess... but please go easy! :mansad:

 

Screen shot attached. I “THINK” that sometimes the while loop terminates prematurely, i.e. as soon as its called! I could be wrong. Its just a hunch.

Being fairly new to labview, I guess I was trying to minimise the clutter by having locals variables, rather than wires. But i can see this may have not been the best idea!

 

 

 

0 Kudos
Message 12 of 14
(422 Views)

why are you waiting for 1000 samples in the stacked sequence diagram and soon after that you are writing TRUE to RAMP DOWN parameter which is causing the primary pump while loop to stop.

 

Do you know the max and min limit of your pump and cant you monitor the level of the pump and program accordingly?

0 Kudos
Message 13 of 14
(415 Views)

Maintaining a constant volume while shuttling the fluid is crucial.

A  vi calculates how long the primary pump remains on the ramps, and in steady state which is dependant on the sample volume, and slope of ramp requested.  I have been using Boolean values as flags, effectively

 

 

 

I have taken a screen shot to demonstrate the ramps profiles that its creating.

 

 

You can see the primary pump tracking my ramp profile, and the secondary pump maintains constant volume, given the primary pumps flow rate and volumetric error. You can see the volume corrections occurring on the troughs.

 

Why would it run oK so long as i have both the main app and this sub vi openopen, but be unpredictable in behaviour when i run only the main app?

 

 

 

0 Kudos
Message 14 of 14
(404 Views)