An image recording apparatus comprising:
- a cartridge installation portion, an ink cartridge being removably installed in the cartridge installation portion;
- a sensor configured to detect whether a remaining amount of ink in the ink cartridge installed in the cartridge installation portion is equal to or less than a predetermined amount;
- a recording head having a nozzle configured to discharge ink supplied from the ink cartridge, the recording head being configured to record an image on a recording medium with the ink discharged from the nozzle;
- a memory;
- and
- a controller configured to:
- determine whether the remaining amount of ink is equal to or less than the predetermined amount based on a detection signal from the sensor;
- in a case it is determined that the remaining amount of ink during image recording on the recording medium by the recording head is equal to or less than the predetermined amount, integrate a discharge amount of ink from the nozzle in accordance with the image recording after the controller determines that the remaining amount of ink is equal to or less than the predetermined amount;
- store in the memory an integrated value of the discharge amount of ink from the nozzle that is integrated in the integration of the discharge amount of ink;
- and
- determine whether a calculated ink remaining amount is equal to or less than a threshold, the calculated ink remaining amount being a remaining amount of ink calculated using the integrated value stored in the memory, the threshold being smaller than the predetermined amount,
- wherein (a) in the determining of the remaining amount of ink, in a case it is determined that the remaining amount of ink at the time of receiving a recording start instruction to start the image recording on one recording medium is equal to or less than the predetermined amount, the controller is configured to:
- compare the calculated ink remaining amount with a required ink amount, the required ink amount being an amount of ink required for the image recording according to the recording start instruction;
- and
- in a case it is determined in the comparing that the calculated ink remaining amount is less than the required ink amount, not to start the image recording according to the recording start instruction, and
- wherein (b) in the determining of the remaining amount of ink, in a case it is determined that the remaining amount of ink at the time of receiving the recording start instruction is not equal to or less than the predetermined amount, the controller is configured to:
- start the image recording according to the recording start instruction;
- and
- during the image recording according to the recording start instruction, in a case it is determined that the remaining amount of ink is equal to or less than the predetermined amount and that the calculated ink remaining amount is equal to or less than the threshold, interrupt the image recording according to the recording start instruction.