Collapse
CollapsingX
  • - or -

Reading and writing files on your Matrox Iris GTR


When you use an image set as the camera source of your Camera step, you must specify both the design-time path and runtime path of where to find these images, using the Images page of the Platform Configuration dialog. This is because the design-time path (on your development computer) and the runtime path (on your Matrox Iris GTR) are, by default, significantly different.

The design-time path can be any file path that your development computer can access. This path is used when you are developing your project (not deployed). Matrox Design Assistant provides a predefined design-time path {PATH("DA Install")}//Images. This path points to the folder where Matrox Design Assistant installs its sample images. You can browse to select other paths.

The runtime path can be any file path the runtime platform can access. Deployed projects use the runtime path. For the Matrox Iris GTR, the runtime path can reference folders on the supported Matrox smart camera or network folders for which credentials have been provided (for example, {PATH("DA Documents")}//Images). This predefined path maps to a path on your Matrox Iris GTR (such as, \\gtr320999\mtxuser\Documents\Matrox Design Assistant\Images). For more information on the PATH() function, see the Specifying a path section in Appendix A: Expression syntax or PATH function reference.

Note that the Matrox Imaging operation system (MIOS) on Matrox Iris GTR accepts forward slashes in the style of Linux. However, to be compatible over various Matrox Design Assistant platforms, Matrox Design Assistant will automatically switch between forward and backward slashes at runtime, as needed.

As a special case, the images in the folder {PATH("DA Documents")}//Images, which evaluates to \mtxuser\Documents\Matrox Design Assistant\Images on your Matrox Iris GTR, can be viewed from any browser. The url must specify the full, case-sensitive file name (for example, http://gtr320201/mtxuser/Docuemnts/Matrox Design Assistant/Images/fname.ext).

Viewing an image directly is useful when dealing with HMI panels with limited resolution or browsers that do not support HTML5 and are not capable of displaying operator views. This provides a way to fetch a current image to view. Note that the ImageWriter step provides an image scaling option to produce scaled down images with clear annotations for this type of application.

Acquiring permission to a network folder

When accessing a network folder, the runtime platform must validate your domain access credentials. This is done by entering a valid user name and password. To do so, go to the CREDENTIALS portal page, accessible by clicking the Administration button() in the Matrox Design Assistant configuration portal.

Accessing a Matrox Iris GTR from another computer should prompt you for a user name and password. In this case, prefix the user name with the camera name (for example, gtr329999\mtxuser). Accessing a Matrox Iris GTR from another computer might require you to enter your credentials twice.

LoadImage step

Regardless of the image source mode, all paths must be absolute. Consider using the PATH() function if behavior similar to relative paths is required, such as if your project might need to run under both Microsoft Windows and MIOS. Paths can point to a network location (for example, \\\\<server name>\\<share name>). For more information on setting an alternate path when working without access to the runtime platform's disk, see the LoadImage in emulation mode subsection of the Procedure for using the LoadImage step section in Chapter 36: LoadImage step.

ImageWriter and TextWriter steps

When saving images locally to your Matrox Iris GTR, storage space, disk wear, and writing speed might become issues. It is recommended that you save large quantities of images, use a network folder or an external USB drive rather than directly on the hard disk of your Matrox Iris GTR.

You can connect an external USB drive to the smart camera's USB connector (via a USB hub). A typical path to the USB is /run/media/mtxuser/keyname, where keyname is the name of your USB key.

The various utility steps (such as the DeleteFiles step) can be used to manage storage on your smart camera.