Practical Series Automation Library

A Software Control Mechanism

Contents

5.3

Web development platforms

Web development platforms (WDP) are used to develop the website that supports the PAL software Project.

Web development platforms are similar to engineering stations and have a similar specification: generally high-powered machines with at least 512 GB of hard drive storage and 16 GB of RAM. Typically with a 10th or 11th generation i7 processor or equivalent (such as an AMD Ryzen 7).

WDPs should be equipped with dual 27" QHD (quad high definition) screens (these have a resolution of 2560 × 1440 pixels).

Unlike ESs, WDP machines do not need a fixed IP address and need not have TIA Portal installed.

  • It is perfectly possible to use an Engineering Station as a Web Development Platform and indeed, it is quite common to do so (in which case it will be referred to as an ES).

The configuration of an WDP, including drive allocation, device naming, software package installation &c. is explained in the ES/WDP Configuration Manual [Ref. 006].

In summary, it is assumed that the WDP has been configured in line with the above document and is equipped as follows:

The WDP is equipped with three hard drive partitions (as a minimum):

C: OpSys Operating system and application files
D: Projects PSP project files
E: Licences Storage area for licences &c.

The C: drive (OpSys) hholds the operating system and any installed programmes and applications. The C: drive should be at least 200 GB in size.

The D: drive (Projects) holds the website project developed for the PAL. Broadly, this is all the HTML, CSS, JS, jQuery and image files needed by a website. The D: drive should fill the remainder of the hard drive, excepting 1 GB that should be reserved for the E: drive. The D: drive should be at least 200 GB in size.

The E: drive (Licences) holds all the licences needed to activate the Siemens TIA Portal software and its installed options.

The E: drive is generally very small, it need only be a few megabytes in size (in practice, a 1 GB partition is more than adequate).

The software applications and configurations required by a WDP are as follows:

  1. A GitHub user account has been setup

  • The account has been added to the PracticalSeries organisation

  1. Git SCM has been installed

  • Notepad++ is installed as the Git default editor

  • An SSH key link has been established between Git and GitHub

  1. The Visual Studio Code text editor has been installed

  • The standard set of Visual Studio Code extensions have been installed

The packages above are listed in the order in which they should have been installed on the engineering station. The exact details for installing and configuring the above application is given in the ES/WDP Configuration Manual [Ref. 006].

5.3.1

WDP software folders

The WDP website project is stored on the D: drive (Projects).This holds a single primary folder that contains the WDP website Git repository:

2500 Git Projects Git Workspace folder

The underlying structure is:

Figure 5.15 - WDP Project folder structure
Figure 5.15   WDP Project folder structure

This structure is examined further in the following section:

5.3.2

Understanding the website structure

The website structure of Figure 5.15 (everything below the PS2001-pal-website, excepting the .git folder) is the actual website, the offline version. Everything in these folders is copied to the live website server and can be seen at the following address:

https://practicalseries.com/2001-pal/

The relationship between the offline and online folders is as follows:

Figure 5.16 - The website folder in relation to the live website
Figure 5.16   The website folder in relation to the live website

The contents of the folders (00-comres, 01-admin, 11-web, 21-protect, 31-git, 81-binary and 91-userdocs) and the root folder are copied to the live website servers using a file transfer protocol (FTP) package, this is a one-way sync from the WDP to the website servers. The synchronisation is made manually whenever the WDP website is updated.

The website has several folders within it:

00-comres Common resources
01-admin Various administration pages
11-web The main website containing the PAL user guides and information
21-project Holds all the documentation associated with the Project (validation documents)
31-git Contains information used by the GitHub repositories
81-binary Contains binary files (the TIA Project archive files &c.)
91-userdocs The online version of the User Documentation files embedded in the TIA Project

The contents of these folders are shown below:

Figure 5.17 - The website folder structure in detail (part 1)
Figure 5.17   The website folder structure in detail (part 1)

The website has two primary components:

  1. A user guide explaining how to download and use the PAL software (contained in the 11-web directory)

  2. A comprehensive guide to validated projects and all the documentation associated with the PAL project in its entirety (contained in the 21-project directory)

The remaining folders are secondary and are used to support the primary sections. A brief description of all the folders is given below:

Common resources directory
   00-comres

The common resources are those components needed by every page within the website. It contains things such as the common cascading style sheets (CSS), the JavaScript (JS) files used within each page, common images and the common font-files needed to correctly render the web pages.

The 00-comres directory is broadly split into two further directories:

