I got it working now
#scpiCmd writeDisplayText #pgm#
C1= int(bytes(substring( value ,0,1)))
C2= int(bytes(substring( value ,1,2)))
C3= int(bytes(substring( value ,2,3)))
C4= int(bytes(substring( value ,3,4)))
C5= int(bytes(substring( value ,4,5)))
C6= int(bytes(substring( value ,5,6)))
deviceWrite(handle,"holding 0x17 2");
deviceWrite(handle,"holding 0x05 "+ ((C1<<8)+C2) + " " + ((C3<<8)+C4) + " " + ((C5<<8)+C6) )
I have trouble to understand if I can have an expression in a function or that only variables. It is now both.
Can I do the above without the extra variables C1..C6 ?