1 Introduction
With the popularization of Internet and the rapid development of industrial automation, the network has penetrated into homes, offices, factories and automation control fields. The E-Link network connection controller contains a high-speed microprocessor and Ethernet interface circuit. Serial devices can easily access the Internet through it to realize data resource sharing of the measurement and control system. It is a bridge connecting Ethernet and serial devices. The Ethernet interface circuit completes the communication of the 10BaseT Ethernet physical layer, and the TCP/IP protocol and other (RS-232, RS-485, CAN, etc.) conversion protocols are written in C51 language inside the high-speed microprocessor. Therefore, the serial device that accesses the Internet through E-Link is simple, does not involve various complex network protocols, and only involves data exchange with E-Link.
2 Introduction to E-Link Data Transmitter
2.1 Product Features
E-Link Data Transmitter is a miniature Internet access module. It can connect distributed serial devices or other intelligent systems of various users to the Internet, and use the TCP/IP network protocol and 10Base-T network interface inside the module to connect to Ethernet, so as to conveniently realize the networking of serial devices. E-Link Data Transmitter has the advantages of small size, low power consumption, low cost and easy use.
Serial devices can provide information such as their own operating status and working parameters to the monitor in the form of TCP or UDP data packets, and can also realize real-time transmission of information. This method has the following characteristics: (1) There is no limit on distance and national boundaries, as long as there is Ethernet, communication is possible; (2) It utilizes widely available network resources. There is no need to lay a field bus; (3) It transmits in real time and at a high transmission rate. The serial rate can reach 115.2 kb/s.
E-Link data transmitter can be widely used in communication systems, factory automation systems, banking and insurance systems, remote distributed equipment control, large retail systems, building automatic management systems and intelligent automatic alarm and fire linkage systems.
2.2 Main Technical Specifications
MC[I is a 16-bit AVR MEGA high-speed processor, the frequency of the crystal oscillator is 14.7456 MHz, its external memory capacity is 32 KB, and the capacity of the internal FLASH memory is 128 KB. It can provide 16 MI/s computing processing capability.
Supported protocols: ARP, IP, UDP, TCP, ICMP, DHCP and DNS.
Network interface: RJ45 (10BASE-T) Ethernet interface.
Interface type: RS232, RS422, RS485, CAN bus.
Serial rate: 300 b/s-115 200 b/s.
Maximum transmission rate: 300KB/s.
Product size: 8.0 emX10.0 cm or smaller.
Power supply: AC or DC power supply.
Software support: Windows XP, Windows 2000, Windows NT, Windows 95/98/ME, Unix Ware SVR4-2, UnixWare 7 SVR5, SCO Open Server, SCO UNIX, Linux fixed tty for 2.0.x, 2.2.x and Linux real tty for 2.0-36, 2.2.x, 2.4.x (all drivers are under system TCP/IP network).
The development board has 32-way switch bidirectional I/O control and 8-way 10-bit A/D converter.
Development environment: Use free AVR-GCC C language programming. Users do not need to consider purchasing expensive AVR-specific C language compilers (such as IAR FORAVR, ImageCraft ICCforAVR and CodeVison C, etc.) again. Moreover, this development system is FREE-WARE, and the system can be tailored completely according to requirements to complete the development work efficiently. [page]
3 Hardware System
3.1 Basic Configuration and Options
The basic configuration of the E-Link data transmitter includes: an E-Link module, a floppy disk or CD (settings and application software), a communication interface cable (module to communicate with serial devices) and a technical manual.
3.2 Appearance of E-Link Data Transmitter
The appearance of E-Link Data Transmitter is shown in Figure 1. J1 is the power interface. Connect to AC7V~12V or DC9V~15V; J2 is the device interface, which is a 9-pin DB9 socket, RS232 level; J3 is the RJ-45 network cable socket, connected to the HUB or data switch through the network cable; J4 is the programmer port, which is used to upgrade the program in the microcontroller to realize different functions, such as RS232_rIEP/IP conversion, WebServer, A/D remote data acquisition and HTTPD control.
3.3 Parameter Setting Connection
The setting of E-Link working parameters and performance test are completed through PC. Use the E-Link communication interface cable provided to connect the COM serial port of PC to the J2 port of E-Link. The J3 port on E-Link is connected to Ethernet via RJ45. The power supply of E-Link can be externally supplied through the J1 socket, and the external power supply is a 15 V DC power supply. The parameter setting and performance test of E-Link requires running the setting software on the PC. The connection method is shown in Figure 2.
3.4 Application system connection
The so-called application system connection refers to the connection of the user's serial port device through the E-Link Internet access method under actual application conditions. The serial port device can be connected to the E-Link in four ways: RS232, RS485, RS422 and CAN bus, as shown in Figure 3.
The E_Link data transmitter can also be directly connected to the MCU system as a part of the MCU system, as shown in Figure 4. [page]
4 Software System
4.1 Software Design
The standard TCP/IP protocol is used. Because any computer that can access the Internet uses this protocol. If you want to transmit data remotely, you can use the existing Windows SOCKET function or the network function under Linux to directly program and realize the data transmission from PC to E-Link.
4.2 Network and E-Link
E-Link data transmission uses TCP/IP protocol, and the internal protocols include TCP, UDP, IP, ARP and simple application layer processing protocols. The upper layer software can use the general SOCKET function in VB and VC. However, it is important to select UDP and TCP. The same IP address and physical address should be avoided in a network segment.
Two types of data can be sent from the network to E-Link: one is the setting data, and the other is the data sent to the serial port through E-Link.
(1) Setting package
The upper layer can set the password of E-Link, the IP address of the board, the IP address of the gateway and the physical address of the board (the password is set to ensure that it is not tampered with). You can use a special serial port monitoring program to set it up. You can also use the hyperterminal software provided by Windows 9x/NT/2000 to set it up. If there is a DHCP server on the network, you can let it set it up by itself. Send the setting data to E-Link, and E-Link will set itself up and not send the data to the serial port.
E-Link must be initialized. The format of the initialization data is to set the 4-digit password, IP address, gateway address and physical address. If not set, its initialization data in X5045 is {\S′,\E′E′,E
′T′,′O,′K′,′O′,′O′′,′O′′,192,168,0,8,20,192,168,0,159,O,192,168,O,8,36}.
When resetting the IP, it is best to use a host in the same network segment as the E-Link IP address to set it. For example, 192.168.0.XXX. The setting format is as follows:
Password setting—"SETSMM:" (7) + old password (4) + new
password (4), 15 bytes; IP setting—"SETSIP:" (7) + password (4) + new IP (4), 15 bytes;
Gateway setting—"SETSGT:" (7) + password (4) + new GATE (4), 15 bytes;
Physical address setting—"SETSMA:" (7) + password (4) + new physical address (61, 17 bytes.
The following is an IP setting data packet to be sent (in VB):
Dim IpSet(1 To 151 As Byt\�′ string
IPSet(1)=&H53′\�′S、′
IoSet(2)=&H45\��′\�′E、′
IpSet(31=&H54\��′\��′′T′
IPSet(4)=&H53\��′\�′S\��′
IpSet(5)&ti49′\��′n
It,Set(6)=&H50\��′′P′
IpSet(7)=&H3A′′:′
\′ password
IpSet(81=&H38′\��′0′
IpSet(9)=&H38\��′\�′O\��′
IpSet(10)=&H38′′0′
IpSet(11)=&H38\′\′0\′\′IP
addressIpSet
(12)=192
IpSet(13)=168
IpSet(14)=0
IpSet(15)=8The
setting is successful, E-Link returns data
{l′S′, ′E′, ′T′, ′st′, ′B′, ′E′, ′O′, ′K′, Oxod, Oxoa};
send the setting packet to E-Link, E-Link sets itself and does not send the data to the serial port. [page]
(2) Sending data packets
If it is not a setup packet, E-Link will receive the UDP/TCP data packet, extract the data part in UDP/TCP, and send it out through the serial port. The communication protocol uses standard RS232, RS422 or RS485. In network data transmission, because the internal RAM of RTL8019AS is limited, it is best not to send more than 4500 bytes of data at a time, otherwise it may overflow. If the processing speed of E-Link is not fast enough or the overflow occurs due to the network card itself, E-Link returns the data string f'O', 'V', 'E''R', 'L', 'O', 'W', OxOd, OxOal, and discards the data packet in the storage area.
4.3 Serial port and E-Link
There is no fixed end character from serial port to E-Link (you can also set the end character, such as 0x0A and 0x0D, etc.). Time control is added to the data transmission of the serial port. 20 ms after the last data is sent, E-Link considers that the data reception is completed and processes the data packet. When the receiving buffer receives each data, E-Link processes the data packet and sends it in the background. If there is a lot of data, the capacity of the receiving buffer should be appropriately increased to avoid data loss caused by overflow.
In general, the lower computer returns data based on the most recently received IP and port. For example, if a data packet with an IP address of 192.168.0.159 and a port of 8000 comes in last time and is sent to the serial port by E-Link, if data comes in from the serial port, this IP and port will still be returned.
If the lower computer wants to send to a target IP as the active party, it must first send a "SETSIP:" + IP address (total 11bytes) data string. E-Link queries the network for the physical address of this IP. If successful, it returns the data string f\′S', \′E', 1', \′, S\′, 'B\′, E\′, \′0\′, \′K\′, 0xod, 0xOa}. When the serial port receives the data string, it can send a data packet. After receiving the data, E-Link sends this data packet according to the applied physical address and target IP, and uses port 8000.
The data space prepared for the serial port is 10 KB. Do not send more than 10 KB of data at a time, otherwise there will be a data string of I\′O′, ′V′, ′E′, ′R′, ′L′, ′O′, ′W′, 0xod, 0xoa returned and the data packet will be discarded.
5 Conclusion
E-Link data transmission can be applied to industrial automation systems, telecommunication systems, remote distributed equipment control, intelligent automatic alarm and fire linkage systems, and intelligent residential building automatic management systems. E-Link network data transmission can also be used to build a new generation of Ethernet measurement and control systems, to transform the existing distributed control systems composed of fieldbuses, and to develop and produce network measurement and control equipment. It will promote the intelligence and networking of household appliances, and bring about profound changes in people's lifestyles.
Previous article:Using LPC2131 to develop frequency measurement unit of PLC speed regulator
Next article:Implementation of a wireless long-distance recognition system based on surface acoustic wave
- Popular Resources
- Popular amplifiers
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Excuse me, what is this component with silk screen 6023?
- Analysis of the working principles of seven types of three-pole emitter DC circuits (updated)
- Design and implementation of FIR filter in DSP
- Some Allegro practical skills that PCB Layout engineers regret not knowing earlier
- Buck-Boost and Step-Up Converters in Wireless Security Cameras and Video Doorbells
- EEWORLD University Hall----Operating System Zhejiang University (Li Shanping)
- TI CapTIvate technology adds capacitive touch capabilities to stoves
- PCB short circuit problem
- Fanuc PLC help newbie
- MFIA Impedance Analyzer Free Trial Application