利来囯际W66

关注官方微信

中文.

Method of 645 meter send in JSON Format

Published Time:2019-09-06 Author:Shanghai ZLAN Views:6238
1. Summary

Previously, we have introduced the Modbus RTU instrument to implement cloud server in JSON format. Similar instruments that support 645 protocol can now send server in JSON format.

ZLAN realizes the 645 instrument to JSON gateway features as follows:

1. Provide upper computer protocols such as transparent transmission, MQTT, POST, GET, etc., combined with JSON format for transmission.

2. The lower computer fully conforms to GB version 645 protocol specification, supporting a gateway bus connection to 32 electricity meters.

3. The design method is complete and easy to use without professional programming knowledge.

There are various types of MQTT gateways in ZLAN, including the following types:

Equipment type Communication type Model
Device 4G+Etherent ZLAN8303-7 ↴
Device Ethernet ZLAN5143 ↴
Device Wifi + Ethernet ZLAN7144 ↴
Device Wifi ZLAN7146 ↴
Device Zigbee ZLAN9543+ZLAN9500 ↴
Device Lora ZLAN9743+ZLAN9700 ↴
Embedded module Embedded gateway module (Ethernet) ZLSN2043S ↴
Embedded module Embedded gateway module (wifi) ZLSN7046T ↴
Embedded module Embedded gateway module (wifi+Ethernet) ZLSN7044 ↴
Chip Gateway single chip ZLAN1043 ↴
2.645 Protocol to JSON
2.1. Configuration steps

Since the Modbus RTU to JSON configuration method has been described in JSON Data Acquisition Gateway, only a brief introduction will be given here. Use Zlvircom version 5.18 and above first. The configuration steps are as follows. In the device editing interface, click "Firmware and Configuration" button, enter the "Web page/Program Download" dialog box, select "Web Page Directory Download", select an empty directory, and then click "JSON Configuration".

JSON参数设置

Here is mainly to set the timing of the time interval, here is 10 seconds.

2.2.645 Configuration details

In the above "JSON to Modbus RTU Settings" dialog box, click "Add/View" to enter the 645 node configuration.

If we need to add forward active total electric energy, we can find the unit, data length, data format and identification number of forward active total electric energy by referring to the relevant data of 645 protocol, as shown in the table below:

645 Protocol content Data item name Unit Data length Data format Identification code
Agreement 645 example forward active total electric power kWh 4 XXXXXX.XX 9010
举例 电能
Corresponding zlvircom configuration parameter JSON keyword: ActiveTotalE Data after adding unit kWh 4 Decimal places 2 645 data type: 9010

It seems to us that how to fill in the configuration information according to the content of 645 protocol:

 645节点配置信息

1. Corresponding JSON keyword: This is the JSON keyword corresponding to the positive active total power in the data uploaded to the cloud, which is designed according to the requirements of the cloud. For example, ActiveTotalE in {" ActiveTotalE ":" 005190.77kwh "}.

2. Data source selection: Select 645 protocol here.

3. Device ID: This is the station number of the 645 meter, which can be obtained from the label of the table.

4. Data type: that is the identification code of 645 protocol, for example, the total forward active power is 9010.

5. Data length: Different identification codes have different lengths, please select after consulting the manual.

6. Number of decimal points reserved: THE data format of XXXXXX.XX is 2 decimal points.

7. Unit added after data: the unit kWh added after the uploaded data 005190.77.

8. The data is enclosed in quotation marks: i.e. "005190.77kwh". If not checked, there are no quotation marks.

9. Serial port polling interval: Since the baud rate of 1200bps is low, the query interval of 1000ms is generally required.

10. Design the next one: If there is still a 645 logo (i.e., JSON keyword), the designer needs to click "Design the next button"; otherwise, click "Complete the Design" button. A dialog box design an identity number +JSON keyword.

11. If you click "Complete design", then go back to the previous dialog box, click "Save JSON Settings", then go back to the previous dialog box, and click "Download" to download configuration information to the device. So the device will work the way it was designed. Of course, if you want to send to the cloud, you also need to change the working mode to "TCP client" in the "Device Settings" interface, fill in the server'S IP to "destination IP or domain name", and fill in the correct destination port.

2.3.645 to JSON test

Here we test this function on the computer with SocketDlgTest, a TCP debugging tool, and find that every 10 seconds we receive JSON data from the device, {" ActiveTotalE ":" 005190.77kwh "}, where the total positive active power of 005190.77kwh corresponds to the current data of the electricity meter.

读到的上传JSON格式

2.4. Summarize

The scheme and products introduced in this paper can realize the automatic acquisition and cloud docking of 645 electricity meters, and can be applied in the fields of energy saving, energy consumption monitoring and centralized meter reading.

利来囯际W66