The injection pump delivers fuel to individual cylinders by opening and closing a solenoid control fuel valve. The PCM monitors the amount of time it takes for the fuel solenoid valve to physically close after commanded to close. Closure time out of range is seen as a fault. This response time is measured in milliseconds & when incorrect a P1216 is set.
The PCM uses a calibrated resistor mounted internally in the injection pump to determine fuel rates. The resistor value is stored in the PCM memory. If the PCM memory has been disturbed or the PCM has been replaced, the PCM will relearn the resistor value on the next ignition cycle. When it does not the P1218 will reset
I have seen both of these codes many times & the repair is replacement of the fuel injection pump.