01-04-2013 11:51 AM
these are the codes on which i have worked out
01-04-2013 12:08 PM
These are first glace items. I haven't dug into your code at all yet.
Do not delete the labels. Make them something intuitive. You can hide the labels on the front panel. But they are essential to the block diagram.
Save your state enum as a type def. Then you can add/subtract cases to the enum without needing to change all of the other enums.
I'll try to dig in a little more when I have some time.
01-04-2013 12:19 PM
could you please do the code complte code and post me as soon as possible
01-04-2013 12:27 PM
@vendingmachine wrote:
could you please do the code complte code and post me as soon as possible
No. We will not do your work for you. How would you learn then? We have our own work to do. We are willing to help you do yours. But we will not do it for you.
Oh, if you have it (I'm not sure when version you are using (Base or Pro)), use the Event Structure to handle the button presses. That will make it easier.
01-04-2013 12:28 PM
@vendingmachine wrote:
could you please do the code complte code and post me as soon as possible
This is a help forum, and not a code writing service. 😮
01-04-2013 12:29 PM - edited 01-04-2013 12:34 PM
After you have implemented crossrulz's suggestions, the next thing I would do is use an event structure to handle the buttons. You could setup one case of the the state machine to contain the event structure.
You are more likely to get help if you ask specific questions about your code or LabVIEW.
01-04-2013 12:38 PM
rarther than going for event structure we can cmplte it using case structure
01-04-2013 12:43 PM
@vendingmachine wrote:
rarther than going for event structure we can cmplte it using case structure
You can, but it will be less intuitive, harder to read, harder to expand, more complicated, use more processing, and probably a few more bad things. If you have the event structure, use it.
01-04-2013 12:43 PM
Event structures and case statements are very different things. An event structure is ideal for user interfaces since you define actions for specific events such as a button press. The event structure will be ideal and not execute until an event occurs. In almost all cases the event structre is contained in a while loop.
A case structure is simply a structure which allows you to execute a specific piece of code based on the selector value. A case structure placed inside a while loop is the basic architecture needed for a state machine. If you use a while loop with a case structure to handle user events you create a polling system. Polling systems must continually run and check for specific conditions. It will be using up CPU cycles as long as it is running. Case structures are not very good for handling your user events because of this.
04-01-2015 04:00 AM
I have only ATM, Car wash, Sprinkler, Traffic light and Boiler CLD questions. I want to practice more, so I need question paper of Coffee machine, Microwave oven, Security system, Thermostat, Treadmill, Vending machine.
Can anybody help me on this?
Thanks