Aime F. answered 02/05/23
PhD in Physics (Yale), have taught Methods of Engineering Analysis
Say the rod runs along the x-axis from (0,0,0) to (L,0,0) and the magnetic field B points along the z-axis, but into the page B = (0,0,–B). The Lorentz force law is F = I(L,0,0)×B = (0,ILB,0) that must cancel the rod weight (0,–Mg,0). Therefore the current is I = Mg/LB.
Check the units: kg m s⁻²/m T = kg s⁻²/T = A.