Apparatus, computer-readable recording medium, and software switching method
By introducing the switching department in the instrument, the software is switched from the first software to the second software when the instrument is not started to start the instrument. Communication continuity.
Patent Information
- Application Number
- CN202411003248.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-07-27
- Filing Date
- 2024-07-25
- Publication Date
- 2025-01-28
AI Technical Summary
The prior art requires the instrument to be restarted during software updates, resulting in the inability to utilize the instrument during this period, and there is a problem that the process data cannot be sent from the instrument to the upper system.
By introducing the switching department in the instrument, when the instrument is not launched again, the software in the movement is switched from the first software to the 2nd software. Switch after processing.
Software switching is performed without starting the instrument again, the communication between the upper system and the instrument is maintained, and the problem that cannot be sent during software switching.
Smart Images

Figure CN119376873A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an instrument, a computer-readable recording medium, and a software switching method, and for example, to an instrument, a computer-readable recording medium, and a software switching method that can be used for collecting process data. Background Art
[0002] As disclosed in Patent Document 1, it is known that software of a device such as a field device is updated after installation.
[0003] Patent Document 1: Japanese Patent Application Publication No. 2004-295299 Summary of the invention
[0004] Software update is to switch the software to the new software. If the instrument is restarted at this time, the instrument will not be usable during this period.
[0005] One aspect of the present invention is to switch the software without restarting the instrument.
[0006] An aspect of the present invention relates to an instrument comprising: hardware configured to send process data to a host system; a storage unit that stores a first software that performs an action to cause the hardware to send process data to the host system, and a second software that performs an action to cause the hardware to send process data to the host system; and a switching unit that switches the software in operation from the first software to the second software, the switching unit switching the software in operation from the first software to the second software after executing a prescribed processing based on the second software during the operation of the first software.
[0007] One aspect of the present invention relates to a computer-readable recording medium having a software switching program recorded thereon, the software switching program causing a processor to execute processing for switching software in operation from a first software to a second software in an instrument, the instrument comprising: hardware configured to send process data to a host system; and a storage unit storing the first software that executes an action to cause the hardware to send process data to the host system, and the second software that executes an action to cause the hardware to send process data to the host system, wherein the switching processing is performed in the action of the first software, and after executing a prescribed processing based on the second software, the software in operation is switched from the first software to the second software.
[0008] An aspect of the present invention relates to a software switching method, which includes a step of switching software in operation from a first software to a second software in an instrument, the instrument comprising: hardware configured to send process data to a host system; and a storage unit storing a first software that performs an action to cause the hardware to send process data to the host system, and a second software that performs an action to cause the hardware to send process data to the host system, wherein in the switching step, in the action of the first software, after executing a prescribed processing based on the second software, the software in operation is switched from the first software to the second software.
[0009] Effects of the Invention
[0010] According to the present invention, the software can be switched without restarting the device. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 1 is a diagram showing an example of a schematic configuration of a system 100 including the device 1 according to the embodiment.
[0012] Figure 2 This is a diagram showing an example of the basic structure of software.
[0013] Figure 3 It is a diagram showing an example of the database 51.
[0014] Figure 4 It is a diagram showing an example of the database 52.
[0015] Figure 5 It is a diagram showing an example of processing (software switching method) executed in the device 1.
[0016] Figure 6 It is a diagram showing an example of a process (software switching method) executed in the system 100 .
[0017] Figure 7 It is a diagram showing an example of a process (software switching method) executed in the system 100 .
[0018] Figure 8 It is a diagram showing an example of a process (software switching method) executed in the system 100 .
[0019] Fig. 9 It is a diagram showing an example of a hardware configuration. DETAILED DESCRIPTION
[0020] Hereinafter, the embodiments will be described with reference to the drawings. The same reference numerals are given to the same elements, and duplicate descriptions will be omitted as appropriate.
[0021] <Implementation Method>
[0022] Figure 1 1 is a diagram showing an example of a schematic structure of a system 100 including an instrument 1 according to an embodiment. The system 100 includes an instrument 1 and a host system 7. The instrument 1 and the host system 7 are connected via a communication line L (online) so as to be able to communicate with each other. The instrument 1, for example, periodically generates process data or sends process data to the host system 7 in response to a request from the host system 7. In addition, the instrument may also be referred to as a device, an apparatus, or the like.
[0023] Process data is data related to a process. An example of a process is a process in a production plant such as a chemical plant or a power plant. In this case, the process data may include process data of various plants that can be obtained in the plant. Various data other than the process data of the plant may also be process data. Other examples of process data are data of monitoring processes, maintenance processes, and prediction processes. An example of a monitoring process is a monitoring process of social infrastructure such as bridges and tunnels. Unless otherwise specified, the instrument 1 sends the process data of the plant to the upper system 7.
[0024] exist Figure 1 The module structure of the instrument 1 is also shown as an example. The instrument 1 includes hardware 2, a storage unit 3 and a switching unit 6.
[0025] The hardware 2 is configured to send process data to the host system 7. The hardware 2 is configured to have the desired functions, for example, including a CPU (Central Processing Unit) such as an MCU (Micro Controller Unit), and components such as a memory and peripheral circuits used by the CPU. Examples of functions include a calculation function for generating process data, a communication function with the host system 7, and the like.
[0026] For example, the hardware 2 includes a computing unit that obtains sensor values of sensors installed in the factory and converts them into measured values. Examples of sensors include pressure sensors, temperature sensors, flow sensors, etc. Sensor values are voltage values, current values, etc. that represent the physical quantity (pressure, temperature, flow, etc.) of the measurement target. The measured value represents the value of the physical quantity itself of the measurement target.
[0027] The storage unit 3 stores information used in the device 1. Examples of the information stored in the storage unit 3 include software 41, software 42, database 51, and database 52. In addition, software is also referred to as a program, program data, and the like.
[0028] The software 41 is the first software that performs an operation to cause the hardware 2 to send process data to the host system 7. The software 41 in operation generates process data. As described above, when the hardware 2 has a calculation function for generating process data, the process data is generated by the cooperative operation of the software 41 and the hardware 2.
[0029] The controller 71 of the host system 7 sends a request to the instrument 1 at an arbitrary timing. This request is also called a communication request. The communication request includes a request to send process data. The software 41 sends the process data to the controller 71 (causing the hardware 2 to send) according to the communication request from the controller 71. This sending corresponding to the communication request is also called a communication response.
[0030] The software 42 is second software that operates to cause the hardware 2 to transmit process data to the host system 7. The software 42 in operation generates process data or transmits a communication response to a communication request from the controller 71, similarly to the software 41.
[0031] For example, the software 42 is a newer version of the software 41 and is scheduled to be used instead of the software 41. The software 42 may also be referred to as software that adds functions to the software 41.
[0032] The software 42 may not be initially stored in the storage unit 3 . For example, during the operation of the software 41 , the maintenance station 72 sends the software 42 to the device 1 , thereby storing (accumulating) the software 42 in the storage unit 3 .
[0033] Figure 2 is a diagram showing an example of the basic structure of software. Figure 2 As shown in (A), the software 41 includes an application 411, an OS (Operating System) 412, and a driver 413. The application 411 is an application program designed to realize the functions of the instrument 1, and performs actions on the OS 412. The driver 413 provides interaction between the hardware 2 and the OS 412, for example, enabling access to the hardware 2 from the application 411 that performs actions on the OS 412.
[0034] The software 42 has the same structure as the software 41. That is, Figure 2 As shown in (B) of FIG. 4 , the software 42 includes an application 421, an OS 422, and a driver 423. The above elements will be described in the same manner as the corresponding parts of the software 41.
[0035] In addition, more specifically, via the switching unit 6 ( Figure 1 ) and access from software 41 and software 42 to hardware 2, which will be described in detail later.
[0036] Back to Figure 1The database 51 is the first database that the software 41 refers to. The software 41 in operation can access the database 51 to add data to the database 51, update the data in the database 51, delete the data in the database 51, etc. Figure 3 The database 51 will be described.
[0037] Figure 3 : is a diagram showing an example of a database 51. As data of the database 51, communication control data and process data are shown as examples. The communication control data is data related to the control of the communication between the hardware 2 and the host system 7, for example, data including settings for enabling the hardware 2 to communicate with the host system 7. The process data is as described above. The process data stored in the database 51 may be process data before (unsent) being sent to the host system 7, or may be process data that has been sent.
[0038] Back to Figure 1 , the database 52 is a second database referenced by the software 42. Similar to the software 41 and the database 51 described above, the software 42 in operation can access the database 52 to add, update, delete, etc. data. Figure 4 The database 52 will be described.
[0039] Figure 4 52 is a diagram showing an example of a database 52. The database 52 includes an interchangeable area 521 and an extended area 522. The interchangeable area 521 is an area for ensuring the interchangeability of the software 42 and the software 41. The data in the interchangeable area 521 is identical to the data in the database 51 ( Figure 3 ), and as described later, the data is copied from the database 51. The data in the extended area 522 is data for providing functions of the software 42 that are not provided in the software 41 (functions extended from the software 41).
[0040] Back to Figure 1 The switch unit 6 arbitrates access from the software 41 and the software 42 to the hardware 2, or controls the software 41 and the software 42. The control of the software 41 and the software 42 by the switch unit 6 includes the startup of the software, the interruption and restart of the processing executed by the software, etc. The function of the switch unit 6 is implemented by a program at a lower level than the program of the software 41 and the software 42. The switch unit 6 can also be called an intermediate layer between the hardware 2 and the software 41 and the software 42.
[0041] The switching unit 6 switches the software in operation from software 41 to software 42. Software switching is also called conversion, software upgrade, etc. In the prior art, the instrument 1 needs to be restarted when the software is switched. Therefore, during this period, there are problems such as the inability to send process data from the instrument 1 to the upper system 7. In order to deal with this problem, in this embodiment, based on the control of the switching unit 6, the software in operation is switched from software 41 to software 42 without restarting the instrument 1. Also refer to Figure 5 Provide explanation.
[0042] Figure 5 1 is a diagram showing an example of processing (software switching method) executed in the device 1. Initially, the software 41 is executed in the device 1, and the software 42 is not yet stored in the storage unit 3.
[0043] In step F1, the software 41 performs an action. For example, the software 41 periodically generates process data, or sends a communication response including process data to the controller 71 in response to a communication request from the controller 71. The generation cycle of process data may be different from the cycle of communication response. The process for generating process data is also referred to as periodic processing. Whenever the periodic processing is completed, the software 41 may notify the switching unit 6 of the status.
[0044] At any timing during the operation of the software 41, the maintenance station 72 sends (the program data of) the software 42 to the device 1. The device 1 receives the software 42 from the maintenance station 72. In the subsequent steps F2 to F13, the software 41 is also in operation.
[0045] In step F2, it is determined whether the software 42 is received (step F2). For example, the determination is made by the switching unit 6 or the software 41. If the software 42 is received (step F2: Yes), the process proceeds to step F3. If not (step F2: No), the process returns to step F1, and the processes of step F1 and step F2 are repeatedly performed until the software 42 is received.
[0046] In step F3 , the software 41 stores the software 42 received in the previous step F2 in the storage unit 3 .
[0047] In step F4 , the switching unit 6 activates the software 42 .
[0048] In step F5, a predetermined process based on the software 42 is started. The predetermined process is a process executed after the software 42 is started, for example, a process required to form a state in which the started software 42 can generate process data or send process data to the host system 7 by cooperating with the hardware 2.
[0049] An example of the prescribed processing is an initialization processing for initializing the hardware 2 in the software 42. For example, the hardware 2 is set to a state where it can communicate with the host system 7 through the initialization processing. The data for this setting may be equivalent to the communication control data ( Figure 3 ). Unless otherwise specified, the prescribed processing is set as the initialization processing. The prescribed processing and the initialization processing can be appropriately replaced within the scope of no contradiction.
[0050] The initialization process of the hardware 2 as described above has been completed during the operation of the software 41, and therefore, it is not actually necessary to perform such a process after the software 42 is restarted. Therefore, the actual initialization process of the hardware 2 can be omitted by the simulation described later.
[0051] In step F6 to step F11 , the switching unit 6 controls the software 41 and the software 42 so that the software 41 is operated and the predetermined processing of the software 42 is completed in the same manner as before.
[0052] In step F6, the switching unit 6 determines whether a jam has occurred in the hardware 2. The jam may be a jam that occurs in the hardware 2 in response to a communication request from the controller 71 (communication jam), or a jam that occurs in the hardware 2 differently (internal jam). If a jam has occurred (step F6: Yes), the process proceeds to steps F7 to F9 in order. If not (step F6: No), the process of steps F7 and F8 is skipped, and the process proceeds to step F9.
[0053] In step F7, the switching unit 6 causes the software 42 to interrupt the predetermined process and causes the software 41 to process the jam. The software 41 can process the jam as before. The jam processing by the software 41 is completed, and the process proceeds to step F8.
[0054] In step F8, the switching unit 6 causes the software 42 to restart the predetermined process. This allows the predetermined process to be advanced while avoiding the influence of congestion. If the predetermined process is completed, the software 42 notifies the switching unit 6 of the status, and if it is not completed, no such notification is made.
[0055] In step F9, the switching unit 6 determines whether there is access from the software 42 to the hardware 2. The access here is a hardware access performed during the execution of a predetermined process by the software 42, including a read access and a write access. For example, a read access is an access for reading (reading out) a value related to the setting of the hardware 2. For example, a write access is an access for writing a value related to the setting of the hardware 2 to the hardware 2. If there is a hardware access (step F9: Yes), the processing proceeds to step F10 and step F11 in order. If not (step F9: No), the processing of step F10 is skipped and the processing proceeds to step F11.
[0056] In step F10, the switch 6 responds to the hardware access from the software 42 instead of the hardware 2. It can also be said that the switch 6 simulates the hardware 2. This simulation can prevent the influence on the operation of the software 41 that may be caused by the software 42 accessing the hardware 2.
[0057] The above-mentioned response based on the switching unit 6 may be a response that no error occurs in the prescribed processing of the software 42. Specifically, the switching unit 6 simulates the typical action of the hardware 2 when it is normal in such a way that the software 42 does not enter the error sequence, and returns the response expected by the software 42 to the hardware 2 to the software 42. If viewed from the software 42, it seems that the hardware 2 of the access target performs the action normally, so the prescribed processing is advanced without error. The switching unit 6 that performs such simulation is designed, for example, to perform actions corresponding to the sequence of prescribed processing (for example, the initialization sequence) based on the interface (I / F) specifications, initialization sequence, etc. of both the software 42 and the hardware 2. As an example, when the software 42 writes (writes) to the register #1 of the hardware 2, and when the value of the register #2 is expected to change, the switching unit 6 returns an affirmative response to the write access (write request) to the register #1. The affirmative response may be a response indicating that the write is successful. In addition, the switching unit 6 returns the value of the register #2 corresponding to the write to the register #1 to the software 42 for the read access (read request) to the register #2.
[0058] In step F11, the switching unit 6 determines whether the periodic processing by the software 41 and the prescribed processing by the software 42 are completed. The completion of the periodic processing is grasped by notifying the switching unit 6 of the situation from the software 41 as described above. As described above, the completion of the prescribed processing is notified to the switching unit 6 from the software 42. In the case of receiving the above two notifications, the switching unit 6 determines that the periodic processing and the prescribed processing are completed. In the case of the above processing being completed (step F11: Yes), the processing proceeds to step F12. In the case of not being the case (step F11: No), the processing returns to step F6.
[0059] In step F12, the switching unit 6 determines whether the software switching condition is met. For example, the maintenance station 72 of the upper system 7 sends a software switching instruction to the instrument 1 at an arbitrary timing. If the instruction from the maintenance station 72 is received, the switching unit 6 determines that the software switching condition is met. Alternatively, the time, time period, etc. of the software switching can be pre-set based on the instruction from the maintenance station 72. In the case of such a time or time period, the switching unit 6 can determine that the software switching condition is met. If the software switching condition is met (step F12: Yes), the processing enters step F13. If not (step F12: No), the processing returns to step F6.
[0060] In step F13, the software 41 copies the data in the database 51 to the database 52. The communication control data and process data ( Figure 3 ) is copied to the swap area 521 of the database 52 ( Figure 4 ). This can also be referred to as making the data in the compatible area 521 of the database 52 identical to the data in the database 51 (equalization). Thus, the compatibility between the software 42 and the software 41 is ensured.
[0061] More specifically, by copying the communication control data in the database 51 to the database 52, the information required for the device 1 to communicate with the host system 7 can be inherited to the database 52 referenced by the software 42. In addition, by copying the process data in the database 51 to the database 52, the process data generated by the software 41 so far can be inherited to the database 52 referenced by the software 42. In particular, by executing this processing at a timing when the periodic processing based on the software 41 is completed, the process data including the latest process data can be inherited without omission.
[0062] In step F14, the switching unit 6 switches the software in operation from the software 41 to the software 42. Next, the processing executed by the software 41 so far is executed by the software 42.
[0063] In step F15 , the software 42 executes an operation. For example, the software 42 periodically generates process data, or transmits a communication response including process data to the controller 71 in response to a communication request from the controller 71 .
[0064] According to the above method, the software in operation can be switched from software 41 to software 42 without restarting the instrument 1. Since it is not necessary to restart the instrument 1, the communication between the host system 7 and the instrument 1 can be maintained even when the software is switched. Therefore, the problem of being unable to send process data from the instrument 1 to the host system 7 does not occur.
[0065] If the instrument 1 must be restarted, the user needs to switch the software at an appropriate timing (for example, operate the host system 7 to instruct switching) based on, for example, the stop of the instrument 1 or the system 100 caused by the restart of the instrument 1. In this embodiment, the software can be switched at an arbitrary timing in the instrument 1, so the user's time is not wasted.
[0066] For example, when the instrument 1 transmits the process data of the factory to the upper system 7, the software can be switched in parallel with the operation (also called running) of the factory. Accordingly, the flexibility of planning the maintenance work of the factory is improved. There is no need to stop the system 100, and accordingly, the downtime of the system 100 can be shortened or eliminated, and the cost can be improved.
[0067] Figure 6 to Figure 8 This is a diagram showing an example of processing (software switching method) executed in the system 100. The description of the contents repeated so far will be appropriately omitted.
[0068] exist Figure 6 The same as previously described is shown in Figure 5 Several processes corresponding to step F1 to step F3. The controller 71 sends a request (S1). This request is the communication request mentioned above, and may include a request to send process data. In response to the request from the controller 71, jamming (communication jamming) occurs in the hardware 2 (S2). The switching unit 6 enables the software 41 to process its jamming (S3). The software 41 processes the jamming and responds (S4). The response indicates that the jamming process has been completed, and further, it includes process data. The switching unit 6 arbitrates access from the software 41 to the hardware 2 (S5). The hardware 2 sends a response to the controller 71 (S6). The controller 71 receives the response (S7).
[0069] The maintenance station 72 sends the software 42 (data of the program) to the device 1 (S8). The software 42 is transferred to the software 41 via the hardware 2 and the switching unit 6 (S9). The software 41 stores the software 42 in the storage unit 3 (S10), and notifies the switching unit 6 of the completion (S11). The switching unit 6 receives the completion notification from the software 41 (S12).
[0070] exist Figure 7 The same as previously described is shown in Figure 5 The switching unit 6 starts the software 42 (S13). The software 42 starts initialization processing (S14, S15).
[0071] In addition, the controller 71 sends a request (S16). A jam (communication jam) occurs in the hardware 2 (S17). The switching unit 6 causes the software 42 to interrupt the initialization process and causes the software 41 to process the jam (S18). The software 41 processes the jam and responds (S19). In addition, thereafter, the software 41 changes to the IdleTask state where no processing is performed, and notifies the switching unit 6 of the situation and whether the cycle processing is completed (S19). In this example, the cycle processing is not completed.
[0072] The switch 6 arbitrates access from the software 41 to the hardware 2, and causes the software 42 to restart the initialization process (S20). The hardware 2 sends a response to the controller 71 (S21). The controller 71 receives the response (S22). On the other hand, the software 42 restarts the initialization process (S23).
[0073] A jam (internal jam) occurs in the hardware 2 (S24). The switching unit 6 causes the software 42 to interrupt the initialization process and causes the software 41 to process the jam (S25). The software 41 processes the jam and responds (S26). In addition, the software 41 changes to the IdleTask state and notifies the switching unit 6 of the situation and whether the cycle process is completed (S26). In this example, the cycle process is not completed. The switching unit 6 causes the software 42 to restart the initialization process (S27).
[0074] The software 42 restarts the initialization process and requests a hardware access request (arbitration of access to the hardware 2) from the switching unit 6 (S28). The switching unit 6 replaces the hardware 2 (emulates the hardware 2) and responds to the hardware access from the software 42 (S29). The software 42 receives the response and continues the initialization process. If the initialization process is completed, the switching unit 6 is notified of the completion (S30). The switching unit 6 receives the completion notification from the software 42 (S31).
[0075] A jam (internal jam) occurs in the hardware 2 (S32). The switching unit 6 causes the software 41 to process the jam (S33). The software 41 processes the jam and responds (S34). In addition, the software 41 changes to the IdleTask state and notifies the switching unit 6 of the situation and whether the cycle processing is completed (S34). In this example, the cycle processing is completed. The switching unit 6 receives a completion notification from the software 42 (S35).
[0076] exist Figure 8 The same as previously described is shown in Figure 5The maintenance station 72 sends a software switching instruction to the instrument 1 (S36). The switching unit 6 receives the switching instruction from the maintenance station 72 (S37). The switching unit 6 copies the data of the database 51 to the database 52 (S38). The switching unit 6 switches the software in operation from the software 41 to the software 42 (S39). Thereafter, the switching unit 6 performs the actions performed on the software 41 so far on the software 42.
[0077] The controller 71 sends a request (S40). A jam (communication jam) occurs in the hardware 2 (S41). The switch 6 causes the software 42 to process the jam (S42). The software 42 processes the jam and responds (S43). The switch 6 arbitrates access from the software 41 to the hardware 2 (S44). The hardware 2 sends a response to the controller 71 (S45). The controller 71 receives the response (S46).
[0078] For example, by Figure 6 to Figure 8 In this way, each element of the system 100 is operated, and the software in operation is switched from the software 41 to the software 42 without restarting the device 1 .
[0079] <Modification or Application Example>
[0080] The disclosed technology is not limited to the above-described embodiment, and several modified examples or application examples will be described.
[0081] The system 100 may include a plurality of devices 1. By applying the techniques described above, the operations of all devices 1 are continued and the software in the operations can be switched (updated) in a centralized manner. For example, the software of all devices 1 can be switched in a centralized manner based on a pre-specified time, condition, etc.
[0082] As a method for specifying the time, the following method can be considered. For example, after the processing based on the provisions of the software 42 is completed, the maintenance station 72 instructs each instrument 1 to switch the software. The software is switched in order from the instrument 1 in a state where the software can be switched, for example, the instrument 1 in which the software 42 is stored in the storage unit 3 and the periodic processing is completed. Alternatively, a timer is installed in the instrument 1 in advance, and when the software 42 is sent from the maintenance station 72 to the instrument 1, information specifying the software switching time is also sent. When the specified time is reached, the instrument 1 switches the software.
[0083] As an example of horizontal expansion, the area where multiple instruments 1 are installed can be divided according to the level of risk caused by the stopping of the operation of the instrument 1. The software can be switched in order from the instruments 1 installed in the area with lower risk. If the software switching of all instruments 1 in the same area is completed, the software of the instruments 1 in the area with higher risk is switched in stages. Even if any adverse situation occurs during the software switching, the problem can be discovered and dealt with during the software switching stage of the instruments 1 in the area with lower risk.
[0084] <Example of hardware configuration>
[0085] Fig. 9 1 is a diagram showing an example of a hardware configuration. The device 1 described so far is configured to include a computer 200 shown as an example. As the hardware configuration of the computer 200, a communication device 201, a display device 202, a storage device 203, a memory 204, and a processor 205 connected to each other by a bus or the like are shown as an example.
[0086] The communication device 201 is a network interface card or the like, and can communicate with other devices. The communication device 201 may correspond to the hardware 2 of the device 1. The display device 202 may also correspond to the hardware 2.
[0087] Various data are stored in the storage device 203 and the memory 204. Specific examples of the storage device 203 are HDD (Hard Disk Drive), ROM (Read Only Memory), RAM (Random Access Memory), etc. The memory 204 may be a part of the storage device 203. The storage device 203 may correspond to the storage unit 3 of the device 1.
[0088] As data stored in the storage device 203, a program 203a is exemplified. The program 203a is a program (software) that causes the computer 200 to function as the device 1. An example of the program 203a is the software 41 and the software 42 described so far, and is also a program that provides the function of the switching unit 6 (also referred to as a software switching program) to cause the computer 200 to execute the above-mentioned processing.
[0089] The processor 205 executes various processes. For example, the processor 205 reads in (reads out) the program 203a from the storage device 203 and expands it in the memory 204, thereby causing the computer 200 to execute various processes executed in the device 1. The processor 205 may correspond to the hardware 2 of the device 1.
[0090] The program 203a can be distributed uniformly or separately via a network such as the Internet. In addition, the program 203a can be recorded uniformly or separately on a computer-readable recording medium such as a hard disk, a floppy disk (FD), a CD-ROM, or a DVD (Digital Versatile Disc), and executed by reading from the recording medium using the computer 200.
[0091] Furthermore, the controller 71 and the maintenance station 72 may also be configured to include the computer 200 as shown in the figure.
[0092] For example, the technology described so far is determined in the following manner. One of the disclosed technologies is instrument 1. Figures 1 to 8 As described in the examples above, the apparatus 1 includes: hardware 2 configured to send process data (e.g., process data of a factory) to a host system 7; a storage unit 3 storing software 41 (first software) that is executed to cause the hardware 2 to send process data to the host system 7, and software 42 (second software) that is executed to cause the hardware 2 to send process data to the host system 7; and a switching unit 6 that switches the software in operation from the software 41 to the software 42. The switching unit 6 switches the software in operation from the software 41 to the software 42 after executing a predetermined process based on the software 42 (e.g., an initialization process in the software 42 for initializing the hardware 2) during the operation of the software 41 (F11: Yes, F14, S30, S39). According to this apparatus 1, the software can be switched without restarting the apparatus 1.
[0093] As reference Figure 1 , Figure 5 as well as Figure 8 As described above, the switching unit 6 can switch the running software from the software 41 to the software 42 (F12: Yes, F14, S36, S39) according to the instruction from the host system 7 (for example, the maintenance station 72). Thus, the software can be switched remotely (by remote operation) at a desired timing.
[0094] As reference Figure 1 , Figure 3 to Figure 5 as well as Figure 8 As described in the above, the storage unit 3 stores the database 51 (first database) referenced by the software 41 and the database 52 (second database) referenced by the software 42, and the switching unit 6 can switch the software in operation from the software 41 to the software 42 (F13, F14, S38, S39) after copying the data of the database 51 to the database 52. Thus, the compatibility of the software 42 and the software 41 can be ensured.
[0095] As reference Figure 1 , Figure 3 as well as Figure 4 As described in the above, the data in the database 51 copied by the switching unit 6 to the database 52 may include data (communication control data) related to the control of the communication between the hardware 2 and the host system 7 (for example, the controller 71). Thus, the information required for the device 1 and the host system 7 to communicate can be inherited to the database 52 referenced by the software 42.
[0096] As reference Figure 1 , Figure 3 as well as Figure 4 As described above, the running software 41 can generate process data, and the data of the database 51 copied to the database 52 by the switching unit 6 can include the process data generated by the software 41. Thus, the process data generated by the software 41 can be inherited to the database 52 referenced by the software 42.
[0097] As reference Figure 1 , Figure 5 , Figure 7 as well as Figure 8 As described in the above, the software 41 in operation performs periodic processing including the generation of process data (S19, S26, S34), and after the periodic processing based on the software 41 is completed, the switching unit 6 can switch the software in operation from the software 41 to the software 42 (F11: Yes, F14, S35, S39). In this way, the process data generated by the software 41 in operation can be inherited without omission, including the latest process data.
[0098] As reference Figure 1 , Figure 5 as well as Figure 7 As described in FIG. 1 and FIG. 2 , if jamming occurs from hardware 2 during the predetermined processing of software 42, switching unit 6 can cause software 42 to interrupt the predetermined processing and cause software 41 to process the jamming (F6: Yes, F7, S18, S25). Thus, software 41 can process the jamming as before.
[0099] As reference Figure 1 , Figure 5 as well as Figure 7 As described in the above, the hardware 2 may generate a jam in response to the hardware 2 receiving a request from the host system 7 (e.g., a request to send process data from the controller 71). By making the software 41 process such jam, the response to the request from the host system 7, such as the sending of process data, can be maintained.
[0100] As reference Figure 1 , Figure 5 as well as Figure 7As described above, if the jamming process by the software 41 is completed, the switching unit 6 can restart the predetermined process by the software 42 (F8, S20, S27). This can avoid the influence of the jamming and advance the predetermined process by the software 42.
[0101] As reference Figure 1 , Figure 5 as well as Figure 7 As described in FIG. 10 and FIG. 11 , the switch unit 6 can respond to the access from the software 42 in the process of executing the prescribed processing to the hardware 2 instead of the hardware 2 (F10, S29). In this case, the switch unit 6 can respond to the access from the software 42 in the process of executing the prescribed processing to the hardware 2 in a manner that does not cause an error in the prescribed processing. For example, the switch unit 6 can return an affirmative response indicating that the write is successful for the write access from the software 42 in the process of executing the prescribed processing to the hardware 2, and return the value expected by the software 42 to the hardware 2 for the read access from the software 42 in the process of executing the prescribed processing to the hardware 2. For example, by emulating the hardware 2 in this way, it is possible to prevent the influence on the action of the software 41 that may be caused by the actual access of the software 42 to the hardware 2.
[0102] As reference Figure 1 , Figure 5 , Figure 7 as well as Figure 8 As described in the above, the software 41 in operation performs periodic processing including the generation of process data (S19, S26, S34). If the periodic processing is completed, the software 41 notifies the switching unit 6 of the completion (S34). If the prescribed processing is completed, the software 42 notifies the switching unit 6 of the completion (S30). After receiving the notifications from the software 41 and the notifications from the software 42, the switching unit 6 can switch the software in operation from the software 41 to the software 42 (F11: Yes, F14, S39). In this way, the software can be switched at an appropriate timing.
[0103] Reference Figures 1 to 9 The program 203a (software switching program) described above is also one of the disclosed technologies. The program 203a causes the processor 205 to execute a process of switching the running software from the software 41 to the software 42 in the above-mentioned device 1. The switching process switches the running software from the software 41 to the software 42 after executing a predetermined process based on the software 42 during the operation of the software 41. According to this program 203a, as described so far, the software can be switched without restarting the device 1.
[0104] Reference Figures 1 to 8The method described in the above (software switching method) is also one of the disclosed technologies. The method includes a step (F14) of switching the software in operation from software 41 to software 42 in the above-mentioned device 1. In the switching step, after executing a predetermined process based on software 42 during the operation of software 41, the software in operation is switched from software 41 to software 42 (F11: Yes, F14, S30, S39). According to this method, as described so far, the software can be switched without restarting the device 1.
[0105] Several examples of combinations of disclosed technical features are described below.
[0106] (1) An apparatus, wherein:
[0107] The instrument has:
[0108] Hardware configured to send process data to a higher-level system;
[0109] a storage unit storing first software that operates to cause the hardware to transmit the process data to the host system and second software that operates to cause the hardware to transmit the process data to the host system; and
[0110] a switching unit that switches the running software from the first software to the second software,
[0111] The switching unit switches the running software from the first software to the second software after executing a predetermined process based on the second software during the operation of the first software.
[0112] (2) An apparatus according to (1), wherein:
[0113] The switching unit switches the running software from the first software to the second software according to an instruction from a host system.
[0114] (3) An apparatus according to (1) or (2), wherein:
[0115] The storage unit stores a first database referenced by the first software and a second database referenced by the second software.
[0116] The switching unit switches the running software from the first software to the second software after copying the data of the first database to the second database.
[0117] (4) An apparatus according to (3), wherein:
[0118] The data of the first database copied to the second database by the switching unit includes data related to control of communication between the hardware and the host system.
[0119] (5) An apparatus according to (3) or (4), wherein:
[0120] The first software in operation generates the process data,
[0121] The data of the first database copied to the second database by the switching unit includes process data generated by the first software.
[0122] (6) The apparatus according to any one of (1) to (5), wherein:
[0123] The first software in operation executes periodic processing including generation of the process data.
[0124] The switching unit switches the running software from the first software to the second software after the periodic processing by the first software is completed.
[0125] (7) The apparatus according to any one of (1) to (6), wherein:
[0126] The predetermined processing includes an initialization processing for initializing the hardware in the second software.
[0127] (8) The apparatus according to any one of (1) to (7), wherein:
[0128] The process data include process data of the plant.
[0129] (9) The apparatus according to any one of (1) to (8), wherein:
[0130] If jamming occurs from the hardware during the predetermined processing of the second software, the switching unit causes the second software to interrupt the predetermined processing and causes the first software to process the jamming.
[0131] (10) An apparatus according to (9), wherein:
[0132] The jamming from the hardware occurs in response to the hardware receiving a request from the host system.
[0133] (11) The apparatus according to (10), wherein:
[0134] The request from the host system includes a request to transmit the process data.
[0135] (12) An apparatus according to any one of (9) to (11), wherein:
[0136] When the jamming process by the first software is completed, the switching unit causes the second software to restart the predetermined process.
[0137] (13) An apparatus according to any one of (1) to (12), wherein:
[0138] The switching unit responds to access to the hardware from the second software during execution of the predetermined process, instead of the hardware.
[0139] (14) An apparatus according to (13), wherein:
[0140] The switching unit responds to access from the second software to the hardware during execution of the predetermined process so that no error occurs in the predetermined process.
[0141] (15) An apparatus according to (13) or (14), wherein:
[0142] the switching unit returns an affirmative response indicating a write success in response to a write access from the second software to the hardware during execution of the predetermined process,
[0143] In response to a read access from the second software to the hardware during execution of the predetermined process, a value expected by the second software to the hardware is returned.
[0144] (16) An apparatus according to any one of (1) to (15), wherein:
[0145] The first software in operation executes periodic processing including generation of the process data.
[0146] If the cycle processing is completed, the first software notifies the switching unit of the completion.
[0147] If the prescribed processing is completed, the second software notifies the switching unit of the completion.
[0148] The switching unit switches the running software from the first software to the second software after receiving both the notification from the first software and the notification from the second software.
[0149] (17) A software switching program causing a processor to execute a process of switching software in operation from a first software to a second software in a device,
[0150] The instrument has:
[0151] hardware configured to transmit the process data to a host system; and
[0152] a storage unit storing the first software that is executed to cause the hardware to send the process data to the host system and the second software that is executed to cause the hardware to send the process data to the host system, wherein:
[0153] The switching process is to switch the running software from the first software to the second software after executing a predetermined process based on the second software during the operation of the first software.
[0154] (18) A software switching method comprising the step of switching software in operation from a first software to a second software in a device,
[0155] The instrument has:
[0156] hardware configured to transmit the process data to a host system; and
[0157] a storage unit storing the first software that is executed to cause the hardware to send the process data to the host system and the second software that is executed to cause the hardware to send the process data to the host system, wherein:
[0158] In the switching step, after a predetermined process based on the second software is executed in the operation of the first software, the software in operation is switched from the first software to the second software.
[0159] Description of the label
[0160] 100 Systems
[0161] 1 Instruments
[0162] 2 Hardware
[0163] 3 Storage
[0164] 41 Software (1st Software)
[0165] 411 Application
[0166] 412 OS
[0167] 413 Driver
[0168] 42 Software (Second Software)
[0169] 421 Applications
[0170] 422 OS
[0171] 423 Driver
[0172] 51 Database (1st database)
[0173] 52 Database (2nd database)
[0174] 6 Switching section (middle layer)
[0175] 7 Host system
[0176] 71 Controller
[0177] 72 Maintenance Station
[0178] 200 Computer
[0179] 201 Communication devices
[0180] 202 Display device
[0181] 203 Storage device
[0182] 203a Procedure
[0183] 204 Memory
[0184] 205 Processor
[0185] L Communication line
Claims
1. An apparatus, wherein: The instrument has: Hardware configured to send process data to a higher-level system; a storage unit storing first software that operates to cause the hardware to transmit the process data to the host system and second software that operates to cause the hardware to transmit the process data to the host system; and a switching unit that switches the running software from the first software to the second software, The switching unit switches the running software from the first software to the second software after executing a predetermined process based on the second software during the operation of the first software.
2. The apparatus according to claim 1, wherein: The switching unit switches the running software from the first software to the second software according to an instruction from a host system.
3. The apparatus according to claim 1 or 2, wherein: The storage unit stores a first database referenced by the first software and a second database referenced by the second software. The switching unit switches the running software from the first software to the second software after copying the data of the first database to the second database.
4. The apparatus according to claim 3, wherein: The data of the first database copied to the second database by the switching unit includes data related to control of communication between the hardware and the host system.
5. The apparatus according to claim 3, wherein: The first software in operation generates the process data, The data of the first database copied to the second database by the switching unit includes process data generated by the first software.
6. The apparatus according to claim 1 or 2, wherein: The first software in operation executes periodic processing including generation of the process data. The switching unit switches the running software from the first software to the second software after the periodic processing by the first software is completed.
7. The apparatus according to claim 1 or 2, wherein: The predetermined processing includes an initialization processing for initializing the hardware in the second software.
8. The apparatus according to claim 1 or 2, wherein: The process data include process data of the plant.
9. The apparatus according to claim 1 or 2, wherein: If jamming occurs from the hardware during the predetermined processing of the second software, the switching unit causes the second software to interrupt the predetermined processing and causes the first software to process the jamming.
10. The apparatus according to claim 9, wherein: The jamming from the hardware occurs in response to the hardware receiving a request from the host system.
11. The apparatus according to claim 10, wherein: The request from the host system includes a request to transmit the process data.
12. The apparatus according to claim 9, wherein: When the jamming process by the first software is completed, the switching unit causes the second software to restart the predetermined process.
13. The apparatus according to claim 1 or 2, wherein: The switching unit responds to access to the hardware from the second software during execution of the predetermined process, instead of the hardware.
14. The apparatus according to claim 13, wherein: The switching unit responds to access from the second software to the hardware during execution of the predetermined process so that no error occurs in the predetermined process.
15. The apparatus according to claim 13, wherein: the switching unit returns an affirmative response indicating a write success in response to a write access from the second software to the hardware during execution of the predetermined process, In response to a read access from the second software to the hardware during execution of the predetermined process, a value expected by the second software from the hardware is returned.
16. The apparatus according to claim 1 or 2, wherein: The first software in operation executes periodic processing including generation of the process data. If the cycle processing is completed, the first software notifies the switching unit of the completion. If the prescribed processing is completed, the second software notifies the switching unit of the completion. The switching unit switches the running software from the first software to the second software after receiving both the notification from the first software and the notification from the second software.
17. A computer-readable recording medium having a software switching program recorded thereon, The software switching program causes the processor to execute processing for switching the software in operation in the device from the first software to the second software. The instrument has: hardware configured to transmit the process data to a host system; and a storage unit storing the first software that is executed to cause the hardware to send the process data to the host system and the second software that is executed to cause the hardware to send the process data to the host system, wherein: The switching process is to switch the running software from the first software to the second software after executing a predetermined process based on the second software during the operation of the first software.
18. A software switching method, comprising the step of switching a running software from a first software to a second software in a device, The instrument has: hardware configured to transmit the process data to a host system; and a storage unit storing the first software that is executed to cause the hardware to send the process data to the host system and the second software that is executed to cause the hardware to send the process data to the host system, wherein: In the switching step, after a predetermined process based on the second software is executed in the operation of the first software, the software in operation is switched from the first software to the second software.
Citation Information
Patent Citations
Field equipment system
JP2004295299A