CN113467365A - PLC monitoring system and method based on CAN bus - Google Patents

PLC monitoring system and method based on CAN bus Download PDF

Info

Publication number
CN113467365A
CN113467365A CN202110876346.8A CN202110876346A CN113467365A CN 113467365 A CN113467365 A CN 113467365A CN 202110876346 A CN202110876346 A CN 202110876346A CN 113467365 A CN113467365 A CN 113467365A
Authority
CN
China
Prior art keywords
plc
bus
module
scanning period
working
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.)
Withdrawn
Application number
CN202110876346.8A
Other languages
Chinese (zh)
Inventor
张鲁国
丁琦
梁松涛
李鑫
孙晓鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Xinda Jiean Information Technology Co Ltd
Original Assignee
Zhengzhou Xinda Jiean 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 Zhengzhou Xinda Jiean Information Technology Co Ltd filed Critical Zhengzhou Xinda Jiean Information Technology Co Ltd
Priority to CN202110876346.8A priority Critical patent/CN113467365A/en
Publication of CN113467365A publication Critical patent/CN113467365A/en
Withdrawn legal-status Critical Current

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
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/054Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/11Plc I-O input output
    • G05B2219/1105I-O

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)

Abstract

The invention provides a PLC monitoring system and a method based on a CAN bus, wherein the system comprises a PLC main control module, a PLC input module, a PLC output module and a CAN bus monitoring module; the PLC master control module, the PLC input module, the PLC output module and the CAN bus monitoring module are respectively in communication connection through a CAN bus; the method comprises the following steps: when the working mode of the CAN bus monitoring module is a recording mode, a PLC working data table is constructed by storing and analyzing data transmitted through the CAN bus in each PLC scanning period in each process period; and when the working mode of the CAN bus monitoring module is a monitoring mode, comparing the received information transmitted through the CAN bus and the time offset of the scanning period corresponding to the starting time point of the process period with the PLC working data table, and judging whether the PLC is in a normal working state according to the comparison result.

Description

