LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to reset and stop

i have attached my labview program. In my program reset and stop is not working. Working of program is shown in pdf attached. But now my stop, reset start is not working

Download All
0 Kudos
Message 1 of 7
(1,568 Views)

Your program is inside out.

 

Your while loop should be on the outside, the start and and reset case structures should be on the inside of the while loop.

 

It looks like you have  the beginnings of a state machine, so that is good.  But the inner while loops in those case means it won't go to conveyor 2 until you've stopped the innermost while loop in conveyor 1.  I don't know if that was your intention.

 

You also have several Rube Goldbergs in there, comparing a boolean wire =True is redundant.  The wire is already true or false.  Likewise with the Select Statement.  Looking at a boolean wire to output a True if True and a False if False, is just a pure waste of diagram space.  Just use the Booleans!

 

PS:  The correct spelling is "conveyor", not "conveyer".

0 Kudos
Message 2 of 7
(1,564 Views)

Thank you for suggestions.

The actual task is as per the question attached.

Download All
0 Kudos
Message 3 of 7
(1,528 Views)

You  really need a 5th state in the state machine that  is an idle state.  Stop will take it right away to that state.  Start will take it out of the idle and  back to what is was doing before.

0 Kudos
Message 4 of 7
(1,517 Views)

You need exactly one outer while loop and one case structure with cases for every state. Decide on a reasonable loop rate. In the idle state you would check the elapsed time and all user controls at regular intervals to see if you should go to the next state (long wait, e.g. 5 seconds) make the program unresponsive to user interactions.

 

This seems like an advance (final?) class project. I recommend to go over your class notes and recap everything you should have learned already. None of your shift registers are initialized, meaning they will start at whatever the value was at the previous run. Unpredictable! All your sequence structures can be avoided. LEDs are typically used as indicators. Using them as controls confuses the user. Arrange all your front panel elements and terminals in a clear way to avoid mistakes. Use arrays on conveyors and LEDs to greatly simplify the code and avoid all that duplication. Make it scalable! Having nearly identical code duplicated in N cases of the case structure is terrible. You are dealing exclusively with integer numerics. The should not be any orange!

0 Kudos
Message 5 of 7
(1,505 Views)

Thank you for your suggestions. I am a newbie to labview. I tried to implement some of your suggestions which i understand. Now reset is not working. Except that other all are working fine.

 

Could you please help how to implement reset.

I tried to give as fifth case in case structure, but I don't know how to program it.

0 Kudos
Message 6 of 7
(1,469 Views)

I have attached the program

0 Kudos
Message 7 of 7
(1,468 Views)