[go: up one dir, main page]

CN116149751A - C# configuration software configuration system - Google Patents

C# configuration software configuration system Download PDF

Info

Publication number
CN116149751A
CN116149751A CN202310043157.1A CN202310043157A CN116149751A CN 116149751 A CN116149751 A CN 116149751A CN 202310043157 A CN202310043157 A CN 202310043157A CN 116149751 A CN116149751 A CN 116149751A
Authority
CN
China
Prior art keywords
module
data
configuration
class
database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310043157.1A
Other languages
Chinese (zh)
Inventor
郑笑彬
赵峰
于海峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Merchants Bureau Cruise Manufacturing Co ltd
China Merchants Heavy Industry Jiangsu Co Ltd
Original Assignee
China Merchants Bureau Cruise Manufacturing Co ltd
China Merchants Heavy Industry Jiangsu Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Merchants Bureau Cruise Manufacturing Co ltd, China Merchants Heavy Industry Jiangsu Co Ltd filed Critical China Merchants Bureau Cruise Manufacturing Co ltd
Priority to CN202310043157.1A priority Critical patent/CN116149751A/en
Publication of CN116149751A publication Critical patent/CN116149751A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Programmable Controllers (AREA)

Abstract

The invention relates to the field of ship automation control, and discloses a C# configuration software configuration system, which comprises: the local computer and the database thereof are communicated with the data structure module through the data communication module; the data structure module is respectively connected with the graphical display module and the alarm display module and is communicated with the data management module; the database is respectively communicated with the window configuration module, the communication configuration module and the data persistence module; the data structure module is connected with the data persistence module. The invention realizes the functions of configuration display and history record of the monitoring alarm system such as the ship central control, the branch control and the valve remote control system. The software of the invention is independent of payment application provided by a PLC manufacturer, is fully and independently researched and developed, has good compatibility to different communication protocols, runs stably, and saves the purchase cost of configuration software. The method is customized and developed for the ship monitoring alarm system, is simple to operate when applied to the ship industry, can realize quick development, and saves the development cost of configuration pictures.

Description

