InoDrive API Library
Project description
Installation
Install and Update package via pip
pip install CK-InoDrive-API
Usage
Importing Library
# Import InoDrive API library
import CkInoDriveAPI
Create InoDrive Object using WebSocket
# Create instance to InoDrive module object
# Connect by Name
Drive = CkInoDriveAPI.InoDrive(target='Name')
# Connect by Serial Number
Drive = CkInoDriveAPI.InoDrive(target='SN')
# Connect by IP Address
Drive = CkInoDriveAPI.InoDrive(target='IPv4 Address')
# Auto connect
Drive = CkInoDriveAPI.InoDrive(target='IPv4 Address', autoConnect=True)
Read and Write Variable's
# Connect to the drive
Drive.connect()
# Read variable with name 'VariableName'
Drive.UserApp.read_var('VariableName')
# Write variable with name 'VariableName' and value equal to 1
Drive.UserApp.write_var('VariableName', 1)
# Disconnect from the drive
Drive.disconnect()
# Drive object cleanup
Drive.dispose()
Get and Set Output's
# Connect to the drive
Drive.connect()
# Read Output 2
state = Drive.IO.get_output(2)
# Take control of InoDrive module to override output state
Drive.SysControl.take_control(True)
# Set Output 2 to On state
Drive.IO.set_output(2, True)
state = Drive.IO.get_output(2)
# Disable module override
Drive.SysControl.take_control(False)
# Disconnect from the drive
Drive.disconnect()
# Drive object cleanup
Drive.dispose()
Change Module Name (Power cycle InoDrive for changes to take effect)
# Connect to the drive
Drive.connect()
# Read module configuration file
config_file = Drive.File.read_module_config()
# Set new module name
config_file['name'] = "NewName"
# Write configuration changes out
Drive.File.write_module_config(config_file)
# Disconnect from the drive
Drive.disconnect()
# Drive object cleanup
Drive.dispose()
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
CK-InoDrive-API-0.2.9.tar.gz
(44.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file CK-InoDrive-API-0.2.9.tar.gz.
File metadata
- Download URL: CK-InoDrive-API-0.2.9.tar.gz
- Upload date:
- Size: 44.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d92105556e1047d16cf43f06b3bfb410d6227d6d2fcc8f4f6b9a427ac4062503
|
|
| MD5 |
b149458220c37b3be989d6f41ab01626
|
|
| BLAKE2b-256 |
bf97c8dd0173335e68a531a8433f8a4aaf980f7fd127d78597eec08fd3b3639b
|
File details
Details for the file CK_InoDrive_API-0.2.9-py3-none-any.whl.
File metadata
- Download URL: CK_InoDrive_API-0.2.9-py3-none-any.whl
- Upload date:
- Size: 48.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
095888a4fe3f1e2365e9ba32534478e747fcad13b0e96fcd0d777770457f801e
|
|
| MD5 |
a1a2e2e78135bdb93f064cd504c30cc2
|
|
| BLAKE2b-256 |
ac6259cbd65cf70bb478baccf8fe3e1e9c5bb0fb1f020b9025131281bd793e1c
|