Example #1
0
 def psSetCurrent(self, newCurrent):
     if newCurrent is not None:
         if not isinstance(newCurrent, Value):
             newCurrent = Value(float(newCurrent), 'A')
         self.psCurrent = newCurrent.inUnitsOf('A')
         self.psCurrent = max(-CURRENT_LIMIT, min(CURRENT_LIMIT, self.psCurrent))
     return self.psCurrent
Example #2
0
 def psSetCurrent(self, newCurrent):
     if newCurrent is not None:
         if not isinstance(newCurrent, Value):
             newCurrent = Value(float(newCurrent), 'A')
         self.psCurrent = newCurrent.inUnitsOf('A')
         self.psCurrent = max(-CURRENT_LIMIT,
                              min(CURRENT_LIMIT, self.psCurrent))
     return self.psCurrent
Example #3
0
 def current(self, current=None):
     ''' change the current setpoint. '''
     if current is None:
         return self.setCurrent
     if not isinstance(current, Value):
         current = Value(float(current), 'A')
     self.setCurrent = current.inUnitsOf('A')
     self.setCurrent = max(-CURRENT_LIMIT, min(CURRENT_LIMIT, self.setCurrent))
     return self.setCurrent
Example #4
0
 def current(self, current=None):
     ''' change the current setpoint. '''
     if current is None:
         return self.setCurrent
     if not isinstance(current, Value):
         current = Value(float(current), 'A')
     self.setCurrent = current.inUnitsOf('A')
     self.setCurrent = max(-CURRENT_LIMIT,
                           min(CURRENT_LIMIT, self.setCurrent))
     return self.setCurrent