02-13-2018 05:46 PM - edited 02-13-2018 05:47 PM
The VI has three buttons for the user to check for the Coldest, Hottest and Rainy Day of the week.
o For simplicity, output the following using an event structure:
o Monday for the Coldest Day
o Tuesday for the Hottest Day
o Wednesday for the Rainy Day
o The VI While Loop counter will only increment when one of the three buttons is pressed.
o After 10 seconds when no button is pressed, the output should default to the Hottest day of the week.
Solved! Go to Solution.
02-13-2018 05:53 PM
Do you have a question? Does the VI work? If not, what are the symptoms?
Is this a class assignment? What have you tried?
Static pictures of front panels are boring. Show us the diagram! Attach the VI!
02-13-2018 05:55 PM
Yes it is! See attached for my attempt!
02-13-2018 06:13 PM
wrote:
The VI has three buttons for the user to check for the Coldest, Hottest and Rainy Day of the week.
o For simplicity, output the following using an event structure:
You've got the event structure, good.
o Monday for the Coldest Day
You need an event for "cold" just like you made for "hot"
o Tuesday for the Hottest Day
You have an event for "hot", just wire up the output.
o Wednesday for the Rainy Day
See comments on coldest day above.
o The VI While Loop counter will only increment when one of the three buttons is pressed.
That's not true if the timeout is wired...
o After 10 seconds when no button is pressed, the output should default to the Hottest day of the week.
Wire the timeout value of 10 seconds (in milliseconds) to the timeout terminal (top left of event structure). The timeout runs automatically when no other events are triggered for the timeout value.
See my comments in red. It would probably be faster for me to write the program, but I am writing in text so you learn for yourself!
02-13-2018 06:21 PM
Attached is the program.
I added the events for Hot, Cold, & Rainy
I don't know how to wire the output.
I am not sure what these comments mean:
o The VI While Loop counter will only increment when one of the three buttons is pressed.
That's not true if the timeout is wired...
o After 10 seconds when no button is pressed, the output should default to the Hottest day of the week.
Wire the timeout value of 10 seconds (in milliseconds) to the timeout terminal (top left of event structure). The timeout runs automatically when no other events are triggered for the timeout value.
02-13-2018 06:25 PM
Each event can wire a different value to the string you have called "String". Just wire up to the output terminal (the pink terminal on right side of event structure).
The blue hourglass at the top left of the event structure is the timeout terminal.
02-13-2018 07:19 PM
like this?
02-13-2018 08:35 PM - edited 02-13-2018 09:05 PM
02-14-2018 10:09 AM
Here is a simple example how it could be done with one single event case (no code hidden in other cases!). See if you understand the purpose of every single item on the diagram, a good beginner exercise :D. Yes, every item has a purpose!
02-14-2018 11:13 AM
Hi altenbach,
Why start with a timeout of zero?