搜尋 圖片 地圖 Play YouTube 新聞 Gmail 雲端硬碟 更多 »
進階專利搜尋 | 網頁圖片 | 網頁紀錄 | 登入

專利

  
[graphic]

SEQUENCE CONTROLLER

BACKGROUND OF THE INVENTION

This invention relates to a sequence controller of the 5 sequentially stored program type, and more particularly, to a system comprising a plurality of identically structured sequence controllers which is capable of parallel and other operations by way of mutual interlocks. 10

There has been available a large-scale sequence controller having very large numbers of program steps and input and output points, wherein its maximum available number of program steps is divided into several to perform the equivalent of parallel operations. 15

However, such equipment is very much costly because of the large numbers of steps and input-output points involved and is not only wasteful for users who need not utilize the full potential of its scale but is not flexible enough to allow an increase or decrease of 10 scale. In this connection, it is obviously desirable that the desired control functions be obtainable by purchasing only the necessary number of controllers which are reasonably small-scaled and low-priced. However, the conventional small-scale controllers are virtually inca- 2* pable of complicated parallel operations, for when a plurality of units are utilized to perform such control operations as interlocking to other machines or capturing certain process signals in other machines and carrying out operations on its own, inputs, outputs and inter- 30 rupt inputs must be allocated for such purposes and, moreover, one machine exerts influences on the other machines.

To solve the above problem, this invention provides a sequence controller including flaps, each of which 35 may be a one-bit memory and which may be set and reset not only by predetermined user instructions in one controller but also by user instructions in another controller connected to said one controller by a common bus, and means for controlling said flags, in such a man- 40 ner that the statuses of said flags may be evaluated in accordance with predetermined user instructions and utilized as operational conditions.

BRIEF DESCRIPTION OF THE DRAWINGS 4J

FIG. 1 is a block diagram showing a couple of sequence controllers as interconnected via a flag control bus in a system according to this invention.

FIGS. 2A and 2B combine to form a flow chart showing the basic operations of said sequence control- 50 ler, and

FIG. 3 is a block diagram showing a typical flag control circuit in said sequence controller.

DETAILED DESCRIPTION OF THE „
PREFERRED EMBODIMENTS

This invention will now be described in detail, reference being had to the accompanying drawings which depict a preferred embodiment of the invention.

In FIG. 1 are shown a couple of identical sequence 60 controllers A and B which are used in accordance with this invention. The two units are connected to each other through a flag control bus 1 (briefly, bus I) which will hereinafter be described in detail. The sequence controllers A and B, respectively, comprises a central 65 processing unit 2 which is a firmware in the form of a microcomputer, an input circuit 3 interfacing said central processing unit 2, with an external contact point

2

connected to input terminal IN, an output circuit 4 for controlling an external equipment connected to an output terminal OUT in accordance with output signals from said central processing units 2, a program memory 5 which memorizes a sequence program arbitrarily entered by the user, a flag control circuit 7 having input-output terminals 6, a machine number setting device 8 for setting the identification numbers of controllers, and a flag output circuit 10 for outputting switching outputs corresponding to the statuses of four flags Fi through F4 set in central processing unit 2 through flag output terminals 9. In addition to the above-mentioned components, each sequence controller in this system further includes, though not shown in the drawings, a keyboard used in writing a program into the program memory 5, a display unit for displaying the user instruction for each step and a display unit for displaying the period and output statuses, among others. It should be understood that the external equipment can be operated by the output of flag output circuit 10.

The user instruction for each process step in the above sequence controller system consists, as shown below, of [OP], a command code, [DATA-1] and [DATA-2] which modify the command code, and [OUT] which is the contents of output control which are to be outputted from output terminal OUT in the execution of the particular step.

The following is a brief explanation of general command codes and the contents of execution thereof in the sequence controller.

(a) [NOP]: "non-operation" command Do nothing but proceed to the next step

(b) [END]: "end" command.

Means that one cycle of operation has been completed.

(c) [JMP]: "jump" command

Jump to the step designated in [DATA-1] and continue execution from there on.

(d) [AND]: "and" command

Proceed to the next step when the two inputs specified in [DATA-1] and [DATA-2], respectively, are concurrently available.

(e) [OR]: "or" command

Proceed to the next step on reception of whichever earlier of the input signals specified in [DATA-1] and [DATA-2].

(f) [CNT]: "count" command

Count signals from the input in [DATA-2] up to the number specified in [DATA-1] and, on countingup, proceed to the next step.

(g) [CJP]: "conditional jump" command

Jump to the step specified in [DATA-1] when the input specified in [DATA-2] is ON and proceed to the next step when it is OFF.

