If I only had a video clip of that fault

dmroeder

Lifetime Supporting Member
Join Date
Apr 2006
Location
Vancouver, WA
Posts
3,603
I did a project a few years ago where I had to keep a buffer of video, say from IP cameras, in order to get video clips of a machine when it fault. The basic idea was few IP cameras were placed on the machine, a piece of software captured the video and kept a buffer from each camera, when I detected a machine fault, I told the software to encode the buffer and save the video clip.

My original solution wasn’t ideal. The software keeping the video buffer was a CPU pig and the machine it was running on wasn’t very powerful. I had to write a program that interfaced with the camera software and the PLC. I have enough experience with interfacing with the PLC, but having to interface with another piece of software made it a bit of a pain since I had no control of whether the software was doing what it was supposed to be doing.
Anyway, I recently rewrote it using OpenCV and python to capture the video buffer, which means I can control all of it. OpenCV handles the cameras better, I can keep the frames in memory, which ends requiring much less CPU. I put it up on github.

At a basic level, you define your cameras in the config file (local USB cameras or IP cameras), point it to a BOOL tag that goes true when there is a fault, the buffer of video from all configured cameras will be saved in MP4 format. You can configure whether you want to write the fault tag back to 0 or not, the max number of clips you want to keep on disk for each camera, as well as the number of seconds of video you want to keep.
If you’re interested:

https://github.com/dmroeder/fault_video
 
And may I add: at least 4 cameras.
1 looking at the machine and minimum 3 watching the operator from 3 different angles.


A quick look at it and it looks very nice. Thanks for sharing.
 
This is fantastic. I don't have an immediate use for it but you can bet I'll be keeping this one up my sleeve for the next time I have a difficult, intermittent problem to solve!

And may I add: at least 4 cameras.
1 looking at the machine and minimum 3 watching the operator from 3 different angles.
I see you've worked with operators before :ROFLMAO:
 
I did a project a few years ago where I had to keep a buffer of video, say from IP cameras, in order to get video clips of a machine when it fault. The basic idea was few IP cameras were placed on the machine, a piece of software captured the video and kept a buffer from each camera, when I detected a machine fault, I told the software to encode the buffer and save the video clip.

My original solution wasn’t ideal. The software keeping the video buffer was a CPU pig and the machine it was running on wasn’t very powerful. I had to write a program that interfaced with the camera software and the PLC. I have enough experience with interfacing with the PLC, but having to interface with another piece of software made it a bit of a pain since I had no control of whether the software was doing what it was supposed to be doing.
Anyway, I recently rewrote it using OpenCV and python to capture the video buffer, which means I can control all of it. OpenCV handles the cameras better, I can keep the frames in memory, which ends requiring much less CPU. I put it up on github.

At a basic level, you define your cameras in the config file (local USB cameras or IP cameras), point it to a BOOL tag that goes true when there is a fault, the buffer of video from all configured cameras will be saved in MP4 format. You can configure whether you want to write the fault tag back to 0 or not, the max number of clips you want to keep on disk for each camera, as well as the number of seconds of video you want to keep.
If you’re interested:

https://github.com/dmroeder/fault_video

I have always wanted to put a camera in our panel right above the HMI and take a picture every time an operator hit a button (with a 60 second denounce or so) and then correlate that with a event log of button presses.

Boy would explain how a lot of **** gets ****ed up :rolleyes: "Yeah I have no idea how it got set like that, I just found it that way" :whistle:

P.S. Bad *** btw
 

Similar Topics

Hi Guys, Hope somebody out there could able to help me. I am trying to use a video clip with in the HMI as an animation. Well never done this...
Replies
2
Views
2,167
I have a request to integrate a pause button in RSlogix to be able to start/stop a video. Video format is not defined at the moment, so it could...
Replies
2
Views
791
Hi All I have a very simple logic with some light sensors and RFID reader, which are providing start and stop events for capturing some short...
Replies
10
Views
2,732
I am using factory talk view studio site edition Version 8.20.00 . In that I added one media player to play video. But I cannot play it...
Replies
1
Views
1,049
I really struggle with STL in Siemens Step 7 Classic. I'll learn chunks, but then I don't use it enough to retain and build on the knowledge. When...
Replies
17
Views
3,213
Back
Top Bottom