diff --git a/dstat-interface/dstat_comm.py b/dstat-interface/dstat_comm.py index e17b9b062504a35deb40b7576fb2fd4d44766b40..9e2641a758b9d504111abb38ea24f31657fd4475 100644 --- a/dstat-interface/dstat_comm.py +++ b/dstat-interface/dstat_comm.py @@ -266,7 +266,12 @@ class PDExp(Chronoamp): self.commands += "R" self.commands[2] += "1" self.commands[2] += " " - self.commands[2] += str(int(65536-self.parameters['voltage']*(65536./3000))) + + if self.parameters['voltage'] == 0: # Special case where V=0 + self.commands[2] += "65535" + else: + self.commands[2] += str(int( + 65535-(self.parameters['voltage']*(65536./3000)))) self.commands[2] += " " self.commands[2] += str(self.parameters['time']) self.commands[2] += " "