(h) [RPT]: "Repeat" command

Repeat the operation from the step specified in [DATA-2] to the current step up to the number of times specified in [DATA-1].

(i) [TIM]: "Timer" command

Proceed to the next step on lapse of the time specified

in [DATA-1] and [DATA-2]. While the foregoing are well-known command codes, the following new command code is defined for the sequence controller according to this invention, (j) [FSR]: "flag control" command Control the flag specified by [DATA-1] among the four flags Fi through F4 of the controller (includ3

ing the very controller in question) having the machine number designated in [DATA-2] to the status (set or reset) specified by the byte of [DATA-1].

While the architecture and operations necessary for 5 execution of said flag control command will be described below in detail, the scheme involved is, in brief, such that by using said flag control command, not only the flags of the principal (own) controller but also the flags of another controller connected via bus 1 can be 10 freely set and reset. And in the case of a command to advance steps on condition of an input signal such as the above-mentioned AND or OR command, if a flag number of the principal machine is specified in [DATA-1] or [DATA-2], the status of the flag functions as an opera- 15 tional condition as does the input signal.

FIGS. 2A and 2B form a flow chart showing the basic operational sequence of the central processing unit 2, which is governed by a system program stored in ROM within the unit 2. Especially, the chart shows the 20 flag control function as a main feature of this invention.

The controller A, i.e. the principal or own machine, will be the main subject of the following description which follows the sequence depicted in the same chart. First, in FIG. 2A, the program steps proceed according 25 to routine (1) and, at routine (2), the user instruction at the step is read from the memory 5 into the central processing unit 2. In routine (3), the output control contents [OUT] of the read-in user instruction are sent to the output circuit 4 and the output status set by the 30 user instruction is outputted from the output terminal OUT. At routine (4), the read-in user instruction is displayed alongside the step number.

The subsequent routines (5), (6), (7) and (8) are routines for receiving flag control signals from the other 35 controller B to the principal controller A. First, at routine (5), it is examined whether the bus 1 is being occupied by the principal controller A. Thus, as will be discussed hereinafter, when a flag control signal is transmitted from the principal controller A to the other 40 controller B, the bus 1 is occupied by the flag control circuit 7 of the principal controller A, and the routine (5) examines this status of flag control circuit 7. In an initial state, the judgement at routine (5) is NO and the sequence proceeds to routine (6). 45

In the routine (6), the status of a predetermined signal line of the bus 1 is examined to judge whether the bus 1 is occupied (used) by the other controller B and, if it is not, the sequence jumps to routine (9) and if the bus 1 is occupied, the sequence proceeds to routine (7). 50

In the routine (7), it is examined whether the flag control signal on the bus 1 designates the principal controller A. Thus, while FIG. 1 shows a couple of controllers A and B interconnected by bus 1, the present system may comprise three or more controllers as inter- 55 connected with a common bus 1 and, therefore, as will be described hereinafter, the machine sending a flag control signal includes the machine number information specifying the recipient machine in the control signal and it is first inquired if the particular control signal is 60 directed to itself (the principal machine). Thus, in the routine (7), a judgement is made if the machine number datum on a predetermined signal line of bus 1 is in agreement with the machine number entered by the machine number setting device 8 of the principal con- 65 troller. If the numbers disagree, the sequence jumps to routine (9) and when the numbers are in agreement, the sequence proceeds to routine (8).

4

In the routine (8), the controller A receives the flag control signal directed to itself, controls the specified one of said flags Fi through F4 to a specified status and sends out an answer signal on a predetermined signal line of the bus 1.

Following the above-mentioned flag control signal reception routine, the routine (9) decodes the command code of the user instruction read out from the program memory 5 and the operation corresponding to the particular command code is performed. While the general command codes (a) through (i) mentioned hereinbefore and the respective operations need not be described in detail, the processing of the AND command, as an example, is shown as routine (10).

The routine (10) examines whether, among a large number of inputs or flags Fi through F4, an AND condition exists or not for the two signals in the user instruction as specified in [DATA-1] and [DATA-2] and, if there is no AND condition, the sequence returns to routine (3). Thus, unless the designated AND condition exists, the steps from routine (3) to routine (10) are repeated and the flag control signal reception routine is executed each time. Since, in the execution of a user instruction such that input statuses and chronological times are operational conditions, the flag control signal reception routine is sequentially executed even while the particular operational condition is valid, the principal controller A is capable of receiving the flag control signals issued by the other controller B even if such signals are issued at any arbitrary time. Now, the operations involved in the execution of the above-mentioned flag control instruction set in the program memory of the principal controller A will be described. At routine (2), the flag control instruction is read in, and at routine (9), the corresponding command code is decoded, whereupon the sequence proceeds to routine (11).

