KR20000009541A - Serial communication device and method thereof - Google Patents

Serial communication device and method thereof Download PDF

Info

Publication number
KR20000009541A
KR20000009541A KR1019980030037A KR19980030037A KR20000009541A KR 20000009541 A KR20000009541 A KR 20000009541A KR 1019980030037 A KR1019980030037 A KR 1019980030037A KR 19980030037 A KR19980030037 A KR 19980030037A KR 20000009541 A KR20000009541 A KR 20000009541A
Authority
KR
South Korea
Prior art keywords
node
communication
nodes
master
port
Prior art date
Application number
KR1019980030037A
Other languages
Korean (ko)
Inventor
화인종
Original Assignee
이종수
엘지산전 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 이종수, 엘지산전 주식회사 filed Critical 이종수
Priority to KR1019980030037A priority Critical patent/KR20000009541A/en
Publication of KR20000009541A publication Critical patent/KR20000009541A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/403Bus networks with centralised control, e.g. polling

Abstract

PURPOSE: A serial communication device performs a communication between a master and a node by using one communication channel in 1:1 communication system. CONSTITUTION: In a serial communication device, one master(1) performs a polling of 1:N with many nodes(2,3,4), and performs a serial communication. One communication line(5) connects the master(1) to the nodes(2,3,4). CPU is connected to a communication element through address buffer, data buffer and a control bus. A control bus is connected to a receiving port. A transmission terminal of the communication element is connected to a transmission port. A receiving terminal is connected to a receiving port. An output terminal of the receiving port is connected to an output terminal of the transmission port, thereby reducing a cost, and facilitating a wiring of a communication line.

Description

직렬통신장치 및 방법Serial communication device and method

본 발명은 직렬통신장치 및 방법에 관한 것으로, 특히 하나의 마스터가 다수의 노드를 폴링하는 1대 N통신 시스템에서 마스터와 노드를 하나의 통신채널만으로 통신이 가능하도록 한 직렬통신장치 및 방법에 관한 것이다.The present invention relates to a serial communication apparatus and method, and more particularly, to a serial communication apparatus and method for enabling communication between a master and a node using only one communication channel in a single N communication system in which one master polls multiple nodes. will be.

일반적으로, 하나의 마스터가 다수의 노드를 폴링하는 1대N통신시스템에서 마스터와 각 노드 상이에 두 개의 통신채널을 두어 마스터가 노드로 데이터를 전송할 때는 채널1을 이용하고, 노드가 마스터로 데이터를 전송할 때는 채널2를 이용하여, 마스터는 순차적으로 노드를 하나씩 호출하면서 데이터를 전송하고 호출된 노드는 마스터로 데이터를 전송한다.In general, in a 1N communication system in which one master polls multiple nodes, there are two communication channels between the master and each node so that the master uses channel 1 to transmit data to the node, and the node sends data to the master. When transmitting, using channel 2, the master transmits data while sequentially calling nodes one by one, and the called node transmits data to the master.

상기와 같은 경우 마스터가 노드로 데이터를 전송하는 순간에 노드에서 마스터로 데이터를 전송하는 일이 없기 때문에 두 개의 통신채널을 구비할 필요가 없다.In this case, since the master does not transmit data from the node to the master at the moment of transmitting data to the node, it is not necessary to have two communication channels.

여기서, 하나의 채널을 이용할 경우 송신포트 및 수신포트가 하나의 채널을 공유하므로 송신할 때는 수신의 기능을 디스에이블시킴으로써 자신이 송신한 데이터가 자신에게 되돌아오는 것을 방지할 수 있고, 송신이 완료되면 다시 수신기능을 인에이블시켜서 수신할 수 있도록 함으로써 하나의 채널을 이용하여 마스터와 노드사이의통신이 가능하게 된다.In this case, when one channel is used, the transmission port and the reception port share one channel, so when transmitting, it is possible to prevent the data transmitted by the user from returning to the user by disabling the reception function. By enabling the reception function again to receive, communication between the master and the node is possible using one channel.

도1은 종래 직렬통신장치의 구성을 보인 블록도로서, 이에 도시된 바와같이 하나의 마스터(1)와 다수의 노드(2,3,4)가 각기 두 개의 통신채널(5,6)을 통하여 1:N 으로 접속되도록 구성된다.1 is a block diagram showing a conventional serial communication apparatus, in which one master 1 and a plurality of nodes 2, 3, and 4 are connected via two communication channels 5 and 6, respectively. Configured to be connected at 1: N.

도2는 상기 마스터(1)와 다수의 노드(2,3,4)들이 각각 구비하고 있는 통신장치의 구성을 보인 블록도로서, 이에 도시된 바와같이 씨피유(21)는 어드레스버스(22)와 데이터버스(23) 및 컨트롤버스(24)를 통하여 통신소자(25)와 연결되고, 상기 통신소자(25)의 송신단자(TX)는 송신포트(26)에 연결되며, 상기 통신소자(25)의 수신단자(RX)는 수신포트(27)에 연결되도록 구성된다.FIG. 2 is a block diagram showing the configuration of a communication device provided by the master 1 and the plurality of nodes 2, 3, and 4, respectively. As shown in FIG. It is connected to the communication element 25 through the data bus 23 and the control bus 24, the transmission terminal TX of the communication element 25 is connected to the transmission port 26, the communication element 25 The receiving terminal (RX) of is configured to be connected to the receiving port (27).