C# configuration software configuration system
Technical Field
The invention relates to the field of ship automation control, in particular to an independently-developed ship automation configuration software configuration system.
Background
The configuration software is used as a development tool of a human-machine interface (HMI) in automatic control, is an important component for implementing the automatic control process of the ship, and is usually provided by a PLC manufacturer or matched software in a complete set of DCS system and a Mimic system.
The current configuration software market is mainly dominated by European and American countries, and has the problems of expensive unit price, charging according to points, large functions, complicated use and the like; the domestic configuration software is late in development and start, and has the problems that the technology is lagged, the requirements of the ship industry cannot be met, the running is unstable and the like.
Although the communication method and the communication system between the CN101963985B data persistence framework and the database proxy are disclosed, the SQL sentence is transmitted to the database proxy, the execution result obtained by the database proxy executing the SQL sentence is converted into a result set which can be identified by the database persistence framework, and the result set is returned to the data persistence framework. But it requires an external module: the SQL sentence transmission module, the result conversion module and the result set return module participate, so that the communication process is increased, and the communication efficiency is influenced.
Therefore, a set of independently developed configuration software is urgently needed to meet the requirement of automatic control in the ship industry.
Disclosure of Invention
Therefore, the invention aims to develop a configuration software configuration system which can be rapidly developed aiming at the ship industry and is capable of opening a bottom layer source code so as to increase and modify functions at any time, is easy to maintain and has high communication efficiency.
In order to solve the above technical problems, the present invention provides a c# configuration software configuration system, comprising: the local computer and the database thereof are communicated with the data structure module through the data communication module; the data structure module is respectively connected with the graphical display module and the alarm display module and is communicated with the data management module; the database is respectively communicated with the window configuration module, the communication configuration module and the data persistence module; the data structure module is connected with the data persistence module.
Further, the database is a MySQL database.
Further, the data communication module performs real-time data communication with each PLC on site by utilizing a multithreading technology, acquires data from each PLC, and invokes a unified interface function to distribute the data to different data modules.
Further, the data management module contains CommonClass items, wherein the CommonClass items comprise BaseDevice class, PLC class, basePLC class, API class, site class, users class, DAO class, BLL class, forms class, config class and Display class.
Further, the data management module reads the data in the database in a multithreading mode at regular time.
Further, the graphical display module contains SharpMimic software with UserItems.
Furthermore, the local computer stores an ini configuration file of the master-slave mode and the database position parameters.
Compared with the prior art, the invention has the following beneficial effects:
1. the data structure module is respectively connected with the graphical display module and the alarm display module, and is communicated with the data management module and the data communication module, the database is respectively communicated with the window configuration module, the communication configuration module and the data persistence module, and the data structure module is connected with the data persistence module, so that the configuration display and the history record functions of the ship central control, the sub control, the valve remote control system and the like, which need to monitor the alarm system, are realized. The software of the invention is independent of payment application provided by a PLC manufacturer, is fully and independently researched and developed, has good compatibility to different communication protocols, runs stably, and saves the purchase cost of configuration software. The method is customized and developed for the ship monitoring alarm system, is simple to operate when applied to the ship industry, can realize quick development, and saves the development cost of configuration pictures.
2. The database is in the local computer to which the configuration software belongs, no independent data server exists, the software is not web service, but is in a C/S mode in the local area network, so that the database proxy is not required to forward data, and each client software can directly communicate the data with the local MySQL database. The functions of SQL statement transfer, conversion, result set return and the like are realized internally by the data persistence module, no external module is needed to participate, and the communication efficiency is high.
3. The invention can modify the configuration file at any time through the master-slave mode and the ini configuration file of the database position parameter stored in the local computer. The SharpMimic software of the graphic display module contains UserItems item, reserves the interface for modifying and adding new control, and can add and modify functions at any time.
Drawings
FIG. 1 is a schematic diagram of the structure of the present invention.
Fig. 2 is a network topology of the present invention.
FIG. 3 is a flow chart of the secondary development of the invention in a typical project.
FIG. 4 is a diagram of the relationship between references among items of the present invention.
Description of the embodiments
As shown in fig. 1 and 2, the c# configuration software configuration system includes: a local computer, and its database,
the local computer is communicated with the data structure module through the data communication module; the data structure module is respectively connected with the graphical display module and the alarm display module and is communicated with the data management module; the database is respectively communicated with the window configuration module, the communication configuration module and the data persistence module; the data structure module is connected with the data persistence module. The data structure module defines and stores a data structure, utilizes three characteristics of object-oriented encapsulation, inheritance, polymorphism and the like, effectively isolates data storage from data processing and data display, and is easy to maintain and expand. The configuration display and history record functions of the ship center control, the branch control, the valve remote control system and the like needing monitoring and alarming systems are realized. The application software is independent of payment application provided by a PLC manufacturer, is fully and independently researched and developed, has good compatibility to different communication protocols, is stable to operate, and saves the purchase cost of configuration software. The method is customized and developed for the ship monitoring alarm system, is simple to operate when applied to the ship industry, can realize quick development, and saves the development cost of configuration pictures.
The database is a MySQL database, is preinstalled in a local computer, can directly import preset data, and can also modify the data through a window configuration module and a communication configuration module.
The data communication module performs real-time data communication with each PLC on site by utilizing a multithreading technology, sends a data request instruction, acquires data, writes the data into the data structure module, and simultaneously writes a control instruction generated by the software into the PLC, so that the simultaneous communication of 4 IP addresses of the PLC redundancy and the double network cards is supported.
The data management module contains CommonClass items for setting information such as whether an alarm signal is blocked or not, medium density in a storage tank and the like, and the CommonClass items call a predefined method in the data structure module to modify corresponding data, write the data into a database, and simultaneously read the data in the database in a multithreading mode at regular time so as to realize data synchronization among a plurality of clients. The data management module reads the data in the database in a multithreaded mode at regular time. The data management module is used for setting information such as whether an alarm signal is blocked or not, medium density in the storage tank and the like, calling a predefined method in the data structure module to modify corresponding data, writing the data into the database, and simultaneously, regularly reading the data in the database in a multithreading mode to realize data synchronization among a plurality of clients.
The data persistence module is connected with the database through third-party open source software mysql.dll and executes commands. The data persistence module is responsible for integrating data into an sql command which can be identified by the database, and is connected with the database through third-party open source software mysql.dll and executes the command, and can also reversely read the data from the database for system call.
The graphical display module contains SharpMimic software with UserItems. The graphical display module is responsible for man-machine interaction, triggers a redrawing function through a data change event in the subscription data structure module, displays state information of the field flow and equipment in modes of graphics, characters, buttons and the like, and acquires data input by a user through a mouse and a keyboard.
The local computer stores an ini configuration file of a master-slave mode and database position parameters.
The alarm display module encapsulates functions such as alarm display, alarm inquiry, alarm confirmation and the like, and the interface refreshing is triggered by the alarm change event in the subscription data structure module, so that the displayed content is consistent with the alarm content in the background data.
The window configuration module is responsible for configuring relevant information of each window to be displayed, such as a window Chinese display name, a window English display name, a window corresponding information such as a cs file name, a window visibility level, a window default operation site and the like, and the window configuration module realizes the synchronization of the configuration of all clients by directly writing data into a database serving as a master station client.
The communication configuration module is responsible for defining the ip address and communication protocol of the PLC, and the information of signal names, chinese display names, english display names, register addresses, alarm Chinese names, alarm English names, alarm levels, alarm groups, whether values are stored in a trend chart, dead zones, overtime time and the like of all communication points. When the data changes, these attribute values will be used to determine whether an alarm is generated, what type of alarm is generated, and the corresponding alarm display.
The configuration software can be rapidly developed aiming at the ship industry, and the bottom layer source code is opened, so that functions can be added and modified at any time, and the configuration software is easy to maintain. The development method comprises the following steps:
as shown in fig. 3, using VS2015 programming, programming language c#, in order to facilitate project management, a mode of multiple projects under a solution is adopted, and software projects such as CommonClass, formManager, PLCManager, sharpMimic, tagConfig, userForms, userItems, userModels are set up under SharpMimic;
the CommonClass corresponds to a data structure module, a data management module, a data communication module and a data persistence module, and is used for basic management functions such as data type management, IO management and file management. FormManager, PLCManager, tagConfig are three configuration tools, the FormManager corresponds to the window configuration module; PLCManager, tagConfig corresponds to a communication configuration module. The Sharpimic corresponds to the graphic display module and is used for display management. UserForms, userItems, userModels is a secondary development tool for saving a template page, a user window and a user control for secondary development, wherein part of the controls are well defined in UserItems, and new controls can be continuously added on the basis. UserForms is used to develop and layout pictures secondarily, userItems is used for device control definition, and UserModels is used to manage device models.
The data structure module is a set of entity classes, integrates data into a hierarchical nested structure in an object-oriented manner, and realizes a uniform interface. When the data communication module acquires data from the local computer, a unified interface function can be called to distribute the data to different data modules, and the type does not need to be judged externally to be what type is; when the alarm control and the display control acquire equipment data, the unified interface is also used for acquiring equipment attributes, so that the equipment type does not need to be judged; when the state of the equipment is changed and the display control is required to be refreshed, the method is also executed by using a unified event-triggered refreshing method, and a polling mode is not required to judge whether the value is changed or not. This module repeatedly embodies three major object-oriented features: packaging, inheritance and polymorphism are used as core structures for the whole project, and all data flow and event triggering are realized through the module.
The CommonClass item contains the following functions:
defining a device class BaseDevice and a plurality of nested classes by utilizing the object-oriented characteristic of C# language, wherein the device class BaseDevice and the plurality of nested classes are used for managing the attribute of the device, including a basic alarm point, a basic record point, a basic button and the like, and the types comprise methods of storing, judging value change, writing data into an output buffer area and persistence, triggering an event when the value is changed and the like, so that corresponding codes do not need to be written again when the device is newly added with the attribute;
the BaseDevice class is used as a base class of all devices, and is defined to inherit the BaseDevice class by types such as a switch valve, an opening valve, a pump, a motor, a fan, an analog quantity, a switching value and the like, and realize interfaces in the BaseDevice class so as to enable all the devices to realize unified properties and methods, which is very convenient and fast when various different device types in the same window are managed subsequently;
the PLC class and the nested class thereof are used for managing PLC communication, so that the program support is communicated with a plurality of groups of redundant PLCs simultaneously; the PLC is a field hardware device, not a component of software, and may be a programmable logic controller in a conventional sense, or may be an intelligent device having only a communication function, such as an intelligent ammeter.
The BasePLC class is used as a base class of all communication protocols, modbusTcp and Siemens S7 classes are defined to inherit BasePLC, the methods of reading data from the PLC and distributing corresponding device data to corresponding devices are realized, and how the data in each data segment are distributed to the device attribute is realized by a device interface function, so that three characteristics of object-oriented encapsulation, inheritance and polymorphism are fully reflected;
the API class is used for calling a system API to realize alarm sounding and alarm silencing;
site class is used for Site management, including operations such as Site authority, site request control, site agreeing to control request, site retrieving control authority, etc.;
users are used for managing user login, including functions of verifying user name and password, user login, user logout, etc.;
the DAO class is used for the communication of the bottom layers of databases such as SqlServer, mysql and the like;
the BLL class is used for defining table names, column names and sql statement splicing required in specific operation processes such as adding, deleting, modifying and checking in the process of communicating with the database;
the Forms are used for defining general warning and progress windows which need to be popped up in the running process;
the Config class is used for reading and writing the ini configuration file;
the Data class is used for storing system operation related status words;
the Display class is used for storing the attribute and method that the system changes the ground color;
the Language class is used for switching related Chinese/English attributes, methods and events of the system;
the version controller class is used to determine the system version at regular time, read the data from the server database and update the local database.
The SharpMimic project contains the following functions:
providing a program entry, initializing Commonclass item attributes and automatically calling a method for reading a configuration file and a database;
providing a main window so as to provide a general menu and a panel for the subsequent window to be displayed in the area;
providing a timer to periodically refresh the control states in the window;
providing a general menu popup;
all menus and popup windows are configured with the number of automatic buttons according to the database, and the colors and the characters of the buttons are automatically changed according to the display setting and the language setting;
the usermodes project provides general panel types, general user controls and general popup window types, the types provide general methods of automatically changing the ground color, automatically refreshing internal control display according to a clock or a change event, automatically controlling the display range and the like, and repeated codes do not need to be written as long as the subsequent window and control inherit the basic types;
the UserForms project is used for self-defining display forms, can be independently developed outside the project, can be changed and compiled only by referencing dll without source codes, and ensures the safety and convenience of the source codes;
the UserItems item provides various controls such as a report control, a valve control, a pump control, a motor control, a fan control, a storage tank control, an analog display control, an alarm lamp control and the like for displaying the state of the field device, and provides various shapes such as pipelines, lines, circles, arcs, rectangles and the like for picture layout, and meanwhile reserves interfaces for modifying and adding new controls;
the FormManager item defines a window of a window configuration tool and a series of corresponding methods for writing configuration into a database;
the PLCManager project defines a window of a PLC configuration tool and a method for reading and writing a database;
the TagConfig item defines a window of a communication point configuration tool, and a series of methods of importing and exporting Excel files, verifying the validity of data, reading and writing databases and the like.
As shown in fig. 4, in operation, the PLC is started: and (3) finding an engineering file catalog, and double-clicking a Sharpmic.sln mouse to open an engineering by using a Visual Studio 2015 installed in the system.
And opening the main window: and opening a solution resource manager, finding a MainForms file, and opening a main window by double mouse clicking.
Editing a main window: after the main window is opened, the main window can be edited like a normal winform project.
Editing an operation window:
and adding a user control to a right key in the UserForms of the engineering, and dragging and dropping tools in the left toolbox into the control by using a mouse to finish the editing work of the running window, wherein the specific window style is dragged and dropped according to the requirement.
And (3) configuring an operation window: in the output Files folder, there is a formmanager file, and the running window can be configured by double-click opening, a root node or a child node can be added, chinese and English names can be configured for each node, the window name to be opened or the script name to be executed can be configured, and the default site and authority of the window can be configured.
Running a program: RUN can be clicked in VS, or shared RUN can be found in the output Files folder.
And (3) switching a window: clicking the corresponding tree label or the button corresponding to the top can switch the displayed window.
Switching languages and display modes: clicking the bottom side bar by right click of the mouse can pop up a menu, language supports Chinese and English, and display modes are divided into daytime and night.
Closing the window: the window is automatically displayed in full screen without a quit button, if the window needs to be closed, a win key needs to be pressed first, a window icon is clicked by a right key, the window is closed, a window password input box is automatically flicked by the window, a correct password is required to be input, the window can be closed, and the password can be modified in a window script.
Modifying the configuration file: in the OutputFiles/config folder, the config. Ini file is opened with a notepad tool to modify the configuration file, including:
the Modbus label is internally provided with parameters related to the Modbus protocol;
the Printer label is internally provided with a printing related parameter, and a Printer port number can be configured;
within the Database tag are Database-related parameters, configurable Database addresses;
within the Site tag are operator station related parameters, each operator station name and current operator station being configurable.
And (3) configuring a PLC: and (3) opening a PLCManager.exe file, and configuring a PLC communication protocol, redundancy/non-redundancy, single network card/double network cards, wherein each PLC needs to be allocated with a PLC ID, the PLC ID is not repeatable, and the subsequent configuration of equipment needs to be designated in which PLC the equipment is located.
Configuring a device table: opening the tagconfig. Exe file requires filling in the device name, device type, device register address of the corresponding PLC, device chinese name, device english name, which can be imported by editing in excel.
Configuring an alarm point table: in the same way, in TagConfig.exe, the first label on the right side of the picture needs to be filled with alarm id, equipment name, alarm level, alarm group, alarm Chinese name, alarm English name and alarm locking state. This table can be imported by editing in excel.
Configuring an operation point table: in the same way, in tagconfig. Exe, the second label on the right side of the picture needs to be configured with a signal code number, a device id, a signal chinese name, a signal english name, a dead zone, a timeout time, whether to record, etc., and the table can be imported after editing in excel.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (7)

  1. A c# configuration software configuration system comprising: a local computer, and its database, characterized in that:
    the local computer is communicated with the data structure module through the data communication module; the data structure module is respectively connected with the graphical display module and the alarm display module and is communicated with the data management module; the database is respectively communicated with the window configuration module, the communication configuration module and the data persistence module; the data structure module is connected with the data persistence module.
  2. 2. The c# configuration software configuration system of claim 1, wherein: the database is a MySQL database.
  3. 3. The c# configuration software configuration system of claim 1, wherein: the data communication module performs real-time data communication with each PLC on site by utilizing a multithreading technology, acquires data from each PLC, and invokes a unified interface function to distribute the data to different data modules.
  4. 4. The c# configuration software configuration system of claim 1, wherein: the data management module contains CommonClass items, wherein the CommonClass items comprise BaseDevice class, PLC class, basePLC class, API class, site class, users class, DAO class, BLL class, forms class, config class and Display class.
  5. 5. The c# configuration software configuration system of claim 1, wherein: the data management module reads the data in the database in a multithreaded mode at regular time.
  6. 6. The c# configuration software configuration system of claim 1, wherein: the graphical display module includes SharpMimic software with UserItems items.
  7. 7. The c# configuration software configuration system of claim 1, wherein: and the local computer stores an ini configuration file of a master-slave mode and database position parameters.
