Function

With the help of the file scanner, you can monitor a directory for new or changed files. The file found will be saved together with the whole path in a text signal. The search is not limited to DAT files, it can also be extended to other file formats. Moreover, you can define here, if the newest or second newest etc. file will be saved in the text signal. The text signal can then be used, for example, to display the file found in an offline trend graph or to display the name in a text field. For each file to be found you need to configure a separate file scanner.

The target signal requires a text signal from a virtual module of the type ibaQPanel text input. The module ibaQPanel text input can be found in the I/O Manager in the Analytics tab under the virtual module.

Configuration

The file scanner object will only be visible in the design mode and will be displayed with this symbol:



Via the browser button, select the folder you want to monitor. If subfolders are to be monitored, too, activate the “Include subfolders” option.

Specify a pattern the file name has to contain or a file ending. Placeholders, such as * and ? are also allowed.

The files can be sorted according to modification or creation date.

In the “Select n-th newest” field, you can define, whether the newest or second newest etc. file has to be selected.

    • “0”: selects the newest file

    • “1”: selects the second newest file, etc.

You can select the target text signal from the drop-down menu below.

Example: Displaying the three newest files in an offline trend graph

For every single file, you can configure file scanners that monitor a defined directory. In the first file scanner, enter “0” at “Select n-th newest” for the first file, in the second file scanner, enter “1” for the second newest file and in the third file scanner, enter “2” for the third newest file. For every file scanner, you need to define a separate text signal.

Create three offline trend graphs. In the offline trend graph properties dialog, select the “Monitor text signals” monitoring mode. In the related drop-down menu, select the text signal that contains the desired file path. Any time, the text signal is changed, the new file will be loaded.

By doing so, you can create several offline trend graphs, in which the newest, second newest etc. file will be loaded, and compare them then.