도3은 상기 송신포트(26)의 구성을 보인 회로도로서, 이에 도시된 바와같이 통신소자(25)의 송신단자(TX)는 신호드라이브소자(31)의 입력단자(32)와 연결되고 그 신호드라이브소자(31)는 두 개의 출력단자(33,34)로 이루어지며, 도4와 같이 수신포트(27)의 구성을 보인 회로도로서, 이에 도시된 바와같이 신호수신소자(41)의 입력단자(42,43)는 상기 송신포트(26)의 신호드라이브소자(31)의 출력단자(33,34)와 연결되고 그 신호수신소자(41)의 출력단자(44)는 통신소자(25)의 수신단자(RX)와 연결되도록 구성되며, 이와 같이 구성된 종래장치의 동작을 설명한다.3 is a circuit diagram showing the configuration of the transmission port 26. As shown therein, the transmission terminal TX of the communication element 25 is connected to the input terminal 32 of the signal drive element 31 and the signal thereof. Drive element 31 is composed of two output terminals (33, 34), a circuit diagram showing the configuration of the receiving port 27 as shown in Figure 4, as shown in the input terminal of the signal receiving element 41 ( 42 and 43 are connected to the output terminals 33 and 34 of the signal drive element 31 of the transmission port 26, and the output terminal 44 of the signal receiving element 41 is received by the communication element 25. The operation of the conventional apparatus configured to be connected to the terminal RX and configured as described above will be described.

먼저, 마스터(1)는 각 노드(2,3,4)를 폴링하면서 통신을 하는데, 이때 마스터(1)가 송신하는 신호는 통신장치의 통신소자(25)의 송신단자(TX)에서 송신포트(26)로 입력되고, 이에 의해 상기 송신포트(26)에 입력된 신호는 신호드라이브소자(31)를 거쳐 통신선(5,6)에 실리게 된다.First, the master 1 communicates while polling each node 2, 3, and 4, wherein the signal transmitted by the master 1 is transmitted from the transmission terminal TX of the communication element 25 of the communication apparatus. (26), the signal input to the transmission port 26 is loaded on the communication lines (5, 6) via the signal drive element (31).

만약, 마스터(1)의 제1 채널(5)을 통해 노드(2,3,4)로 전송되면 그 신호는 각 노드(2,3,4)의 수신포트(27)의 신호수신소자(41)로 입력되고, 이에 의해 상기 수신포트(27)의 신호수신소자(41)는 입력된 신호의 레벨을 비교하여 그 신호레벨의 차이가 양이면 고전위를 출력하고,반면에 신호레벨의 차이가 음이면 저전위를 출력한다.If the signal is transmitted to the nodes 2, 3, and 4 through the first channel 5 of the master 1, the signal is received by the signal receiving element 41 of the receiving port 27 of each node 2, 3, and 4. By this, the signal receiving element 41 of the receiving port 27 compares the level of the input signal and outputs a high potential if the difference in the signal level is positive, whereas the difference in the signal level Negative outputs low potential.

상기 신호수신소자(41)로부터 출력된 신호는 통신소자(25)의 수신단자(RX)를 통해 각 노드(2,3,4)의 씨피유(21)로 입력되어 처리된다.The signal output from the signal receiving element 41 is input to and processed by the CPI 21 of each node 2, 3, 4 through the receiving terminal RX of the communication element 25.

이때, 상기 각 노드(2,3,4)의 씨피유(21)는 수신된 신호를 분석하여 자신이 응답할 신호인지를 판단하고, 만일 자신이 응답할 신호이면 마스터(1)로 그에따른 신호를 상기의 같이 동작하여 전송한다.At this time, the CPI 21 of each of the nodes 2, 3, and 4 analyzes the received signal to determine whether it is a signal to respond to, and if it is a signal to respond, sends a corresponding signal to the master 1. Operate as above and transmit.

도9는 마스터(1)가 각 노드(2,3,4)로 전송하는 통신프레임으로서, 이에 도시된 바와같이 이신호를 수신할 노드(2,3,4)의 정보 및 노드(2,3,4)가 처리할 내용이 포함되어 있어 해당노드(2,3,4)만 마스터(1)로 응답하게 되고, 도10은 노드(2,3,4)가 마스터(1)로 데이터를 전송할 경우의 통신프레임의 구조이다.9 is a communication frame transmitted by the master 1 to each of the nodes 2, 3, and 4, and as shown therein, information of the nodes 2, 3, 4 and nodes 2, 3, 4) contains the contents to be processed so that only the corresponding nodes (2, 3, 4) will respond to the master (1), and FIG. 10 shows that the nodes (2, 3, 4) transmit data to the master (1). Is the structure of the communication frame.

그러나, 상기와 같이 하나의 마스터가 다수의 노드를 폴링하면서 통신하는 통신시스템에서 마스터와 각 노드 사이에 두 개의 채널이 존재하지만 두 개의 채널에 동시에 데이터가 실리는 일이 발생하지 않는다면 두 개의 채널을 따로 구비할 필요가 없고, 또한 두 개의 채널이 따로 구비되어 있을 경우 통신선 결선시에 송수신채널을 구분하여 결선해야 하므로 결선의 오류가 발생할 수 있는 문제점이 있었다.However, in the communication system in which one master polls a plurality of nodes as described above, two channels exist between the master and each node, but two channels cannot be loaded at the same time. There is no need to provide a separate, and if two channels are provided separately, it is necessary to separate the transmission and reception channels when connecting the communication line, so there is a problem that a connection error may occur.

따라서, 상기와 같은 문제점을 감안하여 창안한 본 발명은 마스터와 각 노드 사이에 하나의 통신채널을 이용하여 통신할 수 있도록 한 직렬통신장치 및 방법을 제공함에 그 목적이 있다.Accordingly, an object of the present invention is to provide a serial communication apparatus and method for communicating using a single communication channel between a master and each node.

도1은 종래 직렬통신장치에 대한 구성을 보인 블록도.1 is a block diagram showing a configuration of a conventional serial communication device.

도2는 도1에 있어서, 통신장치의 구성을 보인 블록도.Fig. 2 is a block diagram showing the construction of a communication device in Fig. 1;

도3은 도1에 있어서, 송신포트의 구성을 보인 회로도.3 is a circuit diagram showing the configuration of a transmission port in FIG.

도4는 도1에 있어서, 수신포트의 구성을 보인 회로도.4 is a circuit diagram showing the configuration of a receiving port in FIG.

도5는 본 발명 직렬통신장치에 대한 구성을 보인 블록도.Figure 5 is a block diagram showing the configuration of the serial communication device of the present invention.

도6은 도5에 있어서, 마스터의 통신장치에 대한 구성을 보인 블록도.Fig. 6 is a block diagram showing the construction of the communication device of the master in Fig. 5;

도7은 도5에 있어서, 노드의 통신장치에 대한 구성을 보인 블록도.Fig. 7 is a block diagram showing the construction of the communication device of the node in Fig. 5;

도8은 도6 또는 도7에 있어서, 수신포트의 구성을 보인 회로도.8 is a circuit diagram showing the configuration of a receiving port in FIG.

도9는 마스터에서 노드로 송신하는 프레임의 모습을 보인도.9 shows a state of a frame transmitted from a master to a node.

도10은 노드에서 마스터로 송신하는 프레임의 모습을 보인도.10 is a view showing a frame transmitted from a node to a master.

도11은 도5에 있어서, 마스터의 초기화동작에 대한 흐름도.FIG. 11 is a flowchart of an initialization operation of a master in FIG. 5; FIG.

도12는 도5에 있어서, 마스터의 동작흐름도.Fig. 12 is a flowchart of operation of the master in Fig. 5;

도13은 도5에 있어서, 노드의 동작흐름도.Fig. 13 is a flowchart of operation of the node in Fig. 5;

*****도면의 주요부분에 대한 부호의 설명********** Description of the symbols for the main parts of the drawings *****

1:마스터 2,3,4:노드1: master 2, 3, 4: node

5,6:통신채널 21,61,71:씨피유5,6: Communication channel 21,61,71: CPI

22,62,72:어드레스버스 23,63,73:데이터버스22,62,72: Address bus 23,63,73: Data bus

24,64,74:컨트롤버스 25,66,76:통신소자24, 64, 74: Control bus 25, 66, 76: Communication element

26,67,77:송신포트 27,68,78:수신포트26,67,77: sending port 27,68,78: receiving port

