Open main menu

DAVE Developer's Wiki β

Changes

no edit summary
[[File:TBD.png|thumb|center|600px|<div id="fig1"></div>Fig. 1: Typical usage scenario of utilization]]
==Functionalities==
Streaming capability is used to monitor the production line remotely. Under normal operation, this is enough for the human operators to get an overview of the line while it is working. For this purpose, a simple low-frame-rate video stream (25 fps or something) over , which can be viewed on a local area network remote device, does the job.
The most interesting functionality is related to recording capabilityassociated to alarm events, however. As shown in the previous image, the production line is governed by a Programmable Logic Controller (PLC), which is interfaced to several actuators and sensors. Of course, the line may be subject to different kinds of faults. The most severe—for instance, a major mechanical failure—can lead to the automatic stop of the line. Thanks to the aforementioned sensors, the PLC is aware of such faulty conditions. In these situations, it raises triggers an alarm signal directed to the video recording system. Whenever an alarm is detected, the recording system saves (on a persistent storage device) high-frame-rate footage showing what happened right before and right after the alarm event. Automation engineers and maintenance personnel can leverage afterwards this fine-grained sequence of frames to analyze in detail the scene around the occurrence of the alarm event, searching for its root cause (this process is also referred to as ''post-mortem analysis'').===Alarm mode===During normal operation, the high-frame-rate stream (indicated by the red flow in the previous picture) is stored in a buffer in RAM memory.
==Software implementation==
[[#fig1|Figure 1]] also shows also a simplified block diagram of the application software architecture that was developed to implement this solution. The application is a multi-threaded program. The high-level business logic is coded in a finite state machine (FSM), which interacts with the threads. Each thread takes care of a particular task. For instance During normal operation, T1 acquires the frames from high-frame-rate stream (indicated by the red flow in the previous picture) generated by the image sensor, is acquired by thread T1. T1 also stores them these frames into the alarm buffer, and passes them to the thread T4 after a down rate conversion (low-frame-rate stream is denoted in green). In parallel, T4 is responsible for creating creates a compressed video stream to be transmitted over the local network.  When an alarm is detected by thread T3, T2—which is usually idle—is enabled. Once the alarm buffer is filled, this thread stores it persistently on a solid-state drive (SSD). The application also integrates a web interface (thread T5) that allows to supervise and control the recording/streaming system. For example, it can be used to enable/disable the alarm recording functionality and to read statistical information.
===Sizing the alarm buffer===
4,650
edits