the unit for mass is kg, and the unit for weight is Newton.
W = mg, so on earth the weight would be 40 x 9.8 N
but the scale automatically convert the reading to kilograms, by dividing the N value by 9.8
so the reading = W / 9.8 = mg/9.8
Now, on the moon, the g value is 1/6th, so...