Kim, Ki-Su
(School of Computer Information Engineering, Kunsan University)
,
Lee, Jong-Chan
(Dept. of Computer Information Engineering, Kunsan University)
,
Ha, Heon-Seong
(School of Computer Information Engineering, Kunsan University)
본 논문에서는 자동화 설비 장비의 HMI와 PLC간 RS232 통신 시에 발생하는 실시간 데이터 프레임의 수집을 위하여, 별도의 HMI 혹은 PLC의 수정 없이 MCU를 통하여 실시간 정보 데이터 프레임을 스니핑 함으로서, 사용자가 PLC, HMI 시스템의 수정 작업에 종속되지 않고 데이터를 수집할 수 있는 방법을 제안한다. 사용자는 스니핑 데이터로부터 파싱작업을 통하여 필요한 정보를 수집하고 해당 스니핑 프레임을 목적지로 송신함으로서 본래의 통신 인터페이스를 유지한다. RS232 통신규격으로 MCU의 UART통신 인터페이스 회로를 물리적으로 설계하고, 더불어 MCU내부 DMA장치를 사용함으로서 인터럽트기반 시스템 보다 효율을 개선한다. 또한 환형큐를 사용하여 DMA인터럽트 서비스 루틴의 작업과 메인 스레드의 작업을 논리적으로 분리함으로서 데이터 프레임 IO 작업 처리를 수행한다. 이 방법을 통하여, 사용자는 RS232 규격으로 HMI, PLC간 스니핑 데이터 프레임을 수신하고 PLC와 HMI 간의 프레임 전송이 원래의 목적지에 정상적으로 도착하며 PLC와 HMI의 추가적인 수정 없이 데이터 프레임을 스니핑 함으로서 사용자 시스템에 정상적으로 도착함을 확인할 수 있다.
본 논문에서는 자동화 설비 장비의 HMI와 PLC간 RS232 통신 시에 발생하는 실시간 데이터 프레임의 수집을 위하여, 별도의 HMI 혹은 PLC의 수정 없이 MCU를 통하여 실시간 정보 데이터 프레임을 스니핑 함으로서, 사용자가 PLC, HMI 시스템의 수정 작업에 종속되지 않고 데이터를 수집할 수 있는 방법을 제안한다. 사용자는 스니핑 데이터로부터 파싱작업을 통하여 필요한 정보를 수집하고 해당 스니핑 프레임을 목적지로 송신함으로서 본래의 통신 인터페이스를 유지한다. RS232 통신규격으로 MCU의 UART통신 인터페이스 회로를 물리적으로 설계하고, 더불어 MCU내부 DMA장치를 사용함으로서 인터럽트기반 시스템 보다 효율을 개선한다. 또한 환형큐를 사용하여 DMA인터럽트 서비스 루틴의 작업과 메인 스레드의 작업을 논리적으로 분리함으로서 데이터 프레임 IO 작업 처리를 수행한다. 이 방법을 통하여, 사용자는 RS232 규격으로 HMI, PLC간 스니핑 데이터 프레임을 수신하고 PLC와 HMI 간의 프레임 전송이 원래의 목적지에 정상적으로 도착하며 PLC와 HMI의 추가적인 수정 없이 데이터 프레임을 스니핑 함으로서 사용자 시스템에 정상적으로 도착함을 확인할 수 있다.
In this paper, collecting real-time data frames that occur during RS232 communication between an HMI and PLC of automation equipment by sniffing real-time information data frames through MCU without modification of the HMI or PLC, a method is proposed that allows users to collect data without being ...
In this paper, collecting real-time data frames that occur during RS232 communication between an HMI and PLC of automation equipment by sniffing real-time information data frames through MCU without modification of the HMI or PLC, a method is proposed that allows users to collect data without being dependent on the modification of PLC and HMI systems. The user collects necessary information from the sniffing data through the parsing operation, and the original communication interface is maintained by transmitting the corresponding sniffing frame to the destination. The MCU's UART communication interface circuit is physically designed according to the RS232 communication standard, and this additionally improves efficiency more so than an interrupt-based system by using the DMA device inside the MCU. In addition, the data frame IO operation is performed by logically separating the work of the DMA interrupt service routine from the work of the main thread using the circular queue. Through this method, the user receives the sniffing data frame between the HMI and PLC in RS232 format, and the frame transfer between PLC and HMI arrives normally at the original destination. By sniffing the data frame without further modification of the PLC and HMI, it can be confirmed that it arrives at the user system normally.
In this paper, collecting real-time data frames that occur during RS232 communication between an HMI and PLC of automation equipment by sniffing real-time information data frames through MCU without modification of the HMI or PLC, a method is proposed that allows users to collect data without being dependent on the modification of PLC and HMI systems. The user collects necessary information from the sniffing data through the parsing operation, and the original communication interface is maintained by transmitting the corresponding sniffing frame to the destination. The MCU's UART communication interface circuit is physically designed according to the RS232 communication standard, and this additionally improves efficiency more so than an interrupt-based system by using the DMA device inside the MCU. In addition, the data frame IO operation is performed by logically separating the work of the DMA interrupt service routine from the work of the main thread using the circular queue. Through this method, the user receives the sniffing data frame between the HMI and PLC in RS232 format, and the frame transfer between PLC and HMI arrives normally at the original destination. By sniffing the data frame without further modification of the PLC and HMI, it can be confirmed that it arrives at the user system normally.
* AI 자동 식별 결과로 적합하지 않은 문장이 있을 수 있으니, 이용에 유의하시기 바랍니다.
문제 정의
본 논문에서는 PLC, HMI간 통신의 프레임 획득을 할 수 있도록 Stm32F746IGT6 Cortax M7 MCU의 UART 주변장치를 사용하여 RS232통신을 구현한다. UART(Universal asynchronous receiver/transmitter)는 병렬 데이터의 형태를 직렬 방식으로 전환하여 데이터를 전송하는 컴퓨터 하드웨어의 일종이다.
점차적으로 수요가 증가되는 스마트팩토리 시스템에서 기존의 RS232 통신으로는, HMI와 같이 사용하던 자동화 설비 장비에서 PLC, HMI의 수정 없이는 사용자에게 실시간 데이터 송신이 불가능하다. 본 연구에서는 MCU의 DMA 기능을 활성화, 실시간 정보 데이터 프레임 스니핑, 그리고 환형큐를 활용한 데이터 프레임 IO처리 등을 통하여 시스템의 안정성 및 성능을 충족시켰다. 프로토콜의 파싱작업은 프로토콜 확인 작업과 더불어 소프트웨어로 로직 개발하는 번거로움이 남아있다.
기존의 설비 PLC, HMI 혹은 제어컨트롤 보드와 MES 간에 연동하기 위해서는 PLC, HMI 개발 업체 또는 제어컨트롤 보드 업체에 통신 인터페이스 개발을 별도로 의뢰해야 하고, 중도 업체가 도산을 하는 경우에는 MES와 기존 PLC, HMI 및 제이컨트롤의 연동이 불가 할 수도 있다. 본 연구에서는 PLC 및 HMI를 별도로 수정하지 않고 PLC, HMI 간 실시간 통신 정보 프레임(스니핑)을 획득 할 수 있는 방안을 제시한다. 2장에서 UART통신 및 DMA장치 관련 기술을 소개하고, 3장에서 MCU장치의 UART통신, DMA장치를 활용하여 사용자에게 스니핑 통신 프레임을 제공하는 구성을 직접 구현한다.
제안 방법
Fig. 11과 같이 On/Off만 가능한 비트 램프 오브젝트와 WORD 오브젝트를 추가하여 PLC의 비트주소와 워드 주소를 각각 사용 할 수 있도록 작화 작업을 하고 실험을 진행한다[10].
Fig. 12와 같이 HMI와 PLC간 통신 프레임을 RS232 규격으로 소프트웨어를 설계하고 최종 실시간 데이터 프레임을 사용자에게 송신 및 모니터링이 가능하도록 하였다. HMI에서 PLC간 통신 프레임을 MCU를 통하여 HMI <-> MCU <-> PLC로 데이터를 전송하여 원 데이터의 이동은 문제없이 통신이 되고 더불어 HMI <-> MCU -> Client 방향으로 데이터를 전송하여 사용자가 스니핑 데이터를 수신이 가능하도록 하였다.
HMI에서 PLC간 통신 프레임을 MCU를 통하여 HMI MCU PLC로 데이터를 전송하여 원 데이터의 이동은 문제없이 통신이 되고 더불어 HMI MCU -> Client 방향으로 데이터를 전송하여 사용자가 스니핑 데이터를 수신이 가능하도록 하였다.
타깃 MCU UART 통신의 파라미터 설정은 Baud_Rate 9600 Bits/s, 데이터 길이는 8Bits 패리티 None 스탑 비트 1로 설정한다[3]. UART1 global interrupt Enabled, DMA2 stream2 global interrupt Enabled 추가하여 인터럽트 기능을 활성화하고 프로그램 코드를 작성한다. UART3, UART6의 장치도 UART1과 파라미터는 동일하고, 프로그램 로직 구조는 Fig.
타깃 MCU는 최대 8개의 UART드라이버 장치를 포함하고 DMA기능을 지원한다. 본 논문의 타깃 MCU에서 UART1, UART3, UART6의 장치를 활용하고 추가적으로 2개의 수신 DMA 스트림 장치를 사용하여 시스템 개발 및 실험을 수행한다.
인터럽트 서비스루틴에서 환형큐를 활용하여 작업 간일처리의 분리를 진행함으로서, 인터럽트가 없을 시점에 메인 스레드에서 작업시간이 많이 필요로 하는 I/O작업을 수행하고 이를 통하여 사용자와 원 목적지로 데이터 프레임을 송신하였다. 사용자는 실시간 데이터 프레임을 확인하고 해당되는 프로토콜의 파싱작업을 통하여 자동화 장비의 실시간 정보를 얻을 수 있다.
HMI에서 PLC간 통신 프레임을 MCU를 통하여 HMI <-> MCU <-> PLC로 데이터를 전송하여 원 데이터의 이동은 문제없이 통신이 되고 더불어 HMI <-> MCU -> Client 방향으로 데이터를 전송하여 사용자가 스니핑 데이터를 수신이 가능하도록 하였다. 즉 사용자에게 송신이 불가능한 실시간 데이터 프레임을 MCU를 통하여 원 목적지로 송신하면서, 동시에 사용자에게 실시간 데이터 프레임을 송신하고 사용자는 수신한 데이터 프레임 프로토콜 파싱을 통하여 원하는 작업을 가능케 하였다.
대상 데이터
Table 1은 실제 Stm32F746IGT6 Cortax M7의 본 논문에서 사용되는 물리적 핀 설정 넘버, 타입, 기능을 표현 하였다.
기존 현장에 설치되어 있는 대부분의 PLC, HMI 혹은 제어컨트롤 보드는 MES 연동에 대한 부분이 고려되지 않아 정보 수집이 어렵거나 혹은 작업자 수기 등에 의한 방법으로 데이터를 수집한다. 작업자 수기의 방법은 데이터의 신뢰도가 떨어 질 수 있다.
본 논문의 실험 환경은 윈도우10, 터치 작화를 위한 Easyview Pro, PLC 래더 작화에 필요한 LS 산전 XG5000프로그램을 사용한다. PLC란 산업 환경에서 사용 되는 특별히 설계된 운영체제이고 논리, 시퀀스 타이밍, 카운터 등 사용자가 프로그래밍이 가능한 장비이다[7].
본 논문의 실험을 위하여 PLC는 LS산전의 XGK-CPUE 모델과 Easyview HMI IE 8071 7인치 터치 패널을 사용하였고, 통신 프레임 중계를 위한 타깃 MCU는 STmicrochips사의 STM32F746 MCU를 사용한다[4].
9과 같이 PLC Ladder를 작성하였다. 실험을 위해서는 비트영역과 워드영역이 필요하고 비트영역의 주소는 P00000, 워드영역의 주소는 D00000으로 Ladder 작업을 수행한다. Ladder의 0번째 줄의 로직은 0 혹은 1 또는 A 접점 NO(Normally Open) B접점 NC(Normally Close)으로 표현한다.
후속연구
프로토콜의 파싱작업은 프로토콜 확인 작업과 더불어 소프트웨어로 로직 개발하는 번거로움이 남아있다. 향후 자동화시스템의 통신 프레임을 MCU에서 프로토콜의 종류를 파악하여 사용자에게 알려주고 데이터 파싱로직을 추가 하여 사용자의 선택 사항으로 원하는 데이터를 바로 수신 받을 수 있도록 성능 개선을 위한 연구를 진행할 계획이다.
질의응답
핵심어
질문
논문에서 추출한 답변
인더스트리 4.0은 누구의 주도하에 진행되었는가?
0(industry 4.0)은 독일 총리가 주도하여 진행한 산업관련 정책이다. 이 정책은 제조업 같은 전통 산업에 IT 시스템을 결합하여 생산 시설들을 네트워크화하고 지능형 생산 시스템을 갖춘 스마트 공장(Smart Factory)으로 진화하자는 뜻을 가지고 있다[1].
인더스트리 4.0은 어떤 뜻을 지니고 있는가?
0)은 독일 총리가 주도하여 진행한 산업관련 정책이다. 이 정책은 제조업 같은 전통 산업에 IT 시스템을 결합하여 생산 시설들을 네트워크화하고 지능형 생산 시스템을 갖춘 스마트 공장(Smart Factory)으로 진화하자는 뜻을 가지고 있다[1]. 이를 위해 스마트팩토리의 전문적인 관리가 요구되고 있다.
MES는 무엇인가?
이러한 설비 데이터기반으로 실시간 현황 파악, 계획, 품질 관리 등 실제 이익을 측정 할 수 있는 MES(Manufacturing Execution System)와 같은 제조 실행시스템을 활발하게 현장에 도입 하고 있다[2]. MES란 원자재 투입부터 공정, 제품생산까지 생산의 모든 과정을 데이터로 기록하여 생산의 효율을 높일 수 있는 최적화된 정보를 제공하는 통합 생산 관리 시스템이다[2].
참고문헌 (10)
Jae-Jun Oh, Seong-Ju Choi, and Jin-Sa Kim, “Development of Multiple Wireless Communication Controller for Smart Factory Construction,” J. Korean Inst. Electr. Electron. Mater. Eng, Vol. 30, No. 9, pp. 602-608, September 2017 DOI: https://doi.org/10.4313/JKEM.2017.30.9.602
So Jeong Nam, Seung Woo Lee, Jai-Kyung Lee, "Behaviour Data Acquisition of Equipment in real-time by using PLC ," The Korean Society of Mechanical Engineers, pp. 2368-2371, November 2012
Jae-Jun Oh1, Seong-Ju Choi2, and Jin-Sa Kim3, “Development of Multiple Wireless Communication Controller for Smart Factory Construction,” J. Korean Inst. Electr. Electron. Mater. Eng, Vol. 30, No. 9, pp. 602-608, September 2017 DOI:https://doi.org/10.4313/JKEM.2017.30.9.602
Clive Seguna , Luke Tanti , Jeremy Scerri, Kris Scicluna, "A Low-Cost Real Time Monitoring System for an Industrial Mini-Climatic Chamber," IECON 2019 - 45th Annual Conference of the IEEE Industrial Electronics Society," pp. 14-17 Oct. 2019. DOI: 10.1109/IECON.2019.8927396
M. Martinez Flores et al., "Implementation of control algorithms in a climatic chamber", International Conference on Mechatronics Electronics and Automotive Engineering, pp. 107-112, 2016. DOI: 10.1109/ICMEAE.2016.028
G. Jayanthi ,S Arunachalam, K Praveen ,Krishnan PS Unni,"Cost Effective SCADA for Remote Monitoring and Control for Effective Process Automation Using HMI,"2018 International Conference on Power, Energy, Control and Transmission Systems (ICPECTS), pp. 22-23 Feb. 2018. DOI: 10.1109/ICPECTS.2018.8521608
P. K. Bhowmik ; S. K. Dhar,"Boiler gas burner management system automation using PLC," 2012 7th International Conference on Electrical and Computer Engineering, pp. 20-22, December 2012. DOI: 10.1109/ICECE.2012.6471702
P.K. Shadhu Khan ; Abdullah-Al-Noman ; Rajib Kumar Dey,"PLC based operation of three natural gas generator models- a learing aid for undergraduate students," IEEE Third International Conference on Power Systems Kharagpur, pp. 27-29, December 2009. DOI: 10.1109/ICPWS.2009.5442778
Hugh Jack, Automating Manufacturing Systems with PLCs. Version ,http://claymore.engineer.gvsu.edu/-jackh/books/plcs/
※ AI-Helper는 부적절한 답변을 할 수 있습니다.