What is consistent data?
The size of the data area that cannot be changed simultaneously by concurrent processes is called a consistent data area. A data area that is larger than the consistent data area can be completely corrupted.
Data that belongs together with regard to content and describes a process state at a specific time is called consistent data. For data to be consistent, it must not be changed or updated during processing or transfer.
You want to determine the mean value of a series of numbers. The following conditions hold for this example:
- The elements of the series of numbers are determined at the beginning of the calculation.
- The source data is made available in a buffer and has to be stored in a second buffer.
- Transfer of the source data between the buffers is serial.
- This takes different amounts of time.
If you do the calculation in a constant cycle, then not all of the elements include the latest value and you get a false mean value. If the series of numbers is handled as one unit or structure, the calculation is made only when all the elements of the series of numbers include a valid value. Here it is irrelevant in which order the determination of the elements is made or how much time is required. This series of numbers is then consistent.
Packets with a data matrix code are scanned on a conveyor belt. The scanner feeds the data to a CPU via PROFIBUS. The data matrix code has a length of 8 bytes. Data transfer is not consistent, but in two steps of 4 bytes each.
If the next packet is scanned during data transfer of the first 4 bytes, the data in the CPU consists of the first 4 bytes of the first packet and the second 4 bytes of data of the second packet. The data is corrupted.
You must ensure that the 8 bytes are transferred as a whole. Consistency is required over the complete length of 8 bytes.
Other topics concerning consistent data are available in Entry ID 28991143.