Petri nets have long been known as a readable and powerful graphical modelling language. In particular, Petri nets also allow the creation of high-level models of embedded controllers. These models can be translated to executable code. This possibility is already available in some tools including the IOPT Tools. Another possibility is to translate the Petri net model into a state machine, which can then be easily executed by an even larger number of platforms for cyber-physical systems. In that sense, this paper presents a tool that is able to generate a state machine from a non-autonomous class of Petri supported by the IOPT Tools framework (which is publicly available). These state machines would be too large to be manually generated, but can now be automatically created, simulated, and verified using an higher-level modelling language. The state machines can then be used for execution or even as input for additional verification tools. This paper presents the translation algorithm and an illustrative example.