Perspective Show Image From Scanner

Hey all,

I'm trying to display some image files from Cognex cameras in a perspective page. I have the cameras sending .png images to a shared folder on the Ignition server. I can move those files to the Ignition image directory and I can get them to display, but I run into a problem where Ignition will lock the image file so a new image can't be moved in it's place. I've played around with trying to load the images into memory tags, but they seem to be too large. I've also tried to load the image into a global variable but I can't figure out a way to display that using any perspective component. Is there a way to display a constantly changing image file like this?

Stick them in a database as Blobs, then use my Blob Server module. Or host them via webdev.

(Using the Ignition folder to host files is an unsupported, "accidental" feature. It is unsupported precisely for these sorts of reasons.)

The old way I used to do this was with Ignition's webserver which was C:\Program Files\Inductive Automation\Ignition\webserver\webapps for Windows. To allow for hot loading you need to change the
UseFileMappedBuffer to false in the webdefault.xml Jetty config. However, I have since moved away from this.

Turns out IT already had another webserver in place for other files, which I ended up using for this. webdev or Phil's Blob server are you best options.

Thanks, that seems to be working for now until I play with a better solution. How do you refresh the image when it changes?

As you insert into the DB, you get a new primary key value for the row. Place that in a gateway tag (int8, perhaps). In the image viewer, bind its URL property to an expression that constructs the image URL with that tag in its parameters. Whenever the tag changes, the viewer will load the new image.

Run a timer event to prune the DB of images you no longer need, and if necessary, run VACUUM to preemptively reclaim the space.