12-31-2020 07:01 AM
Help!
Hello, I have recently started using LabVIEW at University, I am a complete novice.
I am required to reset the the minimum and maximum temperature values when the Celsius to Fahrenheit button is activated for 3 seconds. I have been playing around with Timer VI's but i cant get it working, any advice would be much appreciated. Please see screenshot below.
Is anybody able to send me a screenshot of something to fix my problem?
12-31-2020 07:12 AM - edited 12-31-2020 07:13 AM
Hi MBlair,
@MBlair1234 wrote:
I am required to reset the the minimum and maximum temperature values when the Celsius to Fahrenheit button is activated for 3 seconds. I have been playing around with Timer VI's but i cant get it working, any advice would be much appreciated.
No screenshot, but some pseudocode:
IF button AND NOT(prev_button) % detect rising edge
start_time = current_time
ENDIF
IF NOT(button) and prev_button % detect falling edge
duration = current_time - start_time
IF duration >= 3s THEN
reset min/max values
ENDIF
ENDIF
prev_button = button % set prev_button for next iteration
See how far you get: you need just shift registers (for prev_button and start_time) and case structures (for IF-ENDIF)…
Suggestion: for a LabVIEW beginner I recommend to use shift registers instead of feedback node. IMHO they are easier to understand in term of DATAFLOW…
12-31-2020 11:33 AM
First you need to explain what "reset" means. Reset to what? (current temperature, some defaults, etc.)
There is no need to have the temperature in a shift register if you also have the feedback nodes. All you need is shift registers that contain max and min. They need to be initialized with -inf and +inf, respectively that will get reset, when your button is pressed for >3 seconds. For this to work correctly, you also need to change the mechanical action (e.g. to "switch until released")
12-31-2020 01:05 PM
See if this can give you some ideas.
other notes: