pydevmgr-elt


Namepydevmgr-elt JSON
Version 0.5.3 PyPI version JSON
download
home_page
Summary
upload_time2023-09-11 08:13:54
maintainer
docs_urlNone
authorSylvain Guieu
requires_python
licenseCeCILL Free Software License Agreement v2.1
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
This python package is used to handle ELT standard devices directly from python objects and through OPC-UA. 

The package is intended to be used when a full instrument ELT software is not available but scripting needs to be done on devices and using the Low Level ELT software (Running on Beckhoff PLC). 
A good exemple of the use case is making sequences of initialisation and movement of motors for AIT purposes without the
need to buil a high level ELT software. 

The documentation (for version >=0.3) is [here](https://pydevmgr-elt.readthedocs.io/en/latest/index.html)     

Sources are [here](https://github.com/efisoft-elt/pydevmgr_elt)


# Install

```bash
> pip install pydevmgr_elt 
```

From sources :

```bash
> git clone https://github.com/efisoft-elt/pydevmgr_elt
> cd pydevmgr_elt 
> python setup.py install
```


# Basic Usage

(since v0.5)

```python 
from pydevmgr_elt import Motor, wait


with Motor('motor1', address="opc.tcp://192.168.1.11:4840", prefix="MAIN.Motor1") as m1:
    wait(m1.move_abs(7.0,1.0), lag=0.1)
    print( "position is", m1.stat.pos_actual.get() )

```

Can also be done in the old way: 

```python

from pydevmgr_elt import Motor, wait
m1 = Motor('motor1', address="opc.tcp://192.168.1.11:4840", prefix="MAIN.Motor1")

try:
    m1.connect()    
    wait(m1.move_abs(7.0,1.0), lag=0.1)
    print( "position is", m1.stat.pos_actual.get() )
finally:
    m1.disconnect()
```

```python 
from pydevmgr_elt import Motor, DataLink

m1 = Motor('motor1', address="opc.tcp://152.77.134.95:4840", prefix="MAIN.Motor1")

m1_data = Motor.Data() # m1_data is a structure built with default value
m1_dl = DataLink(m1, m1_data) # create a data link use to fill m1_data to real hw values

with m1: # with conexte manager open/close a connection  
    m1_dl.download()
    print( m1_data.stat.pos_actual,   m1_data.stat.pos_error  )
```

Open from an elt yaml configuration file as defined in ELT IFW v3

```python
from pydevmgr_elt import open_elt_device
motor1 = open_elt_device( "tins/motor1.yml" )
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pydevmgr-elt",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Sylvain Guieu",
    "author_email": "sylvain.guieu@univ-grenoble-alpes.fr",
    "download_url": "https://files.pythonhosted.org/packages/e6/7d/9127ec112dd7b0e500b5ac541efb2dfe80e06766bcefc9d92e12cbc9eca7/pydevmgr_elt-0.5.3.tar.gz",
    "platform": null,
    "description": "\nThis python package is used to handle ELT standard devices directly from python objects and through OPC-UA. \n\nThe package is intended to be used when a full instrument ELT software is not available but scripting needs to be done on devices and using the Low Level ELT software (Running on Beckhoff PLC). \nA good exemple of the use case is making sequences of initialisation and movement of motors for AIT purposes without the\nneed to buil a high level ELT software. \n\nThe documentation (for version >=0.3) is [here](https://pydevmgr-elt.readthedocs.io/en/latest/index.html)     \n\nSources are [here](https://github.com/efisoft-elt/pydevmgr_elt)\n\n\n# Install\n\n```bash\n> pip install pydevmgr_elt \n```\n\nFrom sources :\n\n```bash\n> git clone https://github.com/efisoft-elt/pydevmgr_elt\n> cd pydevmgr_elt \n> python setup.py install\n```\n\n\n# Basic Usage\n\n(since v0.5)\n\n```python \nfrom pydevmgr_elt import Motor, wait\n\n\nwith Motor('motor1', address=\"opc.tcp://192.168.1.11:4840\", prefix=\"MAIN.Motor1\") as m1:\n    wait(m1.move_abs(7.0,1.0), lag=0.1)\n    print( \"position is\", m1.stat.pos_actual.get() )\n\n```\n\nCan also be done in the old way: \n\n```python\n\nfrom pydevmgr_elt import Motor, wait\nm1 = Motor('motor1', address=\"opc.tcp://192.168.1.11:4840\", prefix=\"MAIN.Motor1\")\n\ntry:\n    m1.connect()    \n    wait(m1.move_abs(7.0,1.0), lag=0.1)\n    print( \"position is\", m1.stat.pos_actual.get() )\nfinally:\n    m1.disconnect()\n```\n\n```python \nfrom pydevmgr_elt import Motor, DataLink\n\nm1 = Motor('motor1', address=\"opc.tcp://152.77.134.95:4840\", prefix=\"MAIN.Motor1\")\n\nm1_data = Motor.Data() # m1_data is a structure built with default value\nm1_dl = DataLink(m1, m1_data) # create a data link use to fill m1_data to real hw values\n\nwith m1: # with conexte manager open/close a connection  \n    m1_dl.download()\n    print( m1_data.stat.pos_actual,   m1_data.stat.pos_error  )\n```\n\nOpen from an elt yaml configuration file as defined in ELT IFW v3\n\n```python\nfrom pydevmgr_elt import open_elt_device\nmotor1 = open_elt_device( \"tins/motor1.yml\" )\n```\n",
    "bugtrack_url": null,
    "license": "CeCILL Free Software License Agreement v2.1",
    "summary": "",
    "version": "0.5.3",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e67d9127ec112dd7b0e500b5ac541efb2dfe80e06766bcefc9d92e12cbc9eca7",
                "md5": "5f489b64a9bf0cb3fae87e9c1d09bfc2",
                "sha256": "e6a4cb238938101e89c559a50f6697b49a6128d5ebb6b32d77587cc395c191cf"
            },
            "downloads": -1,
            "filename": "pydevmgr_elt-0.5.3.tar.gz",
            "has_sig": false,
            "md5_digest": "5f489b64a9bf0cb3fae87e9c1d09bfc2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 78108,
            "upload_time": "2023-09-11T08:13:54",
            "upload_time_iso_8601": "2023-09-11T08:13:54.887452Z",
            "url": "https://files.pythonhosted.org/packages/e6/7d/9127ec112dd7b0e500b5ac541efb2dfe80e06766bcefc9d92e12cbc9eca7/pydevmgr_elt-0.5.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-11 08:13:54",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pydevmgr-elt"
}
        
Elapsed time: 0.12652s