def putCtrlConf(self, eleobj, ctrlkey, val, type='raw'):
        """ put the value to control PV field

            :param eleobj: element object in lattice
            :param ctrlkey: element control property, PV name
            :param val: new value for ctrlkey
            :param type: set in 'raw' or 'real' mode, 'raw' by default
                         'raw': set PV with the value of 'val',
                         'real': set PV with the value translated from 'val'
        """
        if ctrlkey in eleobj.ctrlkeys:
            if type == 'raw':
                newval = val
            else:  # val should be translated
                newval = eleobj.unitTrans(val, direction='-')
            epics.caput(eleobj.ctrlinfo[ctrlkey]['pv'], newval)
            return True
        else:
            return False