Upon ordering that a principal be released on the principal's own recognizance, or released under non-monetary conditions, or, if bail has been fixed, upon the posting of bail, the court must direct the principal to appear in the criminal action or proceeding involved whenever the principal's attendance may be required and to be at all times amenable to the orders and processes of the court. If such principal is in the custody of the sheriff or at liberty upon bail at the time of the order, the court must direct that the principal be discharged from such custody or, as the case may be, that the principal's bail be exonerated.
A defendant subject to electronic location monitoring under this subdivision shall be considered held or confined in custody for purposes of section 180.80 of this chapter and shall be considered committed to the custody of the sheriff for purposes of section 170.70 of the chapter, as applicable.
N.Y. Crim. Proc. Law § 510.40