-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpH-pHStat.js
More file actions
32 lines (29 loc) · 868 Bytes
/
pH-pHStat.js
File metadata and controls
32 lines (29 loc) · 868 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Static parameters set by user
var pHmin = 4.5 // lower bound of pH-stat
/**
* pH regulator using external/additional pump
*
* @script Peristaltic Pump - pH Regulator
* @author CzechGlobe - Department of Adaptive Biotechnologies (JaCe)
* @version 0.1
* @modified 16.2.2017 (JaCe)
*
* @notes For proper function of the script a pump has to be set to ID 4
*
* @param {number} pHmin Min pH/lower bound for pH stat (base) activation
*
* @return Flow of external/additional pump
*
*/
importPackage(java.util)
importPackage(java.lang)
importPackage(Packages.psi.bioreactor.core.protocol)
var ph = Number(theAccessory.getValue())
var pump = theGroup.getAccessory("pumps.pump-4")
if (ph > pHmin) {
//pump.setRunningProtoConfig(ProtoConfig.ON)
pump.setRunningProtoConfig(new ProtoConfig(500))
} else {
pump.setRunningProtoConfig(ProtoConfig.OFF)
}
result = 60