CN108153173B - Method for processing equipment state information by controller - Google Patents

Method for processing equipment state information by controller Download PDF

Info

Publication number
CN108153173B
CN108153173B CN201711422199.7A CN201711422199A CN108153173B CN 108153173 B CN108153173 B CN 108153173B CN 201711422199 A CN201711422199 A CN 201711422199A CN 108153173 B CN108153173 B CN 108153173B
Authority
CN
China
Prior art keywords
state information
control instruction
controller
received
instruction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711422199.7A
Other languages
Chinese (zh)
Other versions
CN108153173A (en
Inventor
韦守强
丁路宁
孙育宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN SHANLIAN INFORMATION TECHNOLOGY CO LTD
Original Assignee
SHENZHEN SHANLIAN INFORMATION TECHNOLOGY CO LTD
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHENZHEN SHANLIAN INFORMATION TECHNOLOGY CO LTD filed Critical SHENZHEN SHANLIAN INFORMATION TECHNOLOGY CO LTD
Priority to CN201711422199.7A priority Critical patent/CN108153173B/en
Publication of CN108153173A publication Critical patent/CN108153173A/en
Application granted granted Critical
Publication of CN108153173B publication Critical patent/CN108153173B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Debugging And Monitoring (AREA)
  • Communication Control (AREA)

Abstract

The invention discloses a method for processing equipment state information by a controller, which comprises the following steps: setting a delay preset time n as the time from the controller sending a control instruction to the receiving equipment responding to the state information of the instruction; and after the controller sends a control instruction, delaying the preset time n to analyze the received state information, matching the state information with the sent control instruction, if the state information is matched with the sent control instruction, the state information is response state information of the instruction, and if the state information is not matched with the sent control instruction, analyzing the received state information until the state information is matched with the sent control instruction. The invention uses the delay mode to identify the difference between the actual state and the configuration state of the equipment so as to ensure the effective receiving of the real data state, thereby not only avoiding the controller from processing a plurality of pieces of unnecessary state information and improving the performance of processing data, but also effectively ensuring that the real data state of the received equipment is required by the controller.

Description

Method for processing equipment state information by controller
Technical Field
The invention relates to a controller, in particular to a method for processing equipment state information by the controller.
Background
The controller controls the opposite terminal to the equipment by sending a control instruction, and the equipment processes the control instruction and returns corresponding state information to the controller after receiving the control instruction. During the period from the control command sent by the controller to the state information of the equipment responding to the command, other state information of the equipment is uploaded to the controller, the controller can receive a plurality of pieces of state information, and the state information can even cause the controller to mistakenly consider that the received state information is the state information of the equipment responding to the control command, so that the actual state of the equipment is not matched with the configuration state (the state set by the current equipment).
The current solutions are: the controller analyzes all the equipment state information received after the control instruction is sent, and matches the equipment state information with the control instruction sent by the controller until the received state information is matched with the control instruction. In the scheme, the controller needs to analyze and process a large amount of unreasonable state information received after sending the control instruction, and can find the state information matched with the control instruction to obtain the required data, so that the performance of the controller for processing the data is reduced, and the authenticity of the data is influenced.
Disclosure of Invention
The invention aims to solve the technical problem that the controller can find the state information matched with the control instruction to obtain the required data only by analyzing and processing a large amount of unreasonable state information received after the control instruction is sent out, thereby reducing the performance of the controller for processing the data.
In order to solve the above technical problem, a technical solution adopted by the present invention is to provide a method for processing device status information by a controller, including:
setting a delay preset time n as the time from the controller sending a control instruction to the receiving equipment responding to the state information of the instruction;
and after the controller sends a control instruction, delaying the preset time n to analyze the received state information, matching the state information with the sent control instruction, if the state information is matched with the sent control instruction, the state information is response state information of the instruction, and if the state information is not matched with the sent control instruction, analyzing the received state information until the state information is matched with the sent control instruction.
In the method, after the controller sends the control instruction, the controller delays the preset time n to analyze the received state information and matches the state information with the sent control instruction, and the method specifically comprises the following steps:
step S21, the controller sends a control instruction and records the current time a;
step S22, the controller receives the status information returned by the device and records the current time b;
step S23, judging whether the difference between b and a is less than the delay preset time n, if so, not analyzing the received state information, and executing step S22; otherwise, go to step S24;
step S24, analyzing the received state information, judging whether the analyzed data is matched with the current control instruction, and if so, executing step S25; otherwise, continuing to receive the data, and executing step S122;
step S25, the routine ends.
The invention uses the delay mode to identify the difference between the actual state and the configuration state of the equipment so as to ensure the effective receiving of the real data state, thereby not only avoiding the controller from processing a plurality of pieces of unnecessary state information and improving the performance of processing data, but also effectively ensuring that the real data state of the received equipment is required by the controller.
Drawings
Fig. 1 is a flowchart of a method for processing device status information by a controller according to the present invention;
FIG. 2 is a flowchart of a first implementation manner of step S20 according to the present invention;
fig. 3 is a flowchart of a second implementation manner adopted by step S20 in the present invention.
Detailed Description
The invention uses a delay mode to identify the real data state of the equipment, ensures that the state information analyzed and processed each time is the state information responding to the control instruction as much as possible, reduces the analysis and processing of a large amount of unreasonable state information and improves the data processing performance of the controller.
The invention is described in detail below with reference to the figures and specific examples.
As shown in fig. 1, the method for processing device status information by a controller according to the present invention adopts a delay manner to identify a difference between an actual status and a configuration status of a device, so as to ensure effective reception of real status data, and specifically includes:
step S10, setting the delay preset time n as the time from the controller sending the control instruction to the receiving device responding the state information of the instruction; the value of the delay preset time n is obtained according to a plurality of times of test data and is an average value of time intervals from the time when the controller sends the control instruction to the time when the receiving equipment responds to the state information of the instruction.
Step S20, after the controller sends the control command, after delaying the preset time n, analyzing the received status information, and matching the received status information with the sent control command, if matching, it indicates that the status information (latest data status) responding to the command has been received, if not matching, receiving the status information until matching, and after matching the corresponding status information, processing the status information, such as presenting on the interface.
In the present invention, there are two implementation manners of step S20, the first implementation manner: after a control sending command is sent, delaying a preset time n, and starting to receive and analyze the state information; the second implementation mode comprises the following steps: and immediately receiving the state information after sending the control sending instruction, and beginning to analyze the received state information after a preset time n.
The first implementation mode comprises the following steps: after sending the control sending command, delaying the preset time n, and beginning to receive and analyze the status information, as shown in fig. 2, specifically comprising the following steps:
step S211, initializing a delay timer, wherein the initial value of the delay timer is equal to a delay preset time n;
step S212, the controller sends a control instruction and starts a timer;
step S213, when the time of the timer is 0, the controller starts to receive the state information returned by the equipment;
step S214, analyzing the received state information;
step S215, judging whether the analyzed data is matched with the current control instruction, and if so, executing step S216; otherwise, continuing to analyze the received status data, and executing step S214;
and step S216, ending.
The second implementation mode comprises the following steps: after sending the control sending command, immediately receiving the state information, and after a preset time n, beginning to analyze the received state information, as shown in fig. 3, specifically including the following steps:
step S221, the controller sends a control instruction and records the current time a;
step S222, the controller receives the state information returned by the equipment and records the current time b;
step S223, determining whether the difference between b and a is less than the delay preset time n, if so, not processing the received status information, and executing step S222; otherwise, go to step S224;
step S224, analyzing the received state information;
step S225, judging whether the analyzed data is matched with the current control instruction, and if so, executing step S226; otherwise, continuing to receive the status information, and executing step S222;
step S226 ends.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (1)

1. A method for processing device state information by a controller is characterized by comprising the following steps:
step S10, setting the delay preset time n as the time from the controller sending the control instruction to the receiving device responding the state information of the instruction;
step S20, after the controller sends the control instruction, delaying the preset time n to analyze the received state information, and matching the state information with the sent control instruction, if the state information is matched with the sent control instruction, the state information is the response state information of the instruction, otherwise, the received state information is analyzed until the state information is matched with the sent control instruction;
step S20 includes the following steps:
step S221, the controller sends a control instruction and records the current time a;
step S222, the controller receives the state information returned by the equipment and records the current time b;
step S223, determining whether the difference between b and a is less than the delay preset time n, if so, not processing the received status information, and executing step S222; otherwise, go to step S224;
step S224, analyzing the received state information;
step S225, judging whether the analyzed data is matched with the current control instruction, and if so, executing step S226; otherwise, continuing to receive the status information, and executing step S222;
step S226, end;
the value of the delay preset time n is obtained according to a plurality of times of test data and is the average value of time intervals from the time when the controller sends the control instruction to the time when the receiving equipment responds to the state information of the instruction.
CN201711422199.7A 2017-12-25 2017-12-25 Method for processing equipment state information by controller Active CN108153173B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711422199.7A CN108153173B (en) 2017-12-25 2017-12-25 Method for processing equipment state information by controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711422199.7A CN108153173B (en) 2017-12-25 2017-12-25 Method for processing equipment state information by controller

Publications (2)

Publication Number Publication Date
CN108153173A CN108153173A (en) 2018-06-12
CN108153173B true CN108153173B (en) 2020-11-06

Family

ID=62465831

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711422199.7A Active CN108153173B (en) 2017-12-25 2017-12-25 Method for processing equipment state information by controller

Country Status (1)

Country Link
CN (1) CN108153173B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110273550B (en) * 2019-05-22 2020-10-27 中联重科股份有限公司 Pairing automatic control method and control device for pumping equipment
CN111591223B (en) * 2020-04-26 2021-12-07 中国第一汽车股份有限公司 Height adjusting method and system for head-up display image and vehicle

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000072519A1 (en) * 1999-05-19 2000-11-30 Sony Corporation Communication method, communication device, and communication system
CN100571099C (en) * 2006-03-24 2009-12-16 华为技术有限公司 A kind of feedback, device and transceiver
JP4325698B2 (en) * 2007-04-19 2009-09-02 株式会社デンソー Vehicle remote control system, portable device, and in-vehicle device
CN103440746B (en) * 2013-08-09 2016-12-28 深圳市富斯遥控模型技术有限公司 A kind of AFHDS2 intercommunication system being applied to telecontrolled model

Also Published As

Publication number Publication date
CN108153173A (en) 2018-06-12

Similar Documents

Publication Publication Date Title
CN108153173B (en) Method for processing equipment state information by controller
CN107195305B (en) Information processing method and electronic equipment
CN107040549B (en) TCP (Transmission control protocol) sticky packet processing method, server and system
CN105100730A (en) Monitoring method and camera device
CN111694710A (en) Method, device and equipment for monitoring faults of substrate management controller and storage medium
CN108701112B (en) Method and device for simulating serial port communication based on query mode
CN105719587A (en) Liquid crystal display panel detecting system and method
CN107423196B (en) Multi-card-slot state detection method, detection equipment and mobile terminal
CN109451095B (en) Remote controller detection method and device, storage medium and terminal
CN109766197B (en) 4G module stable working method based on Android system
CN108874596B (en) Server stability testing method and server
CN109361746A (en) A kind of document transmission method of Internet of Things, work board and readable storage medium storing program for executing
CN111081251B (en) Voice wake-up method and device
CN108920264B (en) Command timeout processing method and system
CN116209115A (en) Data signal processing device and data signal processing system
CN106953714B (en) Lower computer feedback data acquisition method and device for intelligent robot
CN113556210A (en) Upper computer and method for establishing communication connection
CN113794537A (en) Sensing network in power Internet of things and self-adaptive dynamic sampling method and device thereof
CN103326897A (en) Distributed computing environment general monitoring device and failure detection method
CN102968175A (en) Method, device, controller and system for controlling memory
CN115204381A (en) Weak supervision model training method and device and electronic equipment
CN113824646A (en) Slow-start control method and device, electronic equipment and storage medium
CN112910732A (en) Method and equipment for resetting edge computing server
CN108965378B (en) IO mode identification method, system, equipment and computer storage medium
CN111752778A (en) Method and device for testing stability of solid state disk firmware under linux

Legal Events

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