Convert petrinet to sequence program for cell and to control program for machine