In my opinion, the most important thing is to have an accurate sequence of operations before you start writing code.
Without that information, you will certainly be changing a lot of code on site.
Just my two cents.
This is another reason why I'm for waiting til everything is in place. Things change too often, no reason to write the program months ahead of time when there's about an 80% chance it'll change drastically by the time commissioning comes around. But again, I only have smaller programs to write, so I can afford to do that.
Edit: also, I work for an OEM so by "everything is in place" I mean the unit is assembled in the back of our shop, not in place in field. Definitely have the program done before it leaves the shop.
Last edited: