news 2026/6/23 16:36:47

Linux上位机Windows上位机C++(QT)开发三菱上位机MC 1E 二进制通信 源码 C++快速实现三菱 MC 1E 二进制 支持三菱FX和A系列PLC A-1E 帧 国产化系统上位机

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
Linux上位机Windows上位机C++(QT)开发三菱上位机MC 1E 二进制通信 源码 C++快速实现三菱 MC 1E 二进制 支持三菱FX和A系列PLC A-1E 帧 国产化系统上位机

更多源码下载https://8ma.co/res/YBMV713F

<?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>MitsubishiPlc</class> <widget class="QWidget" name="MitsubishiPlc"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>1030</width> <height>646</height> </rect> </property> <property name="windowTitle"> <string>QT(C++)与三菱MC 1E 二进制协议通信</string> </property> <layout class="QGridLayout" name="gridLayout"> <item row="0" column="0"> <layout class="QVBoxLayout" name="verticalLayout" stretch="6,4"> <item> <layout class="QVBoxLayout" name="verticalLayout_2"> <item> <widget class="QWidget" name="widget" native="true"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="minimumSize"> <size> <width>0</width> <height>340</height> </size> </property> <widget class="QLineEdit" name="lineEdit_2"> <property name="geometry"> <rect> <x>460</x> <y>60</y> <width>81</width> <height>31</height> </rect> </property> <property name="text"> <string>6000</string> </property> </widget> <widget class="QLabel" name="label_4"> <property name="geometry"> <rect> <x>60</x> <y>140</y> <width>61</width> <height>16</height> </rect> </property> <property name="text"> <string>读地址:</string> </property> </widget> <widget class="QPushButton" name="bt_open"> <property name="geometry"> <rect> <x>570</x> <y>50</y> <width>91</width> <height>41</height> </rect> </property> <property name="text"> <string>连接</string> </property> <property name="type" stdset="0"> <string>primary</string> </property> </widget> <widget class="QLineEdit" name="lineEdit"> <property name="geometry"> <rect> <x>130</x> <y>60</y> <width>211</width> <height>31</height> </rect> </property> <property name="text"> <string>127.0.0.1</string> </property> </widget> <widget class="QLineEdit" name="lineEdit_4"> <property name="geometry"> <rect> <x>350</x> <y>130</y> <width>81</width> <height>31</height> </rect> </property> <property name="text"> <string>1</string> </property> </widget> <widget class="QLabel" name="label_2"> <property name="geometry"> <rect> <x>400</x> <y>70</y> <width>51</width> <height>16</height> </rect> </property> <property name="text"> <string>端口:</string> </property> </widget> <widget class="QLabel" name="label_5"> <property name="geometry"> <rect> <x>280</x> <y>140</y> <width>61</width> <height>16</height> </rect> </property> <property name="text"> <string>读数量:</string> </property> </widget> <widget class="QPushButton" name="bt_close"> <property name="geometry"> <rect> <x>690</x> <y>50</y> <width>91</width> <height>41</height> </rect> </property> <property name="text"> <string>断开</string> </property> <property name="type" stdset="0"> <string>danger</string> </property> </widget> <widget class="QLabel" name="label_3"> <property name="geometry"> <rect> <x>150</x> <y>10</y> <width>561</width> <height>31</height> </rect> </property> <property name="text"> <string>QT(C++)实现MC 1E 二进制协议与三菱PLC通信</string> </property> <property name="type" stdset="0"> <string>h3</string> </property> </widget> <widget class="QLabel" name="label"> <property name="geometry"> <rect> <x>60</x> <y>70</y> <width>61</width> <height>16</height> </rect> </property> <property name="text"> <string>IP地址:</string> </property> </widget> <widget class="QPushButton" name="bt_write"> <property name="geometry"> <rect> <x>620</x> <y>230</y> <width>130</width> <height>40</height> </rect> </property> <property name="text"> <string>写入short</string> </property> <property name="type" stdset="0"> <string>warning</string> </property> </widget> <widget class="QPushButton" name="bt_read"> <property name="geometry"> <rect> <x>120</x> <y>230</y> <width>130</width> <height>40</height> </rect> </property> <property name="text"> <string>short读取</string> </property> </widget> <widget class="QLineEdit" name="lineEdit_3"> <property name="geometry"> <rect> <x>130</x> <y>130</y> <width>121</width> <height>31</height> </rect> </property> <property name="text"> <string>D100</string> </property> </widget> <widget class="QLabel" name="label_6"> <property name="geometry"> <rect> <x>130</x> <y>100</y> <width>751</width> <height>21</height> </rect> </property> <property name="text"> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;位地址支持&lt;span style=&quot; color:#008000;&quot;&gt;X、Y、M、F、B&lt;/span&gt;,字地址支持&lt;span style=&quot; color:#008000;&quot;&gt;D、W、R&lt;/span&gt;,位的读取如M10,字的读写如D100&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> </property> </widget> <widget class="QPushButton" name="bt_readBool"> <property name="geometry"> <rect> <x>120</x> <y>180</y> <width>130</width> <height>40</height> </rect> </property> <property name="text"> <string>bool读取</string> </property> </widget> <widget class="QPushButton" name="bt_readInt"> <property name="geometry"> <rect> <x>120</x> <y>280</y> <width>130</width> <height>40</height> </rect> </property> <property name="text"> <string>int读取</string> </property> </widget> <widget class="QLabel" name="label_10"> <property name="geometry"> <rect> <x>550</x> <y>140</y> <width>61</width> <height>16</height> </rect> </property> <property name="text"> <string>写地址:</string> </property> </widget> <widget class="QLabel" name="label_11"> <property name="geometry"> <rect> <x>750</x> <y>140</y> <width>41</width> <height>16</height> </rect> </property> <property name="text"> <string>写值:</string> </property> </widget> <widget class="QLineEdit" name="lineEdit_5"> <property name="geometry"> <rect> <x>810</x> <y>130</y> <width>81</width> <height>31</height> </rect> </property> <property name="text"> <string>1</string> </property> </widget> <widget class="QLineEdit" name="lineEdit_6"> <property name="geometry"> <rect> <x>610</x> <y>130</y> <width>121</width> <height>31</height> </rect> </property> <property name="text"> <string>D100</string> </property> </widget> <widget class="QPushButton" name="bt_write_2"> <property name="geometry"> <rect> <x>620</x> <y>180</y> <width>130</width> <height>40</height> </rect> </property> <property name="text"> <string>写入bool</string> </property> <property name="type" stdset="0"> <string>warning</string> </property> </widget> <widget class="QPushButton" name="bt_write_3"> <property name="geometry"> <rect> <x>620</x> <y>280</y> <width>130</width> <height>40</height> </rect> </property> <property name="text"> <string>写入Int</string> </property> <property name="type" stdset="0"> <string>warning</string> </property> </widget> <widget class="QPushButton" name="pushButton_35"> <property name="geometry"> <rect> <x>870</x> <y>10</y> <width>121</width> <height>41</height> </rect> </property> <property name="text"> <string>源码下载</string> </property> <property name="type" stdset="0"> <string>primary</string> </property> </widget> </widget> </item> </layout> </item> <item> <widget class="QListWidget" name="listWidget"/> </item> </layout> </item> </layout> </widget> <layoutdefault spacing="6" margin="11"/> <resources/> <connections/> </ui>

