Hi, My name is ***** ***** i will be assisting you
The error code 5100 usually comes up after paper jam on printers.
The error indicates 2 possibilities, either their is something stuck or a sensor detecting the paper jam issues has faulted.
Please try the below steps
first of all please turn off the unit....unplug the power cable
now remove the cartridge...manually slide the carriage assembly\ printhead back and forth
also clean the rail against which the assembly slides with a tissue ensuring that there is no ink residue on it
clean the golden contacts of the cartridges and the printhead with a cotton swab dipped in little alcohol
Now check the paper feed tray, roller assembly area and the area where the carriage moved for any stuck obstruction like paper, paper clips, pins etc and if found remove it.
once done turn the unit back on and check
if even after performing the above steps, the error 5100 continues, then an electric sensor that detects paper jams has faulted.
If the unit is within warranty cover get the unit serviced through Canon
If the unit is out of warranty, then you may contact a local repair store for service.
However, sensors repairs\replacement in such case is costly and it is more cost effective to opt in for a new unit.
i hope you understand that in case of hardware faults i can suggest cleaning and reset steps but cannot make a bad part work again