The "Summary of the Health and Safety in Employment Act 1992" at the beginning of Codes of Practice states that "Compliance with codes of practice is not mandatory. However, they may be used as evidence of good practice in court."
This means that the duty to "take all practicable steps" of the Health and Safety in Employment Act 1992 and the Health and Safety in Employment (Pressure Equipment, Cranes and Passenger Ropeways) Regulations 1999 can be met by complying with the relevant Code of Practice. It is worth noting that if you implement the Code of Practice in order to meet your duty to "take all practicable steps" there are aspects of the Code of Practice that must be covered. If however, you choose not to implement the Code you must still comply with the PECPR regulations which includes not operating the equipment unless it has a Certificate of Inspection. To obtain this Certificate the documentation quoted in the Code of Practice must be presented to the Inspection Body. Further to this an inspection is required on the operation of the equipment and the testing of any safety devices fitted. Where this documentation is not presented and the relevant safety devices cannot be tested then a Certificate cannot be issued.
So although the Code of Practice, in total, may not be mandatory there are parts of the code which need to be applied if you wish to use the Code to fulfil your duty to "take all practicable steps". This particularly applies in obtaining the necessary Certificate of Inspection without which the equipment may not be legally used.