IPort-1 module embedded device network solution 0 Overview
Resolver is a kind of commonly used angle detection component, because of its simple structure, reliable operation, and its accuracy can meet the general detection requirements
Resolver,Encoder Troubleshooting Resolver,Custom Resolver,Online Resolver Yuheng Optics Co., Ltd.(Changchun) , https://www.yhencoder.com
In view of the fact that the original serial devices of RS232 and RS485 are no longer adapted to the pace of informationization. The conversion from serial ports to network ports, from level-level serial communication to Ethernet-level or even Internet-based network-level communication is an inevitable trend. The equipment network management has the advantages of strong flexibility, remote control, and interface standards. A common method for adding network port connections to embedded devices is to add an Ethernet control chip and interface to the hardware circuit. However, these chips usually have more than 100 pins, and the hardware structure and network communication protocol of the chip are required. Deep understanding, or designing TCP / IP protocol stack and network control terminal by yourself, the technical threshold is higher. For users who do not know much about network communication protocols and want to add network interfaces to embedded devices, but also do not want to change the original hardware structure, use a model that does not require knowledge of network interfaces to enable network It is undoubtedly a better solution for the product of mutual conversion between the port and the serial communication. To this end, this paper proposes an implementation scheme that uses the IPort-1 module to add a network interface to the user's embedded device. Users can add network ports to their embedded devices without having to understand the network protocol and control interface at all without modifying the original hardware circuit, so it is a convenient and easy solution for embedded device networks.
1 Structure and function of IPort-1 module
The IPort-1 module is a multi-function embedded Ethernet serial data conversion module developed by Guangzhou Zhiyuan Electronics Co., Ltd. It integrates the TCP / IP protocol stack. It can easily complete the network function of embedded devices. The IPort-1 module is integrated with a 10 / 100M adaptive Ethernet interface. Its serial communication maximum baud rate is up to 230.4 kbps, and it has multiple working modes such as TCP Server, TCPClient, UDP and Real COM driver, which can support up to four Connect, and support domain name access and other functions.
The pin definition of the IPort-1 module is shown in Figure 1. The module has a total of 16 pins, including 3 input pins, 3 output pins, and 1 IO port. These ports correspond to different operating modes and have different input or output functions.
2 Real COM mode application of IPort-1 module
In ReM COM mode, a background service program running on its host computer will actively connect to the IPort-1 module and add a serial port on the PC side. This serial port is the serial port of the IPort-1 module. Generally, after the hardware connection is ensured, the network parameters such as IP address, subnet mask, and gateway should be set for the PC. The parameter requirements must be set in the same network segment as the IPox-1 module. The default IP address of the IPort-1 Ethernet to serial port module is: 192.168.0.178. Secondly. Use the ZNetCom software that comes with the module to obtain device configuration information, and set parameters such as working mode and serial port baud rate. Finally, you can use the ZNetManager software to start the service and communicate.
Figure 2 shows the circuit connection diagram of the IPort-1 module and the CAN module. As can be seen from Figure 2, the IPort-1 module communicates with other devices with a UART interface. Simply connect the TXD of the IPort-1 module to the RXD of the device, and connect the RXD of the IPort-1 module to the TXD of the device. The circuit connection is very simple.
Figure 3 shows the debugging results of the communication process between the IPort-1 module and the CAN module.
3 Other working modes
In addition to the Real COM mode, the IPort-1 module also has three working modes: TCPServeY, TCP Client, and UDP. In the TCPServer working mode, the IPort-1 module does not actively connect with other devices, but always waits for the connection of the client (TCP Client). After establishing a TCP connection with the client, bidirectional data communication can be performed. In TCP Client mode, the IPort-1 module will actively connect to the pre-set TCP server. If the connection is not successful, the client will continue to try to establish a connection with the TCP server according to the set connection conditions. . After establishing a TCP connection with the TCP server, two-way data communication is possible. Unlike the TCP protocol used in the above modes, the UDP mode uses the UDP protocol for data communication. UDP is a non-connection-based communication method. It cannot guarantee that the data packets sent to the target host are received correctly. Therefore, in the occasion where high reliability is required, the upper layer communication protocol is generally needed to ensure the correctness of the data; However, because the UDP method is a simpler communication method, it does not increase excessive additional communication volume. At the same time, it can also provide a higher communication speed than the TCP method to ensure the real-time nature of the data packet. In fact, under the circumstances where the network environment is relatively simple and the network communication load is not too large, the UDP working mode is not prone to errors. The status of the devices working in this way are all equal, there is no server and client.
4 Conclusion
Using the IPort-1 module allows users to easily add network interfaces to embedded devices without understanding the network communication protocol and its internal hardware composition structure, and it does not need to change the original hardware structure of the circuit. A convenient and easy-to-use embedded device network solution.
December 05, 2023