31,81:신호드라이브소자 41,91:신호수신소자31, 81: signal drive element 41, 91: signal receiving element

79:입력포트 80:출력포트79: input port 80: output port

상기와 같은 목적을 달성하기 위한 본 발명은 통신장치를 구비한 하나의 마스터가 통신장치를 구비한 다수의 노드와 1:N 으로 폴링하면서 직렬 통신하는 직렬통신장치에 있어서, 상기 마스터와 각 노드를 하나의 통신선으로 접속하여 구성한 것을 특징으로 한다.In order to achieve the above object, the present invention provides a serial communication device in which one master having a communication device is in serial communication while polling at 1: N with a plurality of nodes having a communication device. It is characterized by being connected by one communication line.

상기와 같은 목적을 달성하기 위한 본 발명은 마스터를 초기화하는 제1 과정과; 마스터가 노드로부터 수신되는 데이터를 인터럽트로 처리하여 하나의 통신채널을 통해 데이터를 송수신하는 제2 과정과; 노드가 상기 마스터로부터 데이터가 수신되면 인터럽트가 발생되어 하나의 통신채널을 통해 상기 마스터와 데이터를 송수신하는 제3 과정으로 수행함올 특징으로 한다.The present invention for achieving the above object comprises a first step of initializing the master; A second process of the master processing the data received from the node as an interrupt and transmitting and receiving data through one communication channel; When a node receives data from the master, an interrupt is generated to perform a third process of transmitting and receiving data with the master through one communication channel.

이하, 본 발명에 의한 직렬통신장치 및 방법에 대한 작용 및 효과를 첨부한 도면을 참조하여 상세히 설명한다.Hereinafter, operations and effects of the serial communication apparatus and method according to the present invention will be described in detail with reference to the accompanying drawings.

도5는 본 발명 직렬통신장치의 구성을 보인 블록도로서, 이에 도시한 바와같이 일반적인 구성은 종래와 동일하며, 다만 마스터(1)와 다수의 노드(2,3,4)를 하나의 통신선(5)으로 접속하여 구성한다.5 is a block diagram showing the configuration of the serial communication apparatus of the present invention. As shown in the drawing, the general configuration is the same as in the related art, except that the master 1 and the plurality of nodes 2, 3, and 4 are connected to one communication line ( 5) to connect.

도6은 본 발명 마스터(1)의 통신장치에 대한 구성을 보인 블록도로서, 이에 도시한 바와같이 씨피유(61)가 어드레스버퍼(62)와 데이터버스(63) 및 컨트롤버스(64)를 통하여 통신소자(66)에 연결되고, 상기 씨피유(61)의 컨트롤버스(64)는 수신포트(68)로 연결되며, 통신소자(66)의 송신단자(TX)는 송신포트(67)에 연결되고, 통신소자(66)의 수신단자(RX)는 수신포트(68)에 연결되며, 상기 수신포트(68)의 출력단자와 상기 송신포트(67)의 출력단자를 연결하여 구성한다.Fig. 6 is a block diagram showing the configuration of the communication device of the master 1 of the present invention. As shown in this figure, the CPI 61 passes through the address buffer 62, the data bus 63, and the control bus 64. It is connected to the communication element 66, the control bus 64 of the CPI 61 is connected to the receiving port 68, the transmission terminal TX of the communication element 66 is connected to the transmission port 67 The receiving terminal RX of the communication device 66 is connected to the receiving port 68 and is configured by connecting the output terminal of the receiving port 68 and the output terminal of the transmitting port 67.

도7는 본 발명 노드(2,3,4)의 통신장치에 대한 구성을 보인 블록도로서, 이에 도시한 바와같이 상기 마스터(1)의 통신장치와 구성은 동일한데, 다만 씨피유(71)에 입력포트(79)와 출력포트(80)를 접속하여 구성한 것이 다르다.FIG. 7 is a block diagram showing the communication device of the nodes 2, 3, and 4 of the present invention. As shown in FIG. 7, the communication device of the master 1 is the same, except that The configuration differs by connecting the input port 79 and the output port 80.

도8은 본 발명 수신포트(68)의 구성을 보인 회로도로서, 이에 도시한 바와같이 송신포트(67)의 출력단과 제1 신호수신소자(41)의 입력단(92),(93)을 접속하고, 씨피유(61)의 어드레스버스(64)와 입력단이 접속된 제2 신호수신소자(94)의 출력단을 상기 제1 신호수신소자(91)의 제어단에 접속하여 구성한다.8 is a circuit diagram showing the configuration of the reception port 68 of the present invention. As shown in FIG. 8, the output terminal of the transmission port 67 and the input terminals 92 and 93 of the first signal receiving element 41 are connected to each other. And the output terminal of the second signal receiving element 94 connected to the input bus 64 of the CPI 61 and the input terminal is connected to the control terminal of the first signal receiving element 91.

도11는 마스터(1)의 초기화에 대한 동작흐름도로서, 이에 도시한 바와 같이 전체노드(2,3,4)의 갯수를 지정하는 제1 단계(S1)와; 각 노드(2,3,4)의 통신상태에 대한 플래그를 '0'으로 초기화하는 제2 단계(S2)와; 현재 호출할 노드(2,3,4)의 주소를 첫 번째 노드(2,3,4)로 설정하는 제3 단계(S3)와; 통신에러 노드(2,3,4)의 번호를 첫 번째 노드(2,3,4)로 설정하는 제4 단계(S4)와; 현재 폴링의 모드가 통신정상인 노드(2,3,4)를 호출하는 모드로 설정하는 제5 단계(S5)와; 첫 번째 노드(2,3,4)를 호출하는 제6 단계(S6)와; 노드(2,3,4)에서 응답을 기다리는 시간을 설정하는 제7 단계(S7)와; 전 노드(2,3,4)를 호출하는 데 걸리는 시간을 설정하는 제8 단계(S8)로 수행한다.Fig. 11 is an operation flowchart of the initialization of the master 1, and the first step S1 of designating the number of all nodes 2, 3, and 4 as shown therein; A second step S2 of initializing a flag for the communication state of each node 2, 3, 4 to '0'; A third step S3 of setting the addresses of the nodes 2, 3 and 4 to be called as the first node 2, 3 and 4; A fourth step S4 of setting the number of the communication error nodes 2, 3, 4 to the first node 2, 3, 4; A fifth step S5 of setting nodes 2, 3, and 4 in which the current polling mode is the communication normal; A sixth step S6 of calling the first node 2, 3, 4; A seventh step S7 of setting a time for waiting for a response from the nodes 2, 3, and 4; The eighth step S8 of setting the time taken to call all the nodes 2, 3, and 4 is performed.

