日韩免费一级毛片在线观看-中文日韩亚洲综合-欧美系列日韩另类-欧美激情极品日韩-午夜日韩爱爱毛片视频免费看-欧美日韩一区免费观看-欧美日韩欧美黄色三级

CAN bus and Ethernet interconnect system

In large enterprise automation systems, the top corporate management and production control layer will have adopted Ethernet and PC machines, while the lower level workshop Xianchang Ze Bus and MCU with on-site monitoring Shebei.  adjacent floors are usually controlled machine to be used Gongye cards too, plus PC-card slot or parallel interface LPT EPP Interface Card. this connection the high cost, long development cycle. In view of this situation, I designed a single CAN Ethernet gateway interconnection system, successfully achieved with the existing CAN bus, Ethernet network connectivity directly to the data.

1 System structure

Overall system structure is divided into three parts: on-site monitoring network (CAN network), embedded transparent SX52 gateway, Ethernet information management terminal (such as monitoring platform and network databases, etc.), shown in Figure 1.

CAN bus and Ethernet interconnect system

CAN bus is a bus-based control network interconnect devices. In the CAN bus devices can be mounted up to 110 nodes, the devices will be free to communicate with each other to achieve complex network control system. But the device information layer can not directly reach the information management , to device information into the information management needs through the data gateway. SX52 embedded transparent gateway is designed for this purpose.

In Ethernet Transparent Application Layer Gateway Construction and Analysis of a complete CAN protocol packets. CAN protocol data packets as TCP / IP network application layer data transfer, its practical significance of communications data without any specific explanation. Transparent Type the gateway from the communications processor, CAN bus controller and Ethernet controller composed of three parts. which SX52 microcontroller core processor, which implements the CAN control network and protocol conversion between Ethernet. Ethernet Information management control commands sent to the embedded transparent SX52 gateway, the TCP / IP protocol packet data into a CAN protocol CAN sent to the specified device control network node, Xin Xi Guan Liceng complete control of the Field equipment. Similarly, When the CAN network on the device data (such as regular sampling data or alarm information) to be transmitted to the information, executives, Ke Tou Ming sends data to the embedded gateway SX52, Zai Tongguowangguan Xie Yi Cheng Xu will be converted into the CAN protocol data package TCP / IP protocol of the Ethernet data frame sent to the Ethernet control computer.
Ethernet information management terminal is in accordance with a user's specific requirements and designed user-level applications. It can be a control program or network database WIN32 (CAN node recording device Shuju) software, etc.; CAN node device may even be the server software for the device to provide a more complex data processing.

2 Hardware Design

System hardware is divided into two parts: CAN bus network device interface design and embedded transparent SX52 Gateway.

2.1 CAN Bus Network Device Interface Design

CAN-bus network gateway device interface design more simple design. It is the basis of the completion of device functionality to add a CAN communication controller interface chips, Implementation and CAN bus network. To consider the development costs and flexibility in the design of the author the company's independent use PHILIPHS SJA1000 CAN communications controller chip and CAN bus transceiver 82C250 chip. the structure shown in Figure 2.

2.2 Embedded transparent SX52 Gateway

Transparent Gateway embedded system design is the core of the whole. The structure shown in Figure 3. It consists of protocol conversion module and CAN controller Ethernet controller protocol conversion module composed of two parts. SX52 microprocessor hardware gateway play a central role. It is developed by the U.S. Ubicom Inc. high-speed configurable communications controller, the processing speed is quite high. in the 100MHz external clock, the instruction execution speeds of up to 100 MIPS. It allows TCP / IP protocol stack in the ARP , IP, UDP, TCP, HTTP, SMTP, ICMP and other network protocols.

CAN controller protocol conversion module hardware circuit diagram in Figure 3 left. It consists of three components: the microcontroller SX52, independent CAN communication controller SJA1000, CAN Bus Transceiver 82C250. SX52 is the only one CPU core, for SJA1000 initialization, reading and writing SJA1000 through internal registers for data reception, transmission and error handling. PCA82C250 provides differential transmit capability to the bus and differential receive capability to CAN controller.

CAN bus and Ethernet interconnect system

Ethernet controller protocol conversion module of the microcontroller SX52, Ethernet controller RTL8019AS and isolation filter FB2002 composition. RTL8019AS Realtek manufactured in Taiwan a highly integrated, full-duplex 10Mbps Ethernet Control chip, implemented based on Ethernet MAC layer protocol all the features, built-in 16KB of SRAM, dual DMA channels and FIFO for data packets to send and receive functions. in gateway design, use jumper mode (JP set to high) hardware configuration RTL8019AS 8 bit mode. using RTL8019 low five address lines A0 ~ A4, and low 8-bit data lines D0 ~ D7.SX52 the B port B0 ~ B4 foot cable RTL8019AS as address the low five address lines, B5 ~ B7 as a control line are connected to read and write timing control pin IORB, IOWB, IOCHRDY; C port as a data cable to connect RTL8019AS low 8-bit data lines; A port reservation for future expansion. Figure 3 AT24C64 as 8KB EEPROM, mainly used to save the embedded transparent SX-52 gateway configuration information, such as the gateway IP address, MAC address and the ID SJA1000 network identifier, network mask AMR and bus timing (BTR0, BTR1) and so on. In this way, the flexibility easy to modify the gateway parameters, to adapt to different environments, taking into account future expansion.
RTL8019AS addition to SX52 connection, the will of its network transceiver 4 pin TPOUT +, TPOUT-, TPIN +, TPIN-through external isolation filter FB2002 connected with Ethernet. The use of isolation filters FB2002 is to improve the network communication anti-jamming capability.

3 Software Design

The whole interconnected system of software design can be divided into three parts: CAN-bus device interface communication procedures, transparent gateway protocol conversion process and the Ethernet layer application design. Which, CAN bus communication process device interface and protocol conversion process transparent gateway CAN controller protocol module in the structure there is a greater similarity of Shang, Dan has the micro controller may result in the achievement of different programming languages differ. Thus, which I will not discuss, but Zhuyaotaolun the program after the two Fangmian She Ji .

3.1 Transparent Gateway Protocol conversion

Transparent Gateway protocol conversion program's overall design concept is: when the Ethernet application layer data to be sent to the CAN node, first of all, the data sent to the transparent gateway protocol conversion module from the Ethernet controller data from the transport layer packet Analysis of a complete CAN protocol data packets, stored in a data buffer A further notice to the scheduling module, which will call the CAN protocol controller module CAN protocol data packets sent to the CAN bus. Conversely, when the CAN devices have data to sent to the user layer, the first data sent to the transparent gateway 控制器 agreement by the CAN module will complete CAN protocol data packets stored in buffer B again notify the general control module, which it calls the Ethernet controller protocol conversion CAN module will complete the application layer protocol data packet as the data package up, and then sent to the Ethernet application layer. The structure of the program shown in Figure 4.

3.1.1 CAN Controller Protocol Module

CAN controller protocol conversion module program mainly by SJA1000 register readings CANRead (), write a program CANWrite (), initialization CANInit (), send the program txdsub (), to receive program rxdsub () components. The reason for the preparation of Individual SJA1000 register read and write subroutines, which is the SX52 chip only I / O port decision.

Construction of CAN bus protocol used CAN2.0A control network, the completion of the SJA1000 the main control register initialization CR, acceptance code register ACR, acceptance mask register AMR, bus timing register BTR0, 1, and output control register settings for OCR. Initialized Upon completion, the general control module monitors SJA1000 controller. 當(dāng) CAN bus Shangyou Shujudaoda O'clock, it Tiaoyongjieshou subroutine rxdsub (), to the frame of data packets into data Huanchong Qu B and then release the receiver buffer. Similarly, when there is an agreement by CAN2.0A combined into a frame format of data packets in the data buffer A, up to send to the CAN bus, the total scheduling module will be transferred CAN send subroutine txdsub () to send.


3.1.2 Ethernet controller protocol conversion module

Ethernet controller protocol conversion module is mainly responsible for UDP packets from a complete CAN protocol parsing packets into data buffer A. At the same time, it may be a complete data buffer B in the CAN protocol packets encapsulated in UDP datagram , and then sent to the Ethernet.

CAN bus and Ethernet interconnect system

UDP transport layer in the communication protocol is CAN protocol taking into account the data reported for the short frame format (up to 8 frames per data byte). If using TCP transport protocol, CAN protocol to transfer 8 bytes of data, first by 3 handshake to establish a connection, then transfer the data, but also by shaking hands after releasing the connection. 這樣 transmission efficiency of the limited network resources is undoubtedly a waste. 而 UDP is connectionless transmission, can improve network transmission efficiency and also reduce the Gateway's processing tasks. Of course, UDP transport protocol is not reliable, Duiyukongzhi network is, is not allowed. Weile improve communication of reliability, with a check Ji Zhi Hui Chuan. Tongguo experimental test Biaomingzhezhong Fang Shi is effective.

Ethernet controller protocol conversion module of the Ethernet card driver, ARP, UDP protocol composed of a number of API functions, such as NICInit (), NICDMAInit (), NICInitTxFrame (), NICSendTxFrame (), NICReadAgain (), ARPCheckIfIs () , ARPSendResponse (), ARPSendStPacket (), ICMPProcPktIn (), UDPAppInit (), IPGenCheckSum (),, UDPAppProcPktIn (), UDPStartPktOut () and UDPEndPktOut () and so on. The variables used are: remoteIP [3:0], myIP [ 3:0], UDPRxSrcPortMSB, UDPRxSrcPortLSB, UDPRxDataLenMSB, UDPRxDataLenLSB, UDPTxSrcPortMSB, UDPTxSrcPortLSB, UDPTxDestPortMSB, UDPTxDestPortLSB, DPTxDataLenMSB, UDPTxDataLenLSB so.

When first executed or reset the system, the Ethernet controller protocol conversion module will be the first call NICInit () and UDPAppInit (), etc. NIC, ARP, IP, UDP, and application initialization. Initialization is completed into the main loop. In the main loop, SX52 will repeatedly test whether RTL8019AS receiving Ethernet frames. When data is received, SX52 call NICDMAInit () and NICReadAgain () read the first Ethernet frame and then call ARPCheckIfIs () determine whether the received ARP frame data. If the ARP, then transferred to ARPSendResponse () and ARPSendStPacket () subroutine for ARP ARP processing and sends a response datagram; if not ARP, then determine whether the IP datagram. unless the IP datagram clear the Ethernet frame; when the received frame contains the IP datagram, you need to further determine the datagram is ICMP or UDP data packets. if the ICMP packet is the implementation of ICMPProcPktIn () subroutine handling ICMP packets and resend the IP datagram; If the data for the UDP data packet, then call UDPProcPktIn () subroutine. The program will read the first UDP data packet of data and appropriate treatment, to restore the integrity of the CAN protocol data packets into data buffer B, further notice to the scheduler, the scheduler is called by the main subroutine CAN CAN bus control protocol data packets sent to the CAN bus.

Conversely, when the total scheduler to inform the Ethernet controller protocol conversion module in the data buffer B CAN protocol data ready to send to the Ethernet, it will call NICInitTxFrame (), UDPStartPktOut (), IPGenCheckSum (), IPStartPktOut (), NICSendTxFrame (), UDPEndPktOut () to send treatment such as Functions, in order to achieve CAN bus to Ethernet data transmission.

Ethernet Layer 3.2 Application Design

Ethernet communication protocol generally use the TCP / IP protocol. In this paper, the popular SOCKET socket programming, select Transport Layer UDP (User Datagram Protocol), written by Visual C + + user level program.

