Cylinder-piston unit including: - at least one cylinder including a tubular body; - at least one piston liable with a respective rod, said piston and said rod being translatable longitudinally in said tubular body of said cylinder, - at least one reference codification extending for at least a section (dC) on the surface of said rod, along the longitudinal axis of the same; - at least detecting means, movable anchorable to said tubular body, faced, in use, towards said rod and suitable to detect said at least one reference codification and to emit at the output at least a corresponding output electrical signal, - at least a reference zone of amplitude (d7c) delimited from said detecting means, said at least one reference codification being detectable in correspondence to said at least one reference zone; - said at least one reference codification includes at least one plurality of adjacent sectors (...,Si-1, Si, Si+1,...) extending along said longitudinal axis of said rod, each of them for a section (dSi) of equal length; - each sector (Si) includes a plurality of optical contrast zones (si1, si2, si3), each of them having a different optical contrast and each of them extending along said longitudinal axis of said rod for a respective section of extension (dsi1, dsi2, dsi3) such as the sum of the extensions of said sections of extensions (dsi1+dsi2...), in each sector (Si) is lower or equal to said amplitude (d7c) of said reference zone; - said optical contrast zones (si1, si2, si3) are arranged in each sector (Si) according to the same sequence; and in each sector (Si) each optical contrast zone (si1, si2, si3) has its respective section of extension (ds1, ds2, ds3) of different length compared to the length of the same section of extension in the other sectors (Si-2, Si-1, Si+1, Si+2,...), therefore each sector (Si) remains univocally definable from the length of said at least one section of extension (dsi1, dsi2, dsi3) of said optical contrast zones (si1, si2, si3) in it included. - at least one cylinder including a tubular body; - at least one piston liable with a respective rod, said piston and said rod being translatable longitudinally in said tubular body of said cylinder, - at least one reference codification extending for at least a section (dC) on the surface of said rod, along the longitudinal axis of the same; - at least detecting means, movable anchorable to said tubular body, faced, in use, towards said rod and suitable to detect said at least one reference codification and to emit at the output at least a corresponding output electrical signal, - at least a reference zone of amplitude (d7c) delimited from said detecting means, said at least one reference codification being detectable in correspondence to said at least one reference zone; - said at least one reference codification includes at least one plurality of adjacent sectors (...,Si-1, Si, Si+1,...) extending along said longitudinal axis of said rod, each of them for a section (dSi) of equal length; - each sector (Si) includes a plurality of optical contrast zones (si1, si2, si3), each of them having a different optical contrast and each of them extending along said longitudinal axis of said rod for a respective section of extension (dsi1, dsi2, dsi3) such as the sum of the extensions of said sections of extensions (dsi1+dsi2...), in each sector (Si) is lower or equal to said amplitude (d7c) of said reference zone; - said optical contrast zones (si1, si2, si3) are arranged in each sector (Si) according to the same sequence; and in each sector (Si) each optical contrast zone (si1, si2, si3) has its respective section of extension (ds1, ds2, ds3) of different length compared to the length of the same section of extension in the other sectors (Si-2, Si-1, Si+1, Si+2,...), therefore each sector (Si) remains univocally definable from the length of said at least one section of extension (dsi1, dsi2, dsi3) of said optical contrast zones (si1, si2, si3) in it included.