도12는 마스터(1)에 대한 동작흐름도로서, 이에 도시한 바와같이 통신에러 인터럽트가 발생하였는 지를 판단하는 단계(S21)와; 상기 단계(S21)에서 통신에러 인터럽트가 발생하지 않았으면 해당노드(2,3,4)의 통신상태 플래그를 셋시키는 단계(S22)와; 노드(2,3,4)에서 수신한 입력포트(79) 데이터를 저장하는 단계(S23)와; 상기 단계(S21)에서 통신에러 인터럽트가 발생하였으면 현재 모드가 폴링모드인지를 판단하는 단계(S24)와; 상기 단계(S24)에서 현재 폴링모드가 아니면 해당호기의 통신플래그를 클리어하는 단계(S25)와; 통신이 정상인 노드(2,3,4)중에서 다음 호출할 노드(2,3,4)의 주소를 설정하는 단계(S26)와; 통신이 정상인 노드(2,3,4)의 호출이 완료되었는지를 판단하는 단계(S27)와; 상기 단계에서 통신이 정상인 노드(2,3,4)의 호출이 완료되지 않았으면 상기 단계(S26)에서 선택된 노드(2,3,4)를 호출하는 단계(S28)와; 통신이 정상인 노드(2,3,4)를 호출하는 모드로 설정하는 단계(S29)와; 노드(2,3,4)에서 응답을 기다리는 시간을 설정한 후 종료하는 단계(S30)와; 상기 단계(S27)에서 통신이 정상인 노드(2,3,4)의 호출을 완료하였으면 통신에러모드를 호출하는 모드로 설정하는 단계(S31)와; 상기 단계(S24)에서 현재 폴링모드이면 통신에러 노드(2,3,4)중에서 호출할 노드(2,3,4)를 설정하는 단계(S32)와; 통신에러 노드(2,3,4)의 호출을 완료하였는지를 판단하는 단계(S33)와; 상기 단계(S33)에서 통신에러 노드(2,3,4)의 호출을 완료하지 않았으면 상기 단계(S33)에서 선택된 통신에러 노드(2,3,4)를 호출하는 단계(S34)와; 상기 단계(S33)에서 통신에러 노드(2,3,4)의 호출이 완료되었으면 제일 마지막노드(2,3,4)의 주소보다 큰값으로하여 노드(2,3,4)를 호출하는 단계(S35)와; 통신에러노드(2,3,4)중 호출할 주소를 '0'으로 초기화하는 단계(S36)와; 전 노드(2,3,4)를 호출하는데 걸리는 기간이 경과하였는지를 판단하는 단계(S37)와; 상기 단계(S37)에서 전노드(2,3,4)를 호출하는데 걸리는 시간이 경과하지 않았으면 상기 단계(S30)로 궤환하고 전노드(2,3,4)를 호출하는데 걸리는 시간이 경과하였으면 현재 호출할 노드(2,3,4)의 번호를 첫 번째 노드(2,3,4)로 설정하는 단계(S38)와; 전체노드(2,3,4)를 호출하는 데 걸리는 시간을 설정한 후 상기 단계로 궤환하는 단계(S39)로 이루어진다.Fig. 12 is an operation flowchart for the master 1, which determines whether a communication error interrupt has occurred (S21) as shown therein; Setting a communication state flag of a corresponding node (2, 3, 4) if a communication error interrupt has not occurred in step (S21); Storing the input port 79 data received at the nodes 2, 3, and 4 (S23); Determining whether a current mode is a polling mode (S24) when a communication error interrupt occurs in the step (S21); Clearing the communication flag of the corresponding device (S25) if the current polling mode is not present in the step (S24); Setting addresses (S26) of nodes (2, 3, 4) to be called next among nodes (2, 3, 4) in which communication is normal; Determining whether the call of the nodes (2, 3, 4) in which communication is normal is completed (S27); Calling (2,3,4) the node (2,3,4) selected in step (S26) if the call of the node (2,3,4) in which communication is normal is not completed; Setting the nodes 2, 3, and 4 in which communication is normal to a mode of calling (S29); Setting a waiting time for a response from the nodes 2, 3, and 4 and ending (S30); Setting the communication error mode to a mode in which the call of the nodes (2, 3, 4) in which communication is normal is completed (S31); Setting nodes (2, 3, 4) to be called among communication error nodes (2, 3, 4) in the current polling mode in step (S24); Determining whether or not the call of the communication error node (2, 3, 4) is completed (S33); Calling (S34) the communication error node (2,3,4) selected in step (S33) if the call of the communication error node (2,3,4) is not completed in step (S33); If the call of the communication error node (2, 3, 4) is completed in step S33, calling the node (2, 3, 4) with a value greater than the address of the last node (2, 3, 4) ( S35); Initializing an address to be called among the communication error nodes 2, 3, and 4 to '0' (S36); Determining whether the time period for calling all the nodes (2, 3, 4) has elapsed (S37); If the time taken to call all nodes 2, 3 and 4 has not elapsed in step S37, the time taken to return to step S30 and calls all nodes 2, 3 and 4 has elapsed. Setting the number of nodes (2, 3, 4) to be called currently as the first node (2, 3, 4) (S38); After setting the time taken to call all nodes 2, 3, and 4, the process returns to the above step (S39).

도13은 노드(2,3,4)에 대한 동작흐름도로서, 이에 도시한 바와같이 마스터(1)에서 송신한 데이터를 읽는 단계(S51)와; 수신국주소와 자신의 주소가 일치하는 지를 판단하는 단계(S52)와; 상기 단계(S52)에서 수신국주소와 자신의 주소가 일치하지 않으면 종료하고 수신국주소와 자신의 주소가 일치하면 마스터(1)에서 전송된 데이터를 노드(2,3,4)가 관리하는 출력포트(80)로 출력하는 단계(S53)와; 노드(2,3,4)에서 관리하는 입력포트(79)의 상태를 마스터(1)로 전송한후 종료하는 단계(S54)로 이루어진다.Fig. 13 is a flowchart of operations for nodes 2, 3, and 4, as shown therein, in which step S51 of reading data transmitted from the master 1; Determining whether the address of the receiving station and its address match (S52); In step S52, if the receiving station address and its address do not match, the process is terminated. If the receiving station address and its address match, outputs managed by the nodes 2, 3, and 4 are transmitted from the master 1; Outputting to the port 80 (S53); In step S54, the state of the input port 79 managed by the nodes 2, 3, and 4 is transmitted to the master 1 and then terminated.

이와같은 본 발명의 동작을 상세히 설명한다.Such operation of the present invention will be described in detail.

먼저, 마스터(1)가 각 노드(2,3,4)로 데이터를 전송할 경우에 씨피유(61)의 컨트롤신호를 저전위로 출력하여 통신장치의 수신포트(68)의 기능을 디스에이블시킨후, 송신할 데이터를 통신소자(66)의 송신단자(TX)를 통해 송신포트(67)로 전송하고, 이에 의해 상기 송신포트(67)의 신호드라이브소자(81)는 입력된 신호와 동일한 신호 및 반전된 신호를 출력하는데, 이 신호는 단일 통신선(5)을 통해 각 노드(2,3,4)로 전송된다.First, when the master 1 transmits data to the nodes 2, 3, and 4, the control signal of the CPI 61 is output at low potential to disable the function of the reception port 68 of the communication device. The data to be transmitted is transmitted to the transmission port 67 through the transmission terminal TX of the communication element 66, whereby the signal drive element 81 of the transmission port 67 has the same signal and inversion as the input signal. Outputs a signal, which is transmitted to each node (2, 3, 4) via a single communication line (5).

