How to manage project and library versions

 PcVue's Central project management enables you to centrally manage PcVue project and library versions. It is designed to help you manage successive versions of your project and libraries as part of your project lifecycle policy. It includes tools for the project designer and facilitates deployment.

The original and main use of Central project management is for centralized project management of a networked, multi-station project. However, it can also be used for a single-station project or a system with multiple stations and different projects. In all cases, it is not designed for concurrent engineering. When updating a version, the local project or library is copied to the central storage and replaces the existing one as a whole.

Central project management is neither a revision control software, nor a source code management tool (SCM). It is not designed to keep track of atomic changes done from one version to another in your PcVue project, it does not compress, or do differential saving to economize storage space. For information about using PKZIP25 for that purpose, see the topic Backing up and restoring projects and libraries.

Using Central project management, you can:

  • Specify the central location where versions of projects are stored for deployment.

  • Save a project to the central folder, either as a new version or as an update to an existing version.

  • On a station, select the version of the project from the list stored in the central folder, load it and launch PcVue with that version.

  • Manage the state of project versions in the central project folder in order to control which version should run on stations in production.

  • Do all the above with the shared and common libraries.

You can manage any number of projects in the same central project folder. However, from a particular station, you only see versions of the project that is currently being loaded on that station.

Creating, updating, and managing versions takes place in your development and testing environment, typically on an engineering station running PcVue. The Central project management helps you apply a project management and versionning policy, including the identification and follow-up of:

  • Versions at development or testing stage.

  • Version at validation stage, prior to deployment in production.

  • Version of reference in production.

  • History of operational versions, the ones that were once the reference in production.

The state machine behind Central project management is as follow. ClosedShow picture

The state machine of the Central project management

Version numbering follows widely accepted software versionning schemes using three digits known as Major (a major version), Minor (a minor version), Revision digit (a revision to a Major/Minor version). For example 1.0.0. The major and minor digits can be set according to whatever version control standards are being followed. The revision digit starts at zero and is incremented automatically each time a new version of a particular Major/Minor version is created. If you are using an existing major/minor version, the update version number is updated automatically as the next in the sequence.

While Central project management does not enforce any policy, it has been designed so that you can set-up a development process for your PcVue project, with typical, widely accepted rules.

In particular:

  • The 3-digit version number allows you to identify and track major changes, minor changes and revisions of the configuration.

  • The status allows you to identify if a version is at development or unit tests stage (DEV), validation stage (PREREF), in production (REF), or has been the reference in production in the past (OPE).

  • In addition, you can associate tags to versions. Tags allow you to bypass the lifecycle proposed with the predefined states if your context requires a simpler workflow. For example, if all you need is to identify a version for production and another one for dev, you can ignore the concept of state, and simply use the tags Dev and Prod.

When using Central project management it is essential to make sure that the time is synchronized across all the involved host machines.

Configuring the General parameters

After the creation of a project, or if you want to start using the Central project management with an existing project, the following parameters must be set.

  1. Go to Configure then Projects and select Versions. When you select this for the first time, a dialog is displayed stating that the central folder has not been configured yet. Click on OK to open the Central project management dialog.

    The Central project management dialog is also available as a Standard Action in the Function Key configuration dialog, although it is not allocated to a function key by default.

  2. Click General parameters in the left pane of the Central project management dialog and tick Enable central project management box.

  3. In the Central versions folder field, select the folder where versions of the project and libraries will be stored. You can either type in the name directly or select it from the standard Windows browser dialog opened from the ellipsis button beside the field. The folder path is limited to 200 characters. ClosedShow picture

    General parameters of the Central project management

    For disaster recovery purpose, it is essential that you add this central folder in your backup procedures.

  4. (Optional) To open the access to a network location that is not currently available, click on the Map network drive to get the available space button to open the Map Network Drive dialog box.

    The folder can be located anywhere on a computer acting as file server that all of the stations can access. Central project management requires bulk file copies, so it is best to choose a file server that has a fast access speed and enough storage space to accommodate the needs. The folder you choose as your central storage location must have the following permissions sets:

    • The interactive user or service account running PcVue must be able to browse folders, read and copy files from the central folder.

    • In addition, the interactive user running PcVue on engineering stations must be able to create and delete sub-folders, delete, create, write, and modify files on the central folder.

  5. (Optional) If you want to allow update of project versions with OPE or REF state, tick Enable updating of a version in OPE or REF status box. By default, only versions with DEV state can be updated.

  6. Click Ok button. A message appears in the status bar indicating that the versions folder is connected.

  7. The Reload button can be used when the connection to the central storage folder is lost while the dialog box is open. Click the Reload button once the connection is recovered to refresh the dialog box: List of versions, states etc.

