System and method for programmatically generating a graphical program in
response to state diagram information. The state diagram information
specifies a plurality of states and state transitions. A graphical
program generation program (GPG program), receives the state diagram
information and automatically, i.e., programmatically, generates a
graphical program (or graphical program portion) based on the state
diagram information. The GPG program automatically includes graphical
source code in a block diagram of the graphical program, which serves as
a framework of the states specified by the state diagram information and
the state transitions, with various "placeholders" or "containers"
enabling the user to easily fill in the graphical program with source
code specifying execution instructions for each state and Boolean
conditions for each state transition. The specific graphical source code
automatically generated depends on programming features supported by a
particular graphical programming development environment with which the
graphical program is associated.