PROGRAMMABLE CONTROLLER

Abstract: A programmable controller indicates an abnormal por­ tion on the basis of the result of comparison made between an input signal (A) and an output signal (B) in relation to an output memory (8) of the programmable controller and an output signal (C) of an output circuit (9).

Description: The present invention relates to a programmable controller for detecting a abnormality of an output signal. A conventional programmable controller performs sequence control such that a sequence program is stored in a memory therein and a relay or the like of an external device is operated in accordance with the sequence program. When a load resistance of the external device is small, an element such as a transistor of an output circuit of a programmable controller may be damaged. When sequence control is continued even though the element of the output circuit is damaged, normal sequence control cannot be performed. A conventional programmable controller does not have a means for checking such a failure. It is an object of the present invention to provide a programmable controller to eliminate the conventional drawback described above, by detecting an abnormal state of an output signal therefrom and determining an abnormal part in a circuit. Previous disclosures have been made regarding monitoring programmable controllers for possible faults (US-A-4415884 and US-A-3829842), but neither of these discloses a simple logic association for testing simultaneously an output memory and an output circuit. According to the present invention there is provided a programmable controller having an output memory for storing a signal from a central processing unit and an output circuit for transmitting an output signal from said output memory to an external circuit, wherein a feedback circuit is provided for feeding back an output signal from said output circuit for monitoring purposes, characterised in that, in use, the input and output signals with respect to said output memory and the output signal from said output circuit are compared with each other, an abnormality of said output circuit is signalled on a display device when the output signal from said output circuit does not coincide with the input signal to said output memory and the input signal to said output memory coincides with the output signal therefrom, and an abnormality of said output memory is signalled on said display device when the output signal from said output circuit does not coincide with the input signal to said output memory and the input signal to said output memory does not coincide with the output signal therefrom. With the arrangement described above, since the input and output signals with respect to the output memory and the output signal from the output circuit are compared to detect coincidences and an abnormal part in the circuit is displayed on the display device upon detection of a noncoincidence, the abnormality and failure of the output circuit and the output memory which tend to be influenced by an external circuit connected thereto are immediately found, thereby preventing erroneous operation of the programmable controller. Brief Description of Drawings Fig. 1 is a block diagram of an embodiment according to the present invention; Fig. 2 is a circuit diagram of a feedback circuit of the embodiment; and Fig. 3 is a flow chart for explaining the operation of the embodiment. The present invention will be described with reference to the accompanying drawings. Fig. 1 is a block diagram of a programmable controller according to an embodiment of the present invention. Reference numeral 1 denotes a computing unit (to be referred to as a CPU hereinafter) having an arithmetic and logic function for determining a state of an output signal upon reception of an input signal and a display instruction function for causing a CRT 3 to display data in accordance with a program stored in a ROM 5 for sequence control to be described later. Reference numeral 2 denotes an input circuit for receiving signals from an external limit switch, a proximity switch and switches on an operation panel. Reference numeral 3 denotes a display device for displaying a state of the programmable controller and states of the input and output signals. Reference numeral 4 denotes a key input device for designating a display mode for the CPU 1 and an operation mode of the programmable controller. Reference numeral 5 denotes a ROM for storing a sequence program for determining the operation of a machine as an object of interest. Reference numeral 6 denotes a ROM for receiving the sequence program from the ROM 5 and causing the CPU 1 to perform arithmetic operations. The ROM 6 also stores a program for reading a keyboard input and causing the display device 3 to display data. Reference numeral 7 denotes a RAM for temporarily storing data during arithmetic operations; 8, an output memory for generating an arithmetic result of the CPU 1 to an external device; and 9, an output circuit for generating a signal representing a state of the output memory 8. The main feature of the present invention lies in the arrangement wherein output signals from the output memory 8 and the output circuit 9 are fed back to the CPU 1. An arrangement of the feedback circuit is shown in Fig. 2. Referring to Fig. 2, reference symbol M denotes a memory element in the output memory 8; b1 and b2, buffers, respectively; T, a transistor; D1, a diode; and R1 and R2, resistors, respectively. The buffers b1 and b2, the transistor T, the diode D1, the resistors R1 and R2 are provided for each memory element M in the output memory 8 to constitute the output circuit 9. Unlike in the conventional output circuit, the diode D1, the resistors R1 and R2 and the buffer b2 are added in the feedback circuit of this embodiment. The CPU receives a feedback signal C of the output signal from the feedback circuit. Reference numeral 10 denotes an external circuit in an external device. Reference symbol E, a power supply unit; RL, a relay; and D2, a diode. An output signal (i.e., an input signal A to the output memory) from the CPU 1 is stored in one memory element M in the output memory 8. An output signal B read from the memory element M in the output memory 8 is supplied to the output circuit 9 and is fed back to the CPU 1. The output signal B from the output memory 8 is supplied to the buffer b1 in the output circuit 9 to control on/off operation of the transistor T. An output signal C from the output circuit 9 is supplied to the external circuit 10 to energize the relay RL or the like. The output signal C is also fed back to the CPU 1 through the feedback circuit consisting of the diode D1, the resistors R1 and R2 and the buffer b2. Abnormal state detection processing of the present invention will be described with reference to an operation flow of Fig. 3. When the input signal A is supplied from the CPU 1 to the output memory 8, a comparing means in the CPU 1 compares all bits of the input signal A to the output memory 8 and those of the output signal C fed back from the output circuit 9 (step S1). When the comparing means detects a coincidence between all the bits of the input signal A and the output signal C, the CPU detects that normal operation is performed, so that the flow advances to a normal processing (i.e., step S5). However, if NO in step S1, the comparing means compares all bits of the input signal A to the output memory 8 with those of the output signal B from the output memory 8 (step S2). If YES in step S2, the CPU 1 determines that the output memory 8 is normally operated and that the output circuit 9 is abnormal, thereby causing the display device 3 to display an abnormality of the output circuit 9 (step S4). However, when the comparing means detects that all the bits of the input signal A to the output memory 8 do not coincide with those of the output signal B from the output memory 8, the CPU 1 determines that the output memory 8 is abnormal, thereby causing the display device 3 to display an abnormality of the output memory (step S3).

Claims: A programmable controller having an output memory (8) for storing a signal (A) from a central processing unit (1) and an output circuit (9) for transmitting an output signal (B) from said output memory (8) to an external circuit (10), wherein a feedback circuit (D1,R1,R2,b2) is provided for feeding back an output signal from said output circuit (9) for monitoring purposes, characterised in that, in use, the input and output signals (A,B) with respect to said output memory (8) and the output signal (C) from said output circuit (9) are compared with each other, an abnormality of said output circuit (9) is signalled on a display device (3) when the output signal (C) from said output circuit (9) does not coincide with the input signal (A) to said output memory (8) and the input signal (A) to said output memory (8) coincides with the output signal (B) therefrom, and an abnormality of said output memory (8) is signalled on said display device (3) when the output signal (C) from said output circuit (9) does not coincide with the input signal (A) to said output memory (8) and the input signal (A) to said output memory (8) does not coincide with the output signal (B) therefrom. A programmable controller according to claim 1, wherein said output circuit (9) comprises a first buffer (b1) connected to said output memory (8) for receiving the output signal (B) therefrom, a transistor (T) connected to said first buffer (b1), and said feedback circuit comprises a diode (D1) connected to the transistor (T) and a second buffer (b2) connected between the diode (D1) and the central processing unit (1).

Inventors: HATTORI, KIYOSHI, USUDA, EIJI
Applicants: FANUC LTD.
Application year: 1984
Main classification: G05B23
IPC codes: G05B19, G05B23, G06F11