CN202310043157.1A 2023-01-29 2023-01-29 C# configuration software configuration system Pending CN116149751A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310043157.1A CN116149751A (en) 2023-01-29 2023-01-29 C# configuration software configuration system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310043157.1A CN116149751A (en) 2023-01-29 2023-01-29 C# configuration software configuration system

Publications (1)

Publication Number Publication Date
CN116149751A true CN116149751A (en) 2023-05-23

Family

ID=86357760

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310043157.1A Pending CN116149751A (en) 2023-01-29 2023-01-29 C# configuration software configuration system

Country Status (1)

Country Link
CN (1) CN116149751A (en)

Similar Documents

Publication Publication Date Title
US6053951A (en) Man/machine interface graphical code generation wizard for automatically creating MMI graphical programs
US6198480B1 (en) Object-oriented tag browser
JP6549748B2 (en) Process control configuration method, process control configuration system, and software system
US6078320A (en) System for configuring a process control environment
US8019796B1 (en) Incremental association of metadata to production data
US6466973B2 (en) Method and system for managing storage devices over a network
WO2014064819A1 (en) System building assistance tool and system
WO1998036353A1 (en) System for configuring a process control environment with graphical elements
JP2002502072A (en) Method and apparatus for creating a dedicated monitoring and control data collection system for managing and integrating enterprise real-time applications and systems
EP2084593A2 (en) Data quality and status behavior for human machine interface graphics in industrial control and automation systems
CN104765843B (en) A kind of Graphic Interface Control method for electric power real-time monitoring system
JP4260221B2 (en) System and method for managing a transaction database of records of changes to field device configurations
US5604907A (en) Computer system for executing action slots including multiple action object classes
US6216149B1 (en) Method and system for efficient control of the execution of actions in an object oriented program
JPH04313118A (en) Attribute data managing method
CN116149751A (en) C# configuration software configuration system
Bennett et al. Transformations on a dialog tree: rule-based maping of content to style
JPH11134085A (en) Method and apparatus for monitoring and controlling real-time information in a building automation system
US20030188292A1 (en) System and method for configuration using an object tree formed of hierarchically graduatable objects
CN111651142B (en) Configuration type demonstrator management system
CN113641842A (en) BIM-based atlas query method
CN120909474B (en) A method for dynamically constructing display and control software based on visual data forms
CN120909586B (en) A method, apparatus, computer storage medium, and terminal for generating page files.
US20250244956A1 (en) Bulk configuration of new devices and topology management
Jiancheng et al. A model of user interface design and its code generation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination