Back

Topic

[KB491]Using a Free Archive Unit in a file named by a variable

Tags: Archives

13 years ago
By RM
Options
Print
Applies to:

PcVue all versions


Summary:

This article is a supplement to the online help and explains how to force the data recording of a Free Archive Unit in a file named by a variable.


Details:

The name of the file comes from a PcVue text variable. Here the unit’s name is “xunit”.

  1. If the text variable’s value is a file name (e.g. xfile) without a suffix, the file will be placed in the current project folder …\TH\xunit\xfile.wri.
  2. If it is an absolute path (e.g. C:\xp1\xfile), the file will be stored as follows:
    c:\xp1\xfile.wri.
  3. If it is a relative path (e.g. Xp1\xfile), the file will be placed in the current project folder \TH\xunit\xp1\xfile.wri.
  4. When the text variable’s value changes, the most recent .WRI file will be renamed with a .DAT extension.
  5. If the text variable doesn’t exist or its value is empty or uninitialized, the file will be placed in the current project folder \TH\xunit\ and it will be named as before (e.g. H00000.wri).

Refer to the online Help (Free Archive Unit) for further details.

The saved files for a series can be dynamically changed by updating a text variable’s value. (SCADA Basic program or mimic.)

For example:

vartext = c:\xp1\2011_03_31_10h00.wri

5 minutes later, it is decided to change the destination file forcing a text variable to:
vartext = c:\xp1\2011_03_31_10h05.wri

5 minutes later, it is decided to change the destination file again:
vartext = c:\xp1\2011_03_31_10h07.wri


Created on: 02 Sep 2011 Last update: 04 Sep 2024