이후, 마스터(1)는 노드(2,3,4)로 데이터의 전송이 완료되면 그 노드(2,3,4)로부터 데이터를 수신하기 위해 콘트롤신호를 고전위로하여 수신포트(68)의 기능을 인에이블시킨다.After that, when the transfer of the data to the nodes 2, 3, and 4 is completed, the master 1 functions to receive the signal from the nodes 2, 3, and 4 with the high potential of the control signal. Enable

상기 마스터(1)에서 전송된 신호는 각 노드(2,3,4)의 수신포트(78)의 신호수신소자(91)로 입력되고, 이에따라 상기 수신포트(78)의 신호수신소자(91)는 입력된 신호의 레벨을 비교하여 신호레벨의 차이가 양이면 고전위,신호레벨의 차이가 음이면 저전위를 출력하는데, 이 출력신호는 통신소자(76)의 수신단자(RX)를 통해 씨피유(71)에 전송되어 신호 처리된다.The signal transmitted from the master 1 is input to the signal receiving element 91 of the receiving port 78 of each node 2, 3, 4, and accordingly the signal receiving element 91 of the receiving port 78 Compares the level of the input signal and outputs a high potential if the difference in the signal level is positive, and a low potential if the difference in the signal level is negative, the output signal through the receiving terminal (RX) of the communication device 76 71 is transmitted and signal processed.

즉, 마스터(1)에서 송신한 데이터는 단일 통신채널(5)을 통하여 각 노드(2,3,4)의 수신포트(78)로 전송되는데, 각 노드(2,3,4)에서는 수신된 신호를 분석하여 자신이 응답한 신호인지를 판단하고, 만일 자신이 응답할 신호이면 마스터(1)로 응답한다.That is, the data transmitted from the master 1 is transmitted to the receiving port 78 of each node 2, 3, 4 through a single communication channel 5, which is received at each node 2, 3, 4 The signal is analyzed to determine whether it is a signal to which it has responded.

여기서, 상기 마스터(1)가 각 노드(2,3,4)로 전송하는 통신 프레임은 도10과 같이 이 신호를 수신할 노드(2,3,4)의 정보를 넣어 그 프레임에 기록된 수신국주소와 동일한 주소를 가진 노드(2,3,4)만 마스터(1)로 데이터를 전송한다.Here, the communication frame transmitted by the master 1 to each of the nodes 2, 3, and 4 is recorded in the frame by inserting information of the nodes 2, 3, and 4 to receive the signal as shown in FIG. Only nodes (2, 3, 4) having the same address as the station address transmit data to the master (1).

이때, 마스터(1)는 각 노드(2,3,4)와 직렬통신으로 각 노드(2,3,4)의 입력포트(79)의 상태를 읽어 그 각 노드(2,3,4)에 있는 출력포트(80)에 데이터를 출력하고, 상기 마스터(1)가 노드(2,3,4)를 순차적으로 폴링할 경우 노드(2,3,4)의 갯수에 따라 전 노드(2,3,4)를 폴링하는 시간이 달라지는데, 즉 하나의 노드(2,3,4)를 호출하고 해당 노드(2,3,4)가 응답하는데 걸리는 시간이 t msec인 경우 전체의 노드(2,3,4)가 N개이면 전체 노드(2,3,4)를 폴링하는데 걸리는 시간은 t*N msec 가된다.At this time, the master 1 reads the state of the input port 79 of each node 2, 3, 4 by serial communication with each node 2, 3, 4, Outputs data to the output port 80, and when the master 1 polls the nodes 2, 3 and 4 sequentially, all nodes 2 and 3 according to the number of nodes 2, 3 and 4 The time to poll, 4) varies, i.e. if it takes t msec to call one node (2,3,4) and the node (2,3,4) responds, then the entire node (2,3) When N, 4) is N, the time taken to poll all nodes 2, 3, and 4 becomes t * N msec.

여기서, 상기 노드(2,3,4)의 경우 마스터(1)로부터 호출당하는 시간이 노드(2,3,4)의 갯수에 따라 가변되며, 특히 노드(2,3,4)의 갯수가 적은 경우 노드(2,3,4)는 마스터(1)로부터 호출 당하는 시간이 너무 짧아지게 되므로, 본 발명은 마스터(1)에서 노드(2,3,4)를 호출하는 시간을 일정하게 유지하게 하는데, 즉 마스터(1)는 첫 번째 노드(2,3,4)를 호출할 때 타이머를 기동하고 마지막 노드(2,3,4)를 호출할 때 타이머가 일정시간이 경과했는지를 확인하여 일정시간이 경과하면 다시 처음 노드(2,3,4)를 호출한다.Here, in the case of the nodes (2, 3, 4), the time to be called from the master (1) is variable according to the number of nodes (2, 3, 4), in particular the number of nodes (2, 3, 4) In this case, the nodes 2, 3, and 4 have a short time to be called from the master 1, so the present invention keeps the time of calling the nodes 2, 3, and 4 from the master 1 constant. That is, the master 1 starts the timer when calling the first node (2,3,4) and checks whether the timer has elapsed when the last node (2,3,4) is called. After this elapses, the first node (2, 3, 4) is called again.

그리고, 마스터(1)는 각 노드(2,3,4)의 통신상태를 관리하여 통신이 정상인 노드(2,3,4)들을 우선적으로 호출하고, 통신이 정상인 노드(2,3,4)들의 호출이 완료되면 통신에러가 발생한 노드(2,3,4)를 호출한다.Then, the master 1 manages the communication state of each node (2, 3, 4) to preferentially call the nodes (2, 3, 4) communication is normal, the nodes (2, 3, 4) communication is normal When the call is completed, the node (2, 3, 4) having a communication error is called.

여기서, 상기 마스터(1)의 초기화동작에 대하여 설명하면, 먼저 전체 노드(2,3,4)의 겟수를 지정하여, 그 각 노드(2,3,4)의 통신상태 플래그를 '0'으로 초기화화한다.Here, the initializing operation of the master 1 will be described. First, the number of get of all the nodes 2, 3, 4 is specified, and the communication state flag of each of the nodes 2, 3, 4 is set to '0'. Initialize