三菱FX 系列A 系列PLC 在使用MC 协议(MELSEC Communication Protocol)时,通常采用的是A 兼容 1E 帧(A-1E),而不是 QnA-3E。


✅ 正确对应关系如下:

PLC 系列推荐使用的 MC 协议帧格式说明
FX 系列(如 FX3U、FX5U 等)A-1E 帧(A兼容1E)FX3U 需加装以太网模块(如 FX3U-ENET-ADP),使用 A-1E;FX5U 内置以太网,可支持 QnA-3E,但传统上仍常按 A-1E 处理。
A 系列A-1E 帧A 系列是早期产品,仅支持 A-1E 帧格式。
Q 系列 / L 系列 / iQ-R / iQ-FQnA-3E 帧(或 4E)新一代 PLC,支持更广地址范围和更多数据类型。

🔍 补充说明:

  • A-1E 帧

    • 属于较早期的 MC 协议格式。
    • 仅支持有限地址范围,例如:
      • D 寄存器:D0~D6143、D9000~D9255
      • 不支持扩展寄存器(如 D10000+)
    • 通常使用二进制格式(Binary)通信。
    • 适用于 FX(带以太网模块)、A 系列。
  • QnA-3E 帧

    • 更现代、功能更强。
    • 支持D0~D12287甚至更大范围(依型号而定)。
    • 支持位/字随机读写、浮点数、批量操作等高级功能。
    • FX5U 虽属 FX 系列,但因内置以太网且架构升级,官方文档明确支持 QnA-3E
  • 如果你使用的是FX3U + 以太网模块A 系列 PLC→ 使用MC A-1E 协议
  • 如果你使用的是FX5U、Q 系列等新型 PLC→ 推荐使用MC QnA-3E 协议
版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/6/19 21:00:33

Kotaemon AWS EC2部署实例:国际业务首选

Kotaemon AWS EC2部署实例&#xff1a;国际业务首选 在跨国企业加速数字化转型的今天&#xff0c;客户对智能客服系统的期待早已超越“能回答问题”这一基础要求。他们希望获得准确、连贯且符合本地语境的服务体验——而这背后&#xff0c;是一整套复杂技术栈的协同运作。尤其当…

作者头像 李华
网站建设 2026/6/22 16:33:11

实在没货,简历(软件测试)咋写?

简历咋写&#xff0c;这是很多没有【软件测试实际工作经验】的同学们非常头疼的事情。 简历咋写&#xff1f;首先你要知道简历的作用。 简历的作用是啥呢&#xff1f;一句话就是&#xff1a;让HR小姐姐约你。 如何让HR看你一眼&#xff0c;便相中你的简历&#xff0c;实现在…

作者头像 李华
网站建设 2026/6/23 2:12:58

网约车服务端线上流量巡检与测试验收技术

网约车服务端承接了网约车核心交易流程整体链路串联工作&#xff0c;其涵盖交易细粒度的场景达百万级别&#xff0c;核心交易链路涉及几百个下游服务。这督促我们的质量保障手段要粗细结合&#xff0c;既能保障核心业务的服务可用性&#xff0c;又要保障海量用户场景的正确运行…

作者头像 李华
网站建设 2026/6/20 18:22:20

公考日记7

乘法&#xff1a;

作者头像 李华
网站建设 2026/6/23 1:36:24

科研实验室温湿度监控新范式:以太网 POE 技术全场景解决方案

科研实验室利用以太网POE供电温湿度传感器进行温湿度监控系统的方案设计需要考虑哪些因素&#xff1f;结合科研实验室的场景特殊性、POE 技术特性及温湿度监控的核心需求&#xff0c;方案设计需重点考虑以下8 大核心因素&#xff0c;覆盖技术选型、场景适配、系统稳定性、合规性…

作者头像 李华