Magnetic separators for the machining and foundry industry