11-resources Contains CSS, JS and jQuery files produced by the PSP
21-global Contains third-party components needed by the website

The 11-resources folder contains files associated with the website that have been written and developed by the PSP engineers (i.e. these are files that belong to the PSP). They fall into three categories: CSS files (to manage the appearance of the webpages), images (such as logos &c.) and JavaScript files that handle the dynamic navigation used on the web pages.

The 21-global is primarily used to hold third party applications that are used within the website. These are categorised as follows:

woff files These contain the fonts used by the website and were purchased by the PSP
normalise.css A third-party file use to standardise how different browsers render a website
lightbox.js Used to display images in a larger, overlay arrangement
Waypoints.js Used to create dynamic navigation bars
Hyphenator.js Used to correctly and dynamically hyphenate the website text
MathJax.js Used to render equations on the website where required
Google-prettify.js Allows sections of software (code fragments) to be displayed on the website

Administration files directory
   01-admin

The administration area is used internally by the PSP web development team, it contains various files that are necessary for the website management (such as revision data, workflow diagrams, change requests &c.)

The 01-admin directory is not directly accessible by users of the website, but the contents of it can be accessed by other webpages within the website to display or reference particular information.

PAL documentation directory
   11-web

This contains a full, on-line description and operating guide for the PAL software. It explains exactly how to use the PAL software, how to configure it and gives very detailed, real-world examples of how to use it.

each module is configured, the requirements and options for that module and examples of how to use the module.

This part of the website is directly accessed at the following url:

https://practicalseries.com/2001-pal/11-web/

Project documentation directory
   21-project

The PAL software is designed for use within pharmaceutical environments and as such is a “validated” project (see the Validation Plan (VP) [Ref. 001] for a detailed description of validated projects and their requirements).

Validation is the process of making sure a computerised system (such as a PLC and its software) does precisely what it was designed to do; specifically, it is the exercise of correctly and traceably documenting every requirement of the system and making sure that that requirement is formally and exhaustively tested.

The fact that the Project is validated, and the associated documents required by such projects have been deemed to be useful in their own right. This part of the website gives a practical approach to validating a control system, it explains the “life cycle” process and the phases necessary to progressing from a requirement specification to a fully validated and deployed system.

This part of the website provides examples of all the documentation required to by a validated system and explains how they should be used. This documentation is all made available in pdf and Microsoft Office formats (Word, Excel, Visio and Projects); the documents are complete and can be downloaded and reused as a template by anyone to whom they may be useful; again under the MIT Open Source licence

The project documentation also includes copies of the completed test and qualification documents needed to demonstrate the PAL software has been validated

This part of the website is directly accessed at the following url:

https://practicalseries.com/2001-pal/21-project/

Git repository webpage directory
   31-git

The Git repositories created as part of this Project are all public repositories available to anyone with a GitHub account. These repositories all contain documentation of some form or another, usually as README.md files, that explain the purpose of the repository and how to use the repository.

These files often reference specific websites or pages that offer further explanation of a particular point.

The 31-git directory provides a storage location for such webpages for the PAL repositories; this document, for example, is available as an online webpage:

https://practicalseries.com/2001-pal/31-git/11-00-scm.html

Binary file storage directory
   81-binary

All the downloadable aspects of the website:

  • PDF documents

  • Microsoft Office documents

  • Software archive files

  • Code examples &c.

are stored in the binary area of the website, such files are all accessed via other webpages within the website.

User Document storage directory
   91-userdocs

The 91-userdocs directory is a special directory and is structured in the correct format for the TIA Portal User Documentation facilities (see the Software Design Specification (SDS) [Ref. 003, Section 13] for details of the User Documentation facilities).

This is the online version of the User Documentation embedded within the PAL software TIA Projects.

The User Documentation allows additional information about a block within the PAL software to be directly accessed from within the TIA Portal environment.

5.3.3

Local repository

The website folder: PS2001-pal-website contains the full website in the folders listed in the previous section. This folder is also a Git repository (separate to the PS2001-pal-software repository that contains the software being developed for the PAL, the Controller software, see § 5.2.3)

This means that the development of the website is under the control of the Git VCS.

The website is written and developed using the Visual Studio Code text editor. The repository aspect of the website is maintained via the source code control aspects of this application (again the instructions for installing Visual Studio Code and the various Git extension are given in the ES/WDP Configuration Manual [Ref. 006]).