PLC monitoring system and method based on CAN bus
Technical Field
The invention belongs to the field of industrial control safety, and particularly relates to a PLC monitoring system and method based on a CAN bus.
Background
In recent years, the security incidents of industrial control systems have increased, and high attention has been paid to the competent sectors and the industry. Safety problems of industrial control systems may not only cause information loss or leakage, but also industrial production failures, resulting in damage to production equipment, threat to personal safety, and cause environmental and social problems. Accordingly, enterprises and related departments are increasingly paying more attention to the security of industrial control systems.
Programmable Logic Controllers (PLCs) are the most basic control components in industrial control systems. The PLC is ensured to stably and reliably operate, and the key for ensuring the efficient operation of the production line and the safety of operating equipment and production line personnel is provided. With the continuous improvement of the intelligent degree of the production line, the cases that the PLC is subjected to network attack are also increased. The safety and the capability of resisting network attack of the PLC can be improved by adding safety solutions (such as identity authentication, information encryption and decryption, integrity verification, timeliness verification and the like) based on the cryptographic technology in the PLC master control module, but the related safety solutions occupy the operation resources and time of the PLC and influence the control precision and the working efficiency of the PLC master control module.
How to realize the automatic monitoring and risk processing of the PLC on the premise of not influencing the working efficiency of the PLC and not occupying or occupying less computing resources of the PLC becomes a problem to be solved urgently.
Disclosure of Invention
The invention aims to provide a PLC monitoring system and a method based on a CAN bus aiming at the defects of PLC safety supervision or the requirements of automatic monitoring and risk processing of an industrial control system, and the specific scheme is as follows:
the invention provides a PLC monitoring method based on a CAN bus, which comprises the steps of when the working mode is a recording mode, constructing a PLC working data table by storing and analyzing data transmitted through the CAN bus in each PLC scanning period in each process period;
and when the working mode is the monitoring mode, comparing the received information transmitted through the CAN bus and the time offset of the scanning period corresponding to the starting time point of the process period with the PLC working data table, and judging whether the PLC is in a normal working state according to the comparison result.
Based on the above, the data in the PLC working data table includes: the input parameters and the output control parameters when the input parameters or the output control parameters change state every time in a complete process period under the normal working condition of the PLC, and the range of the duration of each state.
Based on the above, when the working mode is the monitoring mode, firstly, according to the states of the input parameters and the output control parameters of the current PLC and the subsequent state changes, corresponding data are searched in the PLC working data table, and the synchronous correspondence of the PLC working data table and the PLC working state is completed;
comparing the received data of each PLC scanning period with the data of the corresponding working state in the PLC working data table;
if the input parameter and the output control parameter of the current PLC scanning period are consistent with the input parameter and the output control parameter of the previous PLC scanning period, recording the duration of the PLC after entering the current state, and judging whether the PLC is in the normal working state or not according to whether the duration is within the range of the duration of the current state in a PLC working data table or not;
and if the input parameter or the output control parameter of the current PLC scanning period is changed in state compared with the last PLC scanning period, comparing the data of the current PLC scanning period with the data of the next state corresponding to the state of the last PLC scanning period in the PLC working data table, and judging whether the PLC is in a normal working state or not according to the comparison result.
Based on the above, the data in the PLC working data table includes: the input parameters and the output control parameters in each PLC scanning period in a complete process period under the normal working condition of the PLC, and the time offset of each PLC scanning period relative to the starting time point of the process period.
Based on the above, when the working mode is the monitoring mode, firstly, according to the states of the PLC input parameter and the PLC output control parameter in the current and the subsequent PLC scanning periods, the corresponding data is searched in the PLC working data table, and the synchronous correspondence of the PLC working data table and the PLC scanning period is completed;
and comparing the received data of each PLC scanning period and the time offset of the corresponding PLC scanning period relative to the starting time point of the process period with the data of the corresponding PLC scanning period in the PLC working data table, and judging whether the PLC is in a normal working state or not according to the comparison result.
Based on the above, when the working mode is the recording mode, the transmission information time sequence table in the PLC scanning period is constructed by recording and analyzing the time sequence of all data transmitted through the CAN bus in each PLC scanning period;
and when the working mode is the monitoring mode, comparing the time sequence of all data transmitted through the CAN bus in each PLC scanning period with the transmission information time sequence table, and judging whether the PLC is in a normal working state or not according to the comparison result.
Based on the above, when the working mode is the monitoring mode, firstly, whether the time sequence of the information transmitted through the CAN bus in one PLC scanning period is consistent with the transmission information time sequence table or not is monitored, on the premise that the time sequence is consistent with the transmission information time sequence table, the received information transmitted through the CAN bus and the time offset of the scanning period corresponding to the starting time point of the process period are compared with the PLC working data table, and whether the PLC is in the normal working state or not is judged according to the comparison result.
The invention provides a PLC monitoring system based on a CAN bus, which comprises a PLC main control module, a PLC input module, a PLC output module and a CAN bus monitoring module;
the PLC master control module, the PLC input module, the PLC output module and the CAN bus monitoring module are respectively in communication connection through a CAN bus;
the PLC master control module is used for reading input parameters from the PLC input module through the CAN bus in each PLC scanning period and sending output control parameters to the PLC output module through the CAN bus after control operation is finished;
the PLC input module is used for receiving an input control command of the PLC main control module and collecting and processing input parameters;
the PLC output module is used for controlling corresponding execution equipment according to the received output control parameters of the PLC main control module;
the CAN bus monitoring module is used for executing the PLC monitoring method based on the CAN bus.
Based on the above, the PLC master control module sends a command for reading input parameters through the CAN bus;
the PLC input module collects and processes input parameters after receiving the input parameter reading command, and returns the input parameters to the PLC master control module through a CAN bus;
after receiving the returned input parameters, the PLC master control module completes control operation according to the input parameters and the control program to obtain output control parameters, and sends the output control parameters to the PLC output module through the CAN bus;
and after receiving the output control parameters, the PLC output module completes the control process of the execution equipment according to the output control parameters and returns the state information which is output and completed to the PLC main control module.
Compared with the prior art, the invention has prominent substantive characteristics and remarkable progress, particularly:
1. according to the technical scheme, the input data and the output data of the PLC are automatically monitored through the CAN bus monitoring module, the operation safety of the PLC CAN be monitored in real time on the premise of not interfering the normal work of the PLC, and various PLC safety problems such as PLC program logic bombs, system faults, network attacks and the like are discovered and solved;
2. according to the technical scheme, the PLC working data table obtained by analyzing the received and stored data in the recording mode is used as a standard for monitoring and judging the running state of the PLC, so that the automatic monitoring of the PLC can be conveniently realized, and when the control program of the PLC needs to be updated, the PLC working data table corresponding to a new control program can be conveniently and quickly obtained by reusing the recording mode, the automatic monitoring function is continuously exerted, and the PLC working data table has a good flexible monitoring function;
3. according to the technical scheme, the CAN bus monitoring module completes the monitoring function of the working state of the PLC by receiving and analyzing the data broadcasted on the CAN bus, does not occupy any resource of the PLC, does not influence the running efficiency of the PLC, ensures that the PLC CAN run efficiently while ensuring safety, CAN meet different application requirements of the PLC, and has better practicability and universality.
Drawings
Fig. 1 is a schematic diagram of a CAN bus-based PLC monitoring system according to embodiment 1 of the present invention.
Fig. 2 is a schematic diagram of a transmission information timing chart in a scanning period in embodiment 2 of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the following describes the technical solutions of the embodiments of the present invention clearly and completely, but the present invention is not limited to these embodiments:
example 1
This embodiment provides a PLC monitored control system based on CAN bus, as shown in fig. 1, includes: the PLC master control module, the PLC input module, the PLC output module and the CAN bus monitoring module; the PLC master control module, the PLC input module, the PLC output module and the CAN bus monitoring module are respectively in communication connection through a CAN bus; the PLC master control module is used for reading input parameters from the PLC input module through the CAN bus in each PLC scanning period and sending output control parameters to the PLC output module through the CAN bus after control operation is finished; the PLC input module is used for receiving an input control command of the PLC main control module and collecting and processing input parameters; the PLC output module is used for controlling corresponding execution equipment according to the received output control parameters of the PLC main control module; the CAN bus monitoring module is used for receiving and analyzing data transmitted by the PLC through the CAN bus in each scanning period in each process period, and executing the PLC monitoring method based on the CAN bus:
when the working mode is the recording mode, a PLC working data table is constructed by storing and analyzing data transmitted through a CAN bus in each PLC scanning period in each process period;
and when the working mode is the monitoring mode, comparing the received information transmitted through the CAN bus and the time offset of the scanning period corresponding to the starting time point of the process period with the PLC working data table, and judging whether the PLC is in a normal working state according to the comparison result.
It should be noted that the PLC master control module, the PLC input module, and the PLC output module are all components of a PLC controller. In addition, the PLC controller also comprises a power supply module, a communication interface module, an expansion interface module and the like, and the PLC main control module comprises a memory.
When the working mode of the CAN bus monitoring module is the recording mode, it is required to ensure that the PLC is in a normal working state, and the data received by the CAN bus monitoring module is data in a normal state, so that the PLC working data table reflects the condition of the normal working state of the PLC.
In this embodiment, the PLC host system reads input parameters from the PLC input module through the CAN bus in each PLC scanning period, and sends output control parameters to the PLC output module through the CAN bus after completing control operation, and specifically includes:
the PLC master control module sends a command for reading input parameters through a CAN bus;
the PLC input module collects and processes input parameters after receiving the input parameter reading command, and returns the input parameters to the PLC master control module through a CAN bus;
after receiving the returned input parameters, the PLC master control module completes control operation according to the input parameters and the control program to obtain output control parameters, and sends the output control parameters to the PLC output module through the CAN bus;
after receiving the output control parameters, the PLC output module completes the control process of the execution equipment according to the output control parameters and returns the state information which is output and completed to the PLC main control module; and when the PLC master control module receives the state information which is returned by the PLC output module and has finished output, one scanning period is finished.
In this embodiment, the data in the PLC working data table includes: under the normal working condition of the PLC, the input parameters and the output control parameters when the input parameters or the output control parameters are subjected to state change every time in a complete process period, and the duration range of each state.
In this embodiment, when the CAN bus monitoring module enters the monitoring mode, first, according to the state of the input parameter and the output control parameter of the current PLC and the subsequent state change, corresponding data is searched in the PLC working data table, and the synchronous correspondence between the PLC working data table and the PLC working state is completed;
comparing the received data of each PLC scanning period with the data of the corresponding working state in the PLC working data table;
if the input parameter and the output control parameter of the current PLC scanning period are consistent with the input parameter and the output control parameter of the previous PLC scanning period, recording the duration of the PLC after entering the current state, and judging whether the PLC is in the normal working state or not according to whether the duration is within the range of the duration of the current state in a PLC working data table or not;
and if the input parameter or the output control parameter of the current PLC scanning period is changed in state compared with the last PLC scanning period, comparing the data of the current PLC scanning period with the data of the next state corresponding to the state of the last PLC scanning period in the PLC working data table, and judging whether the PLC is in a normal working state or not according to the comparison result.
Setting m PLC scanning periods in each process period, wherein input parameters and output control parameters have n stable states, wherein n is less than or equal to m, each state lasts for one or more PLC scanning periods, and PLC working data are represented as shown in a table I:
table-PLC working data table example
Figure DEST_PATH_IMAGE002
The number Ni in Table I refers to the number of each different state in each process cycle in the present embodiment, i is greater than or equal to 1 and less than or equal to n. The input parameters DIi and the output control parameters DOi are parameter vectors.
Each state duration may be defined as a time interval from a start time (or end time) of the PLC scan cycle of the current state change to a start time (or end time) of the PLC scan cycle of the current state change. Or recording the time offset between each state change and the starting time point of the process cycle, and the duration of each state is the difference between the time offset of the current state change and the time offset of the next state change. If the time of the PLC scan cycle is fixed at T, the duration of each state and its range can also be expressed in terms of the number of scan cycles. Each state duration may be defined by a minimum and/or maximum value for that state duration.
In this embodiment, the CAN bus monitoring module has two working modes, namely, a recording mode and a monitoring mode. In the recording mode, under the condition that the PLC works normally, the data of all PLC scanning periods in the complete process period is recorded, and a plurality of complete process periods are usually recorded. When the recording mode is finished, the records of a plurality of complete process periods are analyzed and merged, stable states and the range of the duration of each state of input parameters and output control parameter pairs transmitted by the PLC through the CAN bus in the complete process periods CAN be obtained, and the range of the duration of each state CAN be manually analyzed and adjusted if necessary, so that the PLC has certain fault-tolerant capability, and a foundation is laid for monitoring the working state of the PLC.
Specifically, when the CAN bus monitoring module enters the monitoring mode, after receiving DI data and output control parameter DO sent by the input module through the CAN bus, all data items with parameters identical to the DI and DO are searched in the PLC working data table, then when the received DI and DO change in state, the changed DI and DO are compared with the next data item of the searched data item, and if two or more data items meeting the conditions still exist, the comparison is continued during the next state change until the uniquely determined corresponding data item is found. According to the method, a certain data item in the PLC working data table corresponding to the current moment can be quickly searched, and synchronous correspondence is completed.
If the input parameter and the output control parameter of the current PLC scanning period are consistent with the input parameter and the output control parameter of the previous PLC scanning period, recording the duration of the PLC after entering the current state, and if the duration is less than or equal to the maximum value of the range of the duration of the current state in the PLC working data table, judging that the PLC is in the normal working state; and if the duration is longer than the maximum value of the range of the duration of the current state in the PLC working data table, judging that the PLC is in an abnormal state. This can prevent the PLC from entering a dead-cycle state due to a fault or other reason.
And if the input parameter or the output control parameter of the current PLC scanning period is changed in state compared with the last PLC scanning period, comparing the data DI and DO of the current PLC scanning period with the data DIi and DOi of the next state corresponding to the state of the last PLC scanning period in the PLC working data table. The following may occur:
when DI = DIi and DO = DOi, judging that the PLC works normally;
when DI = DIi and DO ≠ DOi, judging that the PLC main control module is attacked or has a fault;
when DI ≠ DIi and DO = DOi, judging that the PLC input module has a fault;
and when the DI is not equal to the DIi and the DO is not equal to the DOi, judging that the PLC system is attacked or has a fault.
In addition, if the input parameter or the output control parameter of the current PLC scanning period is changed in state compared with the last PLC scanning period, the state duration before the state change can be compared with the corresponding range of the state duration in the PLC working data table, and if the state duration is not in the range, the PLC state is judged to be abnormal.
And according to different fault conditions and a preset safety control strategy, alarming or taking corresponding safety measures. The normal operation of the PLC system is ensured by monitoring the working state of the PLC in real time.
The system of the embodiment is suitable for the case that the PLC has relative periodicity in each process cycle, that is, the PLC changes states in a certain sequence in each process cycle, and the duration of each state is within a certain range.
Example 2
This example differs from example 1 in that: when the working mode of the CAN bus monitoring module is a recording mode, a transmission information time sequence table in each PLC scanning period is constructed by recording and analyzing time sequence sequences of all data transmitted through the CAN bus in each PLC scanning period; when the working mode is the monitoring mode, the time sequence of all data transmitted through the CAN bus in each PLC scanning period is compared with the transmission information time sequence table, and whether the PLC is in a normal working state or not is judged according to the comparison result.
Specifically, according to the working principle of the PLC scanning cycle, one PLC scanning cycle can be decomposed into four time periods t1, t2, t3 and t4, as shown in fig. 2, the working process of each time period is as follows:
time period t 1: the PLC master control module sends and reads a command sequence of the PLC input module through the CAN bus, and starts the corresponding PLC input module to enter parameter acquisition and processing, namely, starts an input state (an initial mark of a scanning period);
time period t 2: after receiving the command sequence, each PLC input module starts the collection and processing of input parameters, finally obtains the input parameters DI of each input port of the PLC at the moment, and sends the input parameters DI to the PLC master control module through the CAN bus;
time period t 3: the PLC main control module executes corresponding control software after receiving the input parameter DI to obtain a control parameter DO of each output module, and outputs corresponding control parameters to each control module through the CAN bus;
time period t 4: and after receiving the corresponding control parameters DO, each output control module controls the corresponding execution mechanism to complete the control function required by the process flow in the period, and feeds back the execution state of the PLC output module to the PLC main control module until a PLC scanning period is finished.
When the CAN bus monitoring module works in the recording mode, the CAN bus monitoring module constructs a PLC working data table, and also constructs a transmission information timing table in a scanning period of the PLC by recording and analyzing a timing sequence of all information transmitted by the PLC through the CAN bus in each scanning period.
When the CAN bus monitoring module is in a monitoring mode, firstly, whether a time sequence of information transmitted through the CAN bus in a PLC scanning period is consistent with a transmission information time sequence table or not is monitored, on the premise that the time sequence of the information transmitted through the CAN bus is consistent with the transmission information time sequence table, the received information transmitted through the CAN bus and the time offset of the scanning period corresponding to the starting time point of the process period are compared with the PLC working data table, and whether the PLC is in a normal working state or not is judged according to the comparison result.
Example 3
This example differs from example 1 in that:
in this embodiment, the data in the PLC working data table includes: under the normal working condition of the PLC, the input parameters and the output control parameters in each PLC scanning period in a complete process period, and the time offset of each PLC scanning period relative to the starting time point of the process period.
The time offset of each PLC scan cycle with respect to the starting time point of the process cycle may be defined as the time offset between the starting time of each PLC scan cycle and the starting time point of the process cycle.
Assuming that each process cycle has m scan cycles, the PLC operating data is represented as shown in table two:
example of a Table two PLC working data Table
Figure DEST_PATH_IMAGE004
The number Ni in table two refers to the number of each PLC scanning cycle in each process cycle in this embodiment. If the time of the PLC scanning period is fixed and the time of each PLC scanning period is T, the time offset delta ti = (Ni-1) × T (Ni is more than or equal to 1 and less than or equal to m); the input parameters DIi and the output control parameters DOi are parameter vectors.
The CAN bus monitoring module has two working modes, namely a recording mode and a monitoring mode. In the recording mode, under the condition that the PLC normally works, the data of all PLC scanning periods in the complete process period are recorded. When the recording mode is finished, the input parameter and the output control parameter pair transmitted by the PLC through the CAN bus in each scanning period of a complete process period, the corresponding time offset and the time sequence of information transmission through the CAN bus in one scanning period CAN be obtained, and a foundation is laid for monitoring the working state of the PLC.
In this embodiment, the ratio of the states of the input parameter and the output parameter to the previous scanning period in each scanning period may or may not be changed.
In this embodiment, when the CAN bus monitoring module enters the monitoring mode, first, according to the states of the PLC input parameter and the output control parameter in the current and subsequent PLC scanning periods, corresponding data is searched in the PLC working data table, and the synchronous correspondence between the PLC working data table and the PLC scanning period is completed; specifically, after receiving DI data and output control parameter DO sent by the PLC input module through the CAN bus, all data items having the same parameters as DI and DO are found in the PLC working data table, and then the received DI and DO are compared with the next data item of the found data item in the next PLC scanning period, and if there are two or more data items meeting the conditions, the comparison is continued in the next scanning period until the uniquely determined corresponding data item is found. According to the method, a certain data item in the PLC working data table corresponding to the current moment can be quickly searched, and synchronous correspondence is completed.
In this embodiment, when the working mode of the CAN bus monitoring module is the monitoring mode, the CAN bus monitoring module compares the received data of each PLC scanning period and the time offset of the corresponding PLC scanning period with respect to the starting time point of the process period with the data of the corresponding PLC scanning period in the PLC working data table, and determines whether the PLC is in a normal working state according to the comparison result.
Specifically, the DI and DO data received by the CAN bus monitoring module are compared with the DIi and DOi of the corresponding data items in the PLC working data table, and the following situations may occur:
when DI = DIi and DO = DOi, judging that the PLC works normally;
when DI = DIi and DO ≠ DOi, judging that the PLC main control module is attacked or has a fault;
when DI ≠ DIi and DO = DOi, judging that the PLC input module has a fault;
when DI is not equal to DIi and DO is not equal to DOi, judging that the PLC system is attacked or has a fault;
and comparing the time offset of the scanning period corresponding to the starting time point of the process period with the time offset of the corresponding PLC scanning period in a PLC working data table, if the two data are the same, judging that the PLC works normally, and otherwise, judging that the PLC is abnormal.
According to different fault conditions and a preset safety control strategy, alarming or taking corresponding safety measures (such as system outage or system maintenance). The safe operation of the PLC system is ensured by monitoring the working state of the PLC in real time.
This embodiment is applicable to the case where the PLC has strict periodicity in each process cycle, that is, the PLC follows the sequence of the scanning cycles in each process cycle, and each PLC scanning cycle corresponds to a fixed state of the scanning cycle. The embodiment is also suitable for the conditions that the state change of the PLC is frequent and the duration of each state is short in each process period and the conditions that the calculation and storage resources of the CAN bus monitoring module are sufficient.
Finally, it should be noted that the above examples are only used to illustrate the technical solutions of the present invention and not to limit the same; although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art will understand that: modifications to the specific embodiments of the invention or equivalent substitutions for parts of the technical features may be made; without departing from the spirit of the present invention, it is intended to cover all aspects of the invention as defined by the appended claims.