Selecting the folders and files to include

Selecting the exact sub-set of libraries you actually use in your project is important to avoid the burden of copying several unused files when deploying or updating a station's libraries. It can be hundreds or thousands of files depending on library size.

  1. Click Included folders and files under Project in the left pane of the Central project management dialog. Here you select which project folders and files are included when creating or updating a version of the project.

  2. Tick and un-tick the project folders and files in the Project folders pane as required. To display the items that a folder contains, click on the '+' nodes to the left of the folder name. ClosedShow picture

    Included project folders and files tab in The Central Project Management dialog

    Unless you have special requirements and are familiar with the project folder structure, it is recommended that the default selection be used. If you have made changes but wish to restore the default settings, select the Default button to do so. In particular, strong recommendations apply to the following folders:

    • The \TH folder must be excluded to avoid overriding proprietary archive unit data.

    • The \PER folder must be excluded to avoid overriding persistent data, including saved variable values.

    • The \TP folder is dedicated to storing project-specific files. At design-time, it is recommended to clearly identify files that will have to be part of the version management (configuration files common to all stations), from files that should not be overridden upon version loading on a station. And based on this, to separate project-specific files in different sub-folders of \TP, some included to version management, and some others excluded.

    The project root folder is the same as the PcVue root folder unless an alternative has been specified using the -b command line argument.

  3. Next, click Included folders under libraries in the left pane of the Central project management dialog. Here you select which folders are included when saving a version of the libraries.

  4. Tick and un-tick the library folders as required. For the custom libraries, you can only select/de-select an entire library. For the common library, you can select/de-select each sub-folder individually. This selection process allows you to use Central project management for the entirety or part of the Common library and a sub-set or all Shared libraries.

    Central project management takes advantage of a file server you host on your network to store the history of projects and libraries version.

Creating and updating project and library versions

