CK-InoDrive-API 0.2.8b0__py3-none-any.whl → 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ Copyright 2023 Insight Automation, INC.
2
+
3
+ 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:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ 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.
@@ -0,0 +1,129 @@
1
+ Metadata-Version: 2.1
2
+ Name: CK-InoDrive-API
3
+ Version: 1.0.0
4
+ Summary: InoDrive API Library
5
+ Home-page: https://cardinalkinetic.com
6
+ Author: Cardinal Kinetic
7
+ Author-email: support@cardinalkinetic.com
8
+ License: https://www.cardinalkinetic.com/user-manual/api/inodrive-py
9
+ Project-URL: Documentation, https://www.cardinalkinetic.com/user-manual/api/inodrive-py
10
+ Keywords: InoWorx InoDrive InoSync MotionControl ServoControl
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Operating System :: Microsoft :: Windows
14
+ Classifier: Topic :: Scientific/Engineering
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE.txt
20
+ License-File: README.txt
21
+ Requires-Dist: websocket-client ==1.8.0
22
+ Requires-Dist: ifaddr ==0.2.0
23
+ Requires-Dist: msgpack ==1.0.8
24
+
25
+ #### **Installation**
26
+
27
+ Install and Update package via [pip](https://pip.pypa.io/en/stable/getting-started/)
28
+
29
+ ```
30
+ pip install CK-InoDrive-API
31
+ ```
32
+
33
+ #### **Usage**
34
+
35
+ Importing Library
36
+
37
+ ```python
38
+ # Import InoDrive API library
39
+ import CkInoDriveAPI
40
+ ```
41
+
42
+ Create InoDrive Object using WebSocket
43
+
44
+ ```python
45
+ # Create instance to InoDrive module object
46
+ # Connect by Name
47
+ Drive = CkInoDriveAPI.InoDrive(target='Name')
48
+
49
+ # Connect by Serial Number
50
+ Drive = CkInoDriveAPI.InoDrive(target='SN')
51
+
52
+ # Connect by IP Address
53
+ Drive = CkInoDriveAPI.InoDrive(target='IPv4 Address')
54
+
55
+ # Auto connect
56
+ Drive = CkInoDriveAPI.InoDrive(target='IPv4 Address', autoConnect=True)
57
+ ```
58
+
59
+ Read and Write Variable's
60
+
61
+ ```python
62
+ # Connect to the drive
63
+ Drive.connect()
64
+
65
+ # Read variable with name 'VariableName'
66
+ Drive.UserApp.read_var('VariableName')
67
+
68
+ # Write variable with name 'VariableName' and value equal to 1
69
+ Drive.UserApp.write_var('VariableName', 1)
70
+
71
+ # Disconnect from the drive
72
+ Drive.disconnect()
73
+
74
+ # Drive object cleanup
75
+ Drive.dispose()
76
+ ```
77
+
78
+ Get and Set Output's
79
+
80
+ ```python
81
+ # Connect to the drive
82
+ Drive.connect()
83
+
84
+ # Read Output 2
85
+ state = Drive.IO.get_output(2)
86
+
87
+ # Take control of InoDrive module to override output state
88
+ Drive.SysControl.take_control(True)
89
+
90
+ # Set Output 2 to On state
91
+ Drive.IO.set_output(2, True)
92
+ state = Drive.IO.get_output(2)
93
+
94
+ # Disable module override
95
+ Drive.SysControl.take_control(False)
96
+
97
+ # Disconnect from the drive
98
+ Drive.disconnect()
99
+
100
+ # Drive object cleanup
101
+ Drive.dispose()
102
+ ```
103
+
104
+ Change Module Name (Power cycle InoDrive for changes to take effect)
105
+
106
+ ```python
107
+ # Connect to the drive
108
+ Drive.connect()
109
+
110
+ # Read module configuration file
111
+ config_file = Drive.File.read_module_config()
112
+
113
+ # Set new module name
114
+ config_file['name'] = "NewName"
115
+
116
+ # Write configuration changes out
117
+ Drive.File.write_module_config(config_file)
118
+
119
+ # Disconnect from the drive
120
+ Drive.disconnect()
121
+
122
+ # Drive object cleanup
123
+ Drive.dispose()
124
+ ```
125
+
126
+ #### **Links**
127
+
128
+ - [API Documentation](https://www.cardinalkinetic.com/user-manual/api/inodrive-py)
129
+ - [Company Website](https://www.cardinalkinetic.com)