Strictly speaking the control system can't be modified to add an emergency stop as is, because, the laws around machinery would require a full assessment of the machine and this function.
Emergency stops must meet a minimum of iSO 13489-1 performance level C unless the machine c-type standard requires a different level.
Just in the same way that you would expect a modification to a building wiring system covered by bs 7671 to be done to the current version, the laws around machinery actually require this.