Claims (9)

1. A PLC monitoring method based on a CAN bus is characterized in that:
when the working mode is the recording mode, a PLC working data table is constructed by storing and analyzing data transmitted through a CAN bus in each PLC scanning period in each process period;
and when the working mode is the monitoring mode, comparing the received information transmitted through the CAN bus and the time offset of the scanning period corresponding to the starting time point of the process period with the PLC working data table, and judging whether the PLC is in a normal working state according to the comparison result.
2. The CAN bus-based PLC monitoring method of claim 1, wherein the data in the PLC working data table includes: the input parameters and the output control parameters when the input parameters or the output control parameters change state every time in a complete process period under the normal working condition of the PLC, and the range of the duration of each state.
3. The CAN bus-based PLC monitoring method according to claim 2, wherein: when the working mode is the monitoring mode, firstly, according to the states of the input parameters and the output control parameters of the current PLC and the subsequent state changes, searching corresponding data in a PLC working data table, and finishing the synchronous correspondence of the PLC working data table and the PLC working state;
comparing the received data of each PLC scanning period with the data of the corresponding working state in the PLC working data table;
if the input parameter and the output control parameter of the current PLC scanning period are consistent with the input parameter and the output control parameter of the previous PLC scanning period, recording the duration of the PLC after entering the current state, and judging whether the PLC is in the normal working state or not according to whether the duration is within the range of the duration of the current state in a PLC working data table or not;
and if the input parameter or the output control parameter of the current PLC scanning period is changed in state compared with the last PLC scanning period, comparing the data of the current PLC scanning period with the data of the next state corresponding to the state of the last PLC scanning period in the PLC working data table, and judging whether the PLC is in a normal working state or not according to the comparison result.
4. The CAN bus-based PLC monitoring method of claim 1, wherein the data in the PLC working data table includes: the input parameters and the output control parameters in each PLC scanning period in a complete process period under the normal working condition of the PLC, and the time offset of each PLC scanning period relative to the starting time point of the process period.
5. The CAN-bus based PLC monitoring method of claim 4, wherein: when the working mode is the monitoring mode, firstly, according to the states of PLC input parameters and output control parameters in the current and the following PLC scanning periods, searching corresponding data in a PLC working data table, and finishing the synchronous correspondence of the PLC working data table and the PLC scanning period;
and comparing the received data of each PLC scanning period and the time offset of the corresponding PLC scanning period relative to the starting time point of the process period with the data of the corresponding PLC scanning period in the PLC working data table, and judging whether the PLC is in a normal working state or not according to the comparison result.
6. The CAN bus-based PLC monitoring method according to claim 1, wherein:
when the working mode is a recording mode, a transmission information time sequence table in each PLC scanning period is constructed by recording and analyzing time sequence sequences of all data transmitted through the CAN bus in each PLC scanning period;
and when the working mode is the monitoring mode, comparing the time sequence of all data transmitted through the CAN bus in each PLC scanning period with the transmission information time sequence table, and judging whether the PLC is in a normal working state or not according to the comparison result.
7. The CAN-bus based PLC monitoring method of claim 6, wherein: when the working mode is the monitoring mode, firstly, whether a time sequence of information transmission through the CAN bus in a PLC scanning period is consistent with a transmission information time sequence table or not is monitored, on the premise that the time sequence of the information transmission through the CAN bus is consistent with the transmission information time sequence table, the received information transmission through the CAN bus and the time offset of the scanning period corresponding to the starting time point of the process period are compared with the PLC working data table, and whether the PLC is in a normal working state or not is judged according to the comparison result.
8. The utility model provides a PLC monitored control system based on CAN bus which characterized in that: the PLC intelligent control system comprises a PLC main control module, a PLC input module, a PLC output module and a CAN bus monitoring module;
the PLC master control module, the PLC input module, the PLC output module and the CAN bus monitoring module are respectively in communication connection through a CAN bus;
the PLC master control module is used for reading input parameters from the PLC input module through the CAN bus in each PLC scanning period and sending output control parameters to the PLC output module through the CAN bus after control operation is finished;
the PLC input module is used for receiving an input control command of the PLC main control module and collecting and processing input parameters;
the PLC output module is used for controlling corresponding execution equipment according to the received output control parameters of the PLC main control module;
the CAN bus monitoring module for performing the CAN bus-based PLC monitoring method of any one of claims 1 to 7.
9. The CAN bus-based PLC monitoring system of claim 8, wherein:
the PLC master control module sends a command for reading input parameters through a CAN bus;
the PLC input module collects and processes input parameters after receiving the input parameter reading command, and returns the input parameters to the PLC master control module through a CAN bus;
after receiving the returned input parameters, the PLC master control module completes control operation according to the input parameters and the control program to obtain output control parameters, and sends the output control parameters to the PLC output module through the CAN bus;
and after receiving the output control parameters, the PLC output module completes the control process of the execution equipment according to the output control parameters and returns the state information which is output and completed to the PLC main control module.
CN202110876346.8A 2021-07-31 2021-07-31 PLC monitoring system and method based on CAN bus Withdrawn CN113467365A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110876346.8A CN113467365A (en) 2021-07-31 2021-07-31 PLC monitoring system and method based on CAN bus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110876346.8A CN113467365A (en) 2021-07-31 2021-07-31 PLC monitoring system and method based on CAN bus

