There has been some discussion on here about power sources, grounding and wiring control panels. NEC Section 670 (675) covers the Industrial Machine area pretty well, also the Code requirements for Grounding and wire sizing also applies to any panel built.
NFPA 79 is a guideline for panel builders and its not mandatory except to comply with OSHA.
This is a good place to start with NFPA 79, unless you want to purchase the 2018 Edition which is $65.
Link to Siemens white paper for reference > https://assets.new.siemens.com/sieme...per-icp-us.pdf
also > National Electrical Code Top Ten Tips: Article 409, Industrial Control Panels
Or > https://library.e.abb.com/public/1b9...2yRbGpy34tjMzM