FIG. 5A is a flowchart and FIG. 5B is a diagram in which contents of the flowchart are described by the C language. [0058] The sequence processes having the state as shown in FIG. 3 can be rewritten to a branch command according to the state and a form of the next state setting. [0059] Step S1 shows a variable for holding the state of the task. [0060] Step S2 shows the branch command according to