From version 3.5.146 IToolS® implements the management of the image data type, therefore it is possible to use the IToolS® variables to manage an image of any kind, together with the data type image IToolS® implements a first driver capable of loading images from disk with an update strategy to polling, event or both. Using the event mode, the driver checks an image and reloads it when it changes and notifies the change of value.
The image data type introduces a series of operations equivalent to those available for other types of data such as historical archiving on databases and publication of the instantaneous value on publication drivers such as OpcUA or SQL.
To configure a system that controls one or more images present in a certain position on the disk, it is necessary to configure an IToolS® CMS project, insert an ioserver with “ImageReader” driver and configure the update strategy using the “UpdateMode” property:
At this point you can enter the desired variables, set the type of the variable to “Image” and enter the path of the image to be checked in the “Address” field:
The system is already fully configured and able to control images through the paths configured in the variables.
To check each image change, you can use the variable diagnostics window which, by means of a new viewer associated with each type of data, also allows consultation of the images:
The effect is the one visible in the following image:
To publish an image managed by an IToolS® variable via OpcUA, some useful settings are sufficient to configure an OpcUA server and bind between an IToolS® variable of type “Image” and an OpcUA variable.
The following figure shows the configuration in which compared to the previous one there is an OpcUA server with a variable in binding to the “Image” type variable:
Using a free OpcUA client such as UAExpert we can verify that the image is actually published and that any notification of change of value is correctly published:
The ProxyHub publishing system implemented by IToolS® allows you to share variables between projects distributed over the network, therefore the same consideration applies to images. In particular, just add a “VariablesHub” object to the project and associate it with the node containing the variables that you want to make available for distributed applications:
At this point it is possible to create a new IToolS® application, which does not necessarily have to reside on the same computer, add a “VariablesProxy”, import the variables and start the application: