Page 2
No part of this manual may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or through information storage and retrieval systems, for any purpose other than for the purchaser’s personal use, without the express written permission of Shanghai ZLAN information Technology Co., Ltd.
Content Summary ..........................5 Function Features ........................ 7 General Software Features ..................7 Advanced Software Function ................8 Technical Parameters ......................9 Hardware Instruction ......................10 Wifi Function ........................13 AP Mode ........................13 STA Mode........................17 5.8G Usage ....................... 17 Wifi Connection in pairs ..................
Page 4
Multi-host Parameter ..................... 52 Non-storage Multiple Hosts ................. 54 Modbus Under Multi-destination IP ..............54 Slave Station Under Client Mode ............... 55 Registration Pack and Heartbeat Pack ..............56 10.1 Registration Packet ....................57 10.1.1 Connect to send MAC Addresses ............57 Realcom Agreement ..................
Tel: +86-17321037177 http://www.zlmcu.com 1. Summary ZLAN7146 is another serial device server launched by Shanghai ZLAN after ZLAN7100, ZLAN7142 and ZLAN7144. 7146 adopts the latest WIFI chipset, which has stronger WIFI performance and higher cost performance. Use ARM M4 kernel, main frequency 192MHz, and use real-time operating system.
Page 6
ZLAN7146, then connect ZLAN7146 to wireless network through the WIFI. Then any data sent by serial device will be transparently transferred to the PC designated by ZLAN7146, and data sent to ZLAN7146 from PC via network will also be transparently transmitted to the serial device.
CTS/RTS and software flow control XON/XOFF. 4) Sticky package optimization, the real-time of serial framing is strong. The serial packet sub-package interval of ordinary WIFI serial port server is over 100ms, ZLAN7146 is optional 1ms~100ms, resolution precision is greatly improved.
Virtual serial port supports data monitoring. 2.2 Advanced Software Function The 4 in ZLAN7146 means it supports advanced software function, including: 1) Support Modbus gateway function, support Modbus RTU to Modbus TCP. Can support storage Modbus, and can automatically collect the equipment data. Also...
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com 2) Support for multiple hosts: the network port allows multiple computers to access the same serial port device at the same time in ask-answer query mode. 3) Support for custom heartbeat and registration package features: easy to do communication with the cloud and device identification.
-45~165℃ Humidity: 5~95%RH 4. Hardware Instruction The front view of ZLAN7146 WIFI serial server is shown in Figure 3. ZLAN7146 uses black anti-radiation SECC board. Left and right are with two "ears" to facilitate the installation. Size: L × W × H = 9.4cm × 6.5cm × 2.5cm...
Page 11
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Figure 3 7146 Front View Panel Light: ACT: ACT lights up when green indicates that data is normally transferred between WIFI/Ethernet and RS232/485/422. When the ACT light blinks blue, it indicates that data has been returned from RS232/485/422 to WIFI/Ethernet. If the data is short then blue flashing time is relatively short, need to pay attention to view.
Page 12
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Figure 4 Front Interfaces of 7146 The serial interfaces in front of the server area shown in Figure 4, from left there have: Ethernet port: standard RJ45 interface R-, R+, T+, T-: where T+ is RS485A, T- is RS485B; if you need RS422, you can connect these four lines.
Do not plug the cable, put 7146 power on. After a while you can see WIFI_WORK light began to flash, indicating the wifi function has been normal. By default 7146 is in AP mode and SSID is "ZLAN". See "ZLAN" in the wifi list of PC, connect the wifi.
Page 14
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Figure 6 Search for ZLAN hotspots After connecting the laptop, you can automatically get an IP address from 7146. Click ZLVircom software "Device Manage" button, you can see a line in the device list, found 7146 device.
Page 15
Figure 8 Device Parameter Settings dialog box Here you can see one of the device model ZLAN7146, ZLSN7044 and so on. Here you can also configure the IP address and baud rate, the meaning of these parameters will introduce after. Please click on "More Advanced Settings", you can configure the 7146 wifi parameters in the open dialog box.
Page 16
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Name Option Values Instruction WIFI Work Wireless AP: 7146 can be as a Mode hotspot connected notebooks, mobile phones, etc., mainly for using the configuration in the first time. ...
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Relay and wifi interworking. Valid for 7146. If the 7146 as AP mode, it has two types password and no password. No password mode you just select "no encryption" type; password method is recommended to use WEP128 encryption, the password length is of 13 bytes.
When the 2 7146 establish connection via wifi, WIFI_LINK light will be on. 5.5 Antenna Choose If you choose to use the built-in antenna module, no need external antenna, if you need an external antenna you need to meet the following characteristics, ZLAN can provide external antenna. Impedance...
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Table 2 ZLVircom Version Software Description ZLVircom Device Management Tool This version no have the virtual serial (free-installation version) port function ZLVircom Device Management Tool This version has the ZLVircom_x64.msi (installation version) and ZLVircom_x86.msi.
Page 20
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Figure 10 ZLVircom Main Interface Figure 11 Device List From the device list, you can see all of the current online devices, and you can search for devices that are not in one network segment. There is no need to use...
Page 21
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com the "Add Manually" function. Click the “Edit Device” to configure the device parameters. Figure 12 Device Parameters In this interface, the user can set the parameters of the device, then click "Modify Setting", and the parameters are set to the flash of the device, with power-off no...
Page 22
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Dev Type Show only the model of the core module Dev Name You can give the device a readable name, with a maximum of 9 bytes, and support the Chinese name.
Page 24
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com heartbeat. (2) Set to 0~254, when transformation protocol choose REAL_COM protocol, the device will send a length of 0 to 1 content data for every " keep alive time " to implement the heartbeat mechanism of Realcom.
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Domain name system The destination IP can be the domain name (such as the beginning of the WWW server address). REAL_COM protocol It is a non-transparent transmission serial device server protocol, which is suitable for the binding of virtual serial port through Internet.
Page 26
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Figure 13 TCP communication diagram Now suppose the PC COM port (USB to RS232 line) connect with serial port of serial device server, then open the serial debugging assistant ZLComDebug, and open the corresponding COM as figure 14;...
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com 6.5 Virtual serial port test SocketTest in figure 13 communicates directly with the serial port server through TCP. In order to enable users to communicate with the serial port server with the developed serial port software, it is necessary to add a virtual serial port between the user program and the serial port server.
Page 29
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Figure 17 Add Virtual Serial Port Then enter the “device manage”, and double-click the device that you need to bind to the COM5. As shown in FIG. 12, select COM5 from the "virtual serial port" list in the upper left corner.
Page 30
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Figure 18 Virtual Serial Port has been connected Now close the before SocketTest and open a new ZLComdebug as the user's serial port program, now open COM5. At this point, COM5 (virtual serial port) and COM4 (hardware serial port) can send-receive data through networking products.
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Figure 19 Communication via Virtual Serial Port 6.6 Modbus TCP test By default, serial and network data is transmitted transparently. If you need to implement the Modbus TCP to RTU, requires selecting “transfer protocol” for "Modbus TCP ...
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Figure 20 Enable Modbus TCP If the user's Modbus TCP software is used as Slave, it is necessary to change the working mode to client based on the transfer protocol selection, and the destination IP change to the computer IP of Modbus TCP software, and the destination port is 502, as shown in figure 21.
Page 33
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Enter the IP address of the serial port server in the browser, such as http://192.168.1.200, to open the following page. Figure 22 Enter Password in Password: default is 123456. Click the login button to login.
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com parameters in table 3. After modifying parameters, click the "submit" button. 7. Work Mode and Transfer Protocol In different applications can choose different work mode, transfer protocol of the serial server, so as to be more stable and reliable use, the details are as following.
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Server the user device is Modbus RTU. Modbus TCP is the main station. No Use Modbus The user software is Modbus TCP, and Client the user device is Modbus RTU. And Modbus RTU is the main station.
The computer software takes SocketTest (the software that imitates the user's TCP/IP to communicate) as an example. ZLAN serial port server is in compliance with the standard TCP/IP protocol, so any network terminal that conforms to the protocol can communicate with the serial port server.
Figure 24 The serial port server as the Client 7.2.2 The Client connects to Multiple Servers When the ZLAN serial port server is a TCP client, it can connect to 7 destination IP addresses at the same time, and the data sent by the serial port will be sent to 7 destination IP addresses at the same time.
Page 38
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Figure 25 The first destination IP and port Figure 26 The rest 2~7 IP and ports The first IP is set in the device settings interface shown in figure 25, where the first IP can be the domain name.
Please refer to “9.4 Multi-host Function”. 7.2.4 Be both Client and Server The ZLAN serial server supports accepting TCP connections when the device is on a TCP client, which means that it also has TCP server functions.
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Figure 28 Both Client and Server By default, when configured with ZLVircom, if the working mode is changed to "TCP Client" mode, the port (that is, the local port) automatically becomes 0 (0 means a random free port is selected). In order to support the TCP Server mode, the computer software must know the local port of the device, so a value needs to be specified.
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com computer where the network tool is located, while the destination port of the serial port server must be the local port of the network debugging tool. Only when these network parameters are configured the two-way UDP data communication can be guaranteed.
Page 42
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com the TCP link for both devices has been established. Figure 30 TCP device pairing parameter configuration Figure 31 successful TCP device pairing check In the case of UDP pair-connection, the configuration parameters are shown in figure 32, and the parameters corresponding to the arrows must be one-to-one.
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com FIG. 32 configuration of UDP device pairing parameters Finally, we need to remind that if the device is connected to each other, in addition to the above settings of the Ethernet port parameters, the serial port parameters must also be correctly set.
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Figure 33 configure on the same network segment When configured with static IP, both the device and the computer need to be on the same network segment (unless communicating across gateways), either directly or through a switch, as shown in figure 33.
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com light turns green for at least a second. The data is also output from the serial port server, but whether the output data is correct depends on whether the correct serial port parameters (baud rate, data bit, stop bit, check bit) are configured.
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Figure 35 enabling ZLVirocm monitoring Select the three options of enable monitoring, hexadecimal monitoring mode, and display the time of send-receive data, as shown in figure 33. Then click ok. Assuming that data has been sent and received before, now select a virtual serial port to be monitored in the main interface, and then select the menu/view/monitor, as shown in figure 36.
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com and register. It is a communication bridge. It will generate Modbus RTU designation according to Salve ID, function code, register No. and register number in Modbus TCP instructions sent to Modbus gateway by user software and output them from the serial port.
Page 48
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Figure 38 Storage Modbus Gateway As shown in figure 38: ordinary Modbus TCP data flow direction (1)(2) (3)(4). In other words, Modbus TCP instruction is first converted into corresponding Modbus RTU instruction, and then the device responds Modbus RTU instruction to Modbus gateway, which is then converted into Modbus TCP again and sent to the monitoring host computer.
Page 49
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com query response time. In addition, if there are many upper computers to query data at the same time, the serial port will be congested. If the network is compared to the highway, the serial port is compared to the single-log bridge, then the original way is to pass the traffic flow of the highway on the single-log bridge.
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com wait for the RTU device to slowly return data before returning the register contents to the network port. If a particular instruction is no longer queried by the host computer on the network side within 5 seconds, the instruction is automatically deleted and no longer sent from the serial port to the RTU device.
RS485 network, because the sending of multiple master stations at the same time will cause conflicts on the RS485 bus. The multi-host of ZLAN serial port server can "coordinate" the RS485 bus so as to achieve the purpose of...
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Figure 40 multi-host function demo As shown in figure 40, in normal mode, when two hosts, host A and host B, are connected to the serial port server at the same time, host A sends (1) instruction, RS485 device receives (2) instruction, and RS485 device returns (3) instruction, but the serial port server sends (4) to host A and (5) to host B at the same time.
Page 53
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Figure 41 RS485 multi-host support RS485 instruction reply timeout is: the maximum time interval between the start of sending this instruction and the receipt of the reply by the serial port server. The filling time should be greater than the actual maximum time interval.
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com "packet interval" * (N+M+5) +100. 9.6 Non-storage Multiple Hosts In some places, non-stored Modbus must be used. This is because when an event occurs, PLC will read the data in the register, but the data read is the data before the storage collection, which is logically incorrect.
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com and the Modbus TCP device (Modbus TCP device) is the slave station, and multiple network port slave station devices exist simultaneously. In this case, the serial port server can be used as the client to connect to multiple network port devices at the same time according to the method introduced in “7.2.2 Client...
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Figure 44 Modbus TCP conversion in Client Mode Special Settings are required to keep the serial Numbers of the send and reply consistent. Figure 45 Modbus TCP protocol transformation in Client Mode Set the total idle time to 4, which is a special value to let 7146 know to switch to TCP client/cloud priority mode above the reply number.
How to make the cloud software identification module is very important and necessary for the realization of Internet of things communication. Shanghai ZLAN serial server to provide the following types of registration. 10.1.1 Connect to send MAC Addresses Connect to send MAC addresses: this is not only for model 4 (like 5143), but also for regular models.
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Figure 46 Connect to send MAC Addresses 10.1.2 Realcom Agreement The Realcom protocol is a mature protocol with registry and heartbeat packages that users can use to implement registry and heartbeat package functionality.
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com compatible with this way. 10.1.3 Custom Registry The custom registry format allows users to fill in an arbitrary registry format. The method is: in the device setting interface, the configuration is...
10.1.4 Transcode Configuration Files ZLAN 5143 series supports the "transcoding" function, which can write a transcoding configuration table for the serial server, so as to realize the user's fully customized registration package, and can use MAC address wildcard, can solve the trouble of writing a custom registration package for each device, and there is no limit on the length of the registration package.
10.2.1 Implied Heartbeat Even if no heartbeat packets are set, the ZLAN device enables the implied heartbeat when it is on the TCP Client. Therefore, the implied heartbeat function means that the device has sent data, but the server cannot receive the heartbeat data.
/asp language to process and store the data. This saves the user the effort of redeveloping the web application interface. To support this feature, download a configuration file of httpd.txt from the ZLAN serial port server. Download can be done using the firmware upgrade feature of zlvircom.
This is just a simple example of a "transcode" function that can actually be converted to more complex protocols. 12.1 Enable the Transcoding The configuration files converted by the command are written to the httpd.txt file and then downloaded to the ZLAN serial port server. To do this, create a new...
Page 64
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com httpd.txt document in the web page directory. If the user does not have a web directory, make a new webs directory and then make a separate httpd.txt file. Figure 51 Web Directory Now click the "upgrade firmware"...
ZLAN engineer if necessary. ZLAN can also provide the configuration file httpd.txt for the existing case. At present, there are several typical cases as follows: Fixed command translation and conversion.
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com read by the network device. 12.3 Notice When “httpd.txt” is not stored, the device will be used as a normal serial port server. Transcoding is disabled. To delete “httpd.txt” you can simply change “httpd.txt” to “1.txt” and then download it again.
The detailed introduction of network interface modification parameters can be referred to the document of "UDP Management Port Protocol of ZLAN Networking Product". It can also be implemented directly using the device management function library of the “14 Device Management Function Library”.
ZLAN serial instruction has the following characteristics: The serial instruction uses 10 bytes of data leading code, so there is no need to distinguish the communication data or command through the pull down and...
Page 69
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com device, modifying parameters and upgrading firmware. This feature is suitable for users who manage devices through ZLVircom. For ZLVircom software, the device can be managed remotely as long as it can be found in the device list.
Page 70
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com device, and the IP is the public network IP of the device. TCP Client: when the device is a TCP Client, it initiates a TCP connection to port 4196 of the destination IP (116.15.2.3). When the connection is...
P2P search. Get the ZLSN7146 firmware file from ZLAN, such as 1.539(7146).bin. In the ZLVircom tool, first search for the device that needs to be upgraded, and then go to the device parameter edit dialog box.
Page 72
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Figure 58 upgrade button As shown, select the “program file download” radio option. In the program file, select the firmware file. The IP address part of the serial port server has been filled in automatically, no need to write again, and the module type/model has been selected automatically.
(the directory can be obtained from ZLAN), click download, and download all the files in the local web page directory to the internal file system of the device.
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com to AP, multi-router backup and other occasions. 18.1.1 STA Mode Restored to AP When the STA mode parameter configuration is wrong, it can be switched to AP mode, so that the laptop can connect to the wifi module again and reconfigure.
Page 75
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com DEFAULT_WIFI_TIME=10 WIFI_CONFIG_COUNT=2 WIFI_MODE1=STA WIFI_SSID1=TP-LINK_2312 WIFI_CRYPT1=AUTO WIFI_KEY1=12345678 WIFI_BRIDGE1=0 WIFI_DHCP1=0 WIFI_TIME1=10 WIFI_MODE2=AP WIFI_SSID2=TEMP_AP WIFI_CRYPT2=NONE WIFI_IP2=192.168.1.200 WIFI_TIME2=10 We assume that the WIFI parameters configured with ZLVircom are DEFAULT_WIFI parameters, and the WIFI.txt configuration file contains WIFI1 parameters, WIFI2 parameters...
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com WIFI_CRYPT1=AUTO indicates the encryption mode, or if there is no password, it will be NONE. Otherwise, just write AUTO. Other optional WEP64, WEP128, AES, TKIP are not commonly used. WIFI_KEY1=12345678 represents the router's wifi password.
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com Now click the "upgrade firmware" button in "device configuration", and the web and firmware download page will pop up: Figure 62 download of wifi.txt As shown above, select the web directory to download, then select the web directory you just created, and then click the "download"...
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com When the wifi parameter configured by zlvircom is STA mode, if the connection fails for 2 minutes, it will switch to AP mode. The hotspot name is TEMP_AP, and it will stay for 5 minutes. If there is no laptop connection, it will try to connect in STA mode.
Page 79
Shanghai ZLAN Information Technology Co., Ltd Tel: +86-17321037177 http://www.zlmcu.com If the wifi connection is established, but the TCP connection cannot be established, the second wifi parameter will not be switched. Note that after downloading wifi.txt, you need to restart the module before it can take effect.
Need help?
Do you have a question about the ZLAN7146 and is the answer not in the manual?
Questions and answers