04-20-2021 10:35 AM
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
04-20-2021 10:43 AM
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".
04-20-2021 12:17 PM
Thank you for suggestions.
The actual task is as per the question attached.
04-20-2021 12:28 PM
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.
04-20-2021 01:34 PM - edited 04-20-2021 01:39 PM
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!
04-21-2021 12:37 AM
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.
04-21-2021 12:38 AM
I have attached the program