Nhãn hiệu của chúng tôi

Impact-Company-Logo-English Black-01-177x54

Chào mừng bạn đến với Trang web của Schneider Electric

Chào mừng đến với trang web của chúng tôi.
		
Hôm nay chúng tôi có thể giúp gì cho bạn?
Using Command Line Diagnostics SCADAPack E Modbus Client – MODBUSDIAG

With the introduction of the Modbus Scanner in E-Series Utilities 8.12.4, the SCADAPack E is able to be a Modbus Master for Modbus RTU or Modbus/TCP Client protocols.

In cases where there might be a challenge communicating to a slave device, the Command Line Interface and MODBUSDIAG may be used to troubleshoot the Modbus communication protocol. The Diagnostic Command Line Interface can only be accessed via Telnet or a serial port configured as “CMD Line”. The example below will use “CMD Line” port mode.

Use the MODBUSDIAG command to filter Modbus protocol diagnostics when you are in a diagnostic display session and the RTU is operating as a Modbus RTU Master or a Modbus/TCP Client.

A Modbus RTU Master communicates with a Modbus RTU Slave using the Modbus RTU protocol over a serial port.
A Modbus/TCP Client communicates with a Modbus/TCP Server using the Modbus/TCP protocol over an Ethernet port, or using PPP/TCPIP over a serial port.

Hexadecimal format is used to display protocol data bytes.

To enter or return to a diagnostic display session, type DIAG at the command prompt.

Usage


MODBUSDIAG mode filter [filter ....]
Where:        mode = ENABLE DISABLE
Where:        filter = * TX RX ERROR TCP_CLIENT SERIAL_MASTER
Using diagnostics can impact system performance. As a result, you may want to disable diagnostics when not in use. The following system diagnostic filters can be individually enabled or disabled, and are retained in non-volatile memory.

FilterDescription
*Filters enabled or disabled.
TXDisplays Modbus protocol data transmitted by the Modbus RTU Master or Modbus/TCP Client.
RXDisplays Modbus protocol data received by the Modbus RTU Master or Modbus/TCP Client.
ERRORMessages displayed when there are communication interruptions between the RTU and the Modbus RTU Slave or Modbus/TCP Server. Message examples include no response, timeout, or connection success.
TCP_CLIENTDisplays receive and transmit data for the Modbus/TCP protocol when the RTU is operating as a Modbus/TCP Client.
SERIAL_MASTERDisplays receive and transmit data for the Modbus RTU protocol when the RTU is operating as a Modbus RTU Master.

Example


The system design will be as follows:

SCADAPackE Modbus Client

By connecting to the Command Line Interface port with a terminal program you can use the MODBUSDIAG command to see the Modbus messages to the slave device.

  1. Enable transmit and receive diagnostics on a serial port for MODBUSDIAG.

C:\>modbusdiag enable tx rx error serial_master
MODBUSDIAGS Enabled: TX RX ERROR SERIAL_MASTER

2. Start streaming diagnostics on the serial port (diag).

C:\>diag
Connecting to diagnostic display. Use <ESC> to disconnect
16:25:11.286  <--Outgoing Modbus RTU Request-  11 03 00 6B 00 03 76 87
16:25:11.353 -Incoming Modbus RTU Response-->  11 03 06 00 0F 00 59 00 2F 29 7B
16:25:12.298  <--Outgoing Modbus RTU Request-  11 03 00 6B 00 03 76 87
16:25:12.348 -Incoming Modbus RTU Response-->  11 03 06 00 0F 00 59 00 2F 29 7B
16:25:13.298  <--Outgoing Modbus RTU Request-  11 03 00 6B 00 03 76 87
16:25:13.365 -Incoming Modbus RTU Response-->  11 03 06 00 0F 00 59 00 2F 29 7B

The actual windows in the terminal program will look similar to this:

Putty

Putty

The following is a basic example on how to decode the messages.

Modbus Read Holding Registers (FC=03)

Request

This command is requesting the content of analog output holding registers # 40108 to
40110 from the slave device with address 17.

11 03 006B 0003 7687

11: The Slave Address (11 hex = address17 )
03: The Function Code 3 (read Analog Output Holding Registers)
006B: The Data Address of the first register requested. (006B hex = 107 , + 40001 offset = input #40108 )
0003: The total number of registers requested. (read 3 registers 40108 to 40110)
7687: The CRC (cyclic redundancy check) for error checking.

Response

11 03 06 AE41 5652 4340 49AD

11: The Slave Address (11 hex = address17 )
03: The Function Code 3 (read Analog Output Holding Registers)
06: The number of data bytes to follow (3 registers x 2 bytes each = 6 bytes)
000F: The contents of register 40108 = 15
0059: The contents of register 40109 = 89
002F: The contents of register 40110 = 47
297B: The CRC (cyclic redundancy check).

Use Cases


Understanding what the SCADAPack E is transmitting and what the SCADAPack E is receiving at the “byte” level can help ensure you are sending and receiving the expected data.
More details on the MODBUSDIAG command can be found in the SCADAPack E “Command Line and Diagnostics Commands” help section of the Technical Reference manuals installed with SCADAPack E Utilities. The SCADAPack E Configuration file used in this example is attached.

Schneider Electric Việt Nam

Phần đính kèm
334EModbusMasterDIAG.rtu [5.65 KB]
Tìm hiểu thêm
Sản phẩm:
Tìm hiểu thêm
Sản phẩm:

Bạn cần trợ giúp?

  • Công cụ chọn sản phẩm

    Nhanh chóng và dễ dàng tìm được sản phẩm và phụ kiện phù hợp cho các ứng dụng của bạn.

  • Nhận báo giá

    Bắt đầu gửi yêu cầu bán hàng trực tuyến và chuyên gia sẽ liên hệ với bạn.

  • Nơi mua hàng?

    Dễ dàng tìm nhà phân phối Schneider Electric gần bạn nhất.

  • Trung tâm Hỗ trợ

    Tìm sự hỗ trợ cho mọi nhu cầu của bạn tại một nơi.

  • Tài liệu về Sản phẩm
  • Tải xuống phần mềm
  • Công cụ chọn Sản phẩm
  • Thay thế và thay đổi sản phẩm
  • Trung tâm Hỗ trợ
  • Tìm Văn phòng của chúng tôi
  • Nhận báo giá
  • Tìm Nhà Phân phối
  • Cơ hội nghề nghiệp
  • Hồ sơ doanh nghiệp
  • Báo cáo hành vi sai trái
  • Khả năng truy cập
  • Phòng tin tức
  • Nhà đầu tư
  • EcoStruxure
  • Tìm việc
  • Blog
  • Chính sách bảo mật
  • Thông báo về Cookie
  • Điều khoản sử dụng
  • Change your cookie settings