This was asked at another forum:

Can anyone tell me the codes for railings on roofs to prevent falls when working on roof mounted equipment.
2000 IBC, 1003.2.12.4 Mechanical equipment.

Guards shall be provided where appliances, equipment, fans or other components that require service are located within 10 feet of a roof edge or open side of a walking surface and such edge or open side is located more than 30" above the floor, roof or grade below. The guard shall be constructed so as to prevent the passage of a 21-inch-diameter sphere.

Also, the guard must be 42" in height.

Hope this helps,
Ryan Jackson

Ryan Jackson,
Salt Lake City