| Nuclear technology has extremely wide applications in medical,food,agriculture,energy,mineral exploration,etc.In the application of nuclear technology,the detection and extraction of nuclear pulse signals is a crucial link,so nuclear measurement and control instruments It is an important device in the application of nuclear technology.As the key to nuclear pulse data measurement,nuclear instruments often need to maintain a short distance from the radioactive source to achieve a high count rate.A high pulse count rate is an important part of the spectrum.Guarantee,otherwise it is difficult to guarantee the accuracy of the subsequent data analysis.We all know that the harm caused by radioactivity to the human body cannot be reversed,especially in places that require long-term monitoring,such as nuclear power plants,spent fuel reprocessing plants,and environmental radiation level monitoring.The demand for remote spectrum data transmission and remote equipment control is already very strong.Urgent.In the underlying data transmission mode of nuclear instruments,the communication interface circuits used are: USB,RS-232,BPP parallel port,CAN bus.The transmission speed of the USB interface is fast,which can reach 1.5M-5G.The use of USB for data transmission has the characteristics of stability and convenience.At present,there are basically a large number of USB interfaces on the personal computer side;RS232 is a transmission interface with a long history.Although it has retired from the PC camp,it still plays an important role in most embedded devices.It has a long transmission distance and simple development;BPP parallel port has been used in early nuclear instruments,but it has been basically replaced now;CAN The bus and the serial port are the most common data interface in the bottom layer of current nuclear instruments.The CAN bus has the characteristics of good performance and networking(Deng Wei,Pei Wei,Qi Zhiping,2007),which provides a possibility for nuclear measurement and control to achieve multi-point measurement The serial communication is simple and easy.These transmission methods are the bottom interface of the nuclear instrument.When the nuclear instrument needs tocommunicate with the PC software,it is generally converted to USB or virtual serial port for data interaction with the spectrum measurement software on the PC.Due to the characteristics of these interfaces It is often impossible to complete long-distance data transmission.Ethernet is a network implementation method with a very high share in the world today.All computers are integrated with an Ethernet interface.Especially when the current national network construction is complete,the transmission of network data is basically no longer affected by space and distance.Restrictions,most companies and regions have complete network cabling.Therefore,this paper develops an embedded Ethernet gateway system for the situation of the current transmission interface of the nuclear instrument of Sichuan Xinxianda.The characteristic of the gateway system is to realize the mutual conversion between Ethernet,CAN and USART.The nuclear instrument retains the CAN bus interface for easy networking and high reliability.It also realizes the remote measurement and control of the nuclear instrument.At the same time,the serial port is in some special The nuclear instrument is used to control other components of the nuclear instrument.The communication protocol of the nuclear instrument system under the Ethernet gateway system has been redesigned,so that the existing nuclear instruments and meters can be easily connected to the local area network,realizing remote measurement and monitoring.In the research and implementation of Ethernet communication interface equipment in nuclear instruments,according to the requirements of spectrum data transmission and cost considerations,the hardware adopts the structure of ARM +ENC28J60 + PAC82C50 + MAX232,in which ARM uses the embedded microprocessor of STM32F103 series introduced by STMicroelectronics.,Its rich internal resources,complete peripherals,using library functions developed by STMicroelectronics,to a certain extent,reduces the development process and development difficulty.The Ethernet control chip adopts the ENC28J60 with a communication rate of 10 Mb / s developed by American Microchip Company and integrated with a MAC controller and PHY transceiver.It completely meets the transmission requirements of spectral data.The CAN transceiver uses NXP’s PAC82C50,which has a very high transmission rate and cost performance.In the serial communication design,the common single power supply level conversion device MAX2323 is used.ARM and the network card ENC28J60 perform data transmission through the SPI bus interface,and complete the reading and writing of the register data of the ENC28J60,as well as the energy spectrum data and eachcommunication interface data.Interactively,the communication rate of STM32 integrated SPI peripherals is up to 18 Mbit / s,which achieves a perfect coordination with the Ethernet controller.In terms of system software design,the structure of UCOS + LWIP is adopted.Based on the in-depth study of UCOS and LWIP source code,the transplantation of UCOS and LWIP on STM32F103 embedded microcontroller is completed,and the LWIP operating system is based on the characteristics of the operating system The simulation layer is written.In the application software layer,the multi-task mechanism and message queue mechanism provided by UCOS complete the mutual conversion of the Ethernet-CAN-USART protocol.The gateway multi-command communication protocol with unified multi-interface to Ethernet interface is also formulated.At the end of the article,each module of the designed embedded gateway system was tested,and it was jointly tested with the CIT-3000 digital energy spectrometer developed by Sichuan Xinxianda Measurement and Control Company.The test results show that the device realizes the fast and error-free transmission of the pulse information of the nuclear instrument through the network interface.With the Ethernet-CAN-USART conversion protocol,the gateway server can work reliably.In the joint test,the gateway showed good transmission performance and connection stability.When the gateway system is connected to the local area network,it can transmit the nuclear pulse information of the remote nuclear instrument equipment and remotely adjust the operating parameters of the nuclear instrument. |