Example #1
0
    def setHolding(self, mode=None, value=None, force=False):
        # print "setHolding", mode, value
        global ivModes
        with self.devLock:
            currentMode = self.getMode()
            if mode is None:
                mode = currentMode
            ivMode = ivModes[mode]  ## determine vc/ic

            if value is None:
                value = self.holding[ivMode]
            else:
                self.holding[ivMode] = value

            if ivMode == ivModes[currentMode] or force:
                mapping = self.getMapping(mode=mode)
                ## override the scale since getChanScale won't necessarily give the correct value
                ## (we may be about to switch modes)
                DAQGeneric.setChanHolding(self, "command", value, mapping=mapping)

            self.sigHoldingChanged.emit("primary", self.holding.copy())
Example #2
0
 def setHolding(self, mode=None, value=None, force=False):
     #print "setHolding", mode, value
     #global ivModes
     with self.devLock:
         currentMode = self.getMode()
         if mode is None:
             mode = currentMode
         ivMode = self.ivModes[mode]  ## determine vc/ic
             
         if value is None:
             value = self.holding[ivMode]
         else:
             self.holding[ivMode] = value
         
         if ivMode == self.ivModes[currentMode] or force:
             mapping = self.getMapping(mode=mode)
             ## override the scale since getChanScale won't necessarily give the correct value
             ## (we may be about to switch modes)
             DAQGeneric.setChanHolding(self, 'command', value, mapping=mapping)
        
         self.sigHoldingChanged.emit('primary', self.holding.copy())
Example #3
0
 def setChanHolding(self, chan, value=None):
     if chan == 'command':
         self.setHolding(value=value)
     else:
         DAQGeneric.setChanHolding(self, chan, value)
Example #4
0
 def setChanHolding(self, chan, value=None):
     if chan == 'command':
         self.setHolding(value=value)
     else:
         DAQGeneric.setChanHolding(self, chan, value)