Exercise for Week Three.
A thermocouple measures the temperature of a chemical reaction
every second for a 24 hour period, starting at midnight. The measurements are
collected into blocks of 60 consecutive readings (i.e. one block per minute)
which are examined for equipment malfunction. If a malfunction is detected, an
alarm will be activated. The average temperature for each block is printed, together
with the time (in hours and minutes) to which it refers.
The data flow diagram representing this process is shown in the figure below:
The central transforms have already been identified and are surrounded by a dotted
line.
(i) What steps are involved in choosing the central transforms?
(ii) Perform first-level factoring on this diagram.
(iii) Which of the three branch types (afferent, efferent and transform) in the
diagram produced by the answer to part (ii) can be factored further. Complete your
structure chart by factoring all the appropriate branches of the chart produced
by first-level factoring. In doing so, you will need to use to following pre-defined
modules:
Module getvolt Module alarm Input: none Input: flag (type boolean) Purpose: To read the voltage generated Purpose: Sound alarm if flag by the thermocouple. is true. Output: voltage (real variable). Output: none. Module clock Input none Purpose: return the time in seconds since midnight Output: time (integer variable)