Wire sections: AWG, kcmil, mm² - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: HP Prime Software Library (/forum-15.html) +--- Thread: Wire sections: AWG, kcmil, mm² (/thread-11364.html) Wire sections: AWG, kcmil, mm² - JMB - 09-08-2018 05:24 PM Here are four functions to convert wire sections between kcmil and mm², and between AWG and mm² PHP Code: `EXPORT kcmil_to_mm2(kcmil)// kcmil: section in kcmil → section in mm²BEGIN  RETURN kcmil*0.506707479098;END;EXPORT mm2_to_kcmil(mm2)// mm2: section in mm² → section in kcmilBEGIN  RETURN mm2/0.506707479098;END;EXPORT AWG_to_mm2(AWG)// AWG: AWG number → section in mm²// 0, -1, -2 and -3 must be entered for AWG numbers 1/0, 2/0, 3/0 and 4/0BEGIN  RETURN 53.4751207321/(92^(AWG/19.5));END;EXPORT mm2_to_AWG(mm2)// mm2: section in mm² → nearest AWG number// results 0, -1, -2 and -3 are equivalent to AWG numbers 1/0, 2/0, 3/0 and 4/0BEGIN  RETURN ROUND(4.31245284200*LN(53.4751207321/mm2),0);END; ` Example 1: kcmil_to_mm2(300) returns 152.0122 Example 2: mm2_to_kcmil(150) returns 296.0288 Example 3: AWG_to_mm2(14) returns 2.0810 Example 4: mm2_to_AWG(4) returns 11