As shown in FIG. 2B, in the routine (11), it is inquired and judged whether the [DATA-2] in the flag control instruction specifies oneself (principal controller A) or the other controller B. Assuming that the principal controller A is not specified, the sequence advances to routine (12) and controls one of its own flags Fi through F4 which has been specified to a specified status. This is all for the flag control instruction and the sequence returns to routine (1). In this manner, the flag control instruction for the own machine A is processed within the central processing unit 2, without relation to the flag control circuit 7.

In the case of an instruction controlling any flag of the other machine B, the sequence proceeds from routine (11) to routine (13). At routine (13), the status of flag control circuit 7 is examined to see if the bus 1 is occupied by the own machine A. Since the bus 1 is not occupied in an initial condition, the sequence advances to routine (14), where an examination is made of an auxiliary flag f (which is so named in order to distinguish it from flags Fi through F4) which is set at routine (16) as will be described later. Since the auxiliary flag f has been set in the initial state, the sequence advances to routine (15). At routine (15), the operation for occupying the bus 1 with flag control circuit 7 is performed and the sequence then returns to routine (3).

Even if the operation for occupying the bus 1 is executed at routine (15), the own controller A cannot occupy the bus 1 so long as the bus 1 has been occupied by controller B. In this case, therefore, the sequence proceeds from (5) to (6) to (7) and, further, from routine (7) or (8) to routines (9)—(ll)-^(13)-^(14)-+{15). The rou

4,390,966

5 6

tine (15) is repeatedly executed. And if the other con- other controller has issued an answer signal ANS and troller B releases the bus 1 and the routine (15) is exe- the terminal 63 has been rendered "L." Conversely, in cuted in that state, the bus 1 is now occupied by the own order to send out an answer signal ANS from the decontroller A. picted controller to another controller, the output ports

Once the bus 1 is occupied by routine (15), the se- 5 l\ and h of the central processing unit 2 are rendered quence proceeds from (5)—►(<>)—►( 11 )-■»( 13), and from "H." Since the output Q of flip-flop FF is "H", the routine (13) to routine (16) this time. And at routine output of gate Gj, i.e. terminal 63, becomes "L." (16), the above-mentioned auxiliary flag f is set and the In sending out a flag control singal from the controlsequence advances to routine (17). ler shown in FIG. 3 to the other controller, the flip-flop

At routine (17), the other-controller number data, 10 FF is set in the first place and its output Q becomes "L"

flag number data and flag status data, i.e. flag control to open the output gate G& so that the other-controller

signal, are sent out to bus 1 through the flag control number data and particular flag number data are sent

circuit 7 and the sequence returns to routine (3). out from ports Co to C3 to terminals 64 through 67 via

The other controller B receives the above-mentioned gate G6 and the set/reset signal S/R outputted from

flag control signal from the controller A and, as de- 15 port 12 is sent out from output terminal 62 through gate

scribed above, sends out an answer signal to bus 1 on G2. Conversely, when a flag control signal is taken from

completion of signal reception control. This answer the other controller, gates G4 and G7 are opened by the

signal has its effect on the flag control circuit 7 of the "H" signal of port Ii, the machine number and flag

principal (own) controller A and, consequently, the number data are introduced into ports Co through C3,

occupation of bus 1 by controller A is released. How- 20 and the set/reset signal S/R is introduced into port D2.

ever, as long as there is no return of an answer signal, It will be apparent from the above detailed descrip

the routine 17 is executed repeatedly in the principal tion that the sequence control system according to this

controller 17, with the sending of a flag control signal invention comprises one or a plurality of flags which

being continued. can be freely controlled by predetermined user instruc

When an answer signal has come forth and the occu- 25 tions and utilized as operational conditions by predeterpation of bus 1 by the own controller A has been re- mined user instructions, flag control input and output leased, the sequence proceeds from routine (13) to rou- terminals interconnected via a bus in one controller or tine (14). Since, this time, the auxiliary flag f has been between a plurality of identically constructed controlset, the sequence further advances to routine (18) where lers, flag control signal sending means for sending out to the flag control circuit 7 is reinstated to its initial state. 30 said input-output terminals flag control signals for the The execution of the flag control instruction is thus other controller specified according to a predetermined completed and the sequence returns to routine (1). user instruction, and flag control signal receiving means

FIG. 3 shows a typical circuit of said flag control for examining sequentially the signals applied to said

