Skip to content

Commit fc06cf4

Browse files
committed
Merge branch 'dev'
# Conflicts: # bin/chamberconnectlibrary-test.py # chamberconnectlibrary/espec.py # chamberconnectlibrary/watlowf4t.py # setup.py
2 parents 4348ce1 + e7e3cc6 commit fc06cf4

File tree

12 files changed

+2029
-329
lines changed

12 files changed

+2029
-329
lines changed

.vscode/settings.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
// Place your settings in this file to overwrite default and user settings.
22
{
3-
"python.pythonPath": "C:/Python27/python.exe"
3+
"python.pythonPath": "C:/Python27/python.exe",
4+
"python.autoComplete.extraPaths": [
5+
"${env.SPARK_HOME}\\python",
6+
"${env.SPARK_HOME}\\python\\pyspark"
7+
],
8+
"python.linting.pylintPath": "c:/Python27/Scripts/pylint.exe"
49
}

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
# ChamberConnectLibrary
2-
Python library for interfacing with Espec North America chambers with P300, SCP-220 & Watlow F4T controllers.
2+
Python library for interfacing with Espec North America chambers with P300, SCP-220, Watlow F4T & Watlow F4S/D controllers.
33

44
## Requirements
55
python 2.7.x
66

77
## Installation
88
```pip install chamberconnectlibrary```
99

10+
## Updating
11+
Do to some renaming to make the library pep8 compliant some files have been renamed from version 1.x to 2.0.0.
12+
To ensure that the current version is used uninstall and then reinstall the library:
13+
```pip uninstall chamberconnectlibrary```
14+
```pip install chamberconnectlibrary```
15+
1016
## Testing
1117

1218
To test run chamberconnectlibrary-test.py(on windows using COM port #3, test script is located in Python2.7\Scripts directory)
@@ -17,6 +23,7 @@ SCP-220: ```chamberconnectlibrary-test.py EspecSCP220 Serial \\.\COM3 9600```
1723

1824
Watlow F4T: ```chamberconnectlibrary-test.py WatlowF4T RTU \\.\COM3 38400```
1925

26+
Watlow F4: ```chamberconnectlibrary-test.py WatlowF4 RTU \\.\COM3 19200```
27+
2028
## Documentation
21-
Documentation to be added to github wiki as time permits.
22-
For now see [controllerinterface.py](https://github.com/EspecNorthAmerica/ChamberConnectLibrary/blob/master/ChamberConnectLibrary/controllerinterface.py)
29+
See [controllerinterface.md](controllerinterface.md)

bin/chamberconnectlibrary-test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import traceback
1212
from chamberconnectlibrary.espec import Espec
1313
from chamberconnectlibrary.watlowf4t import WatlowF4T
14+
from chamberconnectlibrary.watlowf4 import WatlowF4
1415

1516
def main(**kwargs):
1617
'''Try each command given a set of parameters'''
@@ -19,6 +20,8 @@ def main(**kwargs):
1920
ctlr = Espec(**kwargs)
2021
elif ctlr_type == 'EspecSCP220':
2122
ctlr = Espec(ctlr_type='SCP220', **kwargs)
23+
elif ctlr_type == 'WatlowF4':
24+
ctlr = WatlowF4(**kwargs)
2225
else:
2326
ctlr = WatlowF4T(**kwargs)
2427
ctlr.process_controller()
@@ -38,7 +41,7 @@ def main(**kwargs):
3841

3942
print '\nThe test could not be run try:'
4043
print '\nchamberconnectlibrary_test controller interface ipORserialport [baudrate]'
41-
print '\tcontroller: "Espec"/"EspecP300" or "EspecSCP220" or "WatlowF4T"'
44+
print '\tcontroller: "Espec"/"EspecP300", "EspecSCP220", "WatlowF4", or "WatlowF4T"(default)'
4245
print '\tinterface: "Serial": Serial connection when "controller" is "Espec".'
4346
print '\t "RTU":Serial connection when "controller" is "WatlowF4T"'
4447
print '\t "TCP":TCP connection'

bin/example.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
'''
2+
examples of using the chamberconnectlibrary
3+
'''
4+
from chamberconnectlibrary.watlowf4 import WatlowF4
5+
6+
LOOP_NAMES = ['Temperature', 'Humidity']
7+
8+
CONTROLLER = WatlowF4(
9+
interface='RTU',
10+
serialport='//./COM7',
11+
baudrate=19200,
12+
loop_names=LOOP_NAMES
13+
)
14+
print CONTROLLER.process_controller()
15+
16+
print '\ncascade loops:'
17+
for i in range(CONTROLLER.cascades):
18+
print CONTROLLER.get_loop(i+1, 'cascade', ['processvalue', 'setpoint'])
19+
20+
print '\nloops:'
21+
for i in range(CONTROLLER.loops):
22+
print CONTROLLER.get_loop(i+1, 'loop', 'processvalue', 'setpoint')
23+
24+
print '\nnamed loops:'
25+
for name in LOOP_NAMES:
26+
print CONTROLLER.get_loop(name, ['processvalue', 'setpoint'])
27+
28+
for name in LOOP_NAMES:
29+
print CONTROLLER.set_loop(name, setpoint=60.0)
30+
31+
print '\noperations:'
32+
print CONTROLLER.get_operation()
33+
CONTROLLER.set_operation('standby')
34+
35+
print '\nEvents:'
36+
for i in range(8):
37+
print CONTROLLER.get_event(i+1)

0 commit comments

Comments
 (0)