LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem on loop, colorbox, and time control

I had some problem whenever i using the colour box, the colour will disappear after i close my labview and re-open again. Second one, i am having the problem on link the water level, operation to the timer, the function i want to do is after the user select the water level, operation, the timer will total up the time using but not elapse yet .Then, after i click start,the timer will start to elapse until the end~

so far, below there are the requirement of my project and i m stuck in number 3 and 4, somebody know what the problem really is ? thank appreciate for those who willing to help~

  1. On the washing machine select “Hot Wash” or “Cold Wash”
  2. Select the operation (Wash, Rinse, Spin and Soak)
  3. Select the water level and set the timer for soaking.
  4. Press start button to activate the machine.
  5. Wait until the alert given to indicate the washing process is completed.
0 Kudos
Message 1 of 7
(3,044 Views)

I can't look at your code right now, but the problem with the color box is that it is fundamentally a numeric control. Consequently if you want to set it to a color and have it stay that way when you close the VI. You have to set take color as the default value.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 7
(3,026 Views)

Many questions and comments. Rather than using color boxes on the front panel you can use color box constants on the diagram, if they are only supposed to hold the color that the tank will be at different fill levels. Also in the case statement where the color box appropriate to the wanted color is selected you have made the determination much more complicated than needed, an "in range and coerce" from the "Programming":"Comparison" pallette is much cleaner.  In the soak time(min) section, why use a formula box for a simple multiplication use a native LabVIEW multiply, your soak time on one side, 60 on the other. Your Function select between Wash/Rinse/Spin can be handled more clearly by just using a case statement, as you do in the upper right.

 

It is unclear how this is supposed to work, I haven't time at this moment to work through the logic to see how it compares with your description.

 

You label the soak time control "up to 20 minutes", but have both the default and the range determination with a max of 30.

 

When using a boolean as an input to a "boolean" (true/false) case statement, a comparison of the boolean to a T/F constant is redundant. Wire the boolean control to the case selector. Similarly, on the left, the Boolean that is wired to the "Hot" and "Cold" LEDs could be wired through a NOT "Programming:Boolean" pallette

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 7
(3,006 Views)

yup~   so far i could find the set default setting in the data operation in the colour box and make it work,and thank for you solution~

0 Kudos
Message 4 of 7
(3,005 Views)

Example_VI_BD.png

In Range and Coerce uses one function instead of three.

 

The Formula Express VI is overkill for what you're doing.

 

This is equivalent to just a wire:

washing_machine[1]_BD.png

 

And...

Example_VI_BD.png

 

You'll need to do something about the overall approach.  Once the loop tied to the function starts, the stop boolean won't function until the loop finishes.  This is a bad situation, especially if you're trying to solve a problem for a test.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 5 of 7
(3,000 Views)

A note of caution regarding the "In range and coerce", when you first place it on the diagram the "high" terminal will be a diamond with an empty middle, the bottom will be a diamond with a black fill. This is the default, which is that the range will be from the lower value to the next below the top. In other words, with it set as default, and a 10 wired to the top and a 5 wired to the bottom the values 5,6,7,8,9 are within the limits, but 10 would not be. If you right click on the top terminal there is a selection "Include upper limit" which be default is unselected, checking it would make 10 also within the range.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 6 of 7
(2,995 Views)

i had been make of some change on the project to reduce the redundancy due to the advice which is helpful from you guys and so delete some unclear zone, so far the problem is the timer will automatially run until the end whenever i turn the button and how could i pause the time and control the timer. Furthermore, how could i link the operational(Wash,Rinse,Spin,Soak) and water level to set the timer?

0 Kudos
Message 7 of 7
(2,979 Views)