Skip to content

A repository to house a PIQUE model that analyzes the quality of custom code that is deployed on (or downloaded to) PLCs

License

Notifications You must be signed in to change notification settings

MSUSEL/msusecl-pique-plc-customcode

Repository files navigation

msusecl-pique-plc-customcode

Introduction

This project is an operationalized PIQUE model for the assessment of quality in PLC customcode.

Because of the various development environment challenges when dealing with numerous 3rd party applications, this project is also provided as a packaged standalone docker image. That image is available here.

Tools and 3rd party libraries

These tools and 3rd party libraries will be automatically pulled with the docker image

  • PIQUE-core version 1.0.1 (packaged as a layer in the image)
  • PIQUE-plc-customcode relies upon output from the tool CODESYS, specifically a txt file of rule violations and a csv file of metrics. For examples of these files, please refer to this repository

The dockerfile has been designed to easily adjust version information as new versions are released.

Run environment

Docker

docker engine 20.10.24 (not tested with versions 21+)

The image for this project is hosted on dockerhub here. Instructions to download and run are supplied below

not Docker

It is not suggested to run PIQUE-plc-customcode without the pre-built docker image, but all files and configs are supplied on this repository.

Running

  1. Download and install Docker engine
  2. With Docker engine installed, pull the latest version of this project: docker pull msusel/pique-plc-customcode:latest
  3. Navigate to a working directory for this project
  4. Create two directories, "input" and "output".
  5. Move CODESYS analysis output files (txt file and csv file) into their own directory, named appropriately with the structure 'CodeSys-{project}-output.csv' and 'CodeSys-{project}-output.txt'. The hypens are required. Examples are available here
    • Move these files into the "input" directory
  6. The resulting directory structure should look like this:
├── $WORKDIR
│   ├── input
│   │   ├── project_to_analyze
│   │   │   ├── CodeSys-rules-output.txt
│   │   │   ├── CodeSys-metrics-output.csv
│   ├── output
  1. Run the command docker run -it --rm -v /path/to/working/directory/input:/input -v /path/to/working/directory/output:/output msusel/pique-plc-customcode:latest
  2. Results will be generated in the 'output' directory

Funding Agency:

About

A repository to house a PIQUE model that analyzes the quality of custom code that is deployed on (or downloaded to) PLCs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages