A PLC sequential control process correction method and related components
By creating sequential control process variables in the PLC and using communication equipment to write data, the problem of PLC sequential control function diagrams requiring shutdown to be modified is solved, online modification and storage costs are reduced, and operational efficiency is improved.
Patent Information
- Application Number
- CN202210800903.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-08
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-07-08
AI Technical Summary
Existing PLC technology requires stopping operation when modifying the sequential control function chart (SFC), and has large storage requirements, making the modification process cumbersome and increasing hardware costs.
By creating sequential control process variables in advance and using communication equipment to write sequential control process data into these variables, online changes can be achieved, avoiding the need to store SFC diagrams in the PLC, and using the conversion module to process user-written sequential control process files.
It enables online modification of sequential control process variables without stopping the PLC, improving work efficiency, reducing storage costs, and eliminating the need for professional software developers.
Smart Images

Figure CN115291558B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of control technology, and in particular to a PLC sequential control process correction method and related components. Background Art
[0002] Programmable Logic Controllers (PLCs) can implement sequential control logic functions using Sequential Function Charts (SFCs). In practical applications, SFCs often need to be modified. The conventional method for this is for the user to inform the software developer of the required changes, who then uses specialized programming software (IDEs) to make the changes. However, current PLC technology lacks an effective solution for dynamically organizing sequential control processes based on process requirements. Furthermore, this method sometimes requires the PLC to be stopped before modifications can be made, making the modification process cumbersome. Furthermore, if the PLC is not currently capable of stopping, modifications cannot be made. Furthermore, SFCs are currently stored in the PLC. When the SFCs themselves have complex control logic and involve numerous control steps, they can occupy excessive PLC storage space. Consequently, the PLC must be pre-configured with a device with a large storage capacity, which increases hardware costs. Summary of the Invention
[0003] The purpose of the present invention is to provide a PLC sequential control process correction method and related components, which enable users to make online changes to sequential control process variables without stopping the PLC, facilitate operation, improve work efficiency, and do not require professional software developers, making it more practical.
[0004] To solve the above technical problems, the present invention provides a PLC sequential control process correction method, which is applied to PLC, and the method includes:
[0005] Pre-create one or more sequential control process variables corresponding to the current production process;
[0006] Sending the unique identifier of each sequential control process variable to a communication device connected to the PLC, so that the communication device writes sequential control process data corresponding to each sequential control process variable according to each unique identifier; wherein the sequential control process data is generated by a pre-developed conversion module in the communication device after processing a user-written sequential control process file based on the received current sequential control logic of the PLC;
[0007] Sequentially read data from the sequence control process variables to send control signals to each controlled device, so that each controlled device executes the sequence control logic. Preferably, the sequence control process data includes a controlled device identifier, a controlled device execution action, a sequence step transition condition, a sequence step error exit condition, and an error return step identifier;
[0008] The sequence control process variables include a controlled device identifier variable, a controlled device execution action variable, a sequence step transition condition variable, a sequence step error exit condition variable, and an error return step identification variable.
[0009] Preferably, the variable type of the controlled device identifier variable is a String array; the variable types of the controlled device execution action variable, the sequence step transition condition variable, and the sequence step error exit condition variable are all Bool arrays; and the variable type of the error return step identifier variable is an Int array.
[0010] Preferably, the pre-developed conversion module is an ActiveX control script or a .net control script or an application APP.
[0011] Preferably, the communication device is a monitoring system for monitoring the operating status of the PLC.
[0012] Preferably, the format of the sequential control process file is xls format or xml format.
[0013] Preferably, the sequential control process variable includes an identification variable for indicating whether information transmitted by the communication device is received; wherein the identification variable is changed from a first state to a second state when the communication device starts writing data to the sequential control process variable, and is changed from the second state to the first state when the communication device stops writing data to the sequential control process variable;
[0014] Before sequentially reading data from the sequential control process variables to send control signals to each controlled device, the method further includes:
[0015] Determining whether the identification variable switches between the first state and the second state within a preset determination time period;
[0016] If so, determining that the communication transmission between the self and the communication device is normal, and entering the step of sequentially reading data from the sequential control process variables to send control signals to each controlled device;
[0017] If not, a communication failure signal is sent to the communication device, so that the communication device determines whether to resend the sequential control process data according to the communication failure signal.
[0018] To solve the above technical problems, the present invention further provides a PLC sequential control process correction system, which is applied to a PLC. The system comprises:
[0019] A variable creation unit, used to pre-create one or more sequence control process variables corresponding to the current production process;
[0020] a data sending unit, configured to send the unique identifier of each sequential control process variable to a communication device connected to the PLC, so that the communication device writes sequential control process data corresponding to each sequential control process variable according to each unique identifier; wherein the sequential control process data is generated by a conversion module pre-developed in the communication device processing a user-written sequential control process file according to the received current sequential control logic of the PLC;
[0021] The control unit is used to sequentially read data from the sequential control process variables to send control signals to each controlled device, so that each controlled device executes the sequential control logic.
[0022] To solve the above technical problems, the present invention further provides a computer-readable storage medium, comprising:
[0023] The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the PLC sequential control process correction method as described above are implemented.
[0024] In order to solve the above technical problems, the present invention further provides a PLC, comprising:
[0025] memory for storing computer programs;
[0026] The processor is used to execute the steps of the PLC sequential control process correction method as described above.
[0027] The present invention provides a PLC sequential control process correction method and related components, which do not require additional storage of SFC diagrams and sequential control logic in the PLC, thereby reducing storage costs. Specifically, one or more sequential control process variables corresponding to the current production process are created in advance, and the unique identifier of each sequential control process variable is sent to a communication device, so that the communication device can directly write the sequential control process data into the variable, and sequentially read the data from the sequential control process variables to achieve the same sequential control function as the SFC diagram; and the user can directly modify the sequential control process file, and the conversion module can process the file according to the received sequential control logic to generate sequential control process data, ultimately enabling the user to modify the sequential control process variables online without stopping the PLC and the corresponding production line, which is easy to operate, improves work and production efficiency, does not require professional software developers, and is more practical. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the prior art and the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0029] Figure 1 A flow chart of a PLC sequential control process correction method provided by the present invention;
[0030] Figure 2 A schematic diagram showing the contents of a sequential control process file provided by the present invention;
[0031] Figure 3 A schematic diagram showing the contents of a sequence control process variable provided by the present invention;
[0032] Figure 4 A structural diagram of a PLC sequential control process correction system provided by the present invention;
[0033] Figure 5 This is a structural diagram of a PLC provided by the present invention. DETAILED DESCRIPTION
[0034] The core of the present invention is to provide a PLC sequential control process correction method and related components, which enables users to make online changes to sequential control process variables without stopping the PLC. This facilitates operation, improves work efficiency, does not require professional software developers, and is more practical.
[0035] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0036] Please refer to Figure 1 , Figure 1 A flow chart of a PLC sequential control process correction method provided by the present invention;
[0037] In this embodiment, considering that in the prior art, when a sequential control function chart (SFC) needs to be modified, the user must notify the software developer, who then uses the IDE software to make the modification. In some cases, the PLC must be stopped before the modification can be made, which is a cumbersome process. In addition, the currently used SFC diagram is stored in the PLC, occupying excessive PLC storage space. To address the above technical issues, this application provides a PLC sequential control process correction method that is more practical and convenient for users to directly operate.
[0038] The PLC sequential control process correction method is applied to PLC and includes:
[0039] S11: pre-create one or more sequential control process variables corresponding to the current production process;
[0040] It should be noted that the specific content and number of sequential control process variables can be set according to actual needs.
[0041] It should also be noted that the production process here refers to a complete production line in actual production, such as the complete production line corresponding to the production of a car; it can also refer to the complete production process corresponding to the production of a certain product, such as the complete production process corresponding to the production of rapeseed oil.
[0042] S12: Sending the unique identifier of each sequential control process variable to a communication device connected to the PLC, so that the communication device writes the sequential control process data corresponding to each sequential control process variable according to each unique identifier; wherein the sequential control process data is generated by a pre-developed conversion module in the communication device after processing the user-written sequential control process file according to the current sequential control logic of the received PLC;
[0043] Specifically, the unique identifier of each sequential control process variable is related to the actual application and can be a unique variable name of each sequential control process variable or a unique address of each sequential control process variable, which is not specifically limited here. Each of the unique identifiers can then be sent to a communication device so that the communication device can directly write the sequential control process data into the corresponding sequential control process variable (more specifically, the correct correspondence between the above-mentioned production processes and the sequential control process variables can be ensured by relying on the configuration file of the communication device, which is not specifically limited here), without the need to write an additional data writing program in the PLC. It should be noted that the communication device here can be: a monitoring system including a pre-developed conversion module for monitoring the operating status of the PLC, such as a SCADA monitoring system; when the above-mentioned monitoring system does not exist, the communication device can also be: a communication device such as a personal computer including a pre-developed conversion module, which is not specifically limited here.
[0044] It should also be noted that when there are multiple production processes managed by the PLC and the communication equipment connected to it, it is necessary to ensure that each production process can correctly correspond to its respective sequential control process variables. That is, assuming that a sequential control process variable A is set corresponding to the first production process and a sequential control process variable B is set corresponding to the second production process, the above correspondence needs to be accurately and reliably guaranteed, and the first production process cannot correspond to the sequential control process variable B, nor can the second production process correspond to the sequential control process variable A. In order to ensure the determination of the above correspondence, specifically, the matching of the above correspondence can be completed in the configuration file in the communication equipment to ensure that each production process accurately corresponds to its respective sequential control process variable.
[0045] In addition, for example, taking the current production process corresponding to a sequential control process variable, and the unique identifier of the sequential control process variable is the variable name, if the user or technician changes the variable name according to actual needs (for example, from the original variable name C to the variable name D), the above changes need to be resent to the communication device to ensure that the data can be written correctly, and the specific implementation method can still use the above configuration file to complete this matching.
[0046] Furthermore, the sequential control logic described in this application can be understood in actual production as the production process flow required to complete a certain product in accordance with process requirements (such as which process steps need to be used and the working order between different process steps, etc.); the sequential control process data includes the data itself required to implement the above-mentioned process flow, and the data will display the sequential control logic of the control sequence of each controlled device, control actions and switching conditions between actions in the form of data.
[0047] Of course, the communication between the communication equipment and the PLC here needs to meet the communication protocol requirements corresponding to PLCs of different brands and series, such as OPC UA protocol, Modbus protocol or S7 communication protocol, etc. There is no special limitation here and it depends on actual needs.
[0048] In addition, the conversion module here is a module developed in advance in this application, which can convert and reorganize the sequential control process file written by the user according to the current sequential control logic of the PLC received to generate corresponding sequential control process data. The conversion here refers to ensuring that the sequential control process data can be recognized and read by the PLC, and the reorganization here refers to reorganizing the data according to the sequential control logic so that the subsequent PLC can perform corresponding control based on the read data.
[0049] It should also be noted that there is no special limitation on the specific format of the sequential control process file. It can be a database file or an EXCEL file. It only needs to be a file format that the user is capable of writing to complete the execution logic of data writing or changing. More specifically, taking the creation of an EXCEL file as an example, multiple worksheets can be created in the file according to the production process requirements to facilitate subsequent changes and searches. No special limitations are made here.
[0050] S13: sequentially reading data from the sequential control process variables to send control signals to each controlled device, so that each controlled device executes the sequential control logic. Specifically, the data sequentially read from the sequential control process variables reflects the sequential control function of each controlled device, thereby enabling each controlled device to execute the sequential control logic, that is, realizing the same sequential control function as the SFC diagram in the prior art, but without the need to store the SFC diagram, thus saving storage space.
[0051] In addition, the PLC sequential control process correction method in this application can not only be used when the user has the need to change data online, but of course it can also be used in any data writing situation other than the above-mentioned data online change. No special limitation is made here, and the execution logic of the deep integration of Internet of Things data online change is realized.
[0052] In summary, the present application provides a PLC sequential control process correction method, which does not require additional storage of SFC diagrams and sequential control logic in the PLC, reducing storage costs. Specifically, one or more sequential control process variables corresponding to the current production process are created in advance, and the unique identifier of each variable is sent to a communication device, so that the communication device can write the sequential control process data directly into the variable, and sequentially read the data from the sequential control process variables to achieve the same sequential control function as the SFC diagram; and the user can directly modify the sequential control process file, and the conversion module can process the file according to the received sequential control logic to generate sequential control process data, ultimately enabling users to modify the sequential control process variables online without stopping the PLC and the corresponding production line, which is easy to operate, improves work and production efficiency, and does not require professional software developers, and is more practical.
[0053] Based on the above embodiment:
[0054] As a preferred embodiment, the sequential control process data includes a controlled device identifier, an execution action of the controlled device, a transition condition between sequence steps, a sequence step error exit condition, and an error return step identifier;
[0055] Sequential control process variables include controlled device identifier variables, controlled device execution action variables, sequence step transition condition variables, sequence step error exit condition variables, and error return step identification variables.
[0056] In this embodiment, the contents of the sequence control process data and sequence control process variables are described above and will not be further elaborated here. It is understood that in actual applications, the specific contents of the sequence control process data and sequence control process variables may vary depending on different process flow requirements and are not limited to the above contents.
[0057] Specifically, as an illustration, the error return step identifier here can be understood as when an operation failure occurs, in order to avoid serious consequences, you can return to a safe step for subsequent debugging and processing actions. The error return step identifier can be understood as the identifier of the safe step; the corresponding sequence step error exit condition can be understood as the steps required to exit from the current step where the failure occurs to the above-mentioned safe step.
[0058] Specifically, such as Figure 2 As shown, the Figure 2A schematic diagram showing the contents of a sequential control process file is shown in the figure, where the format of the sequential control process file is in xls format as an example, wherein the device name is the identifier of the controlled device, the device action is the action executed by the controlled device, and other contents such as external jump conditions (conversion conditions between sequential steps) and switch jump value serial numbers are all set according to the current production process requirements. For example, T1002-T31A refers to the first process step, and T1002-T31AError refers to the second process step.
[0059] Further, such as Figure 3 As shown in FIG, a schematic diagram of displaying the contents of a sequence control process variable is shown, wherein the data under the DevName array represents the identifier variable of each controlled device (such as DevName[0]); the data under the DevAct array represents the corresponding execution action variable of each controlled device (such as DevAct[0]); ExSwitchCon is the switching condition variable (external) between sequence steps;
[0060] ExSwitchDly is the delay condition between sequence steps (external); ExExitCond is the sequence step error exit condition variable (external); ErrorStepIndex1 is the error return step identification variable. Other contents are set according to production process requirements and will not be repeated here.
[0061] As a preferred embodiment, the variable type of the controlled device identifier variable is a String array; the variable types of the controlled device execution action variable, the sequence step transition condition variable, and the sequence step error exit condition variable are all Bool arrays; the variable type of the error return step identifier variable is an Int array.
[0062] In this embodiment, the variable types that can be defined as the contents included in the sequential control process variables in the PLC are given, as described above, and will not be repeated here.
[0063] As a preferred embodiment, the pre-developed conversion module is an ActiveX control script or a .net control script or an application APP.
[0064] This embodiment provides information on which control scripts the pre-developed conversion module can be used for. It is understood that when the PLC has a corresponding monitoring system, such as monitoring equipment including a SCADA monitoring system, a pre-developed ActiveX control script or .NET control script required for the method provided by this application can be directly embedded in it. Of course, other script formats, such as dynamic link DLL scripts, are also acceptable. When no corresponding monitoring system exists, a pre-developed application app required for the method provided by this application can be embedded in a communication device connected to the PLC.
[0065] It can be seen that no matter which of the above methods is used, the processing of the sequential control process file, that is, the conversion and reorganization of the correction logic can be achieved simply and reliably.
[0066] As a preferred embodiment, the communication device is a monitoring system for monitoring the operating status of a PLC.
[0067] In this embodiment, a limitation of the communication device is given. Specifically, the monitoring system can be a monitoring device embedded in a SCADA monitoring system. Specifically, the SCADA monitoring system can use Asia View, Wonderware Intouch and WinccSCADA software.
[0068] As a preferred embodiment, the format of the sequential control process file is xls format or xml format.
[0069] In this embodiment, two common formats of sequential control process files are given, but it can be understood that the format types of sequential control process files include but are not limited to the above two types. For example, it can also be a file in Jason format or a file in database format. No special limitation is made here. Any file format that can be used and written by the user is within the scope of protection of this application.
[0070] As a preferred embodiment, the sequence control process variable includes an identification variable for indicating whether information transmitted by the communication device is received; wherein the identification variable changes from a first state to a second state when the communication device starts writing data to the sequence control process variable, and changes from the second state to the first state when the communication device stops writing data to the sequence control process variable;
[0071] Before sequentially reading data from the sequential control process variables to send control signals to each controlled device, the process also includes:
[0072] Determine whether the identification variable switches between the first state and the second state within a preset determination time period;
[0073] If so, determining that the communication transmission between itself and the communication device is normal, and entering the step of sequentially reading data from the sequential control process variables to send control signals to each controlled device;
[0074] If not, a communication failure signal is sent to the communication device, so that the communication device determines whether to resend the sequential control process data according to the communication failure signal.
[0075] In this embodiment, the inventors further considered that in order to ensure the reliability of communication transmission of sequential control process data and its reliable reception by the PLC, the sequential control process variable includes an identification variable for indicating whether the information transmitted by the communication device has been received. The identification variable can be changed by the communication device during information transmission, that is, when the communication device starts writing data to the sequential control process variable, it is changed from a first state to a second state (specifically, if 0 represents the first state and 1 represents the second state, then the change from the first state to the second state is equivalent to a change from 0 to 1), and when the communication device finishes writing data to the sequential control process variable, it is changed from the second state to the first state (specifically, the change from the second state to the first state is equivalent to a change from 1 to 0).
[0076] Therefore, before reading data from the sequential control process variables in sequence to send control signals to each controlled device, it is also possible to determine whether the identification variable switches between the first state and the second state within the preset judgment time. If so, it means that the communication transmission between the PLC and the communication device is normal, that is, the communication device can reliably write the sequential control process data into the sequential control process variables in the PLC; if not, it means that there are two possibilities, either there is no information transmission between the communication device and the PLC within the current preset time, or there is information transmission between the communication device and the PLC but the PLC does not receive it, so the PLC returns a communication fault signal to the communication device. After the signal is received by the communication device, the communication device itself clearly knows whether it has sent the sequential control process data within the current preset judgment time. Therefore, if it is determined that it has written data to the PLC but still receives the communication fault signal, it can resend the sequential control process data.
[0077] It can be seen that the above method can simply and reliably ensure reliable and stable transmission of data between PLC and communication equipment.
[0078] Please refer to Figure 4 , Figure 4 This is a structural diagram of a PLC sequential control process correction system provided by the present invention.
[0079] The PLC sequential control process correction system is applied to PLC and includes:
[0080] A variable creation unit 21 is used to pre-create one or more sequence control process variables corresponding to the current production process;
[0081] The data transmission unit 22 is configured to transmit the unique identifier of each sequential control process variable to a communication device connected to the PLC, so that the communication device can write the sequential control process data corresponding to each sequential control process variable according to each unique identifier. The sequential control process data is generated by a conversion module pre-developed in the communication device after processing a user-written sequential control process file according to the current sequential control logic of the received PLC.
[0082] The control unit 23 is used to sequentially read data from the sequence control process variables to send control signals to each controlled device, so that each controlled device executes the sequence control logic.
[0083] For an introduction to the PLC sequential control process correction system provided in the present invention, please refer to the above-mentioned embodiment of the PLC sequential control process correction method, which will not be repeated here.
[0084] As a preferred embodiment, the sequence control process variable includes an identification variable for indicating whether information transmitted by the communication device is received; wherein the identification variable changes from a first state to a second state when the communication device starts writing data to the sequence control process variable, and changes from the second state to the first state when the communication device stops writing data to the sequence control process variable;
[0085] The PLC sequential control process correction system also includes:
[0086] A judgment unit, configured to judge, before the control unit 23, whether the identification variable switches between the first state and the second state within a preset judgment time; if so, trigger the first determination unit; if not, trigger the signal feedback unit;
[0087] The first determining unit is configured to determine that the communication transmission between itself and the communication device is normal, and trigger the control unit 23;
[0088] The signal feedback unit is used to send a communication fault signal to the communication device, so that the communication device determines whether to resend the sequential control process data according to the communication fault signal.
[0089] The present invention further provides a computer-readable storage medium, comprising:
[0090] A computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, the steps of the PLC sequential control process correction method as described above are implemented.
[0091] For an introduction to the computer-readable storage medium provided in the present invention, please refer to the above-mentioned embodiment of the PLC sequential control process correction method, which will not be repeated here.
[0092] Please refer to Figure 5 , Figure 5 This is a structural diagram of a PLC provided by the present invention.
[0093] The PLC includes:
[0094] Memory 31, for storing computer programs;
[0095] The processor 32 is configured to execute the steps of the PLC sequential control process correction method as described above.
[0096] For an introduction to the PLC provided in the present invention, please refer to the above-mentioned embodiment of the PLC sequential control process correction method, which will not be repeated here.
[0097] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0098] It should also be noted that, in this specification, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0099] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A PLC sequential control process correction method, characterized in that: Applied to PLC, the method includes: Pre-create one or more sequential control process variables corresponding to the current production process; The unique identifier of each sequential control process variable is sent to a communication device connected to the PLC, so that the communication device writes the sequential control process data into each sequential control process variable according to each unique identifier; wherein the sequential control process data is generated by a conversion module pre-developed in the communication device after processing the sequential control process file written by the user according to the received current sequential control logic of the PLC; the conversion module processes the sequential control process file written by the user according to the current sequential control logic of the PLC, including: the conversion module converts and reorganizes the sequential control process file written by the user according to the current sequential control logic of the PLC, so as to ensure that the sequential control process data can be recognized and read by the PLC through conversion; the conversion module reorganizes the sequential control process file written by the user according to the current sequential control logic of the PLC, including reorganizing the data according to the sequential control logic so that the PLC can perform corresponding control according to the read data; sequentially reading data from the sequential control process variables to send control signals to each controlled device, so that each controlled device executes the sequential control logic; Wherein, the sequence control process variables include an identification variable for indicating whether the information transmitted by the communication device is received; wherein the identification variable is changed from a first state to a second state when the communication device starts writing data into the sequence control process variable, and is changed from the second state to the first state when the communication device finishes writing data into the sequence control process variable; Before sequentially reading data from the sequential control process variables to send control signals to each controlled device, the method further includes: Determining whether the identification variable switches between the first state and the second state within a preset determination time period; If so, determining that the communication transmission between the self and the communication device is normal, and entering the step of sequentially reading data from the sequential control process variables to send control signals to each controlled device; If not, a communication failure signal is sent to the communication device, so that the communication device determines whether to resend the sequential control process data according to the communication failure signal.
2. The PLC sequential control process correction method according to claim 1, characterized in that: The sequential control process data includes a controlled device identifier, a controlled device execution action, a transition condition between sequence steps, a sequence step error exit condition, and an error return step identifier; The sequence control process variables include a controlled device identifier variable, a controlled device execution action variable, a sequence step transition condition variable, a sequence step error exit condition variable, and an error return step identification variable.
3. The PLC sequential control process correction method according to claim 2, characterized in that: The variable type of the controlled device identifier variable is a String array; the variable type of the controlled device execution action variable, the sequence step conversion condition variable, and the sequence step error exit condition variable are all Bool arrays; the variable type of the error return step identification variable is an Int array.
4. The PLC sequential control process correction method according to claim 1, characterized in that: The pre-developed conversion module is an ActiveX control script or a .net control script or an application APP.
5. The PLC sequential control process correction method according to claim 1, characterized in that: The communication device is a monitoring system for monitoring the operating status of the PLC.
6. The PLC sequential control process correction method according to claim 1, characterized in that: The format of the sequential control process file is xls format or xml format.
7. A PLC sequential control process correction system, characterized in that: Applied to PLC, the system includes: A variable creation unit, used to pre-create one or more sequence control process variables corresponding to the current production process; A data sending unit is used to send the unique identifier of each sequential control process variable to a communication device connected to the PLC, so that the communication device writes the sequential control process data into each sequential control process variable according to each unique identifier; wherein, the sequential control process data is generated by a conversion module pre-developed in the communication device after processing the sequential control process file written by the user according to the received current sequential control logic of the PLC; the conversion module processes the sequential control process file written by the user according to the current sequential control logic of the PLC, including: the conversion module converts the sequential control process file written by the user according to the current sequential control logic of the PLC and Reorganize to ensure that the sequential control process data can be recognized and read by the PLC through conversion; the conversion module reorganizes the sequential control process file written by the user according to the current sequential control logic of the PLC, including reorganizing the data according to the sequential control logic so that the PLC can perform corresponding control according to the read data; wherein the sequential control process variable includes an identification variable for representing whether the information transmitted by the communication device is received; wherein the identification variable is changed from a first state to a second state when the communication device starts writing data to the sequential control process variable, and is changed from the second state to the first state when the communication device stops writing data to the sequential control process variable; a determination unit, configured to determine whether the identification variable switches between the first state and the second state within a preset determination time period; if so, determining that the communication transmission between the identification variable and the communication device is normal, and proceeding to the step of sequentially reading data from the sequential control process variables to send control signals to each controlled device; if not, sending a communication failure signal to the communication device, so that the communication device determines whether to resend the sequential control process data based on the communication failure signal; The control unit is used to sequentially read data from the sequential control process variables to send control signals to each controlled device, so that each controlled device executes the sequential control logic.
8. A computer-readable storage medium, characterized in that include: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the PLC sequential control process correction method according to any one of claims 1 to 6 are implemented.
9. A PLC, characterized in that: include: memory for storing computer programs; A processor, configured to execute the steps of the PLC sequential control process correction method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Sequential control method and system in PLC
CN105867294A