Back

Topic

[KB50]Inverting an equipment Bit variable’s value

Tags: Varexp

15 years ago
By RM
Options
Print
Applies to:

PcVue all versions.
While the basic content of this article remains valid, details may have changed since it was written.


Summary:

This article refers describes how you can automatically invert the value of an equipment Bit variable.


Details:

You do this by setting an option in a configuration file; there is no such setting in the HMI.

  • Find the file VAREXP.DAT in folder C of the project and make a backup copy of it.
  • Open VAREXP.DAT in a spreadsheet editor, by identifying comma (‘,’) as the column separator. Each value should appear in a separate column.
  • The file has a line for each variable, starting with its type, e.g. BIT. The name is in the 3rd to 8th columns (one for each branch).
  • Locate the line that refers to the equipment Bit variable that is to be reversed.
  • Locate the 67th column and put the value ‘b’ (without quotes) in it.
  • Save the file as plain text with comma separators and close it. Restart the Supervisor and test the outcome.

The Bit variable’s value will be reversed on input from the equipment.

Warn

Do not modify any other values of file VAREXP.DAT unless you know precisely what you are doing.

Note

The columns’ names are shown in the file VAREXPxxx97.XLS. In this case, it enables you to count down from the rightmost column to locate the 67th.


Created on: 08 Oct 2010 Last update: 13 May 2024