Git Product home page Git Product logo

bkpads's Introduction

bkpADS

bkpADS provides an Interface between Beckhoff PLCs and a BK Precision 891 LCR meter which communicates via the bkp891 library.

Configuration

bkpADS takes up to two commandline options:

--plc_id TEXT   ADS Id of PLC  [default: 127.0.0.1.1.1]

-c, --com TEXT  Port to use for serial device communication. COMx on Windows
      [required] 

The variables to communicate with the PLC are

GVL.bMeas_start |
The variable name of the flag for activation of a measurement in PLC
GVL

GVL.sMeas_type |
The variable name of the measurement type in PLC GVL - set by PLC


GVL.rMeas_01, GVL.rMeas_02 |
The variable names for the measurement results in PLC GVL - set by the
Script (most measurements return 2 values)

GVL.bMeas_ready |
The variable name of the flag to show completion of measurement

GVL.bMeas_error |
The variable name of the flag signifying an error occurred

GVL.sMeas_errormsg |
The variable name which holds the error message in PLC

The names are configured in settings.py, which you can find in the installation directory.

Type pip show bkpads in a terminal to locate the directory.

Usage

Important: bkpADS expects the PLC to be in Run Mode before it is started. If you want to test different command line parameters, make sure that the PLC is running before you start bkpADS.

To start bkpADS from the PLC, use NT_StartProcess, which needs the TC2_Utilities Library enabled on the PLC. See the following example PLC code:

    PROGRAM MAIN
    VAR
        bStartscript : BOOL := TRUE;
        bBusy : BOOL := FALSE;
        Start_py_script : NT_StartProcess;
    END_VAR

    IF bStartscript = TRUE AND bBusy = FALSE THEN
        Start_py_script(
            NETID := '',
            PATHSTR := 'bkpads',
            DIRNAME := 'C:\Users\Administrator\Desktop',
            COMNDLINE := '-c COM4',
                START := TRUE,
            BUSY => bBusy
        );
        bStartscript := FALSE;
    END_IF

Edit the COMNDLINE parameter to match the serial port of your device.

bkpads's People

Contributors

jpunkt avatar

Watchers

 avatar  avatar

bkpads's Issues

Major Refactoring

At the moment, bkpads is not geared for deployment as a package, like blocklenium.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.