Array xm[nm] store the coordinates for all the upper marker (vertical lines) and the separation between lines is dxm.

Initizlize Tab:
xm[i]=x2+zerox+i*dxm;

Constraint Tab:
From the displacement x, you can find the number (int)(x/dxm);

l_x=dvalue(x/dxm,unit)+"mm";