The slates are piled vertically in wood pallets forming several layes, 2 or more rows in each layer depending on the slate size. Slates have many sizes and forms. They can be from 2 to 5 millimeters thick. The slate edges have a 45 deegres slope which helps rain to flow away when put in roofs. When piled in pallets, they are kept tight by using a rubber hammer. So we get a variable gap between two slates depending on the slate edge slope and the slate irregularities. At present, when one layer is done, the worker counts manually how many slates are in the rows of a layer, before another layer is put. One of the problems to solve would be to count the slates placed in the begining and end of the row as there can be wood very close (may be an algorinth must take care of this and sum 2 to the resulting count). I also suppose the reading should be done twice, one in each direction, and give an audible signal if both readings are the same. Investimento e Investigacion Industrial, S.L. P.O.BOX 103 32300 Barco de Valdeorras (Orense) Spain TLF. : (+34)909 256412 FAX : (+34)988 300044 E-MAIL: manuel.castro@mx3.redestb.es