I have been experimenting with the camera component in FPMI and I like what I see. However, I now want to save a snapshot of the image based on a trigger. How would I do this in FSQL?
Sorry, this really isn’t feasible. The IP Camera component is in FactoryPMI, triggering a snapshot in FactorySQL doen’t really make sense. You could take a snapshot within FactoryPMI (off of a change of a SQLTag, perhaps) using the fpmi.print.printToImage scripting call.
Sorry I wasn’t very clear. I already have it setup to do a snapshot in FPMI. The reason I want this functionality in FSQL is because this is where all the archiving of my data is taking place and I do not have to worry about a user turning this feature off.
I realize I cannot use the IP Camera component in FSQL. I am hoping there is another way of doing this.
This testing is part of a much larger project. We have a request to install 37 cameras throughout production. The video stream from each camera will be saved to the server. While snapshots will be saved for each roll produced. We haven’t purchased a system yet. I am experimenting with a camera we already have in hopes we can use FSQL and FPMI as much as possible. Once I identify the strengths/weaknesses of this software I can then determine what we will need to purchase to make up this whole system.
Any recommendations for cameras, methodology regarding this is appreciated.
Carl’s saying that FSQL wasn’t designed to work directly with camera systems. I remember that the software that came loaded with Panasonic webcams could record frames or take snapshots when they sensed motion.
As I see it, your options would be:
Figure out how to store images on a shared drive on your server. This would likely involve the camera software and/or your PLC. FPMI could probably be set up to go back through those images.
(way advanced) Your webcam can probably snap pictures by http request. If this is the case a .NET FSQL plugin could use PLC triggers to take pictures. This could be anywhere from relatively simple to more complicated based on things like: specifying write path or dealing with images, dealing with authentication with the camera or sessions, etc. If you do choose this approach, start with a proof of concept before installing 37 cameras. There are still questions of speed, performance, and overall feasibility. This free FSQL UDP Plugin is probably your best starting point.
I don’t know enough about how digital cameras are typically involved in a control system, ie, not on the HMI side. There might exist cameras that are designed to interact with PLCs in the way you’re describing - not optical counters. I’ll check on this on the other forums. I do have experience with high end CCTV surveillance systems and they’re even more of a beast to integrate.
Do you have multiple brands of camera to test with now? edit - I did note your request into our system since it’s a good idea that current features don’t cover.
Lots of IP cameras have a URL for a still JPEG snapshot that is updated every few seconds. Writing a FactorySQL plugin to simply copy from this HTTP url to a file should be relatively simple (maybe use WGET for windows somehow?)
I posted the question to PlcTalk. I think our proposed solutions are as simple as any.
If you use Cognex cameras rather than general IP cameras, they have an FTP push function you can program in. Just need to set up an FTP server where you want to store the pictures, then the camera itself will automatically send the images up. Images from DVT cameras can also be saved, but it requires some custom VB code on the PC side.
That works if you’re looking for periodic snapshots. It’s probably easiest to manage and interact with if you share that same ftp path with Windows/OS file sharing.
These axis cameras have digital inputs that could probably be easily triggered from a regular PLC output signal.