We carry out an exhaustive analysis of the MDS and monodose medication using our robots and a specially designed algorithm for this task, which searches to recognise the different pharmaceutical forms for size, colour, texture etc… helping to minimize the possible errors during the preparation a simultaneously capture process and establishing a learning pattern with machine learning increasing the guarantee of the whole process.