This was not my path, but one of my good mates has done exactly this. The trouble he ran into was that he got too into the project as a consultant (which he did before starting the PhD) and not enough on the research side. As a result, they had to retro-actively stop the clock because it didn't yield any PhD worthy material (or something to that effect, this is me translating as I remember our conversations). So the warning is to keep your eye on the prize and try to keep notes on how it might work with your PhD. Review how this could start to work into a PhD with your supervisors regularly, even if it annoys them, you are paying them (via the uni) to supervise you towards a PhD - you are not a cheap lab tech, consultant or whatever is appropriate for your field.