All repository actions are carried out using the Visual Studio Code application. This includes committing changes to the local repository, creating and managing development branches and the bidirectional synchronisation of the local repository with the remote GitHub repository.

5.3.4

Master WDP — local repository backup to NAS

There can be any number of web development platforms (WDPs), generally, each developer will have one.

There is however, only one Master web development platform (MWDP), this usually belongs to the lead web developer.

All WDPs have a local repository and are constantly being synchronised with the remote repository on the GitHub servers, whenever a commit is made to a local repository, on any WDP, that WDP must first be synchronised with the remote repository (ensuring that any changes made by the local commit do not create a conflict with the any other changes that have been stored within the remote repository).

The remote repository is essentially, the master repository and it is this repository that holds all the commits made by any WDP.

For the same reasons given in § 5.2.7, the web repository is also backed up to the PSP NAS drive.

This is done by the Master Web Development Platform; each time the MWDP is synchronised with the master repository on GitHub, it makes a complete copy of the repository on the PSP network accessible storage (NAS) drives.

The MWDP should be synchronised at least once a week with the remote repository.

The backup mechanism is the same as that for the Master Engineering Station, it uses Dropbox as an intermediary, the full description of how this works is given in § 5.2.7.

The Master Web Development Platform has a slightly different folder structure. Similar to the Master ES, the 2500 Git Project folder is, stored within a live Dropbox folder on the MWDP:

Figure 5.18 - MWDP NAS backup structure
Figure 5.18   MWDP NAS backup structure

Application to access to the PSP Dropbox account should be made to:

Account Manager Michael Gledhill
Account Details PSP Dropbox
Contact Details mg@practicalseries.com
Table 5.6   PSP Dropbox account manager details

5.3.5

Remote repository

All WDPs work with a remote repository that contains the current copy of all committed changes made to the website on any of the WDP machines. The remote repository is the master repository, it holds all the development branches (created by any WDP) and the most up to date master branch.

Any development work that takes place on a development branch on any WDP, will at some point be committed to the local repository (on the WDP), before this can happen, the Visual Studio Code application making the commit will require that any changes that exist within the remote repository, but are not present on the local WDP (i.e. changes that have been made by other users) are pulled from the remote repository, before the local WDP changes can be pushed back to the remote repository. This Pull before Push approach ensures that the user must resolve any conflicts between user’s local repository on the local WDP and the remote repository before pushing the resolved changes back to the remote.

<

To use the remote repository from a local WDP, the two must be linked via a secure shell key link (SSH link), the process for doing this is explained in the ES/WDP Configuration Manual [Ref. 006], and again, on the website here:

The remote repository is a public repository (one that anyone with a GitHub account can read and copy) and is part of the GitHub PracticalSeries organisation. It is available here:

https://github.com/practicalseries

The remote repository itself is available here:

https://github.com/practicalseries/PS2001-pal-website

Read access to the organisation and all of the repositories it contains, is available to anyone with a GitHub account.

Access for contributors requires permission from the organisation owner, applications for such access should be made to:

GitHub Organisation: https://github.com/practicalseries
Repository Name: PS2001-pal-website
Organisation Owner: Michael Gledhill
Contact Details mg@practicalseries.com
Table 5.7   PracticalSeries GitHub organisation details

5.3.6

The live website

The live Practical Series of Publications website is hosted by Heart Internet in the United Kingdom.

The website has various publications (of which the PAL website is just one component), The landing page for the top level of the website is:

https://www.practicalseries.com/

And the landing page for this, the PAL website is:

https://www.practicalseries.com/2001-pal/

The Master Web Development Platform (MWDP) is used to maintain the live website.

The live website is an exact copy of the offline website stored in folder PS2001-pal-wesite on the D: drive of the MWDP, but without the .git folder.

The website is uploaded from the MWDP to the Heart Internet servers using the WinSCP application, the installation of this application is discussed in the ES/WDP Configuration Manual [Ref. 006].

Logon information is required to give access to the WinSCP application (this logon information is also restricted to having the correct credentials, the website will only permit machines with specific IP addresses to upload the data).

The WinSCP application has two windows, the left-hand side is the offline website on the MWDP, the right-hand side is the online website on the Heart Internet servers:

Figure 5.19 - WinSCP FTP with the live website
Figure 5.19   WinSCP FTP with the live website

Those requiring FTP access to the website should apply to the following:

Site Owner:: Michael Gledhill
Account details:: PSP Website FTP
Contact Details mg@practicalseries.com
Table 5.8   PracticalSeries FTP access details



End flourish image