Skip to content

Modbus

Modbus is a serial communications protocol originally published by Modicon (now Schneider Electric) in 1979 for use with its programmable logic controllers (PLCs). Simple and robust, it has since become a de facto standard communication protocol, and it is now a commonly available means of connecting industrial electronic devices. The main reasons for the use of Modbus in the industrial environment are:

  • developed with industrial applications in mind
  • openly published and royalty-free
  • easy to deploy and maintain
  • moves raw bits or words without placing many restrictions on vendors

Projects

Simulators

데이터 타입

타입

설명

용도 예시

Coil (코일)

디지털 출력 (읽기/쓰기)

0 or 1
ON/OFF

모터 ON/OFF
밸브 열기/닫기
램프 제어

Discrete Input (이산 입력)

디지털 입력 (읽기만)

0 or 1
ON/OFF

버튼 상태
센서 감지
리미트 스위치

Holding Register (홀딩 레지스터)

아날로그 출력 (읽기/쓰기)

16bit 정수
-32768~32767

속도 설정값
온도 설정값
제어 파라미터

Input Register (입력 레지스터)

아날로그 입력 (읽기만)

16bit 정수
-32768~32767

온도 측정값
압력 측정값
전류/전압

Terms

코일(Coil)의 유래

코일(Coil) = 디지털 출력(Digital Output, DO)을 의미합니다.

"코일"이라는 용어는 옛날 릴레이 시대에서 유래했습니다:

전류 → [코일] → 자기장 발생 → 접점 ON/OFF

지금은 전자식이지만 용어는 그대로 사용합니다.

Function Code

공식 표준 Function Code (Public)

가장 일반적으로 사용되는 표준 코드들:

공식 표준 Function Code (Public)

FC

이름

설명

01

Read Coils

코일 상태 읽기

02

Read Discrete Inputs

이산 입력 읽기

03

Read Holding Registers

홀딩 레지스터 읽기

04

Read Input Registers

입력 레지스터 읽기

05

Write Single Coil

단일 코일 쓰기

06

Write Single Register

단일 레지스터 쓰기

15

Write Multiple Coils

다중 코일 쓰기

16

Write Multiple Registers

다중 레지스터 쓰기

확장 Function Code

추가 기능을 위한 표준 코드들:

확장 Function Code

FC

이름

설명

07

Read Exception Status

예외 상태 읽기

08

Diagnostics

진단

11

Get Comm Event Counter

통신 이벤트 카운터

17

Report Slave ID

슬레이브 ID 보고

20

Read File Record

파일 레코드 읽기

21

Write File Record

파일 레코드 쓰기

22

Mask Write Register

마스크 레지스터 쓰기

23

Read/Write Multiple Registers

다중 레지스터 읽기/쓰기

43

Read Device Identification

장치 식별 정보 읽기

사용자 정의 영역

제조사나 특수 용도로 정의 가능:

FC 65-72, 100-110: 사용자 정의 가능 영역

See also

Favorite site

기초적인 내용

스팩 샘플