
set_exec_pars(["name":"newtest"])

tscan(sin, 10, 0.100)


st1 = new ch.psi.pshell.bs.Stream("st1", dispatcher)

/*
s1=st1.addScalar("Int8Scalar", "Int8Scalar", 10, 0)
s2=st1.addScalar("Float64Scalar", "Float64Scalar", 10, 0)
w1=st1.addWaveform("Int32Waveform", "Int32Waveform", 10, 0)
mt1=st1.addMatrix("Int16Waveform", "Int16Waveform", 10, 0, 64, 32)
st1.initialize()
bscan (st1, 10)   
*/


r1 = rscan(inp,[sin,inp] , [[0,5,5], [10,15,20], [20,25,5]] , 0.01, false, passes = 1)  

lscan ([inp,motor], [sin,dev], [0,0], [10,1], 10,0.1,false)



//1D vector scan, plot to 1D Vector tab
vector = [ 1, 3, 5, 10, 25, 40, 45, 47, 49]
vscan(inp,[sin,dev],vector, false, 0.5)

//2D vector scan, plot to 2D Vector tab
vector = [  [1,1] , [1,2] , [1,3] , [1,4]   ,                  
   [1.5,2.5]              ,        
     [2,1] , [2,2] , [2,3] , [2,4]   ,              
       [2.5,2.5]              ,          
  [3,1] , [3,2] , [3,3] , [3,4]     ]
a= vscan([inp,motor],[sin,dev],vector,false, 0.1)    