Method of control of a robot (2) having a movable element for agitating a container (3) holding a pulverized drug and diluents to enable a reconstruction process where the pulverized drug is fully dissolved in the diluents. The method comprising the steps of: providing a user interface (22) for introducing data indicative of the drug to be subjected to reconstitution process; accessing to an internal data base DB for outputting, for a selected drug, a list of primitive movements P1, P2,..Pi,..Pn to be used in the reconstructing process; operating the robot (2) for executing sequentially the primitives and moving the container (3) according to the instructions of the primitives; measuring, during the movement of the container under robot action, physical positions in the space and dynamic parameters of the container (3) creating a list of registered data; comparing the measured positions in the space and the dynamic parameter with the corresponding ones of the primitive movements for selecting a list of eligible primitives if a sufficient approximation level is reached; elaborating selected eligible primitives together to generate instructions for the robot allowing a complex movement encompassing the simple movements; and using the robot (2) for shaking said container that is moved in the space according to the complex movement.