aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Draxinger <Wolfgang.Draxinger@draxit.de>2011-12-07 15:43:37 +0100
committerWolfgang Draxinger <Wolfgang.Draxinger@draxit.de>2011-12-07 15:43:37 +0100
commitf416eaf4869bcd9eadaddf2f653c352bbe9368ec (patch)
tree77ce93d65c092dbcbdaab73419b9844ee1a29fff
parentf5be4f2d5ee1adfa2d8714f5f28ebd24204ebf57 (diff)
downloadPyPhytron-master.tar.gz
PyPhytron-master.tar.bz2
Phytron.Axis getFullStatus alias getStatus added, execute no longer copies returned status data into instance, status property added insteadHEADmaster
-rw-r--r--Phytron.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/Phytron.py b/Phytron.py
index 8f8ac90..fb478e2 100644
--- a/Phytron.py
+++ b/Phytron.py
@@ -203,13 +203,15 @@ class Axis(object):
"""
result = self.ipcomm.execute(self.ID, cmd)
assert result.ID == self.ID
- self.status = result.status
- if isinstance(result.data, ExtendedStatus):
- self.extended_status = result.data
+# self.status = result.status
+# if isinstance(result.data, ExtendedStatus):
+# self.extended_status = result.data
return result
def getFullStatus(self):
return self.execute("IS?").data
+ status = property(getFullStatus)
+ getStatus = getFullStatus
def gotoAbsolute(self, position):
return self.execute("GA%d" % position).status
@@ -348,27 +350,27 @@ class Axis(object):
return inputs
inputs = property(getInputs)
- def clearDriverError():
+ def clearDriverError(self):
return self.execute("CA").status
- def clearInitiatorError():
+ def clearInitiatorError(self):
return self.execute("CI").status
- def clearOutputError():
+ def clearOutputError(self):
return self.execute("CO").status
- def resetHW():
+ def resetHW(self):
return self.execute("CR").status
- def resetSFI():
+ def resetSFI(self):
return self.execute("CS").status
- def getDriverTemperature():
+ def getDriverTemperature(self):
return int(self.execute("SA?").data)
driver_temperature = property(getDriverTemperature)
- def getDriverCurrent():
+ def getDriverCurrent(self):
return int(self.execute("SC?").data)
driver_current = property(getDriverCurrent)
- def getDriverVoltage():
+ def getDriverVoltage(self):
return int(self.execute("SU?").data)
driver_voltage = property(getDriverVoltage)