Serial port communication system for weak current control
Technical Field
The invention relates to the technical field of weak current control, in particular to a serial port communication system for weak current control.
Background
In a production environment, tasks are processed according to a first-come first-serve principle, the tasks received first are distributed to an AGV, and then the tasks are processed and then received; according to the principle of closeness, the tasks are assigned to the AGVs closest to the task point for execution. The use frequency of raw materials in the warehouse is different, even if the tasks are distributed according to the principle of being nearby, some time overhead is still caused, for example, the actual distance between the AGV and the task point is very long, in the process of the previous task point, if the AGV which is executing the task meets the condition, the completion time of the task can be prolonged, and the problems can be solved by setting the position of the parking point and the number of the AGV. But each company's warehouse has its own working law, and this law will change with the change of the demand, if the existing method is adopted, the setting of parking points and AGVs number needs to be modified in stages, and the discovery, summary of the law and the setting of the rules all need the participation of personnel, the consumption of resources and time; in addition, the scheduling algorithm is not applicable to all companies and all application scenarios, and needs to be manually adjusted.
Disclosure of Invention
In order to overcome the defects in the prior art, the embodiment of the invention provides a serial port communication system for weak current control, which can be used for solving the problems.
The embodiment of the application discloses: the utility model provides a serial communication system for weak current control, includes a plurality of equipment information acquisition subsystem, equipment control subsystem and equipment communication subsystem, equipment information acquisition subsystem with equipment information control subsystem respectively with equipment communication subsystem signal connection, equipment communication subsystem includes external communication module, trigger module, serial ports basic communication module, data detection and retest module, data storage module and host system, wherein:
the external communication modules are in signal connection with the equipment information acquisition subsystem, each external communication module comprises a plurality of communication subunits, the communication subunits are in communication with the corresponding equipment information acquisition subsystem through two shared variables, the two shared variables are respectively a trigger shared variable and a retest shared variable, the data types of the two shared variables are Boolean types, and the initial value is false; the external controller changes the trigger shared variable by receiving a pulse signal sent by the test instrument, and the pulse signal enables the trigger shared variable to be changed into true and false firstly; the external communication module enables the external equipment information acquisition subsystem signal to acquire the data information again by changing the retest shared variable value;
the trigger module is in signal connection with the external communication modules and is used for identifying data information transmitted by each external communication module, judging the running condition of weak current equipment, outputting normal signals when the equipment runs normally, and outputting alarm signals when the equipment runs abnormally;
the serial port basic communication module is used for adjusting four parameters of the baud rate, the data bit, the stop bit and the check bit to be consistent with the parameters acquired by the equipment information acquisition subsystem, and transmitting the data information to the data detection and retest module without starting a terminator in the initialization process;
the data detection and re-measurement module judges whether the data type and the length of the received data are the same as those set by the equipment information acquisition subsystem, if the data type and the length are different, the data are unqualified, and the data information qualified in detection is sent to the main control module;
and the main control module is used for sending a control instruction to the equipment control subsystem according to the received data information and the field operation requirement, and the equipment control subsystem controls the weak point equipment.
Further, the device information acquisition subsystem comprises a sensor module, a UPS power supply module, a power supply switching module, an operation data storage module and a data information integration module, wherein:
the sensor module is connected to the weak current equipment to be detected and used for detecting the operation condition of the weak current equipment and sending the detected data information to the operation data storage module;
the UPS power supply module is used for performing emergency power supply for the operation data storage module and the data information integration module;
the power supply switching module is used for switching a power supply of the equipment information acquisition subsystem to ensure the stability of power supply of the equipment information acquisition subsystem;
the operation data storage module is used for receiving and storing the operation data of the weak current equipment acquired by the sensor module, and marking a timestamp on the data information in the process of storing the operation data;
and the data information integration module is used for integrating the data information stored in the operating data storage module and sending the integrated data information to the external communication module.
Further, the device information control subsystem comprises a control module, a human-computer interaction module, a signal analysis module, a control interface and an action control module, wherein the signal analysis module is connected with the main control module, the control module is respectively connected with the human-computer interaction module, the signal analysis module and the action control module, and the action control module is connected with the control interface, wherein:
the signal analysis module is used for analyzing the control instruction sent by the main control module and sending the analyzed control signal to the control module;
the control module is used for splitting the control signal into action instructions and sending the action instructions to the corresponding Toshiba control modules according to the action sequence;
the human-computer interaction module is used for checking the action instruction and correcting the action instruction through terminal input equipment connected to a human-computer interaction interface of the human-computer interaction equipment;
and the control interface is used for connecting the action control module with the weak current equipment through signals so as to transmit the action instruction to the weak current equipment and control the weak current equipment.
Furthermore, the equipment information acquisition subsystem also comprises an alarm module, and when the data acquired by the equipment information acquisition subsystem is abnormal, an alarm signal is sent out through the alarm module to prompt maintenance personnel to process.
Further, the equipment information acquisition subsystem further comprises an installation and management monitoring subsystem, wherein the installation and management monitoring subsystem comprises a video monitoring module and an anti-theft alarm system module, and the anti-theft alarm system module comprises:
the video monitoring module is used for monitoring a key area and transmitting a monitoring picture to the equipment communication subsystem;
the anti-theft alarm system module is used for monitoring the access control system and sending out an alarm signal when the access control system is abnormal so as to prevent unauthorized persons from entering an unauthorized area.
Furthermore, the external communication module and the equipment information acquisition subsystem are communicated with each other through one or more of Bluetooth, WiFi, Ethernet, a local area network, the Internet and a 3G/4G/5G network.
The invention has the advantages that: the invention relates to a serial port communication system for weak current control, which comprises a plurality of equipment information acquisition subsystems, an equipment control subsystem and an equipment communication subsystem, wherein the equipment information acquisition subsystems and the equipment information control subsystem are respectively in signal connection with the equipment communication subsystem, the equipment communication subsystem comprises an external communication module, a trigger module, a serial port basic communication module, a data detection and retest module, a data storage module and a main control module, the system can judge whether received data is qualified or not, once unqualified data appears, the equipment information acquisition subsystem can be triggered to perform acquisition again in a mode of communicating a shared variable with external hardware, and the integrity and reliability of the data are ensured, so that the precise control on weak current equipment is ensured.
In order to make the aforementioned and other objects, features and advantages of the invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a serial communication system for weak current control;
FIG. 2 is a schematic diagram of the architecture of the device communication subsystem;
FIG. 3 is a schematic diagram of the structure of the device information collection subsystem;
fig. 4 is a schematic diagram of the structure of the device control subsystem.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1 and 2, in a preferred embodiment of the present invention, a serial communication system for weak current control includes a plurality of device information acquisition subsystems, a device control subsystem and a device communication subsystem, where the device information acquisition subsystem and the device information control subsystem are respectively in signal connection with the device communication subsystem, and the device communication subsystem includes an external communication module, a trigger module, a serial basic communication module, a data detection and retest module, a data storage module and a main control module, where:
the external communication modules are in signal connection with the equipment information acquisition subsystem, each external communication module comprises a plurality of communication subunits, the communication subunits are in communication with the corresponding equipment information acquisition subsystem through two shared variables, the two shared variables are respectively a trigger shared variable and a retest shared variable, the data types of the two shared variables are Boolean types, and the initial value is false; the external controller changes the trigger shared variable by receiving a pulse signal sent by the test instrument, and the pulse signal enables the trigger shared variable to be changed into true and false firstly; the external communication module enables the external equipment information acquisition subsystem signal to acquire the data information again by changing the retest shared variable value;
the trigger module is in signal connection with the external communication modules and is used for identifying data information transmitted by each external communication module, judging the running condition of weak current equipment, outputting normal signals when the equipment runs normally, and outputting alarm signals when the equipment runs abnormally;
the serial port basic communication module is used for adjusting four parameters of the baud rate, the data bit, the stop bit and the check bit to be consistent with the parameters acquired by the equipment information acquisition subsystem, and transmitting the data information to the data detection and retest module without starting a terminator in the initialization process;
the data detection and re-measurement module judges whether the data type and the length of the received data are the same as those set by the equipment information acquisition subsystem, if the data type and the length are different, the data are unqualified, and the data information qualified in detection is sent to the main control module;
and the main control module is used for sending a control instruction to the equipment control subsystem according to the received data information and the field operation requirement, and the equipment control subsystem controls the weak point equipment.
Referring to fig. 3, in the above embodiment, the device information collecting subsystem includes a sensor module, a UPS power supply module, a power supply switching module, an operation data storage module, and a data information integration module, where:
the sensor module is connected to the weak current equipment to be detected and used for detecting the operation condition of the weak current equipment and sending the detected data information to the operation data storage module;
the UPS power supply module is used for performing emergency power supply for the operation data storage module and the data information integration module;
the power supply switching module is used for switching a power supply of the equipment information acquisition subsystem to ensure the stability of power supply of the equipment information acquisition subsystem;
the operation data storage module is used for receiving and storing the operation data of the weak current equipment acquired by the sensor module, and marking a timestamp on the data information in the process of storing the operation data;
and the data information integration module is used for integrating the data information stored in the operating data storage module and sending the integrated data information to the external communication module.
Referring to fig. 4, in the above embodiment, the device information control subsystem includes a control module, a human-computer interaction module, a signal analysis module, a control interface, and an action control module, where the signal analysis module is connected to the main control module, the control module is respectively connected to the human-computer interaction module, the signal analysis module, and the action control module is connected to the control interface, where:
the signal analysis module is used for analyzing the control instruction sent by the main control module and sending the analyzed control signal to the control module;
the control module is used for splitting the control signal into action instructions and sending the action instructions to the corresponding Toshiba control modules according to the action sequence;
the human-computer interaction module is used for checking the action instruction and correcting the action instruction through terminal input equipment connected to a human-computer interaction interface of the human-computer interaction equipment;
and the control interface is used for connecting the action control module with the weak current equipment through signals so as to transmit the action instruction to the weak current equipment and control the weak current equipment.
In the above embodiment, the device information acquisition subsystem further includes an alarm module, and when the data acquired by the device information acquisition subsystem is abnormal, an alarm signal is sent by the alarm module to prompt a maintenance person to perform processing.
In the above embodiment, the device information collecting subsystem further includes a security management monitoring subsystem, and the security management monitoring subsystem includes a video monitoring module and an anti-theft alarm system module, where:
the video monitoring module is used for monitoring a key area and transmitting a monitoring picture to the equipment communication subsystem;
the anti-theft alarm system module is used for monitoring the access control system and sending out an alarm signal when the access control system is abnormal so as to prevent unauthorized persons from entering an unauthorized area.
In the above embodiment, the external communication module and the device information acquisition subsystem communicate with each other through one or more of bluetooth, WiFi, ethernet, local area network, internet, and 3G/4G/5G network. In the actual trial process, other communication modes such as NBIOT and the like can be selected according to actual needs.
The invention has the advantages that: the invention relates to a serial port communication system for weak current control, which comprises a plurality of equipment information acquisition subsystems, an equipment control subsystem and an equipment communication subsystem, wherein the equipment information acquisition subsystems and the equipment information control subsystem are respectively in signal connection with the equipment communication subsystem, the equipment communication subsystem comprises an external communication module, a trigger module, a serial port basic communication module, a data detection and retest module, a data storage module and a main control module, the system can judge whether received data is qualified or not, once unqualified data appears, the equipment information acquisition subsystem can be triggered to perform acquisition again in a mode of communicating a shared variable with external hardware, and the integrity and reliability of the data are ensured, so that the precise control on weak current equipment is ensured.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.