circuit 7. In the figure, inverter Gi is an open-collector input-output terminal and, when a flag control signal

element, and through a predetermined signal line of bus 35 directed to the very own controller has been applied

1 which is connected to a terminal 61, the outputs of thereto, controlling said flag in accordance with the inverters Gi of own controller A and other controller B control signal. Therefore, as an independent single conare respectively wired OR connected. The same is true troller, the system is capable of setting and resetting of the output of NAND gate G2. flags as desired according to user instructions and utiliz

The above-mentioned operation for occupying the 40 ing the status of the flag freely as an operational condi

bus 1 with routine (15) is the control which, referring to tion according to the user instruction, thus allowing a

FIG. 3, output ports lo and li of central processing unit sequence program more complicated than those hi

2 is rendered "H." In this control, if the output side of thereto utilized to be employed.

inverter G] is "H," the control causes the flip-flop FF to Furthermore, when a plurality of controllers herein be set through gate G3 and its output Q is rendered "H," 45 described are used with said input-output terminals while the output of inverter Gi becomes "L." This connected via flag control bus, the flags of other concondition is the state where the bus 1 is occupied by troller B can be freely set and reset by the user instrucown controller A. As the flip-flop FF of any of the tions set in principal controller A and the status of the plurality of controllers connected to bus 1 is set in the flag can be utilized as an operational condition in accorabove manner and, hence, the bus 1 is occupied, the 50 dance with the user instruction set in the same controlterminal 6, is made "L" and as long as the terminal 61 is ler B. In this manner, interlocks and synchronizations "L," the other flip-flop FF cannot be set. Thus, the can be established between or among a plurality of terminal 61 is the input-output terminal for signal INH controllers so as to implement various complicated during use of the bus. Therefore, the judgement in rou- parallel operations.

tine (6) as to whether the other controller occupying 55 Now, a very simple example of application will be the bus 1 can be obtained by making the output port li explained below for reference. At the 20th step in con"H" to open the gate G4, taking the status of terminal troller A, a command to set the flag Fj of controller B 61 into the input port D] and assessing the logic. Simi- is set and at the 10th step in controller B, a command larly, the aforementioned judgement in routine (5) or (e.g. OR command) to advance the process by one step (13) as to whether the bus 1 is being occupied by own 60 on condition that the flag Fi is set. Now, if the controlcontroller can be achieved by taking the status of output ler B reaches said 10th step before the controller A Q of its own flip-flop FF into input port Do and analyz- advances to said 20th step, the controller B stands by at ing the logic. the 10th step and its operation proceeds only after the The transfer and reception of the above-mentioned controller A has reached said 20th step. By such a cornanswer signals ANS are performed through terminal 63. 65 bination of flag control functions, the desired compliThus, assuming that, in FIG. 3, the flip-flop FF of flag cated parallel operations are enabled. Moreover, the control circuit 7 has been set and the bus 1 occupied by implementation of such a complicated parallel operathe very controller, the flip-flop FF is reset when the tion need only the number of controllers which is com

8

mensurate with the scale of operation and the user need not purchase a large-scale equipment. Moreover, the system scale can be freely increased or decreased as a major advantage of this invention.

What is claimed is: 5 1. A sequence controller for carrying out process steps, which reads sequential user instructions which have been entered into a program memory by a user and then transmits a sequence of output statuses in response to statuses of inputs based on said user instructions, 10 comprising:

a central processing unit;

a program memory operatively connected to said central processing unit;

an input circuit operatively connected to said central IS processing unit for receiving status inputs;

an output circuit operatively connected to said central processing unit for transmitting status outputs;

one or more flags controlled by predetermined user instructions, said flags being operatively connected 20 to said central processor and utilized to show operational conditions;

a flag control input-output terminal connectable to a similar flag control input-output terminal of an

25

other similar sequence controller through a common bus;

flag control sending means operably connecting said central processing unit to said input-out terminal for sending out to said input-output terminal a flag control signal directed to another controller according to a predetermined user instructions; and

flag control signal receiving means, operably connecting said central processing unit to said inputoutput terminal for sequentially examining signals applied to said input-output terminal, and, when a flag control signal directed to the particular controller itself is applied, controlling a flag of that particular controller in accordance with said control signal.

2. The sequence controller of claim 1, wherein each of said flags comprises a one-bit memory location.

3. The sequence controller of claim 1, wherein said controller further includes a flag output circuit means operatively connected to said one or more flags for providing switched outputs corresponding to the statuses of said one or more flags.

30

35

40

45

50

55

60

65

« 上一頁繼續 »