摘要
为了解决PLC数据储存量低、查阅不便的问题,设计了一种基于单片机的PLC数据存系统,实现了PLC与U盘、移动硬盘等储存设备的数据传输与存储。设计了RS232和RS485共用同一串口的通信接口;基于ModBus通信协议实现了单片机与PLC的数据传输;使用CH376文件管理芯片,在U盘等储存设备里建立txt、doc等类型文件储存数据,方便桌面计算机对数据进行分析处理;利用DS1302实时时钟系统,以时间信息命名数据文件,实现了数据的长时间有序储存。
In order to solve the issue of low data storage capacity and data view inconvenience of PLC, a method based on SCM had been proposed to store data for PLC. It had been realized about the transmission and storage of data between PLC and U disk, hard disk or other storage devices. A serial communication interface had been designed for RS232 and RS485 to share the same serial port. SCM and PLC had been connected based on ModBus communication protocol. Data was been stored in the form of txt , doc or other files classes to make it easier for desk computer to analyze and process data. The long-term orderly storage of data had been solved by using time information to name data files based on DS1302 real time clock system.
出处
《电子技术应用》
北大核心
2014年第8期31-33,37,共4页
Application of Electronic Technique
基金
国家自然科学基金(50975126
51179076)