signal values airsignal 0 and airsignal 1 a particular embodiment of the invention is depicted in fig9 in which a simple sensor 34 a provides a binary signal indicating air or no air in the particular section 36 a of the fluid conduit 16 the sensor 34 a takes a sample each time that the pump mechanism 24 takes a step so that the resulting binary air values represent either a step with air or a step without air a clock sampler 84 provides values indicating to which pump motor step each binary air value corresponds with many peristaltic mechanisms driven by a step motor the fluid flow varies widely from step to step and some steps may even generate negative flow thus the binary air values for various steps may have to be processed to account for the fluid that actually flowed during that step in the embodiment shown the motor control 86 groups the steps in each pump cycle into several packets so that each packet includes several pump steps the fluid volume qsample pumped in the particular packet may be of the same order of magnitude as the fluid volume pumped in the other packets to achieve this result the packets may have different numbers of step in them the binary air values are provided to a packet accumulator 88 and sorted into values representing steps with air and values representing steps without air when the packet is completed i e when the motor has stepped through all the steps in the packet the number of steps with air are divided by.