Documentation

Introduction

Welcome to the PLC Logic Prover docs!

PLC Logic Prover is a tool with a suite of action units which with the right combination allows testing almost any PLC logic. It helps you to improve the quality of your PLC program.

Table of contents

Read about Action Units on Action Unit Docs page.

Getting Started

Definitions

Action Unit - An action which performs a change when the test is running. There are a few types of predefined actions, such as Set Values, Check Values, etc. Action Units have their own. The config has three sections: general section, execution parameters, post execution parameters and save changes button. Not all predefined Action Units have all listed sections. For example, Set Values have a general section, execution parameters and save changes button.

Action Set - is group of Action Units. Action Units can be grouped by user's preference. Action Set specifies execution order Action Units.

Test Case - includes Action Sets and table of PLC Tags. Test Case specifies execution order of Action Sets.

Output Log - is an execution log of results of individual Action Units.

Test Builder - a window to design Test Case.

Test Runner - a window to run Test Case and display Output Log.

Navigating the app

Test Builder

Main window of the app called Test Builder. This window allows creating a test case of the project. The test case consists of Action Sets and Action Units.

Test Builder has the following sections:

  • Toolbar

  • Workspace

  • Statusbar

Toolbar

  1. Project related actions:

    • New - click to create a new Action Unit, Action Set or New Project.

    • Tags - is a page with a list of tags used in the test case.

    • [cube icon] - Project config. It opens a dialog window for project and PLC communication settings.

    • Project Name

  2. External actions:

    • Test Runner button - opens Test Runner window.

Workspace

3. Test Case tree. The case represents order of the actions. The order can be changed by adding Action Units/Sets or by clicking the edit button. Action Sets have "More menu" with the following functions:

    • Add Action Unit

    • Edit

    • Delete

4. The active Action Unit is highlighted and displayed in the configuration panel.

5. Configuration panel. It allows configuring an active Action Unit. Changes configuration panels need to be saved by clicking the Save button.

6. Shows recent result of Action Unit.

Statusbar

Status bar has miscellaneous UI controls on the left and additional information on the right.

  • Left section

    • App configuration - provides options on time delays between PLC comms requests, Action Units and Action Sets.

    • Hide and show the side panel with the test case tree.

  • Right section

    • Spinner - indicates current test is in progress (not shown on the picture).

    • Help section - links to documentation and Github Issue Tracker

Test Runner

The Test Runner window displays log during the test process.

Test Runner has the following sections:

  • Toolbar

  • Output Log

Toolbar

1. Save as text - Allows saving the output log as a text file for the future reference. The file content is an exact copy of the Output Log section. It can include multiple test outputs.

2. This section represents Test Runner status and control:

  • Start Runner / Abort Runner - is a control button to start or stop test execution.

  • [bell icon] - indicates status of Test Runner before execution. If it's red then there are errors in Test Builder and it needs to be fixed before running the test.

Output Log

Top section of the section has a progress bar and indicates its progress. On the right of the section there are count badges of skipped, passed and failed actions and [bin icon] to clear the Output Log.

3. This window shows the log of Test Runner. The log shows which test PASSed and which is FAILed. Read more in Results section below.

Creating first project

To create your first PLC program test project you will need:

  1. PLC Logic Prover

  2. AB PLC - ControlLogic or CompactLogic

    • with an ethernet card

    • without the IO cards or inhibit the entire IO bus (recommended for more test options)

  3. A computer

Final look of the first project

To create your first project you will require the following:

  • Download and install PLC Logic Prover

  • Connect PLC to you PC via Ethernet cable

  • Download a test program to the PLC (backup existing PLC program if necessary)

When the app is started the first time a new project is generated automatically. Follow the next steps to get results on this project.

Creating first Action Set

  • Click New button from toolbar

  • Select Action Set

  • In dialog window give it a name: My First Action Set and press Save

  • In sidebar Test Case tree click three dots [more icon] button to add Action Unit

  • In dialog window select type Set Tag value and give it a name Should set tags