Make sure all files are properly saved before creating or updating a version, including mimics and configuration files. If there is any unsaved file, the newly created or updated version will not match what runs locally.

  1. Click Project in the left pane of the Central project management dialog. Here you can create a new version of the project, update or delete an existing one. The right pane changes to show details of the local project and of any versions of projects that are stored centrally. The same goes for Libraries except that you have to click on Libraries instead of Project.

    Deleting a version is an irreversible operation that deletes all corresponding files in the central folder and cannot be reversed nor called off. To delete a version, select it and click Delete version button then click Yes to confirm deletion in confirmation dialog.

  2. To create or update a project version, follow either of these two steps:

    (Create a new version) Click the button Create a new version. The Create a new version dialog opens. Here you can choose new major and minor version numbers or use the existing one. You can also add a description to reflect the changes brought by this new version then click OK to start the copying process. The new version is created in the central project folder by copying the selected files from the local project under a selected version number. The new version is given the DEV state and the local version number is updated to reflect the version you have created. ClosedShow picture

    The version number is used to name the sub-folder in which the version is centrally stored.

    Version numbers are applied independently to projects and to libraries. For example, you can have at some point in time, libraries version 1.4.2 and project version 3.0.4. For instance, Project XYZ version 1.3 and version 1.3 of the libraries need not correspond to each other in any way.

    Prior to PcVue version 12.0, version numbering used two digits. Upon migration, the existing centrally stored versions are left untouched, and keep a 2-digit version. Any new version you create will have a 3-digit version number (with the revision digit set to 0).

    Creating project version in the Central project management

    (Update a version) Select the version to update and click the Update version button. Click Yes in the confirmation dialog and the Version update dialog appears allowing you to select the type of update you wish to do: A full update, a partial update since a given date or to just change the description. The selected local files are then copied to the central folder overriding any existing files.

    By default, you can only update a version that has the DEV or PREREF state. However, you can remove that restriction by checking the option Enable updating of a version in OPE or REF status in the General parameters pane.

  3. (Optional) Select the version created and click the Change version state button to change the default DEV state associated to the version. This state determines the readiness of the version for deployment. There are four possible states to choose from to best represent the state of a version:

    You cannot change straight from DEV to REF. If you do not wish to take advantage of the PREREF state for the validation stage, you must first change the state to PREREF and then you can set it to REF.

    • Development (DEV): A version that is at dev-in-progress stage. You can have more than one version DEV. You can load, update, and delete a version in this state.

    • Pre-reference (PREREF): A version that is being validated before deployment in production. You can only have one PREREF version at a time. You can load, update, and delete a version in this state.

    • Reference (REF): A version that is validated for deployment in production, and typically used on all runtime stations of the system. You can only have one REF version at a time. You can load, but you cannot update a version in this state unless you enable updating General parameters pane.

    • Operational (OPE): A version that is used to be a REF in the past. Depending on your practices, the most recent OPE version may be used a fallback when the REF version proves to be faulty once deployed. You can load and delete, but you cannot update a version in this state unless you enable updating General parameters pane.

      If you apply the REF state to a version when a REF version already exists, the latter is changed to OPE.

      If you apply the PREREF state to a version when a PREREF version already exists, the latter is changed to DEV.

  4. (Optional) Select the version created and click Edit version tag button to add a tag that can later be used to start up the version by using the '-d' command line. The tag should not be more than 12 characters, and it should not be duplicated. The list of allowed characters is [-_#$a-zA-Z0-9]. Refer to How to select a project version at start-up topic for more information.

    You can use the Delete all other tags box in the Edit version tag dialog to delete tags associated to other versions.

Project version information is saved in the file INFOS.DAT found in the project root. This file only exists for projects using Central project management, and appears in both the local project and versions in the central project store.

Deploying a version

The process of selecting and loading a version of a project, and / or a version of the libraries, from the central project storage to a station takes place at start-up. It is controlled by command line arguments that you add to the PcVue shortcuts.

By using the proper shortcuts, you control that:

  • Only a validated version is run in production.

  • The user can pick any version on an engineering or test station.

  • The user only run the proper version on validation stations.

See How to select a project version at start-up for more information. See the sub-book System variables for more information about system variables for Central project management.

Example of managing versions with Central project management

The stations

An application has been live for some time but evolving requirements meaning that its configuration occasionally have to be upgraded. The station architecture is as follows:

  • Two server stations, Station 10 and Station 11, are in an association (for hot standby), Association 20.

  • Three client stations are connected to the association.

  • One file server (\\MyFileServer) holds the central project store.

Central project management is enabled on all stations with \\MyFileServer\CentralStore is configured as the central project store.

Station 11 has a complete (development and run-time) license and is started with the command line argument -d.

All other stations have run-time licenses and are started with the command line argument -r.

The versions

The versions to be controlled are at various stages of the development cycle.

Version Description State
1.7.0 The final version of the previous release, archived if a rollback is necessary. OPE
2.1.0 The version currently in use on Stations 1 to 3, but due for replacement shortly. REF
2.2.0 Newly tested and in state PREREF during the validation phase. PREREF
3.0.0 Under development. DEV

All of the versions are stored in the central project store on the file server. ClosedShow picture

Schematic of the versions on the PCs.
  1. Development and testing occurs on Station 11. As the development PC, it can download any of the versions for comparison and troubleshooting as required.

  2. When operational testing on a version is completed, it progresses to state PREREF. Version 2.2.0 is currently in that state.

  3. The operational stations (stations 1 to 3) are configured with the -r switch to load the REF version when they are restarted. Version 2.1.0 currently has that state so it is loaded automatically on start-up of these stations.

  4. When the changeover to version 2.2.0 takes place, it is given REF state. Version 2.1.0 reverts to the OPE state and remains available for rollback.

  5. When each operational station (station 1 to 3) is next restarted, Central project management automatically downloads version 2.2.0 onto it.

  6. If there is a need to fall back temporarily, the administrator re-assigns the state of REF to version 2.1.0 then restarts the stations to load version 2.1.0 again. This assumes that versions 2.1.0 and 2.2.0 are interchangeable functionally and able to serve the users' basic needs.

  7. In this example, the libraries remain unchanged in support of versions 2.1.0 and 2.2.0 of the project. Version 1.7.0 is stored for practical reason only.

The result

After the changeover to version 2.2.0, the project versions are as follows.

Version Description State
1.7.0 The final version of the previous release, archived for troubleshooting purposes. OPE
2.1.0 The previous version available for fallback. OPE
2.2.0 The version currently in use on Stations 1 to 3. REF
3.0.0 Under development. DEV