Metadata-Version: 2.1
Name: pyldsdk
Version: 0.0.2
Summary: Python Logix Designer SDK
Author-email: aawilliams85 <adair.williams85@gmail.com>
License: MIT License
        
        Copyright (c) 2024 aawilliams85
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Repository, https://github.com/aawilliams85/pyldsdk.git
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pythonnet

# pyldsdk

PyLDSDK (Python Logix Designer SDK) is a simple wrapper for some of the features available in Rockwell Automation's Logix Designer SDK v1.01.00.<br>

Use at your own risk.<br>

## Installation

To install from pip:
```console
pip install pyldsdk
```

To upgrade from pip:
```console
pip install pyldsdk --upgrade
```

Since I cannot redistribute the C# client packaged with the Logix Designer SDK, there is a second step required to get started.  Copy all of the following files to a common directory (ex: C:\\YourDllPath).  Then when using pyldsdk, reference that path (and more specifically the *CSClient.dll) as shown in the Examples section.

There is probably a better way, but I found it easiest to compile any of the SDK's sample projects and copy these from the resulting Debug folder.

```console
FtspAdapter.exe
Google.Protobuf.dll
Grpc.Core.Api.dll
Grpc.Net.Client.dll
Grpc.Net.Common.dll
Microsoft.Extensions.Logging.Abstractions.dll
Newtonsoft.Json.dll
RockwellAutomation.LogixDesigner.LogixProject.CSClient.dll
```

## Basic Examples

Use the download function to transfer an *.ACD file to the PLC:

```python
from pyldsdk import LogixProject
proj = LogixProject('C:\\YourDllPath\\RockwellAutomation.LogixDesigner.LogixProject.CSClient.DLL')
proj.download('C:\\YourFolder\\YourProgram.ACD', 'YourDriver\\YourControllerIpAddress')
```

Use the upload function to transfer an *.ACD file from the PLC:

```python
from pyldsdk import LogixProject
proj = LogixProject('C:\\YourDllPath\\RockwellAutomation.LogixDesigner.LogixProject.CSClient.DLL')
proj.upload_new('C:\\YourFolder\\YourProgram.ACD', 'YourDriver\\YourControllerIpAddress')
```
