Data acquisition and storage of Siemens 828D CNC system
-
摘要: 西门子828D数控系统是西门子的全数字化中高端数控系统。主要研究西门子机床自身的OPC UA,并开发符合OPC UA规范的客户端,利用该客户端获取变量的信息,通过Python开发的程序采集OPC UA服务器当中的数据,并将采集的数据处理后存储到MySQL数据库中。结果表明,在数据表的基础上,利用数据表区分功能减少的单表存储量,采用数据库的读写分离的架构,避免数据阻塞,从而提高了数据库的性能。Abstract: Siemens 828D CNC system is a full digital high-end CNC system . This paper mainly studies the OPC UA of Siemens machine tool itself, and develops a client that conforms to the OPC UA specification. Using the client to obtain the information of variables, the data in OPC UA server is collected through the program developed by python, and the collected data is stored in MySQL database after processing. The results show that on the basis of the data table, the single table storage is reduced by using the data table differentiation function, and the read-write separation architecture of the database is adopted to avoid data blocking, so as to improve the performance of the database.
-
Key words:
- OPC UA /
- data acquisition /
- MySQL database /
- data storage
-
表 1 系统变量
变量地址 变量名称 /Axis 轴变量 /Bag 方式组变量 /Channel 通道变量 /DriveVisa 驱动变量 /GUD GUD变量 /Hmi Hmi变量 /Random Plc变量 /Nck Nck变量 /Plc Plc变量 /SEA 通用设定数据 /TEA 通道设定数据 /Tool 刀具变量 表 2 客户端开发工具
工具名称 版本号 Python 3.7 PyCharm 2019 PyInstaller 3.4 PyQt5 5.11.3 OPC UA 0.98.7 QtDesigner 3.1 表 3 客户端主要功能
功能 描述 连接 连接OPC UA服务器 断开 断开OPC UA服务器 浏览 浏览OPC UA所有节点 读 读取该节点的所有属性 订阅 订阅当前节点 监测 显示当前节点的变化 表 4 主轴变量地址
变量名称 描述 主轴转速 ns=2;/Channel/Spindle/actSpeed 主轴转速倍率 ns=2;/s=Channel/Spindle/Speed Over 主轴负载率 ns=2;/s=Channel/Spindle/drivel Load 主轴进给速度 ns=2;/s=Channel/Spindle/act Feed Rate 主轴进给倍率 ns=2;/s=Channel/Spindle/Feed Rate over 主轴电流 ns=2;/s=Channel/Machine Axis/aa Cur -
[1] 史桂俊. OPC UA技术采集数据与模拟测试[J]. 信息系统工程, 2021(3): 83-84. doi: 10.3969/j.issn.1001-2362.2021.03.032 [2] 张宪民, 薛栋栋, 郑家和, 等. 智能制造中基于OPC UA的多源异构数据传输与解析技术[J]. 机电工程技术, 2021, 50(1): 1-7. doi: 10.3969/j.issn.1009-9492.2021.01.001 [3] 禹鑫燚, 殷慧武, 施甜峰, 等. 基于OPC UA的工业设备数据采集系统[J]. 计算机科学, 2020, 47(S2): 609-614. [4] 刘薇. 基于OPC UA的MES数据管理系统的研究[D]. 北京: 北京邮电大学, 2019. [5] 陈彦智. 基于OPC UA的机床运行状态数据可配置采集系统研究[D]. 重庆: 重庆大学, 2018. [6] 何雨婷. 基于OPC UA的智能生产线通信组件的设计与实现[D]. 沈阳: 中国科学院大学(中国科学院沈阳计算技术研究所), 2020. [7] 谢春秋, 余淑荣, 许正军, 等. 基于OPC UA的数控机床远程监控系统研究[J]. 机械设计与制造工程, 2017, 46(12): 51-53. doi: 10.3969/j.issn.2095-509X.2017.12.012 [8] 张弛, 吴明亮, 陆军强, 等. 基于OPC UA的828D数控机床群远程监控系统设计[J]. 机械制造与自动化, 2018, 47(6): 186-189. [9] 李金亮. OPC UA客户端访问与测试功能研究及开发[D]. 北京: 华北电力大学, 2011. [10] 董梁玉, 雷晓卫, 杜敏杰. 基于叉车可靠性强化试验远程监控系统的设计与实现[J]. 制造业自动化, 2021, 43(1): 43-47. doi: 10.3969/j.issn.1009-0134.2021.01.011 [11] 赵增辉, 冯旭. 基于OPC UA的自动化立体仓库监控系统设计[J]. 山西电子技术, 2021(3): 35-37. doi: 10.3969/j.issn.1674-4578.2021.03.012