An intelligent monitoring and control system for a caged environment
By establishing control object data and program segment templates, the control program is automatically configured and checked, which solves the problems of equipment conflict and interlocking in the cage-raising environment control system, and improves the system's adaptability and operational reliability.
Patent Information
- Application Number
- CN202611338487.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-11-20
AI Technical Summary
Existing cage-raising environmental control systems are unable to automatically adjust their control programs according to changes in cage-raising facilities, leading to equipment conflicts and operational instability, and making it difficult to handle equipment interlocks and malfunctions.
By establishing control object data, automatically selecting and configuring program segment templates, forming a control program with a defined execution order, and performing program integrity and equipment interlock checks, the program controller is used to execute control instructions to ensure that the program segments run in sequence.
It reduces the workload of manually modifying control programs, avoids equipment conflicts and interlocking operations, and improves the adaptability and operational reliability of cage-raising environment control.
Smart Images

Figure CN123137112A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of program control technology, specifically to an intelligent monitoring and control system for caged environments. Background Technology
[0002] Cage rearing facilities are typically divided into multiple cage rearing monitoring areas and equipped with various control devices such as fans, air valves, heating devices, spray devices, lighting devices, and cleaning devices. There are also restrictions on the start-up order, interlocking of equipment, and sharing of resources between different control devices.
[0003] Existing caged environmental control systems typically rely on pre-written fixed control programs by technicians. When changes occur in the caged monitoring area, control equipment, input / output channels, or equipment connections, the control program needs to be manually modified. Furthermore, fixed control programs struggle to automatically handle equipment conflicts when multiple areas simultaneously generate control demands. They also have difficulty determining whether the current program segment is complete based on the actual operating status of the control equipment. This can easily lead to problems such as subsequent equipment starting before the preceding equipment has completed its actions, interlocked equipment running simultaneously, or the entire control program being interrupted due to equipment failure.
[0004] Therefore, the present invention mainly addresses the problem of how to automatically generate an executable control program with a clear execution order based on the control object data and regional control requirement data of the caged facility, and how to control the program segment to transfer normally or abnormally according to the actual operating status of the control equipment, and proposes an intelligent monitoring and control system for the caged environment. Summary of the Invention
[0005] The purpose of this invention is to provide an intelligent monitoring and control system for caged environments. By converting caged monitoring areas, control equipment, input channels, and output channels into control object data, selecting and configuring program segment templates according to the regional control requirements data, a control program with a defined execution order is formed. After completing program integrity checks and equipment interlock checks, the program is executed by a programmable logic controller (PLC), thereby reducing the reliance on manual modification of the control program when equipment configuration changes or multi-area control requirements occur in caged facilities.
[0006] The technical solution adopted in this invention is as follows: A caged environment intelligent monitoring and control system includes a controlled object configuration unit, an operation data acquisition unit, a regional control requirement generation unit, a program template storage unit, a control program generation unit, a program checking unit, a programmable controller, and an execution monitoring unit.
[0007] The control object configuration unit acquires the cage monitoring area, control equipment, input channels, and output channels in the cage-raising facility.
[0008] The cage-raising monitoring area is divided according to at least one of cage rows, cage layers, and cage sections, and each cage-raising monitoring area has a unique area identifier. The control equipment includes at least one of the following: fan, air supply valve, air inlet window, heating device, spray device, dehumidification device, lighting device, manure cleaning device, and alarm device.
[0009] The input channel is used to acquire monitoring values from environmental sensors, the actual operating status of the control equipment, and the communication status; the output channel is used to send control commands to the control equipment.
[0010] The control object configuration unit establishes the correspondence between the cage monitoring area, control equipment, input channels and output channels, and records the pre-operation conditions of the control equipment, equipment interlock relationships and equipment shared resource relationships to obtain control object data.
[0011] Pre-operational conditions indicate the equipment status that must be met before the target controlled equipment can start operating. For example, before a circulating fan starts, the corresponding air supply valve should reach a preset opening degree. Equipment interlocks indicate control equipment that is prohibited from operating simultaneously. Shared equipment resources include at least one of the following: power supply circuit, air supply channel, communication channel, and fluid delivery pipeline.
[0012] The data acquisition unit collects monitoring values from each cage monitoring area, the actual operating status of each control device, and the communication status of the input and output channels.
[0013] The data acquisition unit uses a unified clock to correlate the monitored values, actual operating status, and communication status with the acquisition time to obtain system operating data.
[0014] The monitored values include at least one of temperature, humidity, gas concentration, air velocity, and light intensity. These monitored values are used to determine whether a zone control requirement arises, but are not used to limit the specific environmental regulation algorithm employed by the programmable controller.
[0015] The area control requirement generation unit extracts the monitoring values and communication status corresponding to each cage monitoring area from the system operation data, and determines whether the monitoring value is within the measurement range of the corresponding sensor, whether the communication status is normal, and whether the change in monitoring value at adjacent acquisition times exceeds the preset change amount, thereby obtaining the effective monitoring value.
[0016] The area control demand generation unit compares the effective monitoring values with the operating range in the preset operating conditions. It identifies caged monitoring areas where the effective monitoring values are not within the operating range as caged monitoring areas to be controlled, and determines the control demand type based on the relationship between the effective monitoring values and the upper or lower limit of the operating range. For example, when the temperature is below the lower limit of the operating range, the control demand type can be determined as heating; when the gas concentration is above the upper limit of the operating range, the control demand type can be determined as ventilation.
[0017] Control requirements can be prioritized based on the degree to which effective monitoring values exceed the operating range. To enable prioritization of monitoring values with different dimensions, the dimensionless deviation can be calculated:
[0018] in, Indicates the first The degree of deviation corresponding to each control requirement. Indicates the valid monitoring value. This indicates the boundary of the operating range beyond which the effective monitoring value exceeds. and These represent the upper limit and lower limit of the operating range, respectively. This represents a preset non-zero constant. The greater the deviation, the higher the priority of the corresponding control requirement. The area control requirement generation unit stores the requirement identifier, the area identifier of the cage monitoring area to be controlled, the control requirement type, the control requirement priority, the allowed execution period, and the requirement release conditions, thus obtaining the area control requirement data.
[0019] The program template storage unit stores program segment templates corresponding to different control requirement types. Each program segment template includes a template identifier, applicable requirement type, control device type, entry condition, control instruction, execution confirmation condition, hold condition, exit condition, maximum execution duration, normal transfer pointer, and abnormal transfer pointer.
[0020] The control program generation unit selects a program segment template that matches the applicable requirement type based on the control requirement type in the regional control requirement data.
[0021] Based on the data of the controlled object, the control program generation unit determines the target control device that can act on the cage monitoring area to be controlled, meets the pre-operation conditions, and is not in a fault state from the control devices that correspond to the control device type in the selected program segment template.
[0022] The control program generation unit writes the device identifier, input channel, and output channel of the target control device into the selected program segment template, and forms the configured exit conditions based on the exit conditions in the program segment template and the demand release conditions in the area control demand data, thus obtaining the configured program segment.
[0023] The control program generation unit determines the sequential execution relationship between each configured program segment based on the entry conditions of each configured program segment and the prerequisite operating conditions of the target control device.
[0024] The control program generation unit determines the normal transfer relationship and the abnormal transfer relationship based on the normal transfer pointer and the abnormal transfer pointer of each configured program segment, and determines the execution order of the program segments based on the sequential execution relationship, the normal transfer relationship and the abnormal transfer relationship.
[0025] The control program generation unit determines whether the following control conflicts exist between different configured program segments based on the execution order of the program segments and the data of the controlled objects: They occupy the same output channel simultaneously; Send opposite control commands to the same control device; To enable control devices with interlocking relationships to operate simultaneously; The number of devices sharing resources exceeds the allowed number.
[0026] When control conflicts exist, the control program generation unit will postpone the execution of the configured program segments with control conflicts or replace the devices based on the priority of control requirements and the relationship of shared resources between devices.
[0027] When multiple configured program segments target the same control device, have the same control commands, and are allowed to overlap in execution time periods, the corresponding configured program segments can be merged. The merged program segment retains the requirement release conditions corresponding to each control requirement, and terminates equipment operation after all the required requirement release conditions are met.
[0028] The control program generation unit connects the program segments that have undergone control conflict elimination processing according to the program segment execution order to obtain the control program to be checked.
[0029] The program inspection unit extracts the entry conditions, execution confirmation conditions, configured exit conditions, normal transfer pointers, and abnormal transfer pointers of each program segment from the control program to be inspected, and obtains the program segment inspection data.
[0030] Program integrity checks should include at least the following: Determine whether each program segment has an entry path; Determine whether the program segment containing control instructions has the conditions for execution confirmation; Determine whether the program segment used to keep the control device running has a configured exit condition; Determine whether the exception transfer pointer is connected to the exception handler segment; Determine if there is a loop execution path that does not have an exit condition.
[0031] The device interlock check is used to determine whether control devices with device interlock relationships can run simultaneously in the same execution path, based on the execution order of program segments and the device interlock relationship.
[0032] When all checks are error-free, the program checking unit determines the control program to be checked as an executable control program; if an error exists, it outputs the corresponding program segment identifier and error type, and prohibits the control program to be checked from being sent to the programmable controller.
[0033] The programmable logic controller (PLC) receives an executable control program and reads the entry conditions of the current program segment. When the entry conditions are met, it controls the target control device to operate through the corresponding output channel according to the control instructions of the current program segment.
[0034] The execution monitoring unit acquires the actual operating status of the target control device through the input channel, and compares the actual operating status with the execution confirmation conditions of the current program segment to obtain execution confirmation data.
[0035] When the execution confirmation data meets the execution confirmation conditions and the configured exit conditions are met, the execution monitoring unit determines the next program segment based on the normal transfer direction, and the programmable controller enters the next program segment.
[0036] When the execution confirmation data fails to meet the execution confirmation conditions within the maximum execution time, or when an abnormality occurs in the target control device, input channel, or output channel, the execution monitoring unit determines the abnormal handling program segment based on the abnormal transfer direction, and the programmable controller enters the abnormal handling program segment.
[0037] The execution monitoring unit stores the program segment identifier, program segment status, execution start time, execution end time, and the corresponding next program segment or exception handling program segment, thus obtaining the program segment execution record.
[0038] In a further embodiment, the system also includes a program recovery unit, and the program segment template further includes a recovery location identifier.
[0039] When the current program segment is in a timeout or abnormal state, the program recovery unit obtains the abnormal program segment identifier, abnormal control device identifier, and completed program segment identifier from the program segment execution record, and determines the target recovery position based on the recovery position identifier.
[0040] The program recovery unit searches the control object data for a backup control device that is the same type as the abnormal control device, can be applied to the cage monitoring area to be controlled, meets the prerequisite operating conditions, and is not in a fault state.
[0041] When a backup control device exists, the device identifier, input channel, and output channel of the backup control device are used to replace the corresponding content in the abnormal program segment to obtain the replacement program segment; when no backup control device exists, a safety stop program segment is connected after the target recovery position.
[0042] The program recovery unit connects to the alternative program segment or the safety stop program segment to obtain the recovery control program to be checked. The program checking unit re-performs program integrity checks and device interlock checks on the recovery control program to be checked. After the checks pass, the recovery control program is obtained and sent to the programmable logic controller (PLC).
[0043] Optionally, the programmable controller includes a main controller and multiple regional programmable controllers. The control program generation unit divides the executable control program into regional control subroutines and shared device control subroutines according to the regional identifiers corresponding to each configured program segment.
[0044] The main controller executes the shared device control subroutine and sends the area control subroutine to the corresponding area programmable controller. Each area programmable controller executes its area control subroutine and returns area execution confirmation data to the main controller.
[0045] The system can also be configured with a program version management unit and an execution record storage unit. The program version management unit, upon reaching a pre-set program switching point, will switch to the new current program version based on the checked version of the program to be run. The execution record storage unit saves area control requirement data, program version identifiers, program segment execution records, execution confirmation data, recovery control programs, and final execution results.
[0046] The beneficial effects of this invention are: This invention establishes control object data based on the cage monitoring area, control equipment, and input and output channels in the cage rearing facility. It automatically selects and configures program segment templates based on the area control requirements data. After forming the program segment execution order according to the pre-operational conditions, equipment interlock relationships, and control requirement priorities, the resulting control program undergoes program integrity checks and equipment interlock checks. Then, the programmable logic controller (PLC) controls the program segment transfer based on the actual operating status of the control equipment. This allows the control program to be regenerated as the cage area, control equipment, and channel configuration change, ensuring that the previous program segment is confirmed by the equipment before entering the next. This reduces the workload of manually modifying fixed control programs, avoids program segment skipping execution levels and simultaneous operation of interlocked equipment, and improves the adaptability and operational reliability of the cage rearing environment control program. Attached Figure Description
[0047] Figure 1 This is a block diagram of the intelligent monitoring and control system for caged environments of the present invention; Figure 2 This is a flowchart illustrating the overall process of generating and executing the executable control program of this invention. Figure 3 This is a schematic diagram illustrating the conversion of a program segment template into a configured program segment according to an embodiment of the present invention; Figure 4This is a schematic diagram illustrating the execution order, normal transfer, and abnormal transfer of program segments in an embodiment of the present invention; Figure 5 This is a flowchart of the conflict handling and recovery control program generation process of the present invention. Detailed Implementation
[0048] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0049] Example 1 This embodiment provides an intelligent monitoring and control system for caged environments, including a control object configuration unit, an operation data acquisition unit, a regional control requirement generation unit, a program template storage unit, a control program generation unit, a program checking unit, a programmable controller, and an execution monitoring unit.
[0050] The control object configuration unit acquires the cage monitoring area, control equipment, input channels, and output channels in the cage-raising facility.
[0051] The cage-raising monitoring area is divided according to at least one of the cage rows, cage layers, and cage sections of the cage-raising facility, and each cage-raising monitoring area is equipped with a unique area identifier. The area identifier is used to associate the monitoring values, control requirements, and control equipment with the corresponding cage-raising monitoring area.
[0052] The input channels include input channels for receiving monitoring values from environmental sensors and input channels for receiving the actual operating status of the control equipment; the output channels are used to send control commands to the control equipment.
[0053] The control object configuration unit obtains the device type, device identifier, input channel, output channel, cage monitoring area, applicable cage monitoring area, front-end control device, interlock control device, and shared resources of each control device.
[0054] The control object configuration unit determines the pre-operation conditions of the control equipment based on the pre-control equipment, determines the interlocking relationship of the equipment based on the interlocking control equipment, and determines the shared resource relationship of the equipment based on the shared resources of the equipment.
[0055] Preconditions for operation refer to the operating states of other equipment that must be met before the control equipment can begin to execute control commands; interlocking relationships between equipment refer to the restrictions between control equipment that are not allowed to operate simultaneously; shared resource relationships between equipment refer to the shared use of power supply circuits, air supply channels, communication channels, or fluid transport pipelines by different control equipment.
[0056] The control object configuration unit stores the area identifier, equipment type, equipment identifier, input channel, output channel, belonging cage monitoring area, applicable cage monitoring area, prerequisite operating conditions, equipment interlock relationship and equipment shared resource relationship, thus obtaining control object data.
[0057] The data acquisition unit collects monitoring values from each cage monitoring area, the actual operating status of each control device, and the communication status of the input and output channels according to a preset acquisition cycle.
[0058] The monitored values include at least one of temperature, humidity, gas concentration, air velocity, and light intensity. The actual operating status of the control equipment includes at least one of start / stop status, working position, operating gear, operating speed, operating current, and fault status. The communication status includes normal communication status, communication delay status, and communication interruption status.
[0059] The operation data acquisition unit sets the acquisition time for the collected monitoring values, actual operating status and communication status respectively, and performs time mapping on the collected data according to the area identifier, device identifier and channel identifier to obtain system operation data.
[0060] System operation data serves as the common data source for the area control requirement generation unit to determine area control requirements and for the execution monitoring unit to determine the execution status of program segments.
[0061] The area control requirement generation unit extracts the monitoring values, the time of acquisition of the monitoring values, and the communication status of the corresponding input channels for each cage monitoring area from the system operation data.
[0062] The area control requirement generation unit determines whether the monitored value is within the measurement range of the corresponding sensor, whether the communication status of the input channel is normal, and whether the change in the monitored value between adjacent acquisition times exceeds a preset change amount. When all the above judgment results meet the preset validity conditions, the corresponding monitored value is determined as a valid monitored value.
[0063] The area control requirement generation unit compares the effective monitoring values with the corresponding preset operating conditions. When the effective monitoring value is not within the operating range defined by the preset operating conditions, the cage monitoring area corresponding to the effective monitoring value is determined as the cage monitoring area to be controlled.
[0064] Based on the comparison results of whether the effective monitoring value is higher than the upper limit of the operating range or lower than the lower limit of the operating range, the corresponding control requirement type is determined; based on the degree to which the effective monitoring value exceeds the operating range, the priority of the control requirement is determined.
[0065] Control request type indicates the category of control operations that need to be performed, including at least one of ventilation, heating, cooling, dehumidification, humidification, supplemental lighting, and cleaning. Control request priority determines the order in which multiple control requests are processed.
[0066] The regional control demand generation unit stores the demand identifier, the regional identifier of the caged monitoring area to be controlled, the control demand type, the control demand priority, the allowed execution period, and the demand release conditions, thus obtaining regional control demand data.
[0067] In one specific approach, the priority of control requirements is determined based on the degree of deviation of the effective monitored values from the operating range, and the degree of deviation is calculated according to the following formula:
[0068] in, Indicates the first The degree of deviation corresponding to each control requirement. Indicates the valid monitoring value. This indicates the boundary of the operating range beyond which the effective monitoring value exceeds. Indicates the upper limit of the operating range. Indicates the lower limit of the operating range. This indicates a preset non-zero constant. The greater the deviation, the higher the priority of the corresponding control requirement.
[0069] The program template storage unit pre-stores program segment templates corresponding to different control requirement types. Each program segment template includes a template identifier, applicable requirement type, control device type, entry condition, control instruction, execution confirmation condition, hold condition, exit condition, maximum execution duration, normal transfer pointer, and abnormal transfer pointer.
[0070] The entry condition is used to determine whether the program segment can start execution; the control instruction is used to control the corresponding control device; the execution confirmation condition is used to determine whether the control device has reached the required operating state according to the control instruction; the hold condition is used to determine whether the control device can continue to maintain operation; the exit condition is used to determine whether the current program segment can end; the normal transfer pointer is used to determine the next program segment to enter after the current program segment ends normally; and the abnormal transfer pointer is used to determine the abnormal handling program segment to enter when the current program segment times out, the device fails, or the communication is abnormal.
[0071] The control program generation unit extracts the control requirement type from the regional control requirement data and selects a program segment template that matches the applicable requirement type.
[0072] The control program generation unit searches for control devices in the control object data whose device type is the same as the control device type required by the program segment template, and determines whether the found control device can act on the cage monitoring area to be controlled, whether it meets the pre-operation conditions, and whether it is in a non-faulty state, thereby determining the target control device.
[0073] The control program generation unit writes the device identifier, input channel, and output channel of the target control device into the selected program segment template, and sets the exit condition in the program segment template together with the demand release condition in the area control demand data as the configured exit condition to obtain the configured program segment.
[0074] Each configured program segment includes at least the program segment identifier, the device identifier of the target control device, the input channel, the output channel, the entry condition, the control command, the execution confirmation condition, the hold condition, the configured exit condition, the maximum execution duration, the normal transfer pointer, and the abnormal transfer pointer.
[0075] The control program generation unit determines the sequential execution relationship between each configured program segment based on the entry conditions of each configured program segment and the prerequisite operating conditions of the target control device.
[0076] For example, when the second control device needs to be in a preset operating state before the first control device starts operating, the configured program segment for controlling the second control device is arranged before the configured program segment for controlling the first control device, and the second control device reaching the preset operating state is one of the entry conditions for the corresponding program segment of the first control device.
[0077] The control program generation unit determines the normal transfer relationship and abnormal transfer relationship between the configured program segments based on the normal transfer pointer and abnormal transfer pointer of each configured program segment.
[0078] The control program generation unit determines the execution order of program segments based on the sequential execution relationship, normal transfer relationship, and abnormal transfer relationship, and connects each configured program segment according to the execution order to obtain the control program to be checked.
[0079] The control program to be inspected includes a normal execution sequence and an exception handling sequence. The normal execution sequence is used to ensure that the control program continues to execute when each program segment completes normally; the exception handling sequence is used to allow the control program to enter the exception handling program segment when a program segment execution times out, the control equipment malfunctions, or communication abnormalities occur between the input and output channels.
[0080] The program inspection unit extracts the entry conditions, execution confirmation conditions, configured exit conditions, normal transfer pointers, and abnormal transfer pointers of each configured program segment from the control program to be inspected, and obtains the program segment inspection data.
[0081] The program inspection unit performs program integrity checks based on program segment inspection data, specifically including: Check if each configured program segment has an entry path; Check whether the configured program segment containing control instructions has the conditions for execution confirmation; Check whether the configured program segment used to keep the control device running has a configured exit condition; Check if the exception transfer pointer is connected to the corresponding exception handler segment; Check if the control program under inspection has a loop execution path that does not have an exit condition.
[0082] The program checking unit also performs equipment interlock checks based on the program segment execution order and equipment interlock relationships to determine whether control devices with equipment interlock relationships may operate simultaneously in the same execution process.
[0083] When both the program integrity check and the device interlock check are error-free, the program checking unit determines the control program to be checked as an executable control program; when any check has an error, the program checking unit outputs the corresponding program segment identifier and error type, and prohibits the control program to be checked from being sent to the programmable controller.
[0084] The programmable controller receives an executable control program and identifies the first program segment in the executable control program that meets the entry conditions as the current program segment.
[0085] When the entry condition of the current program segment is met, the programmable controller reads the control instructions in the current program segment and sends the control instructions to the target control device through the output channel corresponding to the current program segment.
[0086] The execution monitoring unit obtains the actual operating status of the target control device after executing the control command through the input channel corresponding to the current program segment, compares the actual operating status with the execution confirmation conditions of the current program segment, and obtains the execution confirmation data.
[0087] When the execution confirmation data meets the execution confirmation conditions and the configured exit conditions are met, the execution monitoring unit determines the current program segment as complete and determines the next program segment based on the normal transfer pointer. The programmable controller uses the determined next program segment as the new current program segment.
[0088] When the execution confirmation data fails to meet the execution confirmation conditions within the maximum execution time, the execution monitoring unit determines the current program segment as timed out and determines the exception handling program segment based on the exception transfer direction.
[0089] When system operation data indicates that the target control device has malfunctioned, or that the corresponding input or output channel has a communication abnormality, the execution monitoring unit will determine the current program segment as an abnormal state and determine the abnormal handling program segment according to the abnormal transfer direction.
[0090] The programmable logic controller (PLC) executes the determined next program segment or exception handling program segment. The execution monitoring unit stores the program segment identifier, status, execution start time, execution end time of the current program segment, and the corresponding determined next program segment or exception handling program segment, thus obtaining a program segment execution record.
[0091] Example 2 This embodiment further addresses control conflicts between multiple area control requirements, abnormal control program execution, and partitioned execution between multiple programmable controllers, based on Embodiment 1.
[0092] When the area control requirement generation unit generates multiple area control requirement data, the control program generation unit forms corresponding configured program segments based on each area control requirement data.
[0093] The control program generation unit determines whether there are control conflicts between different configured program segments based on the execution order of the program segments and the data of the controlled objects.
[0094] Controlling conflicts includes: Different configured program segments occupy the same output channel at the same time; Different configured program segments send opposite control commands to the same control device; Different configured program segments enable control devices with interlocking relationships to operate simultaneously; The number of different configured program segments using shared resources on the device exceeds the allowed number.
[0095] The control program generation unit matches the program segment identifiers, control conflict types, involved device identifiers, involved channel identifiers, and corresponding control requirement priorities of the program segments with control conflicts to obtain control conflict data.
[0096] For configured program segments with different control requirement priorities, the control program generation unit retains the execution order of configured program segments with higher control requirement priorities and sets the execution of configured program segments with lower control requirement priorities to be delayed. The control program generation unit sets the release of shared resources of the corresponding device by the high-priority program segment as an additional entry condition for the low-priority program segment.
[0097] When there is a backup control device in the control object data that can act on the same cage monitoring area to be controlled and meets the prerequisite operating conditions, the control program generation unit uses the device identifier, input channel and output channel of the backup control device to replace the target control device and corresponding channel that cause the control conflict, and obtains the replaced configured program segment.
[0098] For multiple configured program segments with the same target control device, the same control commands, and overlapping execution periods, the control program generation unit merges the multiple configured program segments. The merged program segment retains the requirement release conditions corresponding to each control requirement, and terminates the operation of the target control device after all the requirement release conditions that need to be retained are met.
[0099] The control program generation unit obtains conflict-free program segments based on the processing results of delayed execution, equipment replacement, or program segment merging, and connects the conflict-free program segments according to the program segment execution order to obtain the control program to be checked.
[0100] The system in this embodiment also includes a program recovery unit, and the program segment template further includes a recovery location identifier. The recovery location identifier is used to indicate the location where execution is allowed to resume after a program exception occurs.
[0101] When the execution monitoring unit determines that the current program segment is in a timeout or abnormal state, the program recovery unit obtains the abnormal program segment identifier, the abnormal control device identifier, and the completed program segment identifier from the program segment execution record.
[0102] The program recovery unit determines the target recovery location within the program segment execution order based on the abnormal program segment identifier and the recovery location identifier. The target recovery location is a position located before the abnormal program segment that allows execution to resume.
[0103] The program recovery unit determines the equipment type, applicable cage monitoring area, and prerequisite operating conditions of the abnormal control equipment from the controlled object data based on the abnormal control equipment identifier, and then locates a backup control equipment that meets the following conditions: The backup control equipment and the emergency control equipment are of the same type. The backup control equipment can be used to monitor the corresponding caged animals under control. The backup control equipment meets the pre-operation conditions; The backup control equipment is not in a faulty state; There is no interlock conflict between the standby control equipment and the currently operating control equipment.
[0104] When a backup control device exists, the program recovery unit uses the device identifier, input channel, and output channel of the backup control device to replace the corresponding content in the abnormal program segment, thus obtaining a replacement program segment.
[0105] The program recovery unit starts from the target recovery position and sequentially connects the replacement program segment and the program segment that has not yet been completed in the executable control program to obtain the recovery control program to be checked.
[0106] If no suitable backup control device is available, the program recovery unit connects to the safety stop program segment from the target recovery position to obtain the recovery control program to be checked. The safety stop program segment is used to stop the relevant control devices according to a preset stop sequence or to keep the relevant control devices in a preset safe state.
[0107] The program checking unit re-performs program integrity checks and equipment interlock checks on the recovery control program to be checked. If no errors are found, the recovery control program to be checked is identified as the recovery control program and sent to the programmable controller; if errors are found, the execution of the recovery control program to be checked is prohibited, and a pre-stored safety stop program is executed.
[0108] By re-examining the recovery control program, new control conflicts can be prevented between the backup control equipment and its input and output channels and the currently executing program segment.
[0109] The control program generation unit divides the executable control program into regional control subroutines and shared device control subroutines based on the area identifiers corresponding to each configured program segment.
[0110] The area control subroutine includes program segments for controlling control equipment within the corresponding cage monitoring area; the shared equipment control subroutine includes program segments for controlling control equipment or shared resources used by multiple cage monitoring areas.
[0111] The main controller sends the control subroutines of each area to the corresponding area programmable controllers, and retains the control subroutines of shared devices.
[0112] Each region's programmable controller executes the received region control subroutine, obtains the actual operating status of the control equipment through the corresponding input channel, generates region execution confirmation data based on the actual operating status, and sends the region execution confirmation data to the main controller.
[0113] The main controller determines the execution status of the corresponding area control subroutine based on the execution confirmation data of each area. When all area control subroutines related to the current shared equipment control subroutine have reached the preset execution status, the main controller executes the next shared equipment control subroutine or sends the next batch of area control subroutines to the area programmable controllers.
[0114] When any area programmable controller returns a timeout or abnormal state, the main controller suspends the control subroutines of the shared devices related to that area, and executes the exception handling program segment or calls the program recovery unit to generate a recovery control program according to the corresponding exception transfer pointer.
[0115] Example 3 This embodiment further sets up a program version management unit and a running record storage unit based on embodiment two, so as to realize the version switching of the executable control program and the recording of the running process.
[0116] The program version management unit configures a program version identifier for the executable control program output by the program inspection unit. The program version identifier is used to distinguish executable control programs corresponding to different generation times, different controlled object data, or different area control requirement data.
[0117] The program version management unit determines the executable control program currently being executed by the programmable controller as the current program version, and determines the newly generated executable control program that has passed the program integrity check and device interlock check as the program version to be run.
[0118] The version of the program to be run can be generated when the data of the controlled object changes, the program segment template changes, or the data of the area control requirements changes.
[0119] The program version management unit pre-sets at least one program switching position. The program switching position is set at a position where the control device has completed the current control action, the corresponding program segment has generated execution confirmation data, and the subsequent program segment has not yet started execution.
[0120] The program version management unit obtains the status of the current program segment and the corresponding position of the current program segment from the program segment execution record, and determines whether the current program version has reached the program switching position.
[0121] If the current program version has not reached the program switching point, the current program version will continue to execute, and the program segment being executed will not be replaced by the program version to be run.
[0122] When the current program version reaches the program switching position, the program version management unit obtains the current actual operating status of the control device and determines whether the current actual operating status meets the entry conditions of the starting program segment in the program version to be run.
[0123] When the entry conditions are met, the version of the program to be run is determined as the new current program version, and the programmable controller executes the new current program version; when the entry conditions are not met, the current program version is maintained or the safe stop program segment is entered until the program switching conditions are met.
[0124] The above process avoids directly replacing the control program before the control device has completed its operation.
[0125] Optionally, when the system receives a manual takeover signal, the monitoring unit records the program segment identifier of the current program segment, the status of the current program segment, and the most recent program switch position.
[0126] The programmable logic controller (PLC) executes the corresponding safety stop program segment, causing the controlled equipment under the automatic control program to stop running or enter a preset safety state, and then enters the manual control state.
[0127] After manual control ends, the data acquisition unit re-acquires the actual operating status of the control equipment and the communication status of the input and output channels to obtain updated system operating data.
[0128] The control program generation unit regenerates the control program to be checked based on the updated system operation data and controlled object data; after the program checking unit completes the program integrity check and equipment interlock check, it obtains a new executable control program. Alternatively, execution can resume from the recorded program switching position when the actual operating state of the controlled equipment meets the entry conditions of the corresponding program segment in the original executable control program.
[0129] Optionally, when a communication anomaly occurs between the main controller and the area programmable controller, the area programmable controller determines whether the received area control subroutine is complete.
[0130] When the received area control subroutine is complete, the area programmable controller continues to execute the pre-set safety program segment therein; when the received area control subroutine is incomplete, the area programmable controller does not enter the incomplete program segment, but executes the locally stored safety stop program segment.
[0131] After communication is restored, the area programmable controller sends the program segment execution record before and after the communication failure to the main controller. The main controller determines the completed and incomplete program segments based on the program segment execution record, and chooses accordingly to continue executing the original area control subroutine, resend the area control subroutine, or execute the safety stop program segment.
[0132] The runtime storage unit acquires regional control requirement data, program version identifier, program segment execution records, execution confirmation data, execution results of executable control programs, and recovery control programs when they exist.
[0133] The runtime record storage unit stores the above data according to the requirement identifier and the program version identifier to obtain the program runtime record.
[0134] The program execution log should include at least: The caged monitoring areas that generate control needs and the types of control needs; An executable control program and program version identifier generated based on control requirements; The start time, end time, and execution status of each program segment; Execution confirmation data after the control device executes the control command; The exception handling segment or recovery control segment used when an exception occurs; The final execution result of the executable control program.
[0135] By recording program execution, we can determine the program version, program segment execution process, control equipment feedback, and anomaly handling results corresponding to the control requirements of each area.
[0136] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.
[0137] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0138] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0139] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0140] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0141] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A smart monitoring and control system for caged environments, characterized in that, It includes a control object configuration unit, an operation data acquisition unit, a regional control requirement generation unit, a program template storage unit, a control program generation unit, a program checking unit, a programmable logic controller (PLC), and an execution monitoring unit; The control object configuration unit is used to acquire the cage monitoring area, control equipment, input channel and output channel in the cage-raising facility, establish the correspondence between the cage monitoring area, the control equipment, the input channel and the output channel, and record the pre-operation conditions and equipment interlock relationships of the control equipment to obtain control object data; The operation data acquisition unit is used to collect the monitoring values of the cage monitoring area, the actual operating status of the control equipment, and the communication status of the input channel and the output channel, and to perform time correspondence on the collected data to obtain system operation data; The area control demand generation unit is used to determine the cage monitoring area to be controlled, the type of control demand, and the priority of control demand based on the system operation data and preset operating conditions, and to obtain area control demand data. The program template storage unit is used to store program segment templates corresponding to different control requirement types. The program segment template includes entry conditions, control instructions, execution confirmation conditions, exit conditions, normal transfer pointers, and abnormal transfer pointers. The control program generation unit is used to select the corresponding program segment template according to the regional control requirement data, configure the control device, input channel and output channel for the selected program segment template according to the control object data to obtain the configured program segment, and determine the execution order of the configured program segment according to the pre-running conditions, the device interlock relationship and the control requirement priority, and connect the configured program segment to obtain the control program to be checked. The program inspection unit is used to perform program integrity checks and device interlock checks on the control program to be inspected, and to determine the control program to be inspected that passes the program integrity checks and device interlock checks as an executable control program. The programmable controller is used to execute the executable control program, and when the entry condition of the current program segment is met, it controls the corresponding control device to run according to the control instructions of the current program segment; The execution monitoring unit is used to obtain the actual operating status of the control device after executing the control command, compare the actual operating status with the execution confirmation condition of the current program segment to obtain execution confirmation data, and determine whether to enter the next program segment corresponding to the normal transfer or the abnormal handling program segment corresponding to the abnormal transfer based on the execution confirmation data and the exit condition of the current program segment. The programmable controller is also used to execute the next program segment or the exception handling program segment.
2. The intelligent monitoring and control system for caged environments according to claim 1, characterized in that, The control object configuration unit is used for: The cage-raising facility is divided into multiple cage-raising monitoring areas based on at least one of the cage rows, cage layers, and cage sections of the cage-raising facility, and an area identifier is configured for each cage-raising monitoring area. Obtain the device type, device identifier, input channel, output channel, cage monitoring area, applicable cage monitoring area, front-end control device, interlock control device, and shared resources of each control device; The preceding operating conditions are determined based on the preceding control device, the interlocking relationship of the equipment is determined based on the interlocking control device, and the shared resource relationship of the equipment is determined based on the shared resources of the equipment. The control object data is obtained by correspondingly storing the area identifier, the device type, the device identifier, the input channel, the output channel, the cage monitoring area to which it belongs, the cage monitoring area that can be used, the prerequisite operating conditions, the device interlock relationship, and the device shared resource relationship; The shared resources of the equipment include at least one of the following: power supply circuit, air supply channel, communication channel, and fluid delivery pipeline.
3. The intelligent monitoring and control system for caged environments according to claim 1, characterized in that, The area control requirement generation unit is used for: Extract the monitoring values of each caged monitoring area, the acquisition time of the monitoring values, and the communication status of the corresponding input channels from the system operation data; The valid monitoring value is determined based on whether the monitored value is within the measurement range of the corresponding sensor, whether the communication status is normal, and whether the change in the monitored value at adjacent acquisition times exceeds a preset change amount. The effective monitoring value is compared with the operating range in the preset operating conditions, and the cage monitoring area where the effective monitoring value is not within the operating range is determined as the cage monitoring area to be controlled. Based on the relationship between the effective monitoring value and the upper or lower limit of the operating range, the control requirement type is determined, and the control requirement priority is determined based on the degree to which the effective monitoring value exceeds the operating range. The area control requirement data is obtained by storing the requirement identifier, the area identifier of the cage monitoring area to be controlled, the control requirement type, the control requirement priority, the allowed execution period, and the requirement release condition. The monitored values include at least one of temperature, humidity, gas concentration, air velocity, and light intensity.
4. The intelligent monitoring and control system for caged environments according to claim 1, characterized in that, Each of the program segment templates also includes a template identifier, applicable requirement type, control device type, holding conditions, and maximum execution time; The control program generation unit is used for: Based on the control requirement type in the regional control requirement data, select a program segment template that matches the applicable requirement type and the control requirement type; Based on the controlled object data, a target control device is determined from the control devices corresponding to the control device type in the selected program segment template. This target control device can act on the cage monitoring area to be controlled, meets the prerequisite operating conditions, and is not in a fault state. Write the device identifier, input channel, and output channel of the target control device into the selected program segment template, and form a configured exit condition based on the exit condition in the selected program segment template and the demand release condition in the area control demand data to obtain the configured program segment; The configured program segment includes a program segment identifier, a device identifier of the target control device, an input channel, an output channel, an entry condition, a control command, an execution confirmation condition, a hold condition, the configured exit condition, a maximum execution duration, a normal transfer pointer, and an abnormal transfer pointer.
5. The intelligent monitoring and control system for caged environments according to claim 4, characterized in that, The control program generation unit is used for: The sequential execution relationship between the configured program segments is determined based on the entry conditions of each configured program segment and the prerequisite operating conditions of the corresponding target control device. Based on the normal transfer pointers and abnormal transfer pointers of each configured program segment, determine the normal transfer relationships and abnormal transfer relationships between each configured program segment; The execution order of the program segments is obtained based on the execution sequence relationship, the normal transfer relationship, and the abnormal transfer relationship. Based on the execution order of the program segments and the control object data, determine whether different configured program segments simultaneously occupy the same output channel, whether opposite control commands are sent to the same control device, whether control devices with interlocking relationships are running simultaneously, and whether the allowed number of shared resources of the devices is exceeded, and obtain control conflict data. Based on the control requirement priority and the shared resource relationship of the devices, the configured program segments corresponding to the control conflict data are delayed in execution or the devices are replaced; for configured program segments with the same target control device, the same control instruction and overlapping execution time periods, the corresponding configured program segments are merged to obtain conflict-free program segments; The conflict-free program segments are connected in the order of execution to obtain the control program to be checked.
6. The intelligent monitoring and control system for caged environments according to claim 5, characterized in that, The program checking unit is used for: The entry conditions, execution confirmation conditions, configured exit conditions, normal transfer pointers, and abnormal transfer pointers of each conflict-free program segment are extracted from the control program to be inspected to obtain program segment inspection data. Based on the program segment check data, determine whether each conflict-free program segment has an entry path, whether a conflict-free program segment containing control instructions has an execution confirmation condition, whether a conflict-free program segment used to keep the control device running has a configured exit condition, and whether the exception transfer pointer is connected to the exception handling program segment, to obtain the program integrity check result. Based on the normal transfer pointer and the abnormal transfer pointer, determine whether the control program to be checked has a loop execution path without an exit condition, and obtain the loop execution check result; Based on the execution order of the program segments and the device interlock relationship, determine whether the control devices with the device interlock relationship may run simultaneously in the same execution path, and obtain the device interlock check result. When the program integrity check result, the loop execution check result, and the device interlock check result are all error-free, the control program to be checked is determined to be the executable control program; If any check result is incorrect, the corresponding program segment identifier and error type are output, and the control program to be checked is prohibited from being sent to the programmable controller.
7. The intelligent monitoring and control system for caged environments according to claim 4, characterized in that, The execution monitoring unit is used for: Based on the system operation data, determine whether the entry condition of the current program segment is met, and if the entry condition is met, switch the current program segment from the waiting state to the execution state; Obtain the execution confirmation data and execution duration during the execution state of the current program segment; When the execution confirmation data meets the execution confirmation condition and the configured exit condition is met, the current program segment is switched to the completed state, and the next program segment is determined according to the normal transfer pointer. When the execution confirmation data does not meet the execution confirmation condition within the maximum execution time, the current program segment is switched to a timeout state, and the exception handling program segment is determined according to the exception transfer pointer. When the system operation data indicates that the target control device has malfunctioned or the corresponding input or output channel has a communication abnormality, the current program segment is switched to an abnormal state, and the abnormal handling program segment is determined according to the abnormal transfer direction. The program segment execution record is obtained by storing the program segment identifier, status, execution start time, execution end time of the current program segment, and the corresponding next program segment or exception handling program segment.
8. The intelligent monitoring and control system for caged environments according to claim 7, characterized in that, It also includes a program recovery unit, and the program segment template further includes a recovery location identifier; The program recovery unit is used for: When the current program segment is in the timeout state or the abnormal state, the abnormal program segment identifier, the abnormal control device identifier, and the completed program segment identifier are obtained from the program segment execution record. Based on the abnormal program segment identifier and the recovery position identifier, determine the target recovery position that is located before and adjacent to the abnormal program segment in the execution order; Based on the data of the controlled object, find a backup control device that is of the same type as the abnormal control device, can be used in the cage monitoring area to be controlled, meets the prerequisite operating conditions, and is not in a fault state. When the backup control device exists, the device identifier, input channel and output channel of the backup control device are used to replace the corresponding content in the abnormal program segment to obtain a replacement program segment. The replacement program segment and the program segment that has not yet been completed in the executable control program are connected sequentially from the target recovery position to obtain the recovery control program to be checked. When the backup control device is not available, a safety stop procedure segment is connected from the target recovery position to obtain the recovery control program to be checked; The program inspection unit performs program integrity checks and device interlock checks on the recovery control program to be inspected, obtains the recovery control program, and sends the recovery control program to the programmable controller.
9. The intelligent monitoring and control system for caged environments according to claim 1, characterized in that, The programmable controller includes a main controller and multiple regional programmable controllers; The control program generation unit is used to divide the executable control program into regional control subroutines corresponding to different cage monitoring areas, and a shared equipment control subroutine for controlling control equipment shared by multiple cage monitoring areas, according to the area identifiers corresponding to each of the configured program segments. The main controller is used to send each of the area control subroutines to the corresponding area programmable controllers and execute the shared device control subroutines; Each of the aforementioned regional programmable controllers is used to execute the corresponding regional control subroutine, obtain the actual operating status of the corresponding control device, generate regional execution confirmation data based on the actual operating status, and send the regional execution confirmation data to the main controller; The main controller is used to determine the execution status of each area control subroutine based on the area execution confirmation data, and after all the area control subroutines related to the current shared equipment control subroutine have been executed, it executes the next shared equipment control subroutine or the next batch of area control subroutines.
10. The intelligent monitoring and control system for caged environments according to claim 7, characterized in that, It also includes a program version management unit and a runtime record storage unit; The program version management unit is used to configure a program version identifier for the executable control program, determine the executable control program being executed by the programmable controller as the current program version, and determine the newly generated executable control program that passes the program integrity check and the device interlock check as the program version to be run. The program version management unit is also used to determine whether the current program version has reached a preset program switching position based on the program segment execution record, and when the current program version reaches the program switching position, to determine the program version to be run as the new current program version. The operation record storage unit is used to store the area control requirement data, the program version identifier, the program segment execution record, the execution confirmation data, the execution result of the executable control program, and the corresponding recovery control program when a recovery control program exists, to obtain the program operation record.
