Disclosure of Invention
Technical problem to be solved
In view of the above technical problems, the present invention provides a synchronous timing trigger system and method applied to a particle accelerator, which are used to at least partially solve the above technical problems.
(II) technical scheme
The invention provides a synchronous timing trigger system applied to a particle accelerator, which can be connected with at least one client, wherein the client and the synchronous timing trigger system adopt a client/server mode to carry out data interaction, and the synchronous timing trigger system comprises:
the case generation system comprises a PXIe/PXI industrial personal computer and a case output board card, wherein the PXIe/PXI industrial personal computer is used for indexing a case file from a database according to a case file number, the case output board card outputs a case optical signal according to the case file, and the PXIe/PXI industrial personal computer and the case output board card perform data transmission through a PXIe/PXI high-speed backboard bus;
a case transmission system for transmitting the case optical signal;
the case receiving/interpreter is used for receiving the case optical signal and converting the case optical signal into case codes, comparing the converted case codes with the trigger case codes stored by the case receiving/interpreter, and if the two case codes are completely consistent, generating a trigger signal or level to trigger the equipment needing synchronization in the particle accelerator.
The case transmission system is connected with at least one case receiving/interpreter, each device needing synchronization is provided with a case receiving/interpreter corresponding to the device needing synchronization, and the case transmission system fans out and distributes the case optical signal into a plurality of case optical signals and simultaneously transmits the case optical signals to the case receiving/interpreter corresponding to each device needing synchronization.
Optionally, the PXIe/PXI industrial personal computer is provided with a case editing interface, a case control interface, a control logic process and a board card drive function, wherein the case editing interface is used for compiling case files and storing the case files in a database; the case control interface is used for selecting a case file number and setting parameters; the control logic process is used for indexing the case file from the database according to the case file number; the board driver is used for driving the case output board to output the case optical signal according to the case file.
Optionally, the case transmission system is a tree structure formed by connecting a plurality of fan-out devices through plastic optical fibers, each fan-out device comprises at least one output interface, so that case optical signals can be transmitted to a plurality of case receiving/interpreting devices at the same time.
Optionally, the case file includes a case name, a delay time, and a repetition number, where the case name is used to specify a triggered device; the delay time is used for limiting the interval time from the end of last-time case output to the start of current-time output; the number of repetitions is used to define the number of times the current instance is repeatedly output.
Optionally, the case receiver/interpreter comprises a network interface and an optical signal interface, wherein the network interface is used for loading a trigger case code which needs to be responded by the synchronous equipment to the case receiver/interpreter from a database; the optical signal interface is used for receiving the instance optical signal.
Optionally, the client and the synchronous timing trigger system use a standard industrial OPC-UA communication protocol for information interaction to provide multi-client access.
Optionally, the plastic optical fibers connecting the plurality of fanouts are of equal length to equalize the transmission distances of the instance optical signals.
Optionally, the PXI industrial personal computer is provided with a plurality of peripheral slots, and the instance output board card is inserted into one of the slots, so as to expand the function of the synchronous timing trigger system in the later period.
Optionally, the instance output board card includes: an optical signal output port for outputting a case optical signal; and the debugging interface is used for debugging the performance of the instance output board card.
Another aspect of the present invention provides a synchronous timing triggering method, including: the PXI industrial personal computer indexes the case file from the database according to the case file number; the case output board card receives the case file through the PXI high-speed backboard bus and outputs a case optical signal according to the case file; the case transmission system fans out and distributes the case optical signals into a plurality of case optical signals; the case receiving/interpreter corresponding to each device needing synchronization receives the case optical signal and converts the case optical signal into case codes, the converted case codes are compared with the trigger case codes stored by the case receiving/interpreter, and if the case codes are completely consistent with the trigger case codes, a trigger signal or level is generated to trigger the devices needing synchronization in the particle accelerator.
(III) advantageous effects
The invention provides a synchronous timing trigger system and a method applied to a particle accelerator, which have the beneficial effects that:
1. the system adopts a hardware scheme of PXI industrial personal computer and PXI plug-in instance output board card, has abundant storage resources and computing resources, can conveniently analyze, process and store data, solves the problem of insufficient computing function and storage resources of the system on chip, and effectively improves the control precision and speed of the system.
2. The controller and the case output board card in the system carry out data interaction through the PXI bus, so that the data transmission speed is guaranteed, the real-time performance, the reliability and the synchronism of the system are effectively improved, and meanwhile, the PXI case expansion slots provide redundant slots for later-period system function expansion.
3. The system can provide multi-client access, adopts a standard industrial communication protocol OPC-UA, solves the problem of communication port and resource conflict, and simultaneously ensures the standardization and the normalization of the communication protocol.
4. The application of the virtual instrument technology effectively reduces the period of hardware research and development, improves the reliability and maintainability of the system, avoids the difficulty in system upgrade and reduces the operation difficulty of the system.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to specific embodiments and the accompanying drawings.
The embodiment of the invention provides a particle accelerator synchronous timing trigger system, which can be connected with at least one client and can provide multi-client access, and the structure of the system is shown in fig. 1. The system can be used for a medical heavy ion treatment device, and synchronously triggers the accelerator and all devices needing synchronization at a treatment terminal at regular time in the treatment process of the medical heavy ion treatment device, and synchronously operates according to an accurate time reference to generate particle beams needed by treatment. The structure comprises an example generating system, an example transmission system and an example receiving/interpreter, wherein the example transmission system is connected with at least one example receiving/interpreter, each device to be operated is provided with the example receiving/interpreter corresponding to the device, and the example transmission system fans out and distributes an example optical signal generated by the example generating system into a plurality of example optical signals and simultaneously transmits the example optical signals to the example receiving/interpreter corresponding to each device to be synchronized. As described in detail below.
And the case generation system is used for indexing the case file from the database according to the case file number and outputting the case optical signal according to the case file.
The case generation system consists of a PXIe/PXI industrial personal computer and a case output board card, wherein the PXIe/PXI industrial personal computer is provided with corresponding control software. The PXIe/PXI industrial personal computer is a server of the synchronous timing trigger system, and includes a PXIe/PXI control chassis, a PXIe/PXI backplane bus, a system controller and an instance output board card, as shown in fig. 2. When the synchronous timing trigger is required to uniformly trigger corresponding equipment, physical personnel issue a case file number, set operation parameters and a loading request through an upper computer (a central monitoring client), a system controller runs control software, automatically indexes a case file corresponding to the case file number in a database according to the case file number, and loads the indexed case file and the operation parameters into an onboard RAM of a case output board card through a PXIe/PXI backboard bus. And after the case output board card receives a starting instruction sent by the upper computer, a case optical signal of 32 bits is output strictly according to the case file and the operation parameters. Meanwhile, the real-time working state of the case output board card is transmitted to the PXIe/PXI industrial personal computer in real time through the backboard bus and displayed through the interface, namely the case output board card and the controller perform data interaction through the high-speed backboard bus provided by the PXIe/PXI case.
Specifically, the PXIe/PXI industrial personal computer is provided with a case editing interface, a case control interface, a control logic process, a board card drive and other functions, a case file is compiled through the case editing interface and stored in a database, a currently required case file number is selected through the case control interface, the case file corresponding to the case file number is automatically indexed in the database according to the case file number through the control logic process, and the indexed case file and operation parameters are loaded into an on-board RAM of the case output board card through a PXIe/PXI backboard bus.
The case files are compiled according to the beam energy and the treatment lines required by treatment, and different treatment lines and energies have case files corresponding to the treatment lines, so that physical personnel can edit all the case files corresponding to the beam energy and the treatment lines in advance through physical calculation according to actual requirements and store the case files in a database. And when the case files are actually needed, the case files are indexed from the database according to the case file numbers and then loaded into an onboard RAM of the case output board card.
A case file consists of the case name, delay time and number of repetitions as shown in table 1.
TABLE 1
The case name is represented by an 8-bit strictly defined 16-ary number, and the format is as follows: "C0 XXYZZ", case name is divided into three sections, "C0" is the starting byte, "XX" and "YYZZ" represent different front-end devices, acceleration energies and corresponding treatment lines.
The delay time represents the relative time interval from the end of the last case output to the start of the current case output, and the delay precision of the case board card in the embodiment of the invention is 10 nanoseconds.
The repetition times represent the times of continuous repeated output of the currently selected case, and if the times is 1, the current case is ended and the next case output is automatically started; if the current instance output is greater than 1, the current instance output and the delay time are cycled until the set number of times is reached.
The PXIe/PXI industrial control cabinet is provided with a system slot and a plurality of peripheral slots, wherein the plurality of peripheral slots comprise a star-type trigger controller slot. The system controller is inserted into a system slot of the PXIe/PXI industrial personal computer, the case output board card is inserted into a set slot except the star trigger controller slot, and the purpose of setting a plurality of slots is to provide a redundant slot so as to expand the functions of the PXIe/PXI industrial personal computer in the later period. In the embodiment of the invention, the PXI industrial control case adopts a 3U eight-slot PXI case with a PXIS-2630 model of Linghua (ADLINK) company, supports 3U PXI and Compact PCI modules, is compatible with PXIRev.2.2 specifications, provides one system slot and 7 peripheral slots, and adopts a PXI-3950 model controller of Linghua (ADLINK) company, and a CPU (central processing unit) of the controller:
Core
TM2 Duo t 75002.2ghz, front-end bus: 800MHz, maximum support 4GB SO-DIMM memory, two gigabit Ethernet RJ-45 network ports with LED display, 4 USB2.0 ports, 320GB SATA hard disk are provided on the front panel. The PXI case conforms to the CPCI mechanical specification, is provided with an air cooling device, conforms to the requirements of industrial environment tests (temperature, humidity, vibration and impact tests) and the like, and ensures the EMC and electrical safety characteristics of the system and the easy integration of the system.
The case output board card is a board card inserted into the PXIe/PXI bus slot, occupies 1 peripheral slot, is designed based on the FPGA technology, and includes an optical signal input port (R1), two signal transmission ports (T1, T2), a standard TTL signal input port and a JTAG debug port, as shown in fig. 2.
Two optical signal output interfaces (T1, T2) of the case output board card are used for outputting case optical signals, the interface type is T-1522Z, and the interfaces are connected with fan-out equipment of the case transmission system through optical fibers. Meanwhile, in order to facilitate system function expansion of the case, the case output board card is also provided with an optical signal input interface (R1), the interface type is R-2522Z, the TTL signal input interface can receive an external TTL level signal, and the JTAG debugging interface is mainly used for performance debugging of the case output board card. The wavelength of a case optical signal output by the case output board card is 660nm, each case consists of 32-Bit binary number, the width of each Bit is 2.56us, the baud rate is 390625Bit/s, the byte sequence is a big-end mode, the FPGA memory is 256MB, and the bus is a standard PXI bus. The color of the output optical signal is visible red light, the bit can be judged to be '1' or '0' through the flashing of the red light of the optical signal output interface, and when the bit is '1', the optical signal output interface flashes the red light; when the position is '0', the light emitting interface does not flicker and is in a 'light-off' state, and when the case output board is clamped in an 'idle' state, the light emitting interface is always in the 'light-off' state.
A case transmission system for communicating the case optical signal.
The case transmission system of the embodiment of the invention adopts an optical fiber technology, and a tree-shaped transmission network formed by connecting a plurality of fan-out devices and plastic optical fibers is responsible for fan-out and distribution of case optical signals of the case generation system to equipment needing to be triggered, and the structure of the case transmission system is shown in fig. 3.
The first-level fan-out device is located at the topmost layer of the tree structure and is responsible for connecting case optical signals output by the case generation system with second-level fan-out equipment located in different areas of the treatment device through plastic optical fibers with equal length, the second-level fan-out equipment is connected with third-level fan-out equipment through the plastic optical fibers, the third-level fan-out equipment is connected with fourth-level fan-out equipment through the plastic optical fibers and extends downwards step by step according to actual requirements until the third-level fan-out equipment is connected to a case receiving/interpreting device or a front-end intelligent controller, and therefore the transmission and distribution functions of.
The fanout device of the embodiment of the invention adopts an ACFO type fanout device developed by modern physical research institute of Chinese academy, and is responsible for receiving the instance optical signals and carrying out power amplification so as to enlarge the network transmission distance. Meanwhile, all nodes are concentrated on the node taking the node as the center, and the fan-out function is realized. The transmission rate of the fan-out device to signals reaches 1MBps at most, red visible light is adopted, the wavelength is 660nm, the frequency is 1MHZ at most, and the working rated voltage is 20-24V (DC). The fanout device provides RS485, RS232 and POF optical fiber standard interfaces, has 9 optical fiber interfaces of the same type, and can realize the function of transmitting an input trigger pulse sequence to 9 devices at the same time by means of an internal circuit, namely the fanout function of inputting signals 1 and outputting signals 9. Meanwhile, the shell is made of aluminum alloy materials, so that the equipment is convenient to install and fix, the shell is grounded, and the EMC and the electrical safety performance of the equipment are improved to a certain extent.
The plastic optical fiber is used as a transmission medium of the case signal, has the characteristics of low signal loss, high transmission speed, long transmission distance, strong anti-interference capability, light weight and the like, and can effectively improve the real-time property, the synchronism and the anti-interference property of the system. Meanwhile, the transmission frequency of the optical signal is far higher than that of the electric wave, strong electric interference is small, and EMC and electrical safety performance of the system are improved.
The case receiving/interpreting device is used for receiving the case optical signal and converting the case optical signal into the case code, comparing the converted case code with the trigger case code stored by the case receiving/interpreting device, if the two case codes are completely consistent, generating a trigger signal or level, and a synchronous device is needed in the trigger accelerator.
The case receiving/interpreting device mainly comprises a case receiving/interpreting device or an intelligent controller, wherein the intelligent controller is a device controller with case receiving and interpreting functions, and the case receiving/interpreting device is an external trigger device prepared for a device without the case interpreting function. Since the intelligent controller of some devices among the devices requiring synchronization has the case receiving/interpreting function, which is equivalent to the case receiving/interpreting function of the intelligent controller, but some devices do not have the case receiving/interpreting function, the case receiving/interpreting function (external trigger device) is provided for the devices without the case interpreting function. The case transmission system directly transmits the case optical signal to the devices with case receiving/interpreting function, and the devices without case receiving/interpreting function receive the case optical signal through the external case receiving/interpreting device.
The case receiving/interpreter is provided with a network interface and an optical signal interface, the network interface is used for receiving a preloaded triggering case code and storing the preloaded triggering case code in the case receiving/interpreter RAM, the purpose of preloading the triggering case code in the case receiving/interpreter RAM is to set a triggering condition for starting operation of the corresponding equipment in advance, the optical signal interface is used for receiving a case optical signal transmitted by a case transmission system, and the purpose of receiving the optical signal is to determine when the corresponding equipment is triggered according to the preloaded triggering case condition. And if the two example codes are completely consistent, the example receiving/interpreting device outputs a transistor-transistor logic (TTL) trigger level to a device needing to be operated and triggers the device. Since the case output system simultaneously transmits case optical signals to the case receiver/interpreter corresponding to each device, each device is triggered exactly according to the timing of the case generation system trigger case.
The example receiver/interpreter of the present invention provides the working frequency range of the RJ45 network jack: DC-2.5 MHz, frequency stability: better than 10-7, frequency accuracy: better than 10ppm, amplitude range, gear 1: 0V to 10V; gear 2: the voltage of-10V to +10V can be set; harmonic distortion: better than 35dBc, clutter distortion: better than-55 dBc, phase noise: the sampling channel self-checking circuit has the advantages of-107 dBc/Hz @10kHz, arbitrary waveform channel self-checking function and double-path sampling channel self-checking function.
The synchronous timing trigger system provided by the embodiment of the invention has control software which is dependent on the synchronous timing trigger system, and the software is integrated and developed by adopting a virtual instrument technology, so that the improvement and function extension of the system in the later period only need to update related software design, and a hardware board card does not need to be changed or redesigned, the hardware research and development period is effectively reduced, the reliability and maintainability of the system are improved, and the difficulty in system upgrading is avoided. The control software includes server control software and instance output board card programs, and the control software constitutes a framework as shown in fig. 4.
The server control software is used as lower computer software (PXIe/PXI industrial personal computer, namely a synchronous timing trigger system server), is a bridge for information interaction between an upper computer (a control computer such as a central monitoring client and the like) and a case output board card, mainly provides a man-machine operation interface, and realizes the functions of protocol conversion, control logic processing, chain logic processing, OPC-UA variable release, case file editing and storage and data transmission (related functions realized by a virtual instrument table technology). And an operator edits and stores the case file through the human-computer interaction interface, sends a case control request instruction and monitors the real-time state of the case output board card. Meanwhile, the server control software is provided with a debugging mode and a treatment mode, all editing and control functions of the man-machine interaction interface of the server control software are locked in the treatment mode, and the server control software is unlocked only when the operation mode is switched to the debugging mode. As described above, the Server control software provides an interpersonal operation interface for operators and engineers to debug, run and maintain, and also serves as an OPC-UA Server to issue key parameters and control commands in the form of OPC-UA variables through a high-speed ethernet, so as to implement information interaction and data transmission between the synchronous timing trigger system and the accelerator central monitoring system and the therapy terminal control system.
The Server control software is the core of the synchronous timing trigger system, adopts LABVIEW and Microsoft Visual Studio software of the American NI company as development tools, is designed based on a C/S (Client/Server) architecture, and performs data interaction with a Client through a standard industrial OPC-UA protocol. Through the design, the synchronous timing trigger can meet the requirement of multi-client access, the problem of communication port and resource conflict when multiple users carry out information interaction with the synchronous timing trigger is solved, the standardization and the standardization of a communication protocol are ensured, the seamless connection between the system and other standard industrial control systems is facilitated, the system development period is greatly shortened, and the selectivity of upgrading and replacing products is improved. Meanwhile, the life cycle of the software is prolonged, so that the whole system is standard and open, and the system is favorable for later system expansion and upgrading.
And the case output board card program generates and outputs case optical signals according to the control instructions and the case files issued by the control software. Meanwhile, the real-time output state of the case output board card is fed back to the server control software, and the function of monitoring the running state of the case output board card is achieved.
Another aspect of the embodiments of the present invention provides a synchronous timing triggering method, including:
s1, the case generation system outputs the case light signal according to the case file.
Specifically, an upper computer (a central monitoring client and a treatment terminal client) issues a case file number and a loading request to a PXIe/PXI industrial personal computer, the PXIe/PXI industrial personal computer automatically indexes a case file corresponding to the case file number in a database according to the case file number, the indexed case file and operation parameters are loaded into an on-board RAM of a case output board card through a high-speed backboard bus, and the case output board card outputs a case optical signal according to the case file;
s2, the case transmission system fans out and distributes the case optical signal into a plurality of case optical signals and outputs them at the same time.
The case transmission system comprises a fan-out device and plastic optical fibers, wherein the fan-out device is provided with a plurality of output interfaces, and after the fan-out device receives a case optical signal, an internal circuit outputs a plurality of case optical signals which are the same as the case optical signal according to the case optical signal.
S3, the case receiver/interpreter generates a trigger signal or level trigger device based on the case light signal.
The case receiving/interpreter corresponding to each device to be triggered receives the case light signal and converts the case light signal into case codes, the case codes are compared with the trigger case codes stored by the case receiving/interpreter, and if the case codes are completely consistent with the trigger case codes, a trigger signal or a level is generated to trigger the device.
In summary, the embodiments of the present invention provide a synchronous timing trigger system, which can be used for all devices requiring synchronization in a synchronous timing trigger accelerator and a therapy terminal. The system adopts a hardware scheme of PXIe/PXI industrial personal computer + PXIe/PXI plug-in instance output board card, has abundant storage resources and computing resources, can conveniently analyze, process and store data, solves the problem of insufficient computing function and storage resources of the system on chip, and effectively improves the control precision and speed of the system; by applying the virtual instrument technology, the hardware development period is effectively reduced, the reliability and maintainability of the system are improved, and the difficulty in upgrading the system is avoided; the controller and the case output board card in the system carry out data interaction through a PXIe/PXI bus, so that the data transmission speed is ensured, the real-time performance, the reliability and the synchronism of the system are effectively improved, and meanwhile, the PXIe/PXI case expansion slots provide redundant slots for later-period system function expansion; the system can provide multi-client access, adopts a standard industrial communication protocol OPC-UA, solves the problem of communication port and resource conflict, and simultaneously ensures the standardization and the normalization of the communication protocol.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the protection scope of the present invention.