本文将以诺派电表作为采集对象,使用海创微联采集控制系统对电压电流灯数据进行采集,然后将采集到的数据上传到海创物联网平台,海创物联网平台将数据实时可视化。 文章分为3部分: 诺派电表的介绍:设备的连线,串口服务器IP和端口的配置。 海创微联采集控制系统的使用:控件的部署,采集节点的使用。 海创物联网平台的使用:产品和设备的创建,数据可视化。
一、诺派电表
1. 设备连线 首先先介绍一下设备的连线,诺派电表上方由电源供电,使用modbus协议通讯,485线传输数据,连接着串口服务器,串口服务器再用网线连接交换机,这样就可以通过以太网采集到电表数值了。 单元ID和采集量的地址需要查看使用说明书。 2. 修改IP地址和配置端口 接着我们要给串口服务器分配一个IP地址和端口,打开分配的软件ZLVirCom,点击设备管理。
找到连接串口服务器端口,双击进去,就可以分配IP地址和端口了(还的波特率停止位等等)。
二、海创微联采集控制系统
使用海创微联采集控制系统对电表数据进行采集。
打开海创微联采集控制系统,从左边的采集引擎中modbus控件,再拖出一个定时器一个调试器。
按下图连接。
modbus配置如下,地址和端口就是串口服务器配置的地址和端口,通讯模式Teinet。
功能码为FC3,添加10个采集量(功能码、单元ID、采集地址、算法需要查看设备的说明书),具体如下(标识符应使用字母,这里为了展示方便用了中文,上传云端时会改成字母)。
定时器配置为周期10s发送一次请求。
配置完成后,点击部署。
调试界面显示周期10s采集的电表数据。
成功电表数值进行采集了,文章末尾附上快速复用码,导入便可快速部署。
三、海创物联网平台
海创物联网平台能够与海创微联采集控制系统进行联动,将采集到的数据可视化。
1. 产品和设备的创建 登录海创物联网平台,依次点击设备管理-产品-创建产品。
然后在该产品下创建一个设备,操作顺序如下图。
2. 采集量的定义 回头查看刚刚创建的产品,在功能定义中,自定义功能中添加采集量。
注:标识符一定要和采集引擎中的标识符一致,功能名称无所谓。
查看创建的设备,能看到3个唯一标识,产品标识(ProductKey)、设备标识(DeviceKey)、设备密钥(DeviceSecret)。
3. 可视化
回到海创微联采集控制系统,在物联网云平台中拖出海创IOT,输入3个唯一标识,点击部署。
海创IOT显示连接成功,刷新一下页面设备会显示在线。
回到海创物联网平台,在设备的运行状态中就可以实时显示电表数据了。
想了解产品更多内容和获取产品软件欢迎查看官网介绍 :海创物联网 www.gkiiot.com,或者扫描下方的二维码添加。
四、附录
快速复用码
[{"id":"196f69cf.f153e6","type":"iot-modbus","z":"f44b13c4.ed86c","name":"","server":"4faa5a15.f2e274","fc":"HoldingRegister","columns":[{"Key":"有功电能总和","Label":"有功电能总和","UnitId":"5","Address":"1","Quantity":"1","ValueType":"Int16BE","Arithmetic":"%s/10"},{"Key":"电压","Label":"电压","UnitId":"5","Address":"2","Quantity":"1","ValueType":"Int16BE","Arithmetic":"%s/100"},{"Key":"电流","Label":"电流","UnitId":"5","Address":"3","Quantity":"1","ValueType":"Int16BE","Arithmetic":"%s/1000"},{"Key":"有功功率","Label":"有功功率","UnitId":"5","Address":"5","Quantity":"1","ValueType":"Int16BE","Arithmetic":"%s/10"},{"Key":"视在功率","Label":"视在功率","UnitId":"5","Address":"7","Quantity":"1","ValueType":"Int16BE","Arithmetic":"%s/10"},{"Key":"无功功率","Label":"无功功率","UnitId":"5","Address":"9","Quantity":"1","ValueType":"Int16BE","Arithmetic":"%s/10"},{"Key":"频率","Label":"频率","UnitId":"5","Address":"11","Quantity":"1","ValueType":"Int16BE","Arithmetic":"%s/100"},{"Key":"功率因素","Label":"功率因素","UnitId":"5","Address":"12","Quantity":"1","ValueType":"Int16BE","Arithmetic":"%s/1000"},{"Key":"输入有功电能","Label":"输入有功电能","UnitId":"5","Address":"13","Quantity":"1","ValueType":"Int16BE","Arithmetic":"%s/10"},{"Key":"输出有功电能","Label":"输出有功电能","UnitId":"5","Address":"15","Quantity":"1","ValueType":"Int16BE","Arithmetic":"%s/10"}],"x":475,"y":280,"wires":[["b4bc1d56.d0c14"]]},{"id":"f1526cf0.defec","type":"inject","z":"f44b13c4.ed86c","name":"","topic":"","payload":"","payloadType":"date","repeat":"10","crontab":"","once":false,"onceDelay":0.1,"x":315,"y":280,"wires":[["196f69cf.f153e6"]]},{"id":"b4bc1d56.d0c14","type":"debug","z":"f44b13c4.ed86c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":635,"y":280,"wires":[]},{"id":"4faa5a15.f2e274","type":"iot-modbus-client","z":"","name":"","clienttype":"Modbus-TCP","host":"192.168.7.203","post":"4196","tcptype":"Telnet","serialport":"COM1","serialtype":"RTU-Buffered","baudrate":"9600","databits":"8","stopbits":"1","parity":"None","unitid":"5","timeout":"2000","sleep":"80","showActivity":true}]
|