Assignment
Modify your temperature monitoring VI so that it records both the highest and lowest recorded temperatures, and also displays the time elapsed (in seconds) since recording began.
Download
Working version of VI (no block diagram access)
Textbook sections
Shift registers (pp. 277-280)
Using Tick Count (ms) (p. 384)
Programming hints
Keeping track of time is relatively easy. Use the Tick Count (ms) function on the Timing subpalette. Call this function first outside of the loop, then call it again during each iteration of the loop and subtract this value from the original value taken outside the loop. The elapsed time will be recorded in milliseconds, so you'll have to convert it to seconds.
Keeping track of the highest and lowest recorded temperatures is a bit more complicated. You'll have to use shift registers. Shift registers can be tricky when you first start to use them, but they are vital to creating useful VIs. It's important to always initialize your shift registers when the VI begins to run so that no values are carried over from a previous run.
Use Control Structures to compare the most recently recorded temperature to the highest and lowest recorded temperatures. One control structure will compare the current temperature to the highest recorded. If the current temperature is higher, then the TRUE case will replace the high with the current temperature and the FALSE case will simply keep the high the same as it was before. Another control structure will compare the current temperature to the lowest recorded. If the current temperature is lower, then the TRUE case will replace the low with the current temperature and the FALSE case will simply keep the low the same as it was before.
Front panel (example)