WinSock provides support to the UDP by UDP protocol can specify IP addresses to send CAN protocol data transparent gateway, but also CAN protocol via the data it receives. Send and receive side in the same points about the status of the primary and secondary. Liyong CAsyncSocket class manipulate the data connection to send no more simple. First of all, to generate a local socket (SOCK_DGRAM need to specify the mark); then use int CAsyncSocket SendTo  const void  lpBuf  int nBufLen  UINT nHostPort  LPCTSTR lpszHostAddress = NULL  int nFlags = 0 to send data, int CAsyncSocket  ReceiveFrom  void  lpBuf  int nBufLen  CString & rSocketAddress UINT & rSocketPort  int nFlags = 0 receive data. using UDP protocol can manage hosts and SX52 gateway is a two-way data communications. At the same time, This transmission is also easy to make the data SX52 transparent gateway.

This article describes a low-cost, high reliability, fast CAN bus and Ethernet interconnect. The interconnect layer to ensure management control and production monitoring and control layer connection between the upper and lower layers to facilitate the exchange of information to meet the plant , substations and other industrial application requirements occasions.

Declined comment

日本在线www| 国产亚洲精品成人a在线| 美女免费黄网站| 一级女人毛片人一女人| 成人免费观看的视频黄页| 青青青草视频在线观看| 国产激情视频在线观看| 亚洲天堂一区二区三区四区| 深夜做爰性大片中文| 国产一区二区高清视频| 91麻豆精品国产片在线观看| 国产国语对白一级毛片| 台湾毛片| 国产成人精品综合在线| 国产麻豆精品| 国产原创视频在线| 成人高清视频在线观看| 韩国妈妈的朋友在线播放| 97视频免费在线| 国产亚洲免费观看| 亚洲天堂在线播放| 香蕉视频久久| 亚洲 欧美 91| 成人在激情在线视频| 尤物视频网站在线| 国产一级强片在线观看| 99色视频在线观看| 国产伦理精品| 国产精品1024永久免费视频 | 黄视频网站在线看| 午夜在线亚洲| 欧美日本二区| 黄色免费网站在线| 亚洲天堂免费| 欧美激情影院| 国产综合成人观看在线| 精品国产亚洲人成在线| 国产网站免费| 日韩免费在线视频| 久久国产一区二区| 九九精品在线播放| 999久久久免费精品国产牛牛| 国产精品123| 亚洲 男人 天堂| 色综合久久天天综合| 日韩一级精品视频在线观看| 美女免费黄网站| 日韩欧美一二三区| 成人a大片高清在线观看| 日本在线www| 亚洲精品影院| 欧美一区二区三区在线观看| 欧美一区二区三区在线观看| 色综合久久天天综合观看| 日韩一级精品视频在线观看| 精品毛片视频| 精品久久久久久中文字幕2017| 成人高清视频在线观看| 你懂的日韩| 一级毛片视频免费| 亚洲 男人 天堂| 国产精品1024永久免费视频| 精品国产一区二区三区久久久蜜臀| 日韩免费在线观看视频| 成人免费高清视频| 国产高清视频免费观看| 欧美电影免费看大全| 精品久久久久久综合网| 日韩avdvd| 免费的黄色小视频| 日韩avdvd| 青草国产在线| 亚洲精品影院久久久久久| 日韩avdvd| 日日日夜夜操| 国产成人女人在线视频观看| 一级毛片视频在线观看| 国产高清视频免费观看| 欧美激情一区二区三区中文字幕| 天天色色色| 国产网站麻豆精品视频| 日韩一级黄色| 欧美夜夜骑 青草视频在线观看完整版 久久精品99无色码中文字幕 欧美日韩一区二区在线观看视频 欧美中文字幕在线视频 www.99精品 香蕉视频久久 | 日本特黄一级| 免费一级片网站| 精品久久久久久中文| 日韩av片免费播放| 夜夜操天天爽| 成人影院一区二区三区| 国产网站免费| 日本免费乱理伦片在线观看2018| 麻豆系列国产剧在线观看| 成人免费观看的视频黄页| 国产精品自拍在线观看| 四虎论坛| 午夜激情视频在线播放| 成人免费网站久久久| 黄色福利| 韩国三级视频网站| 高清一级做a爱过程不卡视频| 精品久久久久久中文字幕2017| 九九九在线视频| 天天色成人| 亚久久伊人精品青青草原2020| 欧美激情伊人| 成人免费一级毛片在线播放视频| 天堂网中文字幕| 成人在激情在线视频| 欧美爱爱动态| 日韩av东京社区男人的天堂| 国产精品自拍在线观看| 亚洲精品久久久中文字| 黄色免费三级| 国产一区二区精品久久91| 欧美激情一区二区三区中文字幕| 日韩在线观看视频免费| 91麻豆精品国产自产在线| 一级毛片视频在线观看| 欧美激情一区二区三区在线播放| 国产美女在线观看| 精品美女| 国产一区二区精品久久91| 日韩av成人| 成人免费高清视频| 97视频免费在线| 精品毛片视频| 精品在线视频播放| 一级毛片视频在线观看| 天天色色色| 日韩专区一区| 香蕉视频久久| 中文字幕一区二区三区精彩视频 | 欧美18性精品| 欧美大片a一级毛片视频| a级黄色毛片免费播放视频| 精品国产一区二区三区久久久蜜臀| a级精品九九九大片免费看| 亚欧乱色一区二区三区| 四虎论坛| 亚洲第一页乱| 一级片片| 四虎影视库| 91麻豆精品国产自产在线| a级精品九九九大片免费看| 麻豆网站在线看| 国产麻豆精品高清在线播放| 韩国三级一区| 一级女性全黄久久生活片| 日日夜夜婷婷| 日韩字幕在线| 久久久久久久久综合影视网| 国产一级强片在线观看| 青青青草影院| 亚欧成人乱码一区二区| 成人高清视频免费观看| 夜夜操天天爽| 91麻豆精品国产高清在线| 香蕉视频一级| 好男人天堂网 久久精品国产这里是免费 国产精品成人一区二区 男人天堂网2021 男人的天堂在线观看 丁香六月综合激情 | 亚洲精品影院久久久久久| 99久久精品国产国产毛片| 精品国产香蕉伊思人在线又爽又黄| 高清一级做a爱过程不卡视频| 尤物视频网站在线观看| 免费毛片播放| 国产精品自拍在线观看| 99久久网站| 日本久久久久久久 97久久精品一区二区三区 狠狠色噜噜狠狠狠狠97 日日干综合 五月天婷婷在线观看高清 九色福利视频 | 黄视频网站免费观看| 成人免费观看的视频黄页| 成人a大片在线观看| 欧美夜夜骑 青草视频在线观看完整版 久久精品99无色码中文字幕 欧美日韩一区二区在线观看视频 欧美中文字幕在线视频 www.99精品 香蕉视频久久 | 欧美日本韩国| 国产亚洲男人的天堂在线观看| 精品久久久久久影院免费| 日本伦理片网站| 欧美激情在线精品video| 欧美日本二区| 九九久久国产精品| 国产亚洲男人的天堂在线观看| 久久99中文字幕| 999久久狠狠免费精品| 青青久在线视频| 国产国产人免费视频成69堂| 日日夜人人澡人人澡人人看免| 欧美国产日韩在线| 黄色免费三级| 日本特黄一级| 麻豆系列国产剧在线观看| 在线观看导航| 国产一区二区高清视频| 可以在线看黄的网站| 国产亚洲免费观看| 一本伊大人香蕉高清在线观看| 色综合久久手机在线| 久久精品店| 久久99爰这里有精品国产| 欧美a级片视频| 精品视频免费在线| 精品国产亚洲人成在线|