1. A sequence controller comprising: an input selection circuit; a logical processing circuit; an output control circuit; a sequence program storage circuit; a memory circuit; means connecting a plurality of input contacts to the input selection circuit; means connecting the input selection circuit to the logical processing circuit; means connecting the logical processing circuit and the memory circuit; means connecting the memory circuit and the logical processing circuit to the output control circuit; means connecting the sequence program storage circuit to the logical processing circuit; means connecting a plurality of output relays to the output control circuit to be controlled thereby; the sequence program storage circuit storing a relay sequence having branch points; the level of each branch point and its on-off state being stored in the memory circuit; whereby data from the plurality of input contacts is processed in accordance with the relay sequence stored in the sequence program storage circuit to control the output relays.