The present disclosure relates to a control system and a programmable logic controller.
In the field of factory automation (FA), logs recorded by a programmable logic controller (PLC) and moving images of a production facility captured by an imaging device may be used to identify the cause of a trouble at the production facility. For example, when a production facility operates abnormally, a moving image of the abnormal operation is compared with the log acquired at the time added to the moving image to identify the cause of the abnormal operation. The time added to the moving image may be, for example, the time at which each frame of the moving image is captured by an imaging device or the time at which data of each frame of the moving image is acquired by the PLC.
Any inconsistency between the time added to the moving image and the log record time can cause difficulty in identifying the cause. Techniques for matching the time added to the moving image with the log record time are thus awaited.
Patent Literature 1 describes a technique for a high-precision synchronization of the time added to the moving image with the log record time by connecting an imaging device (camera) with a PLC with a dedicated low-delay imaging trigger line. The technique described in Patent Literature 1 can match the time added to the moving image with the log record time.
The technique described in Patent Literature 1 uses the dedicated low-delay imaging trigger line to connect the camera and the PLC. The technique thus does not allow use of widespread cameras such as network cameras or webcams and uses a dedicated imaging device compatible with the imaging trigger line. In addition, the use of the dedicated low-delay imaging trigger line limits remote monitoring.
In view of the above circumstances, an objective of the present disclosure is to enable matching of the time added to a moving image with the record time of a log recorded by a PLC without connecting a camera and the PLC with a dedicated low-delay imaging trigger line.
To achieve the above objective, a control system according to the present disclosure includes a camera including a first synchronous counter, a programmable logic controller including a second synchronous counter, and a control network connecting the camera and the programmable logic controller. The control network guarantees a duration of a communication delay to be within a longest communication delay duration, and periodically and repeatedly synchronizes the first synchronous counter and the second synchronous counter with high precision by measuring durations of a plurality of transmission delays between the camera and the programmable logic controller. The camera adds, to a captured image obtained by image capturing, a count value of the first synchronous counter at the image capturing, and transmits the captured image to the programmable logic controller through the control network. The programmable logic controller stores, into a storage device included in the programmable logic controller, a count value of the second synchronous counter, internal data or data of a connected control target, the count value of the first synchronous counter, and the captured image.
The present disclosure enables matching of the time added to a moving image with the record time of a log recorded by a PLC without connecting a camera and the PLC with a dedicated low-delay imaging trigger line.
A control system according to an embodiment of the present disclosure is described with reference to the drawings. In the drawings, the same or equivalent components are assigned the same reference sign.
A control system 1 illustrated in
The PLC 10 and devices as control targets controlled by the PLC 10 are connected with a control network in an industrial network. In the industrial network, factory automation (FA) devices to be controlled in real time are connected and controlled through Ethernet (registered trademark). Industrial networks using Ethernet include CC-Link IE Field (registered trademark) and CC-Link IE TSN (registered trademark).
The PLC 10 and the moving image management device 30 are connected with an Ethernet communication cable for communication with each other. Similarly, the PLC 10 and the camera 20 are connected with an Ethernet communication cable for communication with each other and also to the control network.
The camera 20 continuously captures images of a production facility at regular intervals. The camera 20 transmits moving image data indicating the moving image acquired by continuously capturing images of the production facility to the PLC 10. Although
The PLC 10 being a programmable logic controller is connected to components such as a sensor and an actuator (not illustrated) other than the camera 20 and the moving image management device 30. The PLC 10 acquires moving image data indicating the moving image captured by the camera 20 from the camera 20. As described later, the PLC 10 records a log of the operation of the PLC 10. The PLC 10 also stores the acquired moving image data as described later.
The moving image management device 30 reads the log recorded by the PLC 10 and the moving image data stored by the PLC 10 and reproduces the log and the moving image in an interrelated manner. Reproduction in an interrelated manner refers to displaying, while a moving image is being reproduced, the log at the time corresponding to the moving image being reproduced together with the moving image. This interrelated reproduction allows, for example, the user to learn, through viewing the moving image reproduced in an interrelated manner, the state of the production facility at the time at which abnormal data is recorded in the log. When the user identifies an abnormality in the production facility through viewing the moving image, the user can view the log reproduced in an interrelated manner to examine the data recorded in the log at the time the abnormality occurs.
Inconsistency in the moving image to be avoided in the control system 1 is described with reference to
The timeline for image capturing is first described. The timeline for image capturing indicates that the camera 20 captures images of the production facility at regular intervals to acquire sequential images. Each vertical tick line on the time axis indicates one captured image, or more specifically, one frame in the moving image. In the timeline for image capturing, the vertical tick lines are at regular intervals and indicate that the frames of the moving image are acquired at regular intervals. Upon acquiring each frame, the camera 20 transmits image data indicating the frame to the PLC 10.
The frames acquired at regular intervals by the camera 20 during image capturing may not be received by the PLC 10 at regular intervals due to jitter. Additionally, the camera 20 includes a clock different from the clock included in the PLC 10, causing a clock difference. Thus, the time interval between frames during image capturing by the camera 20 may differ from the time interval between frames at the reception by the PLC 10. The camera 20 and the PLC 10 are connected with a general-purpose communication cable, and thus cause latency as well in transmission of each frame.
The time at which the camera 20 captures each frame thus typically differs from the time at which the PLC 10 receives image data indicating the frame. Thus, the moving image associated with the log based on the time at which the PLC 10 receives each frame actually has inconsistency between the time associated with each frame and the time associated with the log. In the example below, the clock difference, jitter, and latency that can cause inconsistency are described in detail.
The clock difference is first described. The timeline for the clock difference in
Jitter is now described. The timeline for jitter in
Latency is now described. The timeline for latency in
Although one of the clock difference, jitter, or latency occurs in each timeline in
The PLC 10 is typically used for mechanical control. Mechanical control based on detection signals from sensors involves high responsiveness. The sensors include infrared sensors and magnetic sensors, and may also be camera systems. In contrast, control for machining often involves synchronous operation of actuators with multiple axes.
To maintain synchronization in control networks such as CC-Link IE Field and CC-Link IE TSN, hardware devices include a mechanism that achieves a particular level of punctuality and synchronizes the timing between the devices in microseconds by statistically measuring delays on transmission paths.
Such transmission path delays are measured using measurement values indicating transmission path delays from a master through slaves to achieve a high-precision synchronization.
As described above, the camera 20 can function as a sensor and thus is to be highly responsive, but is not to operate in synchronization, unlike actuators with multiple axes.
An image capturing operation performed by the camera 20 is to be controlled synchronously in the same manner as the actuators on the control network. The PLC 10 as an embedded controller includes an additional large storage to operate as a data collection device for collecting data including images.
More specifically, the PLC 10 typically handling control data alone performs the image acquiring process divided into image capturing instruction and image transmission and uses the synchronization function of the control network in each of the imaging instruction and the image transmission to associate remote image data and control data with each other and store such data.
The configuration of the PLC 10 is described with reference to
The processor 100 is, for example, a central processing unit (CPU). Each function of the processor 100 described later is implemented by the processor 100 reading and executing a control program DP stored in the storage device 110.
The storage device 110 includes, for example, a random-access memory (RAM), a hard disk drive (HDD), or a solid-state drive (SSD). The storage device 110 stores a log DL, moving image data DM, the control program DP, and buffering data DB. The log DL, the moving image data DM, and the buffering data DB are described later. The storage device 110 functions as a work memory when the processor 100 reads and executes the control program DP.
The clock 120 outputs clock signals for the processor 100, the storage device 110, and the communication interface 140 to operate.
The synchronous counter 130 indicates time by counting the clock signals generated by the clock 120. The synchronous counter 130 is an example of a second synchronous counter in an aspect of the present disclosure.
The communication interface 140 is a communication interface for a control network, such as CC-Link IE Field and CC-Link IE TSN. The communication interface 140 connected to the camera 20 and the moving image management device 30 allows the PLC 10 to communicate with the camera 20 and the moving image management device 30.
Each function implemented by the processor 100 reading and executing the control program DP is described. The processor 100 reads and executes the control program DP to implement functional components including a log recorder 101, a moving image data acquirer 102, and a moving image storage 105.
The log recorder 101 records, as the log DL in the storage device 110, the log of, for example, sensor data acquired from a sensor (not illustrated) or data indicating the internal state of the PLC 10. The log recorder 101 records the log together with the record time based on the clock signal from the clock 120.
The moving image data acquirer 102 acquires moving image data indicating a moving image captured by the camera 20 and stores the moving image data as buffering data DB into the storage device 110 to buffer the moving image data. The moving image data acquirer 102 also stores the reception time of each frame into the buffering data DB. The reception time of each frame is acquired based on the synchronous counter 130 counting the clock signals from the clock 120. The buffering data DB has an upper limit capacity. When the data size of the buffering data DB reaches the upper limit capacity, the oldest data is deleted. The buffering data DB has, for example, a ring buffer data structure. The buffering data DB has, for example, a data size to store a moving image of about 30 minutes long.
Upon generation of a trigger with the condition specified by setting information, the moving image storage 105 extracts, from the moving image data included in the buffering data DB, moving image data acquired around the time at which the trigger is generated and stores, into the storage device 110, as the moving image data DM, new moving image data including the frames to which the reception time is added. The trigger herein refers to a signal for instructing the moving image storage 105 to store the moving image. The trigger is generated when, for example, a log indicating an abnormality of the production facility is recorded in the log DL, since the moving image before and after the abnormality occurs in the production facility is highly likely to be used. The moving image storage 105 stores the moving image in response to the trigger. The time around the time at which the trigger is generated is, for example, within two minutes before and after the trigger generation.
As illustrated in
The processor 200 is, for example, a CPU. Each function is implemented by the processor 200 reading and executing the control program stored in the storage device 210. The storage device 210 includes, for example, a RAM or a read-only memory (ROM). The imager 250 captures an image of a production device.
The clock 220 outputs clock signals for the processor 200, the storage device 210, and the communication interface 240 to operate. The synchronous counter 230 indicates time by counting the clock signals generated by the clock 220. The synchronous counter 230 is an example of a first synchronous counter in an aspect of the present disclosure.
The communication interface 240 is a communication interface for a control network, such as CC-Link IE Field and CC-Link IE TSN. The communication interface 240 connected to the camera 20 and the moving image management device 30 allows the camera 20 to communicate with the PLC 10. The control network includes a mechanism to ensure and guarantee a duration of a delay in communication from a master to a slave to be within a longest communication delay duration, and periodically and repeatedly synchronizes the first and second synchronous counters with high precision by measuring the durations of multiple transmission delays between the camera 20 and the PLC 10.
The configuration of the moving image management device 30 is described with reference to
The processor 300 is, for example, a CPU. Each function is implemented by the processor 300 reading and executing the control program stored in the storage device 310.
The storage device 310 includes, for example, a RAM, an HDD, or an SSD. The storage device 310 stores a control program executable by the processor 300. The control program is, for example, an engineering tool program provided by the manufacturer of the PLC 10. The storage device 310 serves as a work memory when the processor 300 reads and executes the control program.
The input device 320 outputs signals based on a user input. The input device 320 is, for example, a touchscreen integrated with the display device 330 described below. In some embodiments, the input device 320 may be an input device such as a keyboard or a mouse.
The display device 330 displays information to be provided to the user based on the control performed by a display controller 302. The display device 330 is, for example, a touchscreen integrated with the input device 320. In some embodiments, the display device 330 may be an independent display.
The communication interface 340 is, for example, a common communication interface such as a universal serial bus (USB) interface or a network interface. The communication interface 340 connected to the PLC 10 allows the moving image management device 30 to communicate with the PLC 10.
Each function is implemented by the processor 300 reading and executing the control program stored in the storage device 310. The processor 300 reads and executes the control program to implement functional components including a data acquirer 301 and the display controller 302.
The data acquirer 301 communicates with the PLC 10 through the communication interface 340 and acquires the moving image data DM and the log DL stored in the storage device 110 in the PLC 10.
The moving image management device 30 specifies, based on a user input, recorded logging data and the reproduction start point of moving image data to instruct the display controller 302 to display the logging data and the moving image data on the screen of the display device 330. The reproduction start point may be specified with the method below.
(1) The reproduction start point may be directly specified by inputting time through the input device 320.
(2) To record data and a moving image before or after an event indicating an abnormality of logging data, the reproduction start point may also be specified by selecting the event. For example, an event history or an alarm history may be displayed for a user selection in a table including an event occurrence time and the details of each event, such as excess temperature and speed decrease. This eliminates time-consuming timing matching between a moving image and data.
A process for collecting moving image data synchronized with control data using synchronization on the control network is described based on the three operations below:
Image capturing performed by the camera 20 that appears to be a sensor is handled as an action performed by an actuator and is controlled synchronously using synchronization on the control network to synchronize the timing with other control data. The PLC 10 uses the synchronization to control an image capturing timing for instruction to the camera 20 that is a timing at which image capturing by the camera 20 is to be performed.
The synchronization is thus used without any change to allow the camera 20 to automatically determine the image capturing timing at each synchronization point of the network upon receiving an instruction from the PLC 10 or based on predetermined setting information specifying the number of synchronization points to be used as a trigger for image capturing. The PLC 10 monitors the duration of a delay at each synchronization point and can thus associate the image capturing timing with the control data with high precision. In this case, the minimum interval between instructions to capture images is the duration between synchronization points.
The control network repeatedly transmits and receives small identical data at high speed to maintain punctual control as illustrated in
The control network, such as CC-Link IE Field and CC-Link IE TSN, has the control communication bandwidth and the information communication bandwidth time-shared as illustrated in
In some embodiments, the control network may be used for synchronization between the image capturing timing and the time or for transmission or reception of time information, whereas other communication lines may be used to transmit images. However, a communication line provided separately can inconvenience users by, for example, using dual communication lines with different methods.
The time of image capturing performed by the camera 20 may be identified using the PLC 10 or added to the moving image data using the camera 20.
Identification by the PLC 10 may be adding the time of imaging by the PLC 10 through prediction of a delay or adding through transmission and receipt of the identification information at the time at which the PLC 10 has instructed the image capturing. When the camera 20 automatically determines the image capturing timing at each synchronization point of the network upon receiving an instruction from the PLC 10 or based on predetermined setting information specifying the number of synchronization points to be used as a trigger for capturing images, the PLC 10 may add the time at the following synchronization point.
The camera 20 may add the time of image capturing to moving image data by, for example, adding the real time in the UNIX (registered trademark) time format in nanoseconds to each frame of an image. In some embodiments, for example, a frame count value for the operating frequency of 90 KHz of the clock counter in the camera 20 may also be added in accordance with the specifications of the moving image format. In the case of adding a frame count value of 90 KHz, the time at which the counter is 0 is shared in advance between the camera 20 and the PLC 10. When the camera 20 automatically determines the image capturing timing based on setting information acquired from the PLC 10 or predetermined setting information using the counter information indicating the synchronization time to calculate a synchronization point, transmission with addition to image data is easier and more reliable.
Since matching in the image capturing timing among the multiple cameras 20 can be controlled with high precision, pieces of image data recorded by the multiple cameras 20 may be associated with one another with high precision and may also be composited. For example, images captured by the multiple cameras 20 may be changed and composited into a natural 360° image without blind spots, thus reducing the workload for analyzing any trouble.
In the above embodiment, the moving image management device 30 includes the input device 320 and the display device 330, but the input device 320 and the display device 330 may be external devices.
The programs used in the PLC 10 and the moving image management device 30 may be distributed on a non-transitory computer-readable recording medium such as a compact disc ROM (CD-ROM), a digital versatile disc (DVD), a USB flash drive, a memory card, or an HDD. Such programs may be installed on a dedicated programmable logic controller or a general-purpose computer to cause the controller or the computer to function as the PLC 10 or the moving image management device 30.
The programs may be stored in a storage device in another server on the Internet and may be downloaded from the server.
The foregoing describes some example embodiments for explanatory purposes. Although the foregoing discussion has presented specific embodiments, persons skilled in the art will recognize that changes may be made in form and detail without departing from the broader spirit and scope of the invention. Accordingly, the specification and drawings are to be regarded in an illustrative rather than a restrictive sense. This detailed description, therefore, is not to be taken in a limiting sense, and the scope of the invention is defined only by the included claims, along with the full range of equivalents to which such claims are entitled.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2021/026926 | 7/19/2021 | WO |