Simulation device and simulation method of nuclear safety class DCS field control station and storage medium
By constructing a virtual field control station, consistency in site configuration, intra-site data communication, inter-site data communication, and external data communication is achieved, solving the inconsistency problem in existing technologies. It also has simulation command processing capabilities, improving the response speed and computational efficiency of the simulation device.
Patent Information
- Application Number
- CN202410566431.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-09
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-05-09
AI Technical Summary
Current simulation control devices in safety-grade DCS systems have inconsistencies with safety-grade DCS in terms of site configuration, intra-site data communication, inter-site data communication, external data communication, and site logic operation functions. Furthermore, they lack the ability to process simulation commands and cannot meet actual needs.
Multiple virtual field control stations are constructed, and communication between the station and the outside world is realized through virtual board modules, communication modules and data processing modules. A simulation processing module is used for command processing, and a multi-threaded management method is used to improve response speed and computing efficiency.
It achieves consistency with the safety-level DCS in terms of site configuration, intra-site data communication, inter-site data communication, and external data communication, and has simulation command processing capabilities, thereby improving the response speed and computational efficiency of the simulation device.
Smart Images

Figure CN118444645B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of instrument control simulation, in particular to a simulation device and method for a nuclear safety class DCS field control station and a storage medium. BACKGROUND
[0002] The field control station places the control module and I / O module in the control room in the original DCS into field bus equipment, does not rely on the computer in the control room, and directly completes in the field to realize complete decentralized control. In a safety class DCS system, the FCS is the basis of the entire system and is the core of ensuring the safe operation of the system. Usually, the manufacturer equipped with a safety class DCS system will correspondingly be equipped with a virtual DCS for operator training and examination, control system function verification, and fault simulation.
[0003] In the current simulation control, the station configuration, intrastation data communication, interstation data communication, external data communication, and station logic operation function are inconsistent with the safety class DCS, and there is a lack of processing of simulation instructions, so that the simulation capability of the simulation device cannot meet the actual demand. SUMMARY
[0004] The present application is to solve the above problems, and aims to provide a simulation device and method for a nuclear safety class DCS field control station and a storage medium, which realizes virtualization of the field control station, ensures that the station configuration, intrastation data communication, interstation data communication, external data communication, and station logic operation function are consistent with the safety class DCS, and has a simulation instruction processing function.
[0005] The present application is realized by the following technical solutions:
[0006] In a first aspect, a simulation device for a nuclear safety class DCS field control station includes a plurality of virtual field control stations for simulating the present field control station, and the virtual field control station includes:
[0007] A virtual board card module for simulating various board cards in the field control station;
[0008] A communication module for realizing intrastation communication between the virtual board card module, the data processing module, and the simulation processing module, and realizing extrastation communication between the virtual field control station and external modules;
[0009] A data processing module for generating and managing data in the virtual field control station;
[0010] A simulation processing module for realizing simulation-related instruction processing logic.
[0011] Specifically, the external module includes a virtual engineer station, a virtual safety display unit, other virtual field control stations, and simulation control service software.
[0012] The communication module realizes the downloading, monitoring, and maintenance communication between the virtual field control station and the virtual engineer station.
[0013] The communication module realizes the inter-station communication between the virtual field control station and the virtual safety display unit.
[0014] The communication module realizes the simulation communication between the virtual field control station and the simulation control service software.
[0015] The communication module realizes the inter-station communication between the virtual field control station and other virtual field control stations.
[0016] In a second aspect, a simulation method of a nuclear safety level DCS field control station is based on a simulation device of a nuclear safety level DCS field control station as described above, and the simulation method includes:
[0017] Performing the inter-station communication connection and the external communication connection of the virtual field control station;
[0018] Performing the data processing of the virtual field control station;
[0019] Creating a virtual board card;
[0020] Processing the simulation instruction to complete the simulation of the virtual field control station on the existing field control station.
[0021] Specifically, the communication processing process includes:
[0022] Initializing the virtual field control station, and configuring the legal IP of the same network segment for the virtual field control station and the external module;
[0023] Taking the virtual field control station as a server, and establishing communication with the virtual safety display unit;
[0024] Taking the virtual field control station as a server, and establishing two communication servers connected with the virtual engineer station, the communication types include maintenance data communication and downloading data communication, the maintenance data communication is used for real-time data interaction with the virtual engineer station in the maintenance or running mode, and the downloading data communication is used for sending the downloading file from the virtual engineer station to the corresponding main control board card in the downloading mode, the main control board card of the virtual field control station includes a main control board card A and a main control board card B;
[0025] Taking the virtual field control station as a server and a client at the same time, and establishing a communication connection through an inter-station communication IP address;
[0026] The virtual field control station is taken as a client and is connected with a simulation control service software, all variable data and state data of a project are buffered in the simulation control service software, the virtual field control station sends output variable data and equipment state data to the simulation control service software every cycle and acquires all input variable data.
[0027] Specifically, it is judged whether there is a downloaded configuration file in the virtual field control station, if not, the process is ended, if yes, device data and variable data are parsed, the variable data are sent to the simulation control service software, communication with other virtual field control stations is established, and variable data shared memory, state data shared memory and communication shared memory are created.
[0028] The method for creating the variable data shared memory comprises that: the process of the master control board card of the hot backup configuration uses the same shared memory as real-time data buffer, and makes all variable data of the same type use a continuous shared memory.
[0029] The method for creating the state data shared memory comprises that: the shared memory for buffering all board card state data is established, and the master control board card acquires state information of other board cards by accessing the shared memory.
[0030] The method for creating the communication shared memory comprises that: the shared memory for communicating with external modules is used as the input buffer and the output buffer of communication, so that the input data and the output data of the virtual field control station are unique, and the board card synchronously inputs and outputs data from the buffer.
[0031] Specifically, the method for creating the virtual board card comprises:
[0032] The downloaded configuration file is parsed, the board card configuration list is determined, the board card type, the board card state information and the channel enabling information of all virtual board cards in the list are parsed, and the virtual board card is initialized.
[0033] The virtual field control station acquires the space size required by all virtual board cards, uniformly allocates shared memory of corresponding size, and names the shared memory.
[0034] The virtual field control station initializes the shared memory, and binds the information of the virtual board card with the shared memory space.
[0035] When the virtual field control station is periodically operated, the virtual input board card copies input data from the buffer shared memory, and completes signal input; the master control board card acquires data in the shared memory of the corresponding virtual input board card according to algorithm configuration, runs the algorithm, and then copies the result to each virtual output board card; the virtual output board card copies output data to the buffer shared memory, and completes signal output.
[0036] Specifically, the simulation processing process comprises three parallel threads, namely, an instruction receiving thread, an instruction processing thread and a main loop thread.
[0037] The instruction receiving thread is configured to listen to a network connection, receive simulation instructions from the network and send the instructions to the thread pool.
[0038] The instruction processing thread is configured to judge the instruction data and output a simulation state to the main loop thread.
[0039] The main loop thread is configured to select whether to stop the simulation during a period of loop execution.
[0040] Specifically, the instruction receiving thread comprises the following steps.
[0041] The simulation instructions are received through the network and sent to the thread pool.
[0042] The instruction processing thread comprises the following steps.
[0043] The simulation instructions in the thread pool are read, and it is judged whether the simulation instructions need to be switched in a stop state, if yes, the simulation instructions are sent to the main loop thread after the main loop thread completes a loop; if no, the simulation instructions are sent to the thread pool, the simulation instructions are processed, and then the processed simulation instructions are sent to the main loop thread after the main loop thread completes a loop.
[0044] The main loop thread comprises the following steps.
[0045] After a current period is completed, the simulation instructions sent by the instruction processing thread are received, it is judged whether the simulation needs to be stopped, if yes, the simulation is stopped; if no, a simulation state in the simulation instructions is determined, and the simulation instructions are processed according to the simulation state.
[0046] A computer readable storage medium, the computer readable storage medium stores a computer program, characterized in that the computer program is executed by a processor to realize the simulation method of the nuclear safety level DCS field control station according to any one of the above.
[0047] Compared with the prior art, the simulation method of the nuclear safety level DCS field control station has the following advantages and beneficial effects.
[0048] The application greatly facilitates the function expansion of the board card by constructing multiple virtual field control stations and virtually various types of board cards through the virtual board card module; the communication between the stations and outside the stations is realized through the communication module, the data exchange between the modules is more efficient through the creation of the shared memory by the data processing module; finally, the simulation processing is realized through the simulation processing module, and the multi-thread management is adopted to realize the running and scheduling of each task of the virtual control station, so that the response speed of the virtual control station is faster and the calculation efficiency is higher. BRIEF DESCRIPTION OF DRAWINGS
[0049] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the principles of the application. In the drawings:
[0050] Figure 1 is a structural schematic diagram of a simulation device of a nuclear safety level DCS field control station according to the application.
[0051] Figure 2 is a flow schematic diagram of a simulation method of a nuclear safety level DCS field control station according to the application.
[0052] Figure 3 is a flow schematic diagram of a simulation processing process according to the application.
[0053] Figure 4 is a logic flow diagram of the establishment of the down-loaded data communication according to the application.
[0054] Figure 5 is a shared memory distribution diagram of the third embodiment according to the application.
[0055] Figure 6 is a stop instruction processing logic flow diagram according to the application.
[0056] Figure 7 is a run instruction processing logic flow diagram according to the application.
[0057] Figure 8 is a freeze instruction processing logic flow diagram according to the application. DETAILED DESCRIPTION
[0058] To make the objects, technical solutions and advantages of the application clearer, the application will be further described in detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the related content, and are not a limitation on the application.
[0059] It should also be noted that, for ease of description, only the parts relevant to the present invention are shown in the accompanying drawings.
[0060] Where there is no conflict, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0061] Example 1
[0062] like Figure 1 As shown, this embodiment provides a simulation device for a nuclear safety-grade DCS field control station, including multiple virtual field control stations (VPSs) for simulating real-world field control stations. The virtual field control stations include:
[0063] The virtual board module is used to simulate various boards in a field control station; it is used for various boards included in a virtual field control station, including the main control board VPU, IO acquisition card, communication card, etc.
[0064] The communication module is used to realize intra-station communication between virtual board modules, data processing modules, and simulation processing modules, as well as inter-station communication between the virtual field control station and external modules. External modules include Virtual Engineer Station (VMTS), Virtual Safety Display Unit (VSVDU), other Virtual Field Control Stations (VPS), and Simulation Control Service Software (SDS).
[0065] The data processing module is used to generate and manage data in the virtual field control station;
[0066] The simulation processing module is used to implement simulation-related instruction processing logic, including project running, pausing, stepping, saving and loading of working conditions, fault settings, etc.
[0067] The communication module enables downloading, monitoring, and maintenance communication between the virtual field control station and the virtual engineer station, such as... Figure 4 As shown, the communication module enables inter-station communication between the virtual field control station and the virtual safety display unit; the communication module enables simulation communication between the virtual field control station and the simulation control service software; and the communication module enables inter-station communication between the virtual field control station and other virtual field control stations.
[0068] Example 2
[0069] like Figure 2 As shown, a simulation method for a nuclear safety-grade DCS field control station is provided. Based on the simulation device for a nuclear safety-grade DCS field control station described above, the simulation method includes:
[0070] First, the inter-station communication connection and the external communication connection of the virtual field control station are made. The communication involved in the field control station includes the intra-station communication (the communication between the master control board and other board), the inter-station communication (the communication with other control stations), the maintenance data communication (the communication with the engineer station), and the simulation communication (the communication with the simulation control service software). Except for the intra-station communication which adopts the shared memory communication mode, the other communications adopt the TCP / IP communication for simulation.
[0071] The communication processing procedure includes:
[0072] The virtual field control station is initialized, and the legal IP of the same network segment is configured for the virtual field control station and the external module. In the running process of the VPS (virtual field control station), the VPS needs to communicate with the VMTS (virtual engineer station), the VSVDU (virtual safety display unit), other VPS (virtual field control station), and the simulation control service software (SDS). When the VPS (virtual field control station) is initialized, the legal IP of the same network segment of the above software is added to the VPS to establish the relevant communication connection. The relevant IP is configured by the user in the stage of adding the project VPS (virtual field control station).
[0073] The virtual field control station is taken as the server, and the communication with the virtual safety display unit is established. In the communication process with the VSVDU (virtual safety display unit), the VPS (virtual field control station) is taken as the server to wait for the connection of the VSVDU (virtual safety display unit). The communication data with the VSVDU (virtual safety display unit) is managed by the VPU process. The communication module receives the input data and sends the output data at a fixed period.
[0074] The virtual field control station is taken as a service end, two communication service ends connected with the virtual engineer station are established, the communication types include maintenance data communication and download data communication, the maintenance data communication is used for real-time data interaction with the virtual engineer station in a maintenance or running mode, the download data communication is used for sending a download file to a corresponding main control board card by the virtual engineer station in a download mode, the main control board card of the virtual field control station includes a main control board card A and a main control board card B; in the communication process with the VMTS (virtual engineer station), the VPS (virtual field control station) is taken as a service end and waits for the connection of the VMTS (virtual engineer station). In a hot backup configuration mode, the master and slave VPU (main control board card) contained in the VPS (virtual field control station) all need to correspond to an IP, that is, the VPS (virtual field control station) will establish two communication service ends with the VMTS (virtual engineer station). According to the communication type with the VMTS (virtual engineer station), it is divided into maintenance data communication and download data communication. The maintenance data communication is used for real-time data interaction with the VMTS (virtual engineer station) in a maintenance or running mode. The download data communication is used for sending a download file to a corresponding VPU (main control board card) by the VMTS (virtual engineer station) in a download mode.
[0075] The virtual field control station is taken as a service end and a client end at the same time, and a communication connection is established through an inter-station communication IP address; the VPS (virtual field control station) inter-station communication adopts a TCP / IP mode for communication, which is completed by a virtual communication card (VCOM card). When inter-station communication is performed, the opposite end station and the local end station establish a connection through an inter-station communication IP address, the VPS (virtual field control station) is taken as a service end and a client end.
[0076] The virtual field control station is taken as a client end, and a connection is established with a simulation control service software, all variable data and state data of a project are buffered in the simulation control service software; the virtual reality control station sends output variable data and device state data to the simulation control service software every cycle, and obtains all input variable data. As a proxy service for external data communication, the SDS (simulation control service software) buffers all variable data and state data of the entire project. The VPS (virtual field control station) needs to send output variable data and device state data to the SDS (simulation control service software) every cycle, and obtain all input variable data. In the communication process, the VPS (virtual field control station) is taken as a client end and establishes a connection with the SDS (simulation control service software).
[0077] Secondly, data processing of the virtual field control station is performed; the data needing to be processed in the field control station includes variable data, state data and communication shared data. Initialization, real-time data updating and fault data updating of the three parts are needed during actual simulation.
[0078] If there is no configuration file, the process ends; if there is, the device data and variable data are parsed, the variable data is sent to the simulation control service software, and communication with other virtual field control stations is established, while the variable data shared memory, the state data shared memory and the communication shared memory are created;
[0079] The method for creating the variable data shared memory includes: the master board card process of the hot backup configuration uses the same shared memory as real-time data cache, and all the same type of variable data uses a continuous shared memory; in order to more effectively perform inter-process communication of the VPU (master board card) in the same station, and to simulate the data synchronization of the station in the hot backup configuration, the shared memory is used to create the relevant dynamic data cache, and the VPU process of the hot backup configuration uses the same shared memory as real-time data cache. All the same type of variable uses a continuous shared memory, which facilitates the synchronous copy operation of the input and output data.
[0080] The method for creating the state data shared memory includes: the shared memory for state data cache is established, and the master board card of the hot backup configuration obtains the state information of other board cards by accessing the shared memory; in order to more effectively perform inter-process communication of the VPU in the same station, and to simulate the state synchronization of the station in the hot backup configuration, the shared memory is used to create the relevant state data cache, including the master mode state, the hot backup state, the fault state and the like. The VPU of the hot backup configuration can obtain the state information of the two VPUs by accessing the shared memory.
[0081] The method for creating the communication shared memory includes: the shared memory for communication with external modules is used as the input buffer and the output buffer of the communication, so that the input data and the output data of the virtual field control station are unique. The communication objects of the VPS (virtual field control station) outside include the VMTS (virtual engineer station), the VSVDU (virtual safety display unit), other VPS (virtual field control station) and the simulation control service software. The VMTS (virtual engineer station) is separately connected with each VPU for communication, so as to simulate the separate download communication and maintenance data communication of the MTS to the master card, and to achieve the effect of separate monitoring of the master and the slave. The other connections are in units of virtual control stations. The input buffer and the output buffer of the communication are realized by the shared memory, so as to ensure that the communication input and output data of each VPU process in the same station are unique, and the board card synchronously inputs and outputs data from the buffer.
[0082] The third step is to create a virtual board card; different board card state information is generated according to the type of the board card, the size and the offset of the information recorded in the shared memory are recorded, and the same size of the input area and the output area are allocated to the board card according to the number of channels of the board card.
[0083] The method for creating a virtual board card comprises:
[0084] The bin file of the device is parsed, the board card configuration list is determined, the board card type, board card state information and channel enabling information of all virtual board cards in the list are parsed, the virtual board card is initialized, and feedback is given to the simulation control service software;
[0085] The virtual field control station obtains the space size required by all virtual board cards, uniformly allocates shared memory of the corresponding size, and names the shared memory. The memory name is used as a unique identifier to distinguish different virtual control stations.
[0086] The virtual field control station initializes the shared memory and binds the information of the virtual board card with the shared memory space. After the shared memory is initialized, the VPS (virtual field control station) binds the variable with the shared memory space of the virtual board card according to the variable information and the space size, offset and channel number of the virtual board card.
[0087] During the periodic operation of the virtual field control station, the virtual input board card copies the input data from the buffer zone shared memory to complete the signal input; the main control board card collects the data in the shared memory of the corresponding virtual input board card according to the algorithm configuration, performs algorithm operation, and then copies the result to each virtual output board card; the virtual output board card copies the output data to the buffer zone shared memory to complete the signal output.
[0088] The communication time of the method is much lower than that through the bus, and only the calculation communication time can be controlled in the us level, meeting the requirement of the main control operation period.
[0089] In the fourth step, the simulation instruction is processed to complete the simulation of the virtual field control station on the actual field control station. The simulation processing process includes three parallel processing threads, namely, an instruction receiving thread, an instruction processing thread and a main loop thread;
[0090] The instruction receiving thread is used for listening to network connection, receiving simulation instructions from the network and sending the instructions to the thread pool;
[0091] The instruction processing thread is used for judging the instruction data and outputting the simulation state to the main loop thread; for the instruction that needs to wait for the end of the current operation period of the VPU, the current simulation state is set, and after the operation period ends, the processing logic is executed; for other types of instructions, the instructions are directly sent to the thread pool for processing.
[0092] The main loop thread is used for executing the periodic cycle and selecting whether to stop the simulation. When the cycle is completed, it is judged whether the simulation state is stopped. If it is not stopped, the simulation state is continued to process the instructions.
[0093] As Figure 3As shown, the instruction receiving thread specifically includes: receiving simulation instructions via the network and sending the simulation instructions to the thread pool.
[0094] The instruction processing thread includes: reading simulation instructions from the thread pool, determining whether a switch to a stopped state is needed based on the simulation instructions, and if so, sending the simulation instructions to the main loop thread after the main loop thread completes its loop; if not, sending the simulation instructions to the thread pool, processing the simulation instructions, and then sending the processed simulation instructions to the main loop thread after the main loop thread completes its loop.
[0095] The main loop thread includes: after completing the current cycle, receiving simulation instructions sent by the instruction processing thread, and determining whether the simulation needs to be stopped. If yes, the simulation is stopped; if no, the simulation state in the simulation instruction is determined, and the simulation instruction is processed according to the simulation state.
[0096] Example 3
[0097] This embodiment provides a specific example of creating a virtual RS485 board.
[0098] The RS485 board has two channels, and each board can connect 10 slave devices. Each slave device can only be connected to one channel. Each slave device can be configured with multiple variables. The variable types are divided into 1-byte switch variables, 16-bit register short type variables, and 32-bit register variables. All virtual RS485 boards have adopted the shared memory method for designing variables and status data.
[0099] 1) State information design
[0100] Use a 4-byte unsigned integer to store the card status and use two bytes to store the channel status.
[0101] 2) Shared memory design
[0102] The size of shared memory is related to the variable configuration. Taking a board with a slave device connected to it and configured with two switch variables, one 16-bit register variable, and one 32-bit register variable as an example, the design of shared memory is explained.
[0103] For ease of unified management, 16-bit registers are also represented using 32 bits. Meanwhile, since variables need to carry quality bits, switch quantities are stored using 2 bytes, and other variables are stored using 5 bytes.
[0104] like Figure 5 As shown, calculations show that, under the variable configuration of the use case, the shared memory space used by the virtual RS485 board is 20 bytes.
[0105] Example 4
[0106] The simulation instruction includes a plurality of instructions, such as a stop instruction, a run instruction, a freeze instruction, etc.
[0107] As shown in Figure 6 , the stop instruction is used to exit the virtual control station. The stop instruction carries a virtual master ID parameter, which indicates the virtual master ID that needs to be stopped: ID = -1 indicates exiting the virtual control station; ID = 0 indicates exiting the virtual master A; and ID = 1 indicates exiting the virtual master B.
[0108] As shown in Figure 7 , the run instruction is used to make the virtual control station enter a simulation running state.
[0109] As shown in Figure 8 , the freeze instruction is used to make the virtual control station enter a simulation freeze state. After entering the state, the VPU kernel will no longer perform periodic scheduling until the run instruction is received again.
[0110] Embodiment five
[0111] A computer readable storage medium, the computer readable storage medium storing a computer program, characterized in that the computer program is executed by a processor to implement the simulation method of the nuclear safety level DCS field control station according to any one of the above embodiments.
[0112] Without loss of generality, the computer readable medium can include computer storage media and communication media. The computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information such as computer readable instruction data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid state storage technology, CD-ROM, DVD or other optical storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device. Of course, those skilled in the art can know that the computer storage medium is not limited to the above several. The system memory and mass storage device mentioned above can be collectively referred to as memory.
[0113] In the description of the specification, the description of the terms "one embodiment / way", "some embodiments / ways", "an example", "a specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment / way or example are included in at least one embodiment / way or example of the present application. In the specification, the illustrative description of the above terms does not necessarily refer to the same embodiment / way or example. Also, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments / ways or examples. In addition, the person skilled in the art can combine and combine the different embodiments / ways or examples described in the specification and the features of the different embodiments / ways or examples, without contradiction.
[0114] In addition, the terms "first", "second" are only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "a plurality of" is at least two, for example, two, three, etc., unless otherwise specifically limited.
[0115] The person skilled in the art should understand that the above-mentioned embodiments are only for the purpose of clearly illustrating the present application, and are not intended to limit the scope of the present application. For those skilled in the art, other changes or modifications can be made on the basis of the above-mentioned application, and these changes or modifications are still within the scope of the present application.
Claims
1. A simulation method for a nuclear safety-grade DCS field control station, characterized in that, A simulation device based on a nuclear safety-grade DCS field control station, the device comprising: multiple virtual field control stations for simulating real-world field control stations, the virtual field control stations comprising: Virtual board module, used to simulate various boards in field control station; The communication module is used to realize intra-station communication between the virtual board module, data processing module, and simulation processing module, as well as to realize inter-station communication between the virtual field control station and external modules. The data processing module is used to generate and manage data in the virtual field control station; The simulation processing module is used to implement the instruction processing logic related to simulation. The external modules include a virtual engineering workstation, a virtual safety display unit, other virtual field control stations, and simulation control service software; The communication module enables downloading, monitoring, and maintenance communication between the virtual field control station and the virtual engineer station; The communication module enables inter-station communication between the virtual field control station and the virtual safety display unit; The communication module enables simulation communication between the virtual field control station and the simulation control service software. The communication module enables inter-station communication between virtual field control stations and other virtual field control stations. The simulation method includes: Establish inter-station and external communication connections for virtual field control stations; Perform data processing for the virtual field control station; Create a virtual board; Processing simulation commands completes the simulation of the real-world field control station by the virtual field control station; The data processing process includes: determining whether a configuration file is installed in the virtual field control station; if not, the process ends; if it is installed, the device data and variable data are parsed, and the variable data is sent to the simulation control service software. Communication with other virtual field control stations is established, and variable data shared memory, status data shared memory, and communication shared memory are created. Methods for creating shared memory for variable data include: hot-standby configuration of the main control board process using the same shared memory as a real-time data cache, and making all variable data of the same type use a contiguous shared memory; The methods for creating a shared memory for status data include: establishing a shared memory for caching the status data of all boards, and the main control board obtaining the status information of other boards by accessing this shared memory; Methods for creating communication shared memory include: using shared memory for communication with external modules as input and output buffers for communication, making the input and output data of the virtual field control station unique, and allowing the board to synchronously input and output data from the buffer.
2. The simulation method for a nuclear safety-grade DCS field control station according to claim 1, characterized in that, The communication processing includes: Initialize the virtual field control station and configure the virtual field control station and external modules with valid IP addresses on the same network segment; The virtual field control station is used as a server and communication is established with the virtual security display unit. The virtual field control station is used as the server, and two communication servers are established to connect with the virtual engineer station. The communication types include maintenance data communication and download data communication. Maintenance data communication is used to perform real-time data interaction with the virtual engineer station in maintenance or operation mode. Download data communication is used to send download files from the virtual engineer station to the corresponding main control board in download mode. The main control board of the virtual field control station includes main control board A and main control board B. The virtual field control station serves as both a server and a client, and establishes a communication connection through inter-station communication IP addresses. The virtual field control station acts as a client and establishes a connection with the simulation control service software. The simulation control service software caches all variable data and status data of the project. The virtual reality control station sends output variable data and equipment status data to the simulation control service software every cycle and obtains all input variable data.
3. The simulation method for a nuclear safety-grade DCS field control station according to claim 1, characterized in that, Methods for creating virtual cards include: Virtual board initialization: Parse the downloaded configuration file, determine the board configuration list, and parse the board type, board status information, and channel enable information of all virtual boards in the list to initialize the virtual boards; Create shared memory: Obtain the space required by all virtual cards, allocate shared memory of the corresponding size, and name the shared memory; Initialize shared memory: The virtual field control station initializes the shared memory and binds the information of the virtual board to the shared memory space.
4. The simulation method for a nuclear safety-grade DCS field control station according to claim 3, characterized in that, During the periodic operation of the virtual field control station, the virtual input board copies input data from the shared memory of the buffer to complete the signal input; The main control board is configured according to the algorithm, collects data from the shared memory of the corresponding virtual input boards, runs the algorithm, and then copies the results to each virtual output board. The virtual output board copies the output data to the shared memory in the buffer area to complete the signal output.
5. The simulation method for a nuclear safety-grade DCS field control station according to claim 1, characterized in that, The simulation process includes three parallel processing threads: the instruction receiving thread, the instruction processing thread, and the main loop thread. The instruction receiving thread is used to listen to network connections, receive simulation instructions transmitted from the network, and send the instructions to the thread pool. The instruction processing thread is used to judge the instruction data and output the simulation status to the main loop thread; The main loop thread is used to select whether to stop the simulation when executing the periodic loop.
6. The simulation method for a nuclear safety-grade DCS field control station according to claim 5, characterized in that, The instruction receiving thread specifically includes: Receive simulation commands over the network and send them to the thread pool; The instruction processing thread includes: Read the simulation instructions from the thread pool and determine whether a switch to a stopped state is needed based on the simulation instructions. If yes, send the simulation instructions to the main loop thread after the main loop thread completes its loop. If no, send the simulation instructions to the thread pool, process the simulation instructions, and then send the processed simulation instructions to the main loop thread after the main loop thread completes its loop. The main loop thread includes: After completing the current cycle, receive the simulation command sent by the command processing thread and determine whether the simulation needs to be stopped. If yes, stop the simulation; if no, determine the simulation state in the simulation command and process the simulation command according to the simulation state.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements a simulation method for a nuclear safety-grade DCS field control station as described in any one of claims 1-6.
Citation Information
Patent Citations
Instrument control simulation system IP distribution method, system and device and storage medium
CN112202937A
Digital simulation design system and method, storage medium and electronic equipment
CN114063472A