이후, 마스터(1)는 각 노드(2,3,4)를 폴링하면서 해당노드(2,3,4)가 통신이 정상이면 통신상태 플래그를 셋시키고 통신에러이면 클리어 시키며, 현재 호출한 노드(2,3,4)의 주소를 첫 번째 노드(2,3,4)로 설정하고, 반면에 통신에러노드(2,3,4)를 호출할 때 사용되는 통신에러 노드(2,3,4)의 번호를 첫번째 노드(2,3,4)로 지정한다.After that, the master 1 polls each of the nodes 2, 3, and 4 while the corresponding nodes 2, 3, and 4 set the communication status flag when the communication is normal, and clears the communication error. Set the address of 2,3,4 to the first node (2,3,4), while the communication error node (2,3,4) is used when calling the communication error node (2,3,4). ) Is assigned to the first node (2, 3, 4).

그리고, 현재 폴링의 모드가 통신정상인 노드(2,3,4)를 호출하는 모드로 설정하고, 이 통신정상이 노드(2,3,4)를 호출하는 모드가 끝나면 통신에러인 노드(2,3,4)를 호출하는 모드로 전환한다.Then, the current polling mode is set to the mode of calling the nodes 2, 3, and 4, which are normal communications. When the mode of the normal communication calls the nodes 2, 3, and 4, the node 2, which is a communication error, Switch to calling mode 3,4).

이후, 첫 번째 노드(2,3,4)를 호출하고, 각 노드(2,3,4)에서 응답을 기다리는 시간을 설정하여 설정한 시간내에 해당 노드(2,3,4)로부터 응답이 없으면 그 노드(2,3,4)는 통신에러로 처리한다.After that, the first node (2, 3, 4) is called and each node (2, 3, 4) waits for a response, and if there is no response from the corresponding node (2, 3, 4) within the set time The nodes 2, 3, and 4 deal with a communication error.

그리고, 전 노드(2,3,4)를 호출하는 데 걸리는 시간을 설정하여 그 설정된 시간이 경과해야만 다시 첫 번째 노드(2,3,4)를 호출한다.Then, the time required to call all the nodes (2, 3, 4) is set, and the first node (2, 3, 4) is called again only after the set time has elapsed.

여기서, 마스터(1)의 동작을 도12를 참조하여 설명한다.Here, the operation of the master 1 will be described with reference to FIG.

먼저, 마스터(1)는 각 노드(2,3,4)로부터 수신되는 데이터를 인터럽트로 처리하고, 이 인터럽트가 통신에러에 의해 발생하였는지를 판단한다.First, the master 1 processes the data received from each node 2, 3, 4 as an interrupt, and determines whether this interrupt is caused by a communication error.

이때, 각 노드(2,3,4)에서 설정된 시간내에 응답이 없으며 해당노드(2,3,4)를 통신에러로 처리하는데, 만약 통신에러에 의한 인터럽트가 아니라면 노드(2,3,4)에서 마스터(1)로 송신한 데이터를 수신한 경우 발생하는 수신인터럽트이다.At this time, there is no response within the time set by each node (2, 3, 4) and the corresponding node (2, 3, 4) is treated as a communication error. This is a reception interrupt that occurs when the data sent to the master (1) is received.

이후, 해당 노드(2,3,4)의 통신상태 플래그를 셋시키는데, 이는 해당노드(2,3,4)가 통신정상임을 표시한다.Thereafter, the communication status flags of the nodes 2, 3, and 4 are set, which indicates that the nodes 2, 3, and 4 are in communication normal.

여기서, 마스터(1)는 노드(2,3,4)에서 수신한 해당 노드(2,3,4)의 입력포트 데이터를 저장하고, 현재 폴링모드가 통신정상인 노드(2,3,4)들을 호출하는 모드인지 통신 에러노드(2,3,4)들을 호출하는 모드인지를 판단한다.Here, the master 1 stores the input port data of the nodes 2, 3, and 4 received by the nodes 2, 3, and 4, and selects the nodes 2, 3, and 4 whose polling mode is normal for communication. It is determined whether the calling mode or the communication error nodes 2, 3, and 4 are called.

만일, 통신정상인 호기를 호출하는 모드이면 해당호기의 통신플래그를 클리어시키고, 이후 마스터(1)는 통신이 정상인 노드(2,3,4)중에서 다음 호출할 노드(2,3,4)의 주소를 설정하고, 만약 통신정상인 전 노드(2,3,4)를 다 호출하였다면 통신에러인 노드(2,3,4)를 호출한다.If the normal call is in the call mode, the communication flag of the call is cleared. Then, the master (1) is the address of the next call node (2, 3, 4) among the nodes (2, 3, 4) in which communication is normal. If all the nodes (2, 3, 4) which are normal communication are called, call nodes (2, 3, 4) which are communication errors.

그리고, 마스터(1)는 현재 폴링모드이면 노드(2,3,4)중에서 호출할 노드(2,3,4)를 설정하여 완료되면 노드(2,3,4) 주소를 제일 마지막 노드(2,3,4)의 주소보다 큰값으로 하여 그에 따른 노드(2,3,4)를 호출하고, 여기서 전 노드(2,3,4)를 호출하는데 걸리는 시간이 경과하면 다시 첫 번째 노드(2,3,4)를 호출한다.Then, the master 1 sets the nodes 2, 3, and 4 to be called among the nodes 2, 3, and 4 when the polling mode is currently completed. Call the nodes 2, 3, and 4 according to the value larger than the address of 3, 4, and when the time required to call all the nodes 2, 3, and 4 elapses, the first node 2, Call 3,4).

이때, 노드(2,3,4)의 동작을 도13를 참조하여 설명하면, 각 노드(2,3,4)는 마스터(1)에서 송신한 데이터를 읽어 그 데이터의 수신국주소와 자신의 주소가 일치하는 지를 판단한다.At this time, the operation of the nodes 2, 3, and 4 will be described with reference to Fig. 13, and each node 2, 3, and 4 reads the data transmitted from the master 1, and the receiving station address of the data and its own. Determine if the addresses match.

만약, 각 노드(2,3,4)는 수신국주소와 자신의 주소가 일치하지 않으면 대기하고, 반면에 수신국주소와 자신의 주소가 일치하면 마스터(1)에서 전송된 데이터를 해당노드(2,3,4)가 관리하는 출력포트(80)로 출력한후 그 해당노드(2,3,4)에서 관리하는 입력포트(79)의 상태를 마스터(1)로 전송하는데, 여기서 도10은 상기 노드(2,3,4)에서 마스터(1)로 전송하는 데이터의 프레임에 대한 구조를 나타낸다.If each node (2, 3, 4) does not match the recipient address and its address, it waits. On the other hand, if the recipient address and its address match, the node (2, 3, 4) waits for the data transmitted from the master (1). After outputting to the output port 80 managed by 2, 3, and 4, the state of the input port 79 managed by the corresponding node 2, 3, 4 is transmitted to the master 1, where FIG. Denotes a structure for a frame of data transmitted from the nodes 2, 3, and 4 to the master 1.

이상에서 상세히 설명한 바와 같이 본 발명은 마스터와 각 노드사이에 하나의 통신채널을 이용하여 통신할 수 있도록 함으로써 배선에 따른 비용을 절감할 수 있고 아울러 통신선의 배선 및 결선이 용이할 수 있는 효과가 있다.As described in detail above, the present invention enables communication between the master and each node using a single communication channel, thereby reducing the cost of wiring and having the effect of easily wiring and connecting the communication line. .

Claims (8)

통신장치를 구비한 하나의 마스터가 통신장치를 구비한 다수의 노드와 1:N 으로 폴링하면서 직렬 통신하는 직렬통신장치에 있어서, 상기 마스터와 각 노드를 하나의 통신선으로 접속하여 구성한 것을 특징으로 하는 직렬통신장치.A serial communication device in which one master having a communication device is in serial communication while polling 1: N with a plurality of nodes having a communication device, wherein the master and each node are connected by one communication line. Serial communication device. 제1 항에 있어서, 마스터의 통신장치는 씨피유가 어드레스버퍼와 데이터버스 및 컨트롤버스를 통하여 통신소자에 연결되고, 상기 씨피유의 컨트롤버스는 수신포트로 연결되며, 상기 통신소자의 송신단자는 송신포트에 연결되고, 상기 통신소자의 수신단자는 수신포트에 연결되며, 상기 수신포트의 출력단자와 상기 송신포트의 출력단자를 연결하여 구성한 것을 특징으로 하는 직렬통신장치.The master communication apparatus of claim 1, wherein the CPI is connected to a communication device through an address buffer, a data bus, and a control bus, and the CPI control bus is connected to a receiving port, and a transmitting terminal of the C communication device is connected to a transmitting port. And a receiving terminal of the communication element is connected to a receiving port, and is configured by connecting an output terminal of the receiving port and an output terminal of the transmitting port. 제1 항에 있어서, 노드의 통신장치는 씨피유가 어드레스버퍼와 데이터버스 및 컨트롤버스를 통하여 통신소자에 연결되고, 상기 씨피유의 컨트롤버스는 수신포트로 연결되며, 상기 통신소자의 송신단자는 송신포트에 연결되고, 상기 통신소자의 수신단자는 수신포트에 연결되며, 상기 수신포트의 출력단자와 상기 송신포트의 출력단자를 연결하고, 상기 씨피유에 입력포트와 출력포트를 접속하여 구성한 것을 특징으로 하는 직렬통신장치.The communication device of claim 1, wherein the communication device of the node is connected to a communication device via an address buffer, a data bus, and a control bus, and the control bus of the connection is connected to a receiving port, and a transmission terminal of the communication device is connected to a transmission port. And a receiving terminal of the communication element is connected to a receiving port, and is configured by connecting an output terminal of the receiving port and an output terminal of the transmitting port and connecting an input port and an output port to the CPI. Communication device. 제2 항 또는 제3 항에 있어서, 수신포트는 송신포트의 출력단과 연결된 제1 신호수신소자의 입력단을 접속하고, 씨피유의 어드레스버스와 입력단이 접속된 제2 신호수신소자의 출력단을 상기 제1 신호수신소자의 제어단에 접속하여 구성한 것을 특징으로 하는 직렬통신장치.4. The receiver of claim 2 or 3, wherein the receiving port connects an input terminal of a first signal receiving element connected to an output terminal of a transmission port, and connects an output terminal of the second signal receiving element connected to an address bus of the CPI and the input terminal. A serial communication device characterized in that it is connected to the control terminal of the signal receiving element. 마스터를 초기화하는 제1 과정과; 마스터가 노드로부터 수신되는 데이터를 인터럽트로 처리하여 하나의 통신채널을 통해 데이터를 송수신하는 제2 과정과; 노드가 상기 마스터로부터 데이터가 수신되면 인터럽트가 발생되어 하나의 통신채널을 통해 상기 마스터와 데이터를 송수신하는 제3 과정으로 수행함올 특징으로 하는 직렬통신방법.A first step of initializing the master; A second process of the master processing the data received from the node as an interrupt and transmitting and receiving data through one communication channel; And when the node receives data from the master, an interrupt is generated to perform a third process of transmitting and receiving data to and from the master through one communication channel. 제5 항에 있어서, 제1 과정은 전체노드의 갯수를 지정하는 제1 단계(S1)와; 각 노드의 통신상태에 대한 플래그를 '0'으로 초기화하는 제2 단계(S2)와; 현재 호출할 노드의 주소를 첫 번째 노드로 설정하는 제3 단계(S3)와; 통신에러 노드의 번호를 첫 번째 노드로 설정하는 제4 단계(S4)와; 현재 폴링의 모드가 통신정상인 노드를 호출하는 모드로 설정하는 제5 단계(S5)와; 첫 번째 노드를 호출하는 제6 단계(S6)와; 노드에서 응답을 기다리는 시간을 설정하는 제7 단계(S7)와; 전 노드를 호출하는 데 걸리는 시간을 설정하는 제8 단계(S8)로 수행하는 것을 특징으로 하는 직렬통신방법.The method of claim 5, wherein the first process comprises: a first step (S1) of designating the number of all nodes; A second step S2 of initializing a flag for the communication state of each node to '0'; A third step S3 of setting an address of a node to be called currently as the first node; A fourth step S4 of setting the number of the communication error node as the first node; A fifth step (S5) of setting a mode of calling a node whose current polling mode is normal for communication; A sixth step S6 of calling the first node; A seventh step S7 of setting a time for waiting for a response from the node; And an eighth step (S8) of setting the time taken to call all nodes. 제5 항에 있어서, 제2 과정은 통신에러 인터럽트가 발생하였는 지를 판단하는 단계(S21)와; 상기 단계(S21)에서 통신에러 인터럽트가 발생하지 않았으면 해당노드의 통신상태 플래그를 셋시키는 단계(S22)와; 노드에서 수신한 입력포트 데이터를 저장하는 단계(S23)와; 상기 단계(S21)에서 통신에러 인터럽트가 발생하였으면 현재 모드가 폴링모드인지를 판단하는 단계(S24)와; 상기 단계(S24)에서 현재 폴링모드가 아니면 해당호기의 통신플래그를 클리어하는 단계(S25)와; 통신이 정상인 노드중에서 다음 호출할 노드의 주소를 설정하는 단계(S26)와; 통신이 정상인 노드의 호출이 완료되었는 지를 판단하는 단계(S27)와; 상기 단계에서 통신이 정상인 노드의 호출이 완료되지 않았으면 상기 단계(S26)에서 선택된 노드를 호출하는 단계(S28)와; 통신이 정상인 노드를 호출하는 모드로 설정하는 단계(S29)와; 노드에서 응답을 기다리는 시간을 설정한 후 종료하는 단계(S30)와; 상기 단계(S27)에서 통신이 정상인 노드(2,3,4)의 호출을 완료하였으면 통신에러모드를 호출하는 모드로 설정하는 단계(S31)와; 상기 단계(S24)에서 현재 폴링모드이면 통신에러 노드중에서 호출할 노드를 설정하는 단계(S32)와; 통신에러 노드의 호출을 완료하였는지를 판단하는 단계(S33)와; 상기 단계(S33)에서 통신에러 노드의 호출을 완료하지 않았으면 상기 단계(S33)에서 선택된 통신에러 노드를 호출하는 단계(S34)와; 상기 단계(S33)에서 통신에러 노드의 호출이 완료되었으면 제일 마지막노드의 주소보다 큰값으로하여 노드를 호출하는 단계(S35)와; 통신에러노드중 호출할 주소를 '0'으로 초기화하는 단계(S36)와; 전 노드를 호출하는데 걸리는 기간이 경과하였는지를 판단하는 단계(S37)와; 상기 단계(S37)에서 전노드를 호출하는데 걸리는 시간이 경과하지 않았으면 상기 단계(S30)로 궤환하고 전노드를 호출하는데 걸리는 시간이 경과하였으면 현재 호출할 노드의 번호를 첫 번째 노드로 설정하는 단계(S38)와; 전체노드를 호출하는 데 걸리는 시간을 설정한 후 상기 단계로 궤환하는 단계(S39)로 이루어진 것을 특징으로 하는 직렬통신방법.The method of claim 5, wherein the second process comprises: determining whether a communication error interrupt has occurred (S21); Setting a communication state flag of a corresponding node if a communication error interrupt has not occurred in step S21; Storing input port data received at the node (S23); Determining whether a current mode is a polling mode (S24) when a communication error interrupt occurs in the step (S21); Clearing the communication flag of the corresponding device (S25) if the current polling mode is not present in the step (S24); Setting an address of a node to be called next among nodes in which communication is normal (S26); Judging whether the call of the node having normal communication is completed (S27); In step S28, invoking the node selected in step S26 if the call of the node having normal communication is not completed; Setting (S29) a mode in which a node in which communication is normal is called; Setting a time for waiting for a response from the node and terminating it (S30); Setting the communication error mode to a mode in which the call of the nodes (2, 3, 4) in which communication is normal is completed (S31); Setting a node to be called from among communication error nodes (S32) in the current polling mode (S24); Judging whether the call of the communication error node has been completed (S33); Calling (S34) the communication error node selected in the step (S33) if the call of the communication error node is not completed in the step (S33); If the call of the communication error node is completed in step S33, calling the node with a value greater than the address of the last node; Initializing an address to be called among the communication error nodes to '0' (S36); Determining whether a time period for calling all nodes has elapsed (S37); If the time taken to call all nodes has not elapsed in step S37, returning to step S30 and if the time taken to call all nodes has elapsed, setting the number of the node to be called as the first node. (S38); And setting the time taken to call all nodes and returning to the step (S39). 제5 항에 있어서, 제3 과정은 마스터에서 송신한 데이터를 읽는 단계(S51)와; 수신국주소와 자신의 주소가 일치하는 지를 판단하는 단계(S52)와; 상기 단계(S52)에서 수신국주소와 자신의 주소가 일치하지 않으면 종료하고 수신국주소와 자신의 주소가 일치하면 마스터에서 전송된 데이터를 노드가 관리하는 출력포트로 출력하는 단계(S53)와; 노드에서 관리하는 입력포트의 상태를 마스터로 전송한후 종료하는 단계(S54)로 이루어진 것을 특징으로 하는 직렬통신방법.The method of claim 5, wherein the third process includes: reading data transmitted from a master (S51); Determining whether the address of the receiving station and its address match (S52); Terminating if the receiving station address and its address do not match in step S52 and outputting data transmitted from the master to an output port managed by the node if the receiving station address and its address match; And transmitting the state of the input port managed by the node to the master and terminating (S54).
KR1019980030037A 1998-07-25 1998-07-25 Serial communication device and method thereof KR20000009541A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019980030037A KR20000009541A (en) 1998-07-25 1998-07-25 Serial communication device and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019980030037A KR20000009541A (en) 1998-07-25 1998-07-25 Serial communication device and method thereof

