My team is attempting to move some paper forms for daily operator machine checks to Ignition.
The forms are fairly simple. They just have the name of something to check, the frequency to check it, and an image of what is to be checked. The operator simply checks a box if the item passes an inspection.
An extremely simple mockup of the screen is as such
We plan to (eventually) move about 30 machines to using these checklists, each with aprox. 5 things to check each.
My plan was to have an SQL table with machine/name/frequency/image for each item, and then just simply query from that table to get the appropriate checklist, depending on the machine name and the day of the week.
However, the easiest way to get an image to display in a table is using Ignition's Image Management tool, and then mapping from something in the table, like "Oil Gauge Img" to an image path in image management.
However, this method requires manually adding elements to the "image path list" configuration on the table, for each image I plan to show. With 150 possible images, this would be both a nightmare to set up and to maintain.
I could use BLOBs to store the images directly in the SQL database, but I've heard that that tends not to be a good idea, as they can take up a lot of storage, and be annoying to display in a table.
Are there any better ways to handle this in Vision?
From the documentation, that looks like it hosts the image on the web (intranet). I could do the same manually, as my company pays for -- although does not make much use of -- the webdev module. (Using BLOBs still seems like the more manageable solution, as it confines all the business details to one table)
Either way, with an image accessible from a URI, I can use an image component to display the image no problem.
Is there a way to nicely embed these into a Vision Table, or do I need to go the route of using some template-repeater imitation of a table?
No need for my module in Vision. Just join the table with the image blobs to your checklist table and include the blob column in the dataset that feeds a Power Table. In the Power Table, use the configureCell method to return a dynamic ImageJLabel component to which you have loaded the image bytes.
You'll have to preset the power table's row height to accommodate the largest image, IIRC.
Sorry, I don't have an example handy.
Edit: Probably ought to be a subclass of JLabel that has paint() overridden to use the Image bytes, similar to what is done with the Paintable Canvas.
Power table definitely seems like the way to go then.
I tend to default to using the default table, as I like the ease of mapping text from one thing to another. But I suppose there is sometimes a use for the more advanced option
(Also, the perspective misunderstanding is logical. Knowing what I do now, everything in this project would have been doable, and perhaps even easier, in perspective. So many forms.....)
I ended up going with using Ingition's built in image manager. I don't expect the images to change that frequently, and using this method avoids storing BLOBs in SQL, which I'm still a bit worried about the performance impact of.
With this method, it's as simple as using the iconPath property in the configureCell return dictionary. (Thank goodness. I do not have the strength of will to work with JLabels)
I was a little worried that iconPath would only work with icons, but it was able to read from the path 'daily_checklist/check_fill_level.jpeg' completely fine.