We introduce the concept of constant 2-labelling of a weighted graph and show how it can be used to obtain perfect weighted coverings. Roughly speaking, a constant 2-labelling of a weighted graph is a 2-colouring of its vertex set which preserves the sum of the weights of black vertices under some automorphisms. We study this problem on four types of weighted cycles. Our results on cycles allow us to determine (r, a, b)-codes in Z 2 whenever |a − b| > 4, r ≥ 2 and we give the precise values of a and b. This is a refinement of Axenovich's theorem proved in 2003.