Your first Action Unit is created. Now add tags to your project.

  • Click Tags button from toolbar

  • Click Add button and set name to bool_value

  • Click Add button, set name to int_value and change datatype to INT

In Test Case tree click Action Unit Should set tags:

  • In Execution parameters under Tag name select tag bool_value

  • On the right click [plus icon] and tag name select tag int_value

  • Set next field at the right, Set to value, to 5

  • Click Save button

Set PLC configuration:

  • Click [gear icon] button from toolbar

  • Set project name: My first project

  • Set PLC IP address and CPU slot

Run the test:

  • Click Test Runner button from toolbar

  • In Test Runner window click Start Runner

That's it, you just completed your first simple project with PLC Logic Prover. Now try to add another type of Action Unit, e.g. Check Tag Values and check the values you just set to PLC.


Developing test project

New Project

In this section there are more details on the following sections:

  • Project

  • Tags

  • Action Set

  • Action Unit

Project

A new project is created automatically on the first run. Also it can be created by clicking New button from the toolbar. Heads Up! Creating a new project will overwrite the existing one. Use the export function to save the project into a file.

Project config dialog provides the following parameters:

  • Name of the project

  • PLC IP Address

  • CPU Slot

Tags

Tags page allows creating tags which will be used during configuration of Action Units.


Creating tags from Action Unit config

Tags could be created directly in Action Unit configs. To create a tag type the tag name and click the Create button below. The data type is automatically selected of the last tag used.

Action Set

Action Sets can be created by using the File menu or clicking New button from toolbar.

When adding or editing Action Set there are the following options:

  • Name - this how it will be displayed in the test results.

  • Enable/Disable - when it disabled Action Units of this set won't be executed. The Action Units also won't be checked for validation.

  • Insert before - is an option to change order.

Action Unit


More details on each type of Action Units can be found at detailed page.

Action Units can be added into the Test Case by clicking New button from toolbar or [three dots] icon near Action Sets.

When adding Action Unit there are the following required fields:

  • ActionType - select one of the types described at detailed page.

  • Action Name - a short description of what the action should do. For example, Set a healthy state for sensors or Test overload protection. The name will be displayed in the test results.

  • Add to - select Action Set where the Action Unit will be added.

  • Insert before - is an option to change order in the Action Set.

When Action Unit is added it can be modified via the configuration panel.

Additionally, each Action Unit has more options:

  • Duplicate - it will duplicate the Action Unit and insert it at the next position in the Action Set.

  • Move to - will open a dialog window with options to select Action Set and the position to insert.

  • Delete - will delete the Action Unit. This action cannot be undone.

Run the test

To run the test it requires to open the Test Runner window. Test Runner window can be opened from the program menu Window or by clicking Test Runner from the toolbar. When Test Runner is open click Start Runner to execute the test.

Results

Results displayed in Output Log. Results show the following information:

  • Name of the project.

  • Date and time test started.

  • Generic Action Sets and Action Units - these units are added automatically to the test case, such as Open PLC Connection and Close PLC Connection.

  • Custom Action Sets and Action Units - the units and sets created during the test building process.

  • Action Sets showed with one (1) indent. It has just its name. When Action Set is disabled it displays the name with the description "is disabled".

  • Action Units showed with two (2) indents. As Action Set it has the name and disable description if it is disabled.

  • PASS/FAIL result shown with three (3) indents. Failed action displayed in Red with a [cross] icons when passed are in Green with [check] icon.

  • Action pass condition shown with four (4) indents.

When the test is completed it will log the completion message. See an example below:

--- 62 actions of Conveyor CV01 PLC Test are completed on 3 Jun 2020, 3:38.14 pm

In this example:

  • 62 is number of actions completed. It includes Passed and Failed actions of all types, such as Unite Test, Power Nap, Set Tag Value, etc. However it excludes skipped actions.

  • Conveyor CV01 PLC Test is the name of the current project.

  • 3 Jun 2020, 3:38.14 pm is the date and time when the test has been completed.

Have a question? Post it in Github Issues or send it to alex@controlx.io