Publications (1)

Publication Number Publication Date
KR20000009541A true KR20000009541A (en) 2000-02-15

Family

ID=19545201

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019980030037A KR20000009541A (en) 1998-07-25 1998-07-25 Serial communication device and method thereof

Country Status (1)

Country Link
KR (1) KR20000009541A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100323806B1 (en) * 1999-11-19 2002-02-19 김진태 Method for multiful communication
US6634618B2 (en) 2000-05-24 2003-10-21 Kil Yong Jang Water saving automatic valve
KR100688516B1 (en) * 2005-01-11 2007-03-02 삼성전자주식회사 Method for serial data communication using a single line and apparatus therefor

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100323806B1 (en) * 1999-11-19 2002-02-19 김진태 Method for multiful communication
US6634618B2 (en) 2000-05-24 2003-10-21 Kil Yong Jang Water saving automatic valve
KR100688516B1 (en) * 2005-01-11 2007-03-02 삼성전자주식회사 Method for serial data communication using a single line and apparatus therefor

Similar Documents

Publication Publication Date Title
US4191941A (en) Switch matrix for data transfers
KR20000009541A (en) Serial communication device and method thereof
US4823344A (en) Remote test circuit for channel terminal
US5612954A (en) Time switch system
JP4364404B2 (en) Communication device
JPS615654A (en) Initial setting system of digital line terminator
JPS6125348A (en) Method for deciding and notifying communication speed of data communication network
US5881052A (en) Line signal analyzing method for use in an electronic switching system
KR19990012478A (en) Integrated terminal device and method for data processing in all electronic switch
JP2715137B2 (en) Communication network control method
KR100353447B1 (en) Communication apparatus and method between processors by using atm switch
KR100263978B1 (en) Multimodem system
US5966383A (en) Data communication system using a time slot interface architecture between processor and devices therein
KR900004030B1 (en) Multi access network device
KR100202991B1 (en) Duplication circuit for matching apparatus between device and time slot of switching system
KR100202993B1 (en) Conjunction apparatus between two connectors
KR0129612B1 (en) Apparatus for the con of hardware component of concentrated b-nt system
KR100272862B1 (en) Device and method for communicating serial between numerous circuit pack using request before trasmission form of mutipoint communication system.
KR100231487B1 (en) Self-identification data generator in communication system using common bus
KR200219092Y1 (en) connection circuit between switching devices
KR970025238A (en) Message Exchange Device Using Parallel Bus in Wireless Private Exchange
KR19980084879A (en) Channel processing method using memory
JPS6223651A (en) Data transmission equipment
KR950022514A (en) Communication port control method of a single processor communicating with a plurality of systems and apparatus therefor
JP2000341310A (en) Polling control system

Legal Events

Date Code Title Description
A201 Request for examination
SUBM Submission of document of abandonment before or after decision of registration