이 페이지는 기계 번역을 사용하여 번역되었습니다. 영어 원문을 보려면 여기를 클릭하십시오.
Modbus 통신
Industrial Communication Toolbox™는 TCP/IP 또는 직렬 RTU 프로토콜을 통해 Modbus 인터페이스를 지원합니다. 이 인터페이스를 사용해 Modbus 서버와 통신하여 PLC 제어, 온도 조절기와의 통신, 스테퍼 모터 제어, DSP로의 데이터 전송, PAC 제어기로부터의 대용량 메모리 읽기, Modbus 프로브의 온도 및 습도 모니터링과 같은 작업을 수행할 수 있습니다.
modbus 함수를 사용하여 Modbus 인터페이스 객체를 생성하고, read, write, writeRead, maskWrite 함수를 사용하여 통신합니다.
PLC에서 레지스터를 읽는 전체 워크플로를 보여주는 예제는 원격 온도 센서에서 온도 읽어오기 항목을 참조하십시오.
툴박스에는 읽기 및 쓰기를 손쉽게 설정할 수 있는 사용자 인터페이스와, 값을 확인할 수 있는 라이브 플롯(실시간 그래프)을 제공하는 Modbus 탐색기 앱도 포함되어 있습니다. 자세한 내용은 Modbus 탐색기 앱 사용 항목을 참조하십시오. 앱을 사용하여 PLC에 읽고 쓰는 전체 워크플로를 보여주는 예제는 Control a PLC Using the Modbus Explorer 항목을 참조하십시오.
Simulink®의 Modbus 클라이언트 블록을 사용하면 Modbus TCP/IP 또는 직렬 서버에서 데이터를 읽거나 쓸 수 있습니다. 예제로는 Simulink의 Modbus Client 블록을 사용하여 원격으로 물의 pH 제어 항목을 참조하십시오.
블록
| Modbus Client Read | Read data from Modbus server (R2024b 이후) |
| Modbus Client Write | Write data to Modbus server (R2024b 이후) |
함수
앱
| Modbus 탐색기 | Modbus 코일 및 레지스터에 읽기 및 쓰기 |
도움말 항목
Modbus 프로그래밍 방식 워크플로를 사용한 통신
- Modbus 인터페이스 지원 기능
Industrial Communication Toolbox Modbus 지원을 사용하여 TCP/IP 또는 직렬 RTU를 통해 Modbus 서버 및 애플리케이션과 통신합니다. - Modbus 연결 만들기
modbus함수를 사용하여 Modbus 객체를 생성하고, 이를 Modbus 인터페이스에 연결합니다. - Read Data from a Modbus Server
Use themodbusobject to read coil, input, and register data from the Modbus server. - 원격 온도 센서에서 온도 읽어오기
TCP/IP를 통해 연결된 PLC에서 원격 센서의 온도 및 습도 측정값 읽어오기 - Write Data to a Modbus Server
Use themodbusobject to write coil and holding register data to the Modbus server. - Write and Read Multiple Holding Registers
Perform a combination of one write operation and one read operation on groups of holding registers in a single Modbus transaction. - Modify Contents of Holding Register Using Mask Write
Apply AND and OR masks to the current contents of a holding register.
Simulink를 사용한 Modbus 통신
- Simulink에서 Modbus 클라이언트 구성
모델에 맞게 Modbus 클라이언트를 구성합니다. (R2024b 이후)
Modbus 탐색기를 사용한 Modbus 통신
- Modbus 탐색기 앱 사용
Modbus 탐색기 앱을 사용하여 코일과 레지스터를 읽고 쓸 수 있습니다. - Configure Connection in Modbus Explorer
Configure communication with the device, either over TCP/IP or Serial RTU. - Read Coils, Inputs, and Registers in Modbus Explorer
Read coils, inputs, input registers, and holding registers, similar to the functionality of the Modbusreadfunction. - Write to Coils and Holding Registers in Modbus Explorer
Write to coils and holding registers, similar to the functionality of the Modbuswritefunction. - Control a PLC Using the Modbus Explorer
Perform reads and writes to a PLC using the Modbus Explorer. - Generate a Script from Your Modbus Explorer Session
Generate a MATLAB® script from your session to run at the command line.
문제 해결
Troubleshooting the Modbus Interface
Try these tips if you have problems using the toolbox Modbus interface. See information about Modbus supported platforms, configuration and connection, and other interface-specific tips.

