The invention relates to a universal
data acquisition unit and a
data acquisition method thereof, belonging to the technical field of
data acquisition; the universal
data acquisition unit comprises amicroprocessor; a multi-path discrete
signal input interface is connected with the input end of a counter by a photoelectric isolating circuit, and a multi-path
continuous signal input interface is connected with the input end of an A / D converter, and a
microprocessor is connected with the input ends of the A / D converter and the counter. The data acquisition method comprises that:
system initialization is carried out; continuous and discrete
signal interrupt vector is set;
interrupt latency is carried out, if the discrete
signal is interrupted, the discrete signal is acquired; if the
continuous signal is interrupted, the
continuous signal is acquired; if a watchdog is interrupted, a
system is restarted; if
hibernation is interrupted,
system setting data is stored, and then a
hibernation state is carried out; and then,
interrupt latency awaken operation is carried out, if awakening is interrupted, the system is started, and the setting is restored before interruption; if the continuoussignal and the discrete signal are acquired,
interrupt latency is continuously carried out after data is transmitted to an upper computer; if not, interrupt latency is carried out directly.