KR19980074453A - Communication system and method for multi robot control - Google Patents

Communication system and method for multi robot control Download PDF

Info

Publication number
KR19980074453A
KR19980074453A KR1019970010310A KR19970010310A KR19980074453A KR 19980074453 A KR19980074453 A KR 19980074453A KR 1019970010310 A KR1019970010310 A KR 1019970010310A KR 19970010310 A KR19970010310 A KR 19970010310A KR 19980074453 A KR19980074453 A KR 19980074453A
Authority
KR
South Korea
Prior art keywords
data
received
main process
receiving
robot
Prior art date
Application number
KR1019970010310A
Other languages
Korean (ko)
Other versions
KR100206144B1 (en
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 KR1019970010310A priority Critical patent/KR100206144B1/en
Publication of KR19980074453A publication Critical patent/KR19980074453A/en
Application granted granted Critical
Publication of KR100206144B1 publication Critical patent/KR100206144B1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1069Session establishment or de-establishment
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/40Robotics, robotics mapping to robotics vision
    • G05B2219/40306Two or more independent robots

Abstract

본 발명은 다중로봇제어를 위한 통신시스템 및 방법에 관한 것으로서, 특히, 외부장치로부터 직렬로 데이터를 수신받는 수신수단; 초기화 후 상기 수신수단에 데이터가 수신되는지를 소정시간 간격으로 체크하고, 수신된 데이터를 소정 바이트 수신받아 서비스번호를 검출하고, 상기 검출된 서비스번호에 따라 서브프로세스를 호출하는 메인프로세스수단; 상기 메인프로세스수단에 의한 호출시 해당 서브프로세스로 메인프로세스로부터 로봇식별자를 수신받고, 상기 수신수단으로부터 직접적으로 데이터를 수신받고, 수신된 데이터의 유무 및 제어코드문자에 따라 소정시간 대기 후 에러처리하고, 상기 수신된 데이터에 따라 결과된 응답데이터를 전송하는 복수의 서브프로세스수단; 및 상기 서브프로세스수단으로부터 수신된 응답데이터의 전송순서를 정해서 순차적으로 전송하는 전송수단을 구비하는 것을 특징으로 한다.The present invention relates to a communication system and method for multi-robot control, in particular, receiving means for receiving data serially from an external device; Main process means for checking whether data is received by the receiving means at predetermined time intervals after initialization, receiving a received byte for a predetermined byte, detecting a service number, and calling a subprocess according to the detected service number; Receive the robot identifier from the main process to the corresponding sub-process when calling by the main process means, receive data directly from the receiving means, wait for a predetermined time according to the presence or absence of the received data and control code character, A plurality of subprocess means for transmitting the resultant response data according to the received data; And transmission means for sequentially determining the transmission order of response data received from the sub-process means.

따라서, 본 발명은 수신모듈과 송신모듈을 분리하여 송수신이 동시에 발생함으로써, 보다 빠른 통신이 가능하며, 제어하고자 하는 로봇의 식별자만을 지정함으로써, 여러대의 로봇을 제어할 수 있고, 전송시 록(Lock)기능에 의해 전송순서를 제어함으로써, 데이터의 혼선을 제거할 수 있는 효과가 있다.Therefore, the present invention separates the receiving module and the transmitting module and transmits and receives simultaneously, thereby enabling faster communication. By specifying only the identifier of the robot to be controlled, it is possible to control several robots and to lock the transmission. By controlling the transmission order by the function, the crosstalk of data can be eliminated.

Description

다중로봇제어를 위한 통신시스템 및 방법Communication system and method for multi robot control

본 발명은 다중로봇제어를 위한 통신시스템 및 방법에 관한 것으로서, 특히, 단일 회선의 직렬통신포트을 사용하여 복수의 로봇과 정보교환을 안정적으로 할 수 있도록 직렬통신 알고리즘으로 구현된 다중로봇제어를 위한 통신시스템 및 방법에 관한 것이다.The present invention relates to a communication system and method for multi-robot control, and in particular, a communication for multi-robot control implemented with a serial communication algorithm to enable stable exchange of information with a plurality of robots using a serial communication port of a single line. System and method.

일반적으로, 제어기 통신의 경우 통신을 개시하는 측 즉, 제어기 또는 외부기기의 통신성격에 따라 제어기에 걸리는 부하(Load)가 차이가 난다. 제어기는 어떠한 경우에도 모우션, TP통신, Ethernet통신, 위치데이터 편집, 로봇프로그램 편집 등과 같은 프로세스를 직렬통신으로 수행함으로 인하여 그것에 의한 영향을 받지 말아야 한다. 이를 위해 제어기내의 통신 프로세서를 최적화하는 기술이 필요하다.In general, in the case of controller communication, the load applied to the controller varies according to the communication initiation side, that is, the controller or external device. In no case should the controller be affected by it by performing serial communication such as motion, TP communication, Ethernet communication, location data editing, robot program editing, etc. To this end, a technique for optimizing the communication processor in the controller is required.

종래의 로봇 통신은 하나의 프로세서와 작업 로봇 사이를 직렬 입출력라인으로 연결하여 일대일 통신에 의해서 작업 로봇이 퍼스널 컴퓨터등과 같은 외부기기에서 제공하는 명령에 따라 필요한 작업을 실시하도록 한다. 이러한 종래 기술은 데이터의 분배나 통신중 다른 프로세스에 의한 부가적인 통신이 필요치않는다. 다중작업을 하는 멀티태스킹 시스템의 경우에 있어서, 상기한 필요성이 발생할 경우가 있었으나 대부분 통신불가 처리에 의해 통신을 대기시키는 방식이 사용된다.Conventional robot communication connects one processor and a work robot by serial input / output lines so that the work robot performs necessary work according to a command provided by an external device such as a personal computer by one-to-one communication. This prior art does not require the distribution of data or additional communication by other processes during communication. In the case of a multitasking multitasking system, the above necessity has arisen, but in most cases, a method of waiting for communication by a non-communicable process is used.

그리고, 상기 로봇 통신은 파일교환, 위치데이터의 교환 등의 비교적 간단한 작업을 단일 로봇에 대해 실시한다.The robot communication performs a relatively simple operation such as file exchange and position data exchange with a single robot.

종래 기술에 따른 통신 단계를 개략적으로 순서대로 나열하면, 첫째로, 연결을 확인하고, 둘째로, 서비스요구를 위한 토큰(Token) 즉, 서비스번호를 송신하고, 셋째로, 작업 명령을 위한 복수 바이트의 데이터를 송신하고, 넷째 상기 데이터에 따른 응답을 확인하고 마지막으로 통신을 종료한다.The communication steps according to the prior art are roughly listed in order, firstly, confirming a connection, secondly, transmitting a token, i.e., a service number, for a service request, and thirdly, a plurality of bytes for a work command. Transmit data, and confirm response according to the data, and finally terminate communication.

그러나, 상술한 종래 기술은 단일 로봇의 경우에만 적용되고, 통신중 에러가 발생하였을시 이에 대한 대책 즉, 시간체크, 파워리셋 등이 수동적이며, 또한 데이터의 송신중 그 내용이 끊기는 통신장애가 발생할 경우 대략 30초 정도의 시간이 지난후에야 에러처리되는 문제점이 있다.However, the above-described conventional technique is applied only to a single robot, and when an error occurs during communication, a countermeasure, that is, a time check, a power reset, etc., is passive, and a communication failure occurs when the contents are interrupted during data transmission. There is a problem that the error handling only after about 30 seconds.

본 발명의 목적은 상기와 같은 문제점을 해결하기 위하여 단일 회선의 직렬통신포트만을 사용하여 복수의 로봇과 정보교환을 안정적으로 할 수 있도록 한 다중로봇제어를 위한 통신시스템 및 방법을 제공하는 데 있다.SUMMARY OF THE INVENTION An object of the present invention is to provide a communication system and method for multi-robot control which enables stable information exchange with a plurality of robots using only a serial communication port of a single line to solve the above problems.

본 발명의 다른 목적은 통신으로 인해 로봇의 원활한 제어를 구현하는 데 지장을 초래하지 않는 방법을 제공하는 데 있다.Another object of the present invention is to provide a method that does not interfere with the smooth control of the robot due to communication.

상기 문제점을 해결하기 위하여 본 발명의 시스템은 외부장치로부터 직렬로 데이터를 수신받는 수신수단; 초기화 후 상기 수신수단에 데이터가 수신되는지를 소정시간 간격으로 체크하고, 수신된 데이터를 소정 바이트 수신받아 서비스번호를 검출하고, 상기 검출된 서비스번호에 따라 서브프로세스를 호출하는 메인프로세스수단; 상기 메인프로세스수단에 의한 호출시 해당 서브프로세스로 메인프로세스로부터 로봇식별자를 수신받고, 상기 수신수단으로부터 직접적으로 데이터를 수신받고, 수신된 데이터의 유무 및 제어코드문자에 따라 소정시간 대기 후 에러처리하고, 상기 수신된 데이터에 따라 결과된 응답데이터를 전송하는 복수의 서브프로세스수단; 및 상기 서브프로세스수단으로부터 수신된 응답데이터의 전송순서를 정해서 순차적으로 전송하는 전송수단을 구비하는 것을 특징으로 한다.In order to solve the above problems, the system of the present invention comprises: receiving means for receiving data serially from an external device; Main process means for checking whether data is received by the receiving means at predetermined time intervals after initialization, receiving a received byte for a predetermined byte, detecting a service number, and calling a subprocess according to the detected service number; Receive the robot identifier from the main process to the corresponding sub-process when calling by the main process means, receive data directly from the receiving means, wait for a predetermined time according to the presence or absence of the received data and control code character, A plurality of subprocess means for transmitting the resultant response data according to the received data; And transmission means for sequentially determining the transmission order of response data received from the sub-process means.

상기 문제점을 해결하기 위하여 본 발명의 방법은 외부장치로부터 직렬로 데이터를 수신받고, 수신된 데이터를 래치하는 수신단계; 메인 프로세스를 초기화 하는 단계; 초기화될 경우 래치된 데이터를 소정 시간간격으로 체크하고, 수신 데이터의 유무를 판단하여 수신 데이터가 존재하지 않을경우 중앙처리장치의 로드를 해지하는 단계; 상기 수신데이터가 존재할 경우 메인프로세스로 수신 데이터중 선두부터 소정의 바이트만 순차적으로 독출하는 단계; 상기 단계에서 독출된 수신 데이터의 종류를 체크하여 서비스번호를 검출하는 단계; 상기 서비스번호에 따라 로봇제어를 위한 복수의 함수중 해당 함수를 호출하는 서비스 호출단계; 함수호출시 수신 데이터의 나머지 데이터를 독출하고, 독출된 데이터에 따라 소정의 서브프로세스를 수행하는 단계; 상기 서브프로세스 수행에 의해서 발생되는 응답데이터를 함수호출 순서에 따라 외부장치로 전송하는 단계를 구비하는 것을 특징으로 한다.In order to solve the above problems, the method of the present invention comprises the steps of receiving data serially from an external device and latching the received data; Initializing the main process; Checking the latched data at a predetermined time interval when it is initialized, and determining whether there is received data to cancel loading of the central processing unit when there is no received data; Sequentially reading only predetermined bytes from the head of the received data to the main process when the received data exists; Detecting a service number by checking a type of the received data read in the step; A service call step of calling a corresponding function among a plurality of functions for robot control according to the service number; Reading the remaining data of the received data when the function is called, and performing a predetermined subprocess according to the read data; And transmitting the response data generated by performing the subprocess to an external device in a function call order.

도 1 은 본 발명에 의한 다중로봇제어를 위한 통신시스템을 설명하기 위한 블록도.1 is a block diagram illustrating a communication system for multi-robot control according to the present invention.

도 2 는 본 발명에 의한 다중로봇제어를 위한 통신방법를 설명하기 위한 플로우챠트.2 is a flowchart for explaining a communication method for multi-robot control according to the present invention.

도 3 은 본 발명에 의한 서비스 호출시 서브프로세스를 설명하기 위한 플로우챠트.3 is a flowchart for explaining a subprocess in the service call according to the present invention.

도 4 는 본 발명에 의한 전송모듈에서 전송방법을 설명하기 위한 플로우챠트.4 is a flowchart for explaining a transmission method in the transmission module according to the present invention.

도 5 는 본 발명에 의한 메인프로세스에서 처리되는 통신 프로토콜을 설명하기 위한 도면.5 is a view for explaining a communication protocol processed in the main process according to the present invention.

도 6 은 본 발명에 의한 서브프로세스에서 처리되는 통신 프로토콜을 설명하기 위한 도면.6 is a diagram for explaining a communication protocol processed in a subprocess according to the present invention;

이하, 첨부한 도면을 참고하여 본 발명을 보다 상세하게 설명하면 다음과 같다.Hereinafter, the present invention will be described in detail with reference to the accompanying drawings.

도 1 은 본 발명에 의한 다중로봇제어를 위한 통신시스템을 설명하기 위한 블록도, 도시된 바와 같이 송신모듈(10)과, 메인프로세스(20)과, 복수의 서브프로세스(F1∼Fn)와, 전송모듈(40)로 구성된다.1 is a block diagram illustrating a communication system for multi-robot control according to the present invention, as shown, a transmission module 10, a main process 20, a plurality of sub-processes (F1 to Fn), It consists of a transmission module (40).

상기와 같이 구성된 본 발명에 따른 다중로봇제어를 위한 통신시스템의 동작에 관하여 도 2, 도 3, 도 4 의 플로우챠트 및 도 4 및 도 5 의 통신 프로토콜 인용하여 기술하면 다음과 같다.The operation of the communication system for multi-robot control according to the present invention configured as described above will be described with reference to the flowcharts of FIGS. 2, 3 and 4 and the communication protocols of FIGS. 4 and 5 as follows.

도 1 을 참조하여, 본 발명에 따른 다중로봇제어를 위한 통신 방법은 목적하는 로봇제어를 달성하기 위하여 퍼스널 컴퓨터(PC) 등과 같은 외부장치로부터 시리얼 데이터 전송라인을 통해 데이터를 전송 및 수신을 수행한다. 통상 외부장치와 통신 프로세스간의 통신은 장치 드라이버(60)에 의해서 이루어진다. 이 장치 드라이버(60)의 역할은 주변장치를 제어하고 관리하는 방법을 운영체제에 알려주는 일을 수행한다.Referring to FIG. 1, a communication method for multi-robot control according to the present invention transmits and receives data through a serial data transmission line from an external device such as a personal computer (PC) to achieve a desired robot control. . Normally, communication between the external device and the communication process is made by the device driver 60. The role of the device driver 60 is to inform the operating system how to control and manage peripheral devices.

도 2 를 참조하여, 특정의 작업을 수행하는 로봇들은 각각이 자신의 고유번호가 할당되어 있으며, 이 작업 로봇으로 하여금 작업을 수행하도록 하기 위해서는 프로그래머가 상기 외부장치를 통해 로봇의 인식번호만을 지정하면 된다. 일단 토큰(서비스시작번호)와 로봇식별자(Robot #)를 포함한 프로그램된 데이터들이 전송되어 수신모듈의 버퍼에 래치된다(제 10 단계).Referring to FIG. 2, each robot performing a specific task is assigned its own unique number. In order for the robot to perform the task, the programmer designates only the identification number of the robot through the external device. do. Once programmed data including the token (service start number) and the robot identifier (Robot #) are transmitted and latched in the buffer of the receiving module (step 10).

그 다음 로봇식별자가 지정되면 메인프로세스는 직렬통신 장치드라이버를 사용하기 위해 직렬통신 포트인 RS232C를 초기화 한다(제 10 단계).Then, if a robot identifier is specified, the main process initializes the serial communication port RS232C to use the serial communication device driver (step 10).

상기 제 12 단계 후 메인프로세스는 수신포트의 버퍼를 50㎳의 시간간격으로 체크하여 버퍼에 데이터가 수신되었는지를 판단한다. 그 판단결과로 수신데이터가 존재하지 않을 경우에는 쓰래드-일드(Thread_yield)를 수행하여 중앙처리장치의 로드(Load)를 해제하고 통신을 종료한다(제 14 단계), 이에 반하여 수신데이터가 존재할 경우에는 버퍼에 래치된 수신 데이터를 1바이트 단위로 독출하며, 수신된 유효한 데이터의 헤드(Head)를 찾아 소정의 바이트만을 메인프로세스로 순차적으로 독출한다(제 18 단계).After the twelfth step, the main process checks the buffer of the receiving port at a time interval of 50 ms to determine whether data is received in the buffer. As a result of the determination, if the received data does not exist, the thread_yield is executed to release the load of the central processing unit and terminate the communication (step 14). In contrast, if the received data exists, The received data latched in the buffer is read in units of 1 byte, and the head of the received valid data is found to sequentially read only predetermined bytes into the main process (step 18).

상기 헤드(Head)는 조회문자(ENQ; Enquiry Character)나 헤드시작문자(SOH; Start of Heading)가 된다. 본 발명에서 사용되는 로봇제어를 위한 제어문자들을 열거하면, 조회문자(ENQ), 확인응답문자(ACK), 헤드시작문자(SOH), 텍스트시작문자(STX), 데이터끝문자(GS), 텍스트끝문자(ETX), 전송끝문자(EOT) 등이 있으며 이 데이터들은 각각이 아스키 코드 1바이트로서 표준 아스키 코드 테이블에 정의되어 있다.The head is an inquiry character (ENQ) or a head start character (SOH). Enumerating the control characters for robot control used in the present invention, inquiry character (ENQ), acknowledgment (ACK), head start character (SOH), text start character (STX), data end character (GS), text There is an end character (ETX), end-of-transmission character (EOT), and each of these data is defined in the standard ASCII code table as an ASCII code byte.

도 5 에 나타낸 바와 같이 메인프로세스는 헤드 시작문자(SOH)와, 서비스 시작번호(token))와, 에러제어문자들(errorH,errorH)과, 로봇식별자(Robot #)로 구성된 통신 프로토콜을 독출하고, 선두데이터인 헤드시작문자(SOH))가 독출된 후 순차적으로 데이터들이 읽혀진다. 여기에서 초기의 errorH, errorL은 각각 0(zero)이며, 아스키코트로 Ox30이다.As shown in FIG. 5, the main process reads out a communication protocol composed of a head start character (SOH), a service start number (token), error control characters (errorH, errorH), and a robot identifier (Robot #). After reading the head start character (SOH) which is the leading data, the data are read sequentially. Here, initial errorH and errorL are 0 (zero), respectively, and it is Ox30 as ASCII coat.

이때 선두데이터가 조회문자(ENQ;Enquiry Character)인 경우 확인응답문자(ACK)를 송신모듈(Tx)을 통해 전송한다.In this case, when the head data is an inquiry character (ENQ), an acknowledgment character (ACK) is transmitted through the transmission module (Tx).

이어서, 메인프로세스는 수신된 데이터들의 종류를 체크하여 토큰 즉, 서비스번호를 추출하고 추출된 토큰을 체크한다(제 18 단계).Subsequently, the main process checks the received types of data, extracts the token, that is, the service number, and checks the extracted token (step 18).

본 발명에 따른 통신 프로세스는 약 60가지의 기능을 수행할 수 있으며 모든 기능들은 별도의 함수호출에 의해서 수행된다. 따라서, 상기 제 18 단계 후 체크된 토큰에 따라 해당 함수를 호출하는 서비스호출을 수행한다(제 20 단계).The communication process according to the present invention can perform about 60 functions, and all functions are performed by separate function calls. Therefore, after the eighteenth step, a service call for calling the corresponding function is performed according to the checked token (step 20).

상기 제 20 단계에서 서비스 호출시 도 5 에 나타낸 바와 같이 메인프로세스에서 처리되지 않은 나머지 수신 데이터들은 동도면의 좌측에서 우측순으로 서비스 호출에 의해 수행되는 프로세스에 넘겨지고, 메인 프로세스로부터 로봇번호가 전달되며, 상기 나머지 수신 데이터에 따라 소정의 서브 프로세스가 수행된다(제 22 단계). 이때 메인 프로세스는 프리(Free)상태가 되어 다음 프로세스에 대비한다.When receiving a service call in the twentieth step, as shown in FIG. 5, the remaining received data not processed in the main process is passed to the process performed by the service call from the left to the right side of the drawing, and the robot number is transmitted from the main process In operation 22, a predetermined subprocess is performed according to the remaining received data. At this time, the main process becomes free and prepares for the next process.

도 6 의 수신 테이터들은 n개의 데이터와, 제어문자들 GS, CSH, CSL, ETX로 구성되며, GS는 데이터의 끝을, CSH는 체크섬(Check sum)의 상위바이트를, CSL은 체크섬(Check sum)의 하위바이트를 각각 나타내며, 텍스트끝문자(ETX)를 마지막 수신 바이트로 보며, 텍스트끝문자(ETX)의 수신시 송신모듈을 통해 전송끝문자(EOT;End of transmission) 1 바이트를 송신한다.The reception data of FIG. 6 is composed of n data and control characters GS, CSH, CSL, and ETX, GS is the end of the data, CSH is the high byte of the check sum, and CSL is the check sum. ) Indicates the lower byte, respectively, and the end-of-text character (ETX) is regarded as the last received byte, and when the end-of-text character (ETX) is received, an end-of-transmission (EOT) byte is transmitted through the transmitting module.

상기 서브 프로세스의 수행에 의해서 발생되는 응답데이터는 기능호출 순서에 따라 송신 모듈을 통해서 외부장치로 전송된다(제 24 단계).The response data generated by the execution of the subprocess is transmitted to the external device through the transmission module in the function call order (step 24).

이하, 상기 서비스 호출단계에 의해 수행되는 서브프로세스를 상세히 기술하면 다음과 같다.Hereinafter, the subprocess performed by the service call step will be described in detail.

도 2 를 참조하여, 메인 프로세스에 의해 서비스 호출시 서브프로세스에서는 메인 프로세스로부터 로봇식별자를 수신하고(제 30 단계), 이어서 외부장치로부터 버퍼에 래치된 수신 데이터를 직접 서브프로세스의 해당 함수로 독출한다(제 32 단계).Referring to FIG. 2, when the service is called by the main process, the subprocess receives the robot identifier from the main process (step 30), and then reads the received data latched in the buffer from the external device directly into the corresponding function of the subprocess. (Step 32).

상기 제 32 단계를 수행한 결과 데이터의 독출이 제대로 수행되는지를 판단한다(제 34 단계).As a result of performing step 32, it is determined whether data reading is properly performed (step 34).

상기 제 34 단계 후 만약 데이터가 5초동안 수신되지 않으면 에러처리를 수행하고, 메인 프로세스로 복귀한다(제 36 단계). 그리고, 5초의 시간 이내라도 GS, ESC, ETX 등의 제어문자가 수신된다면 에러처리를 수행하고, 메인 프로세스로 복귀한다(제 38 단계).After the thirty-fourth step, if data is not received for five seconds, error processing is performed and the process returns to the main process (stage 36). If control characters such as GS, ESC, ETX, etc. are received within 5 seconds, error processing is performed and the process returns to the main process (step 38).

이어서, 데이터가 독출되면서 상기 제어코드문자가 독출되지 않을시 독출된 제이터에 따라 소정의 서브프로세스를 수행하고, 그렇게 함으로써 발생되는 응답데이터를 전송모듈(Tx)로 보낸다(제 40 단계).Subsequently, when data is read and the control code character is not read, a predetermined subprocess is performed according to the read jitter, and the response data generated thereby is sent to the transmission module Tx (step 40).

따라서, 수신되는 데이터를 바탕으로 해당 로봇제어를 위한 서브 프로세스에 통신 프로세스의 제어권을 넘겨주고, 통신도중 데이터의 손실을 감지하고, 데이터의 손실에 따라 강제로 통신을 종료시키게 된다.Therefore, based on the received data, the control right of the communication process is transferred to the sub-process for controlling the robot, the loss of data is sensed during communication, and the communication is forcibly terminated according to the loss of data.

이하, 본 발명에 따른 전송모듈의 동작을 설명하면 다음과 같다.Hereinafter, the operation of the transmission module according to the present invention will be described.

일부 통신 모듈은 로봇프로그램의 지령에 의해 통신을 개시할 수 있다. 즉, 외부장치에서 데이터를 수신하기를 원할 때 전송모듈(Tx)을 통하여 ENQ를 내보내고 응답확인문자(ACK)를 기대한다.Some communication modules may initiate communication by a command of the robot program. That is, when the external device wants to receive data, it sends out ENQ through the transmission module Tx and expects a response acknowledgment character (ACK).

상기한 서브프로세스는 복수의 함수호출에 의해서 동시에 수행 가능하지만, 그 응답데이터를 외부장치로 전송하기 위해서는 하나씩 순서대로 전송하여야 한다.The above subprocesses can be executed simultaneously by a plurality of function calls, but in order to transmit the response data to the external device, they must be transmitted one by one.

도 4 을 참조하여 먼저, 프로세스 요구 순서에 따라 함수호출시 발생되는 응답데이터의 전송순번을 결정하기 위해 각 응답데이터에 전송 식별자를 부여한다(제 60 단계). 이를 위해 현재의 식별자를 1씩 증분시켜서 각 응답데이터의 전송식별자를 결정한다.Referring to FIG. 4, first, a transmission identifier is assigned to each response data in order to determine a transmission order of response data generated when a function call is made according to a process request order (step 60). To this end, the current identifier is incremented by 1 to determine the transmission identifier of each response data.

상기 제 60 단계 후 전송처리될 응답데이터의 전송 식별자가 기설정된 다음순번값과 일치하는지를 판단하고(제 62 단계), 그 판단결과 일치하지 않을 경우 일치할 때 까지 대기시킨다.After the 60th step, it is determined whether the transmission identifier of the response data to be transmitted is matched with a preset next order value (step 62).

한편, 그 판단결과 일치할 경우 뮤텍스(mutex)를 체크하고, 그 체크 결과 뮤텍스(mutex)가 잠겨있으면 전송처리될 응답데이터를 소정시간 지연시킨 후 뮤텍스(mutex)를 다시 체크한다(제 64 단계). 여기에서 뮤텍스는 임의의 프로세스가 전송모듈(Tx)을 사용하게 되면 잠금(Lock)을 수행하여 다른 프로세서가 진입하지 못하도록 차단하는 역할을 한다.On the other hand, if the result of the determination matches, the mutex is checked. If the mutex is locked, the mutex is delayed for a predetermined time and the mutex is checked again (step 64). . Here, the mutex performs a lock when an arbitrary process uses the transmission module Tx to block another processor from entering.

반면에 대기상태가 해제되면 전송할 응답데이터를 포맷시키고, 다른 응답데이터가 전송모듈에 진입하지 못하도록 뮤텍스를 잠그고, 포맷된 데이터를 외부장치로 송신한다(제 66 단계).On the other hand, when the standby state is released, the response data is transmitted, the mutex is locked so that other response data does not enter the transmission module, and the formatted data is transmitted to the external device (step 66).

상기 제 46 단계에서 송신을 실시한 후 다음순번값을 1씩증분하여 갱신하고, 다음 차례의 응답데이터가 전송모듈에 진입할 수 있도록 뮤텍스를 해제한다(제 68 단계).After transmitting in step 46, the next order value is incremented and updated by one, and the mutex is released to allow the next response data to enter the transmission module (step 68).

상술한 바와 같이 본 발명은 수신모듈과 송신모듈을 분리하여 별개의 프로세스로 관리함으로써 송수신이 동시에 발생한다, 따라서 보다 빠른 통신이 가능하며, 프로그래머가 단일 퍼스널 컴퓨터를 통해 제어하고자 하는 로봇의 식별자만을 지정함으로써, 여러대의 로봇을 제어할 수 있고, 전송시 록(Lock)기능에 의해 전송순서를 제어함으로써 데이터의 혼선을 제거할 수 있는 효과가 있다.As described above, the present invention separates the receiving module from the transmitting module and manages them in separate processes so that transmission and reception occur simultaneously. Therefore, faster communication is possible, and only the identifier of the robot that the programmer wants to control through a single personal computer is designated. By doing so, it is possible to control several robots and to control the transmission order by the transmission lock function, thereby eliminating crosstalk of data.

또한, 본 발명에서는 통신장에 발생시 정해진 시간을 대기하거나 특정한 이벤트 발생 후 에러처리하여 강제종료함으로써, 에러처리시간을 단축할 수 있는 또 다른 효과가 있다.In addition, in the present invention, there is another effect that the error processing time can be shortened by waiting for a predetermined time when the communication field occurs or forcibly terminating by error processing after a specific event occurs.

Claims (7)

외부장치로부터 직렬로 데이터를 수신받는 수신수단; 초기화 후 상기 수신수단에 데이터가 수신되는지를 소정시간 간격으로 체크하고, 수신된 데이터를 소정 바이트 수신받아 서비스번호를 검출하고, 상기 검출된 서비스번호에 따라 서브프로세스를 호출하는 메인프로세스수단; 상기 메인프로세스수단에 의한 호출시 해당 서브프로세스로 메인프로세스로부터 로봇식별자를 수신받고, 상기 수신수단으로부터 직접적으로 데이터를 수신받고, 수신된 데이터의 유무 및 제어코드문자에 따라 소정시간 대기 후 에러처리하고, 상기 수신된 데이터에 따라 결과된 응답데이터를 전송하는 복수의 서브프로세스수단; 및 상기 서브프로세스수단으로부터 수신된 응답데이터의 전송순서를 정해서 순차적으로 전송하는 전송수단을 구비하는 것을 특징으로 하는 다중로봇제어를 위한 통신시스템.Receiving means for receiving data serially from an external device; Main process means for checking whether data is received by the receiving means at predetermined time intervals after initialization, receiving a received byte for a predetermined byte, detecting a service number, and calling a subprocess according to the detected service number; Receive the robot identifier from the main process to the corresponding sub-process when calling by the main process means, receive data directly from the receiving means, wait for a predetermined time according to the presence or absence of the received data and control code character, A plurality of subprocess means for transmitting the resultant response data according to the received data; And transmission means for sequentially determining the transmission order of the response data received from the sub-process means and sequentially transmitting the response data. 외부장치로부터 직렬로 데이터를 수신받고, 수신된 데이터를 래치하는 수신단계; 메인 프로세스를 초기화 하는 단계; 초기화될 경우 래치된 데이터를 소정 시간간격으로 체크하고, 수신 데이터의 유무를 판단하여 수신 데이터가 존재하지 않을경우 중앙처리장치의 로드를 해지하는 단계; 상기 수신데이터가 존재할 경우 메인프로세스로 수신 데이터중 선두부터 소정의 바이트만 순차적으로 독출하는 단계; 상기 단계에서 독출된 수신 데이터의 종류를 체크하여 서비스번호를 검출하는 단계; 상기 서비스번호에 따라 로봇제어를 위한 복수의 함수중 해당 함수를 호출하는 서비스 호출단계; 함수호출시 수신 데이터의 나머지 데이터를 독출하고, 독출된 데이터에 따라 소정의 서브프로세스를 수행하는 단계; 상기 서브프로세스 수행에 의해서 발생되는 응답데이터를 함수호출 순서에 따라 외부장치로 전송하는 단계를 구비하는 것을 특징으로 하는 다중로봇제어를 위한 통신방법.A receiving step of receiving data serially from an external device and latching the received data; Initializing the main process; Checking the latched data at a predetermined time interval when it is initialized, and determining whether there is received data to cancel loading of the central processing unit when there is no received data; Sequentially reading only predetermined bytes from the head of the received data to the main process when the received data exists; Detecting a service number by checking a type of the received data read in the step; A service call step of calling a corresponding function among a plurality of functions for robot control according to the service number; Reading the remaining data of the received data when the function is called, and performing a predetermined subprocess according to the read data; And transmitting response data generated by performing the subprocess to an external device in a function call order. 제 2 항에 있어서, 상기 메인 프로세스 초기화 단계는 초기화 동작을 두 번정도 수행하고, 두 번이상 실패할 경우 탈출하는 것을 특징으로 하는 다중로봇제어를 위한 통신방법.The communication method according to claim 2, wherein the main process initialization step performs an initialization operation twice and escapes when the main process fails more than two times. 제 2 항에 있어서, 상기 메인 프로세스에서 처리되는 수신 데이터의 통신 프로토콜은 헤드시작문자(SOH)와, 서비스시작번호(토큰)와, 에러제어문자들(errorH, errorH)과, 로봇식별자로 구성되는 것을 특징으로 하는 다중로봇제어를 위한 통신방법.The communication protocol of the received data processed in the main process comprises a head start character (SOH), a service start number (token), error control characters (errorH, errorH), and a robot identifier. Communication method for multi-robot control, characterized in that. 제 2 항에 있어서, 상기 메인 프로세스에서 수신 데이터의 유무체크는 50㎳ 시간 간격으로 수행되는 것을 특징으로 하는 다중로봇제어를 위한 통신방법.The communication method according to claim 2, wherein the presence or absence of received data in the main process is performed at 50 ms intervals. 제 2 항에 있어서, 상기 서브프로세스단계는 메인프로세스로부터 로봇식별자를 수신하는 단계와, 외부창치로부터 수신된 데이터를 직접 해당 함수로 독출하는 단계와, 데이터의 독출시 데이터의 수신여부를 판단하는 단계와, 상기 단계의 판단결과 소정시간동안 데이터가 수신되지 않을시 에러처리하고, 메인 프로세스로 복귀하는 단계와, 데이터 수신시 수신 데이터로에 소정의 제어코드문자가 존재하는지를 판단하는 단계와, 상기 제어코드문자가 존재할 경우 에러처리하고 메인 프로세스로 복귀하는 단계와, 데이터 수신시 제어코드문자가 존재하지 않을시 상기 수신된 데이터에 따른 소정 프로세스를 수행하고, 그것에 의해 발생되는 응답데이터를 전송모듈로 보내는 단계로 구성되는 것을 특징으로 하는 다중로봇제어를 위한 통신방법.The method of claim 2, wherein the subprocess comprises: receiving a robot identifier from a main process, directly reading data received from an external window into a corresponding function, and determining whether to receive data when reading data; And an error process when no data is received for a predetermined time as a result of the determination of the step, returning to the main process, and determining whether a predetermined control code character exists in the received data path when receiving the data; Error control and return to the main process if the control code character is present, and if there is no control code character when receiving data, performs a predetermined process according to the received data, and sends the response data generated by the transfer module Communication method for multi-robot control, characterized in that consisting of the sending step. 제 2 항에 있어서, 상기 전송단계는 서브프로세스 요구 순서에 따라 복수의 서브프로세스에서 보낸 각각의 응답데이터의 전송순번을 결정하기 위해 상기 응답데이터에 전송식별자를 부여하는 단계; 전송처리될 응답데이터의 전송 식별자가 기설정된 다음순번값과 일치하는지를 판단하는 단계; 상기 단계의 판단결과 일치하지 않을 경우 대기시키는 단계; 일치할 경우 뮤텍스 록체크를 실시하고, 상기 뮤텍스가 잠겨있으면 전송처리될 응답데이터를 소정시간 지연시킨 후 뮤텍스를 다시 체크하는 단계; 상기 뮤텍스가 해제되면 전송할 응답데이터를 포맷시키고, 뮤텍스를 잠그고, 송신하는 단계; 및 송신실시 후 다음순번값을 갱신하고, 다음 차례의 응답데이터가 전송모듈에 진입할 수 있도록 뮤텍스를 해제하는 단계를 구비하는 것을 특징으로 하는 다중로봇제어를 위한 통신방법.3. The method of claim 2, wherein the transmitting step comprises: assigning a transmission identifier to the response data to determine a transmission order of each response data sent from a plurality of subprocesses according to a subprocess request order; Determining whether the transmission identifier of the response data to be transmitted is matched with a preset next order value; Waiting if the determination result of the step does not match; Performing a mutex lock check if there is a match, and if the mutex is locked, delaying response data to be transmitted for a predetermined time and checking the mutex again; Formatting response data to be transmitted when the mutex is released, locking the mutex, and transmitting the response data; And releasing the mutex to update the next sequence value after transmitting and to release the next sequence of response data into the transmission module.
KR1019970010310A 1997-03-25 1997-03-25 Communication system and method for controlling multi-robot KR100206144B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019970010310A KR100206144B1 (en) 1997-03-25 1997-03-25 Communication system and method for controlling multi-robot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019970010310A KR100206144B1 (en) 1997-03-25 1997-03-25 Communication system and method for controlling multi-robot

Publications (2)

Publication Number Publication Date
KR19980074453A true KR19980074453A (en) 1998-11-05
KR100206144B1 KR100206144B1 (en) 1999-07-01

Family

ID=19500689

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019970010310A KR100206144B1 (en) 1997-03-25 1997-03-25 Communication system and method for controlling multi-robot

Country Status (1)

Country Link
KR (1) KR100206144B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020045148A (en) * 2000-12-08 2002-06-19 조정남 Apparatus for guarding equipments
KR100749806B1 (en) 2006-09-29 2007-08-17 한국전자통신연구원 A management-boat and work-robots in the waters based on wireless network and method of controlling it

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102617461B1 (en) * 2022-12-05 2023-12-27 쿠팡 주식회사 Electronic apparatus and unmanned mobile apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020045148A (en) * 2000-12-08 2002-06-19 조정남 Apparatus for guarding equipments
KR100749806B1 (en) 2006-09-29 2007-08-17 한국전자통신연구원 A management-boat and work-robots in the waters based on wireless network and method of controlling it
US7970493B2 (en) 2006-09-29 2011-06-28 Electronics And Telecommunications Research Institute Management ship and working robots in waters based on wireless network and working robot control method thereof

Also Published As

Publication number Publication date
KR100206144B1 (en) 1999-07-01

Similar Documents

Publication Publication Date Title
EP0784818B1 (en) Microprocessor programming using a state machine
US6208904B1 (en) General purpose data communications protocol converter
US5537558A (en) Apparatus and method for communicating multiple devices through one PCMCIA interface
US4602341A (en) Shared data logger controller and method
US5847659A (en) Electronic wiring system using automatic cyclic, communication means
US20050132037A1 (en) Programmable controller and communication interface therefor
KR100206144B1 (en) Communication system and method for controlling multi-robot
EP0336547B1 (en) Computer network and method for operating it
KR100278607B1 (en) system for transferring wafer cassette and method thereof
EP0886410A2 (en) Data communication method, data communication apparatus, and data communication program recording medium
US5481675A (en) Asynchronous serial communication system for delaying with software dwell time a receiving computer's acknowledgement in order for the transmitting computer to see the acknowledgement
EP0115348A2 (en) Remote initialization of interconnected communications stations
US5748893A (en) Network interface apparatus
EP0355856A1 (en) Daisy chain interrupt processing system
US4910732A (en) Onechip-computers as network-controller and computer
EP0649077B1 (en) Multiple-task controller
EP0378398B1 (en) Data processing system with means for detecting status of data processing device receiving commands
KR100401386B1 (en) Method of Controlling Interrupt Between Two Processors
JPH0318212B2 (en)
US6771656B1 (en) Communication right determination method, information processing apparatus use therefor, and computer-readable recording medium recorded with program for carrying out the method
US20030172137A1 (en) Communication controlling device, communication controlling method and image forming system
JPH04155566A (en) Down-load system
KR100413422B1 (en) Multiport controlling method in multiport controller
KR0136952B1 (en) Method of exchanging the data between a client and a server
KR200221933Y1 (en) Wire and wireless interfacing apparatus for computer

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20070329

Year of fee payment: 9

LAPS Lapse due to unpaid annual fee