当前位置: 首页 > news >正文

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 协议
http://www.gsyq.cn/news/123048.html

相关文章:

  • 1d 人工势场法路径规划Matlab代码实战
  • 图论
  • Python - dataclass
  • 云计算与边缘计算:未来数字化转型的关键驱动力 - 实践
  • 文献可视化分析期末复习与应用研究:基于知识图谱的核心概念与实践方法探讨
  • SIGSEGV段错误排查全攻略
  • AI元人文构想的理论构建过程与深层意义分析(二)
  • C++输入输出(cin和cout)的用法
  • 实用指南:LeetCode算法日记 - Day 107: 最长重复子数组
  • 【Agent】MemOS 源码笔记---(6)---MemScheduler -- 总体
  • 三菱PLC与组态王打造饮料自动装箱机控制系统
  • 【Nature Communications‘24‘06】预训练多模态大语言模型经过 SkinGPT-4 提升皮肤病学诊断能力
  • 品牌营销战略策划公司选哪家靠谱?奇正沐古 - 资讯焦点
  • 幻方的 “已知” 与 “未知”:三阶唯一解、多阶构造及未解之谜
  • 宪法守护童年:向霸凌和诈骗说“不” - 资讯焦点
  • Neo4j启动
  • 2025年郑州头部吊顶式空调机组设计多少钱,空气幕/表冷器/卧式暗装风机盘管/吊顶式空调机组/工业暖风机吊顶式空调机组采购找哪家 - 品牌推荐师
  • 2025年嘉兴排行前列的卧式暗装风机盘管采购多少钱,卡式风机盘管/吊顶式空调机组/空气幕/消防排烟防火阀卧式暗装风机盘管采购怎么选择 - 品牌推荐师
  • 无代码解决方案:解锁数字化转型的普惠路径
  • Oracle索引技术:理论与实操全解析
  • 深入理解Golang并发模型与CSP理论
  • 23、Samba使用与SSL配置全解析
  • 人工智能如何改变 Anthropic 的工作方式
  • 代码之恋(第十四篇:分叉的路径与意外的Push)
  • SpringSecurity授权原理与实战
  • 告别API碎片化!用AI Ping获取MiniMax-M2、GLM-4.6与Kimi-K2
  • 100G双光口网卡技术解析:Intel E810-CAM2方案的性能与应用突破
  • 2025.12.18博客
  • 刚刚,Gemini 3 Flash 正式上线!位置稳居第一!
  • 2025年杨浦服务好的宠物医院哪家靠谱推荐,母狗绝育/猫咪绝育/狗狗绝育/宠物绝育/宠物体检/宠物内科/宠物皮肤科/宠物医院宠物医院最好的 - 品牌推荐师