Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
comfilehmi:hmi_connection_mcu:index [2026/02/11 02:16] – created admincomfilehmi:hmi_connection_mcu:index [2026/02/20 15:34] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== LS 산전 PLC (XGB시리즈)와 연결방법 (CNET 이용) ======+====== HMI와 MCU ======
  
-우선 아래 그림처럼 XGB PLC와 ComfileHMI를 연결세요XGB와 HMI 의 RS232C 포트를 사용하였습니다.+일반적으로 HMI는 PLC와 함께 사용는 것으로 알려져 있습니다PLC 대신 MCU (마이크로 콘롤러칩)보드를 사용한다면 획기적인 비용절감효과를 볼 수 있습니다.
  
-{{ :comfilehmi:hmi_connection_lsplc:ls_hmi.png?nolink |}}+이를 위해서, ComfileHMI는 MCU와 연결할 수 있는 Simple MODBUS 라는 프로토콜을 지원하고 있습니다.
  
-테스트를 하기 위해 XGB 레더 작화 프로그램인 XG5000 을 이용해서 아래와 같이 레더로직을 작성한 뒤 XGB PLC에 전송하였습니다(XG5000 사용법은 LS일렉트릭 홈페이지의 메뉴얼을 참조하시기 바랍니다.)+{{url>https://docs.google.com/presentation/d/e/2PACX-1vTvMuunCrVK2F264CCzlXrcOIF8Z_vJSdAeyLTWZvAzXYNViFKxTnLmiuK5WiJX75ATHIxt6CUYSmFf/embed?start=false&loop=false&delayms=30000 960,569}}
  
-{{ :comfilehmi:hmi_connection_lsplc:xg5000.png?nolink |}}+===== Simple MODBUS  =====
  
-===== 통신 셋팅 =====+  * [[..:simpleMODBUS:|simple MODBUS 란 무엇인가?]] 
 +  * [[simplemodbus_sourcedownload|simple MODBUS 표준 소스 다운로드 (STM32, AVR)]]
  
-프로젝트창에 보면 <내장Cnet>이라는 항목이 있습니다. 우클릭한 뒤 열기를 선택해주세요.+===== Simple MODBUS 사용예  =====
  
-{{ :comfilehmi:hmi_connection_lsplc:xg5000_2.png?nolink |}}+  * [[https://blog.naver.com/cubloc/221128873740|AVR MCU와 HMI 연결예 (소스 포함, BLOG)]] 
 +  * [[https://blog.naver.com/cubloc/221427153205|마이크로칩 PIC MCU 연결예 (소스포함, BLOG)]]
  
-아래 빨간색 박스친 부분의 설정을 바꾸세요. 테스트에 사용한 PLC 에서는 채널1이 RS232C입니다.+===== MCU와 RS232로 연결하는 방법 =====
  
-{{ :comfilehmi:hmi_connection_lsplc:xg5000_3.png?nolink |}} +MCU는 5V 또는 3.3V 레벨의 신호만을 취급하기 때문에, +/- 12V레벨로 변환한뒤 ComfileHMI와 연결해야 합니다.
-{{ :comfilehmi:hmi_connection_lsplc:xg5000_4.png?nolink |}}+
  
-XG5000 에서의 설정과정을 동영상으로 보세요. (XGB시리즈중 XBM-DN16S를 사용) +{{ :comfilehmi:hmi_connection_mcu:connectionmcu.png?nolink | }}
-{{ :comfilehmi:hmi_connection_lsplc:xgbcomfilehmi.gif?nolink |}} +
-===== Comfile Studio에서의 설정 =====+
  
-Comfile Studio선 LS ELECTRIC, XBM/XBC(LINK)를 선택하세요.+  * 5V 회로서는 MAX232를 사용해야 합니다. 
 +  * 3.3V 회로에서는 MAX3232를 사용해야 합니다.
  
-※ XEC일 경우는 XEC(LINK)를 선택하세요. 
  
-{{ :comfilehmi:hmi_connection_lsplc:lsplc.png?nolink |}} 
  
-다음과 같이 작화하였습니다. {{ :comfilehmi:hmi_connection_lsplc:lsproject.zip |}}+===== HMI의 프로젝트 통신 구성 ======
  
-{{ :comfilehmi:hmi_connection_lsplc:xg5000_6.png?nolink |}}+ComfileHMI Editor에서 <MCU>, <SIMPLE MODBUS>로 하세요.
  
-ComfileHMI 작화과정을 동영상으로 보세요. +{{ :comfilehmi:hmi_connection_mcu:mcusetting1.png?nolink |}}
-{{ :comfilehmi:hmi_connection_lsplc:xgbcomfilehmi2.gif?nolink |}}+
  
-최종동작모습 +===== HMI + MCU 실제 적용 사례 ======
- +
-<html> +
-<center> +
-<iframe width="560" height="315" src="https://www.youtube.com/embed/imiqWJz_nxc" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> +
-</center> +
-</html>+
  
 +{{ :comfilehmi:hmi_connection_mcu:sm1.png?nolink |}}
  
 [[comfilehmi:index#ComfileHMI_하드웨어|상위 페이지로 가기]] [[comfilehmi:index#ComfileHMI_하드웨어|상위 페이지로 가기]]