Publications (1)

Publication Number Publication Date
CN113467365A true CN113467365A (en) 2021-10-01

Family

ID=77883628

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110876346.8A Withdrawn CN113467365A (en) 2021-07-31 2021-07-31 PLC monitoring system and method based on CAN bus

Country Status (1)

Country Link
CN (1) CN113467365A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113931830A (en) * 2021-11-12 2022-01-14 华能伊敏煤电有限责任公司 Combined type variable frequency control system and method for open-pit coal mine open-drainage system
CN117666462A (en) * 2024-01-31 2024-03-08 成都苔岑智能设备有限公司 PLC product standardization control system based on independent allocation of multiple parameters

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113931830A (en) * 2021-11-12 2022-01-14 华能伊敏煤电有限责任公司 Combined type variable frequency control system and method for open-pit coal mine open-drainage system
CN117666462A (en) * 2024-01-31 2024-03-08 成都苔岑智能设备有限公司 PLC product standardization control system based on independent allocation of multiple parameters
CN117666462B (en) * 2024-01-31 2024-05-17 成都苔岑智能设备有限公司 PLC product standardization control system based on independent allocation of multiple parameters

Similar Documents

Publication Publication Date Title
CN113467365A (en) PLC monitoring system and method based on CAN bus
CN104052730B (en) The intrusion detection of intelligent computer physics and system of defense and method for industrial control system
CN103221891A (en) Intelligent interface for a distributed control system
CN109992624A (en) A kind of synchronous storage method, device and the computer equipment of block chain Block chain
CN102890735A (en) Modeling method of strategy table and strategy table searching match of stable control device
CN109519233A (en) For nuclear power plant's steam turbine into the on-line monitoring method and system of steam control valve
CN108870635A (en) Protection control method of air conditioning unit and related equipment
CN111665816A (en) DCS (distributed control system) engineering configuration verification method based on nuclear power simulation technology
CN112395124A (en) Robot abnormity control method and device in cluster environment
CN103744766A (en) Working method of monitoring system
CN107863168B (en) Method for analyzing withdrawal time of nuclear power unit when power operation loses final heat trap
CN112201378A (en) Hot standby switching method, system, terminal and medium based on nuclear power plant DCS platform
CN112952773A (en) Direct-current power distribution network protection method and system and fault recovery method and system
CN104763576A (en) Distinguishing and correcting method for auxiliary signal anomaly for pumped storage group protection
Bouyer et al. Synthesis of optimal strategies using HyTech
CN115269262A (en) Step hydropower data backup method
CN116095146A (en) Source configuration method of relay protection information model of main substation and sub station based on block chain
CN111539642B (en) Object-oriented power plant data acquisition and processing system and method thereof
CN110488772B (en) DCS centralized monitoring method and device and centralized monitoring terminal
CN109085817B (en) Control method and system for off-line downloading of CPU (Central processing Unit) in joint debugging stage of nuclear power unit
CN114243715A (en) Method and system for testing hydropower station AGC control device
CN111126277A (en) Power failure alarm signal identification method, device, terminal and storage medium
CN205920348U (en) A intelligence is opened and is gone into to leave module for photovoltaic electricity measurement and control device
CN112178618A (en) Steam injection boiler fault alarm method, device and system
CN116441018A (en) Grinding set start-stop control decision method and device of powder manufacturing system and electronic equipment

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20211001