U.S. safety codes: How we got here
In 1970, Congress passed the Occupational Health and Safety Act, encouraging employers and employees to reduce incidents of occupational safety and health hazards at their places of employment. Subsequently, a governmental body called OSHA was established by Congress to serve as a watchdog and enforcer of all workplace-related regulations. OSHA CFR 29 Part 1910 is the overarching standard stating that the "employer must provide a safe workplace," while subpart O contains general requirements for machine safety.
The OSHA standards assume the use of Industry Consensus Standards (ICS) like ANSI B11.0: Safety of Machinery: General Requirements and Risk Assessment and ANSI/NFPA 79: Electrical Standards for Industrial Machinery.
Outside the U.S., safety standards for machinery are governed by the IEC, which develops standards for electrical, electronic, and related technologies, and the International Standards Organization (ISO), which covers other technical fields. As of 2013, machine builders must use EN ISO 13849-1:2008 – Safety-related parts of control systems to prove presumption of conformity with the European Machinery Directive (2006/42/EC). Additionally, the IEC 62061 and IEC 61508 standards deal with functional safety of safety-related electrical, electronic, and programmable electronic control systems. IEC 62061 deals with the development of machine-specific control systems, while ISO 13849 and IEC 61508 detail the development of general purpose safety systems.