07-11-2017 10:51 PM - edited 07-11-2017 10:54 PM
Dear Sir/Madam,
Can anyone please give me some guideline by using Event Structure to create this situation below?
Situation:
I want to bake a cake. The oven has 2 modes, which are Running mode and Standby mode. I put the cake inside the oven and click Running. The cake start to bake. But I need to maintain the temperature in a range of between 170 celcius and 185 celcius. If out of range, then the oven will shut down. After the cake done, I will let the oven in Standby mode, which is not shutdown the oven.
Thank you
Solved! Go to Solution.
07-12-2017 12:36 AM
Are you familiar with State Machines? If not, this should be the first step in your learning. Using an Event driven state machine is the second step. I recommend to go through the Core 1-2 online learning courses...
07-12-2017 01:34 AM
Thank you. i have a question here. This situation will involve case structure and event structure or just involve event structure only?
Thank you.
07-12-2017 01:34 AM - edited 07-12-2017 01:35 AM
If you want to bake a real cake, you don't need an event structure, not even LabVIEW. Even if you just want to simulate the process, you don't need an event structure.
Since the loop needs to spin anyway to simulate the temperature (as a function of setting, temperature differential, heater power, heat loss etc.) you can just poll for the user interaction. No event structure needed.
If the use of an event structure required for this homework problem? If so, ask the teacher why.
(Also, next time try to pick a more unique subject for the post. Here it could have been e.g. "oven simulation" or similar. "Event structure" is way too vague.)
07-12-2017 01:45 AM
Thank you for your advise. I will choose a suitable subject for next time. Haha
07-16-2017 09:17 PM
07-16-2017 09:55 PM
Greeting. Thank you for your reply.
I am suffering about how do I set the 170-185 celcius as the starting point from datas? If the oven start running, the temperature must be in the range of 170-185 celcius, otherwise it will shut down automatically. But if the starting point is under 170 celcius, then the oven will be standby mode and it will not shut down.
Thank you and sorry for wasting your time.
07-17-2017 01:00 AM
Use a proper architecture and leave the hardware IO out at this point. Get rid of these silly loops inside the inner case structure.
The program will do exactly what you tell it to do, so create a simulation testbench where you can manually control the inputs (e.g. with a slider). See what happens at the various temperature ranges and logically change the code until it does what you want. Simple as that!
07-17-2017 01:41 AM
Thanks