function valo=JsetcontrolvalInt(deviceName,prop,val)
%eval(['[dummy,val]=system(''G:\Users\c\ctfop\Public\ctf3emit\release\RPCintf 2 ' elem ' ' prop ' ' num2str(val) ''');'])
% Initialise RDA
javaMethod('setProperty', 'java.lang.System', 'cmw.names', 'abcmw.cern.ch:5020');
rda = cern.cmw.rda.client.RDAService.init();
ccvName = prop;
valueTag = 'value';
cycle = 'SCT:USER:SETUP';

% Create a device handle
device = rda.getDeviceHandle(deviceName);
ccv = device.get(ccvName, cycle);
% Get the value
ccv.insert(valueTag, val);
device.set(ccvName, cycle, ccv);
ccv = device.get(ccvName, cycle);
% Get the value
valo=ccv.extractInt(valueTag);
