From 85414a7acf5fc7bdd1dc76670f509a703b4a49fe Mon Sep 17 00:00:00 2001 From: Thierry Zamofing Date: Thu, 5 Apr 2018 08:44:37 +0200 Subject: [PATCH] checking coordinate transform --- Readme.md | 183 +++++++++++++++++++++++++++++++++++++++++++- SAR-EXPMX3.subs | 22 +++--- TestTrf.py | 104 +++++++++++++++++++++++++ add_EXPMX3.cmd | 7 +- cfg/MX3_coordTrf.py | 20 ++--- cfg/SAR-EXPMX3.cfg | 18 ++--- cfg/stream.cfg | 26 +++++++ qt/ESB_MX_5cam.ui | 39 ++++++++++ stream.template | 88 +++++++++++++++++++++ 9 files changed, 474 insertions(+), 33 deletions(-) create mode 100755 TestTrf.py create mode 100644 cfg/stream.cfg create mode 100644 stream.template diff --git a/Readme.md b/Readme.md index bc78fe1..ccc17df 100644 --- a/Readme.md +++ b/Readme.md @@ -597,9 +597,15 @@ caput SAR-EXPMX3:ASYN.AOUT '&1;cpx jog1..5=10000;call 16' caput SAR-EXPMX3:debug0 '&1;#1..5j/;cpx call 15' caput SAR-EXPMX3:debug0 '&1;#1..5j/;cpx call 15' -caput SAR-EXPMX3:debug0 '&1;#1..5j/;cpx call 16' +caput SAR-EXPMX3:debug0 '&1;#1..5j/;cpx call 15' +caput SAR-EXPMX3:debug0 '&1;#1..5j/;jog1..5=10000;cpx call 16' +caput SAR-EXPMX3:debug0 '&1;#1..5j/;cpx call 15' +caput SAR-EXPMX3:debug0 '&1;cpx jog1..5=0;call 16' +caput SAR-EXPMX3:debug0 '&1;#1..5j/;cpx call 15' +caput SAR-EXPMX3:debug0 '&1;cpx jog1..5=10000;call 16' + @@ -609,4 +615,179 @@ caput SAR-EXPMX3:ASYN.AOUT cpx call 15 caput SAR-EXPMX3:ASYN.debug cpx call 16 caput SAR-EXPMX3:ASYN.debug0 cpx call 16 + + + +see also: + +/home/zamofing_t/Documents/prj/SwissFEL/epics_ioc_boot_sf/SARES20-CSSU-ESB1/SARES20-CSSU-ESB1_startup.script +/home/zamofing_t/Documents/prj/SwissFEL/epics_ioc_boot_sf/SARES20-CSSU-ESB1/SARES20-CSSU-ESB1_hexpodPI.subs +/home/zamofing_t/Documents/prj/SwissFEL/epics_ioc_boot_sf/SARES20-CSSU-ESB1/hpod.template +/home/zamofing_t/Documents/prj/SwissFEL/epics_ioc_boot_sf/SARES20-CSSU-ESB1/cfg/hpod.proto + + + +caQtDM -macro "P=SAR-EXPMX:,R=asyn" asynRecord.ui +caQtDM -macro "P=SAR-EXPMX:,R=asyn" asynSerialPortSetup.ui +caQtDM -macro "P=SAR-EXPMX:,R=asyn" asynOctet.ui +caQtDM -macro "P=SAR-EXPMX:,R=debug0" asynOctet.ui + + +caput SAR-EXPMX:asyn.AOUT '&1;#1..5j/;cpx call 15' +caput SAR-EXPMX:asyn.AOUT '&1;#1..5j/;cpx call 16' + +caput SAR-EXPMX:debug0 '&1;#1..5j/;cpx call 15' +caput SAR-EXPMX:debug0 '&1;#1..5j/;cpx call 16' + + +caput SAR-EXPMX:debug '&1;#1..5j/;cpx call15;abslinear X(1000)Y(0)U(0)V(0)W(0);call16' + +caget -S SAR-EXPMX:debug0 + +caput SAR-EXPMX:debug0 '&1;#1..5j/;cpx call15;abslinear X(1000)Y(0)U(0)V(0)W(0);call16' +caput SAR-EXPMX:debug0 '&1;#1..5j/;cpx call15;abslinear X(00)Y(0)U(0)V(0)W(0);call16' +caput SAR-EXPMX:debug0 '&1;#1..5j/;cpx call15;abslinear X(1000)Y(0)U(0)V(0)W(0);call16' +caput SAR-EXPMX:debug0 '&1;#1..5j/;cpx call15;abslinear X(00)Y(0)U(0)V(0)W(0);call16' +caput SAR-EXPMX:debug0 '&1;#1..5j/;cpx call15;abslinear X(1000)Y(0)U(0)V(0)W(0);call16' + + +SAR-EXPMX:MOT_GIR_W.SPMG +Plugin: epics3 : loaded & connected +===================================== +Description: Stop +TimeStamp: Apr 04, 2018 11:57:02.623574449 +Type: DBF_ENUM +Count: 1 +Value: 0 +nbStates: 4 +States: + 0 Stop + 1 Pause + 2 Move + 3 Go ``` + + +Check some coord trf 4.4.18 +--------------------------- +``` +$$$*** +!common() +!SAR-EXPMX3() //with !MX3_setup_sim() + + +using trf: +!MX3_coordTrf(exc=5000,height=2000,width=500000,length=1000000,camSf=1.7453292519943296e-05) + +open forward +// define(AA1='L1',AA2='L2',AA3='L3',AA4='L4',AA5='L5') +// define(r='L6',scl='L7') +// define(S1='L11',S2='L12',S3='L13',S4='L14',S5='L15') +// define(X='C6',Y='C7',U='C3',V='C4',W='C5') + L6=2000/500000 + L7=5000/1.41421356237 + L11=L7*sin(L1*1.74532925199e-05) + L12=L7*sin(L2*1.74532925199e-05) + L13=L7*sin(L3*1.74532925199e-05) + L14=L7*sin(L4*1.74532925199e-05) + L15=L7*sin(L5*1.74532925199e-05) + + send 1"fwd_inp(%f) %f %f %f %f %f\n",D0,L1,L2,L3,L4,L5 + send 1"fwd_inp(%f) %f %f %f %f %f\n",D0,L11,L12,L13,L14,L15 + + + //C6=D^-1*S + C6=+.5*L11 -.5*L12 +(L6+.5)*L13 +(L6-.5)*L14 +(.5-L6)*1.41421356237*L15 + C7=+.5*L11 +.5*L12 +.25*L13 +.25*L14 +.25*1.41421356237*L15 + C3= -.5*L13 -.5*L14 +.5*1.41421356237*L15 + C4=-.5*L11 +1.*L12 +1.5*L13 -.5*L14 -.5*1.41421356237*L15 + C5=-.5*L11 -1.*L12 +.5*L13 +.5*L14 +.5*1.41421356237*L15 + + send 1"fwd_res %f %f %f %f %f\n",C6,C7,C3,C4,C5 + + D0=$000000f8; //C3=$8 C4=$10 C5=$20 C6=$40 C7=$80 hex(8+int('10',16)+int('20',16)+int('40',16)+int('80',16)) -> '0xf8' +close + +open inverse +// define(AA1='L1',AA2='L2',AA3='L3',AA4='L4',AA5='L5') +// define(r='L6',scl='L7') +// define(S1='L11',S2='L12',S3='L13',S4='L14',S5='L15') +// define(X='C6',Y='C7',U='C3',V='C4',W='C5') + + //if(D0>0) + // send 1"Velocity calculation NOT SUPPORTED\n" + + send 1"inv_inp(%f) %f %f %f %f %f\n",D0,C6,C7,C3,C4,C5 + + L6=2000/500000 + + L11=+.5*C6 +.5*C7 +(0) *C3 -.5*C4 +.5*C5 + L12=-.5*C6 +.5*C7 +(0) *C3 +.5*C4 +.5*C5 + L13=+.5*C6 +.5*C7 -(.5) *C3 +.5*C4 -.5*C5 + L14=-.5*C6 +.5*C7 -(.5) *C3 -.5*C4 -.5*C5 + L15= .5*1.41421356237*C7 +.5*1.41421356237*C3 -.5*1.41421356237*C5 + + L7=1.41421356237/5000 + L1=asin(L11*L7)/1.74532925199e-05 + L2=asin(L12*L7)/1.74532925199e-05 + L3=asin(L13*L7)/1.74532925199e-05 + L4=asin(L14*L7)/1.74532925199e-05 + L5=asin(L15*L7)/1.74532925199e-05 + + send 1"inv_res %f %f %f %f %f\n",L1,L2,L3,L4,L5 + +close + + + + + + + + + + + + + + + + + + +&1;cpx abs linear;jog1=0;jog2=0;jog3=0;jog4=0;jog5=0 +&1;cpx abs linear;jog1=10000;jog2=20000;jog3=30000;jog4=40000;jog5=50000 + +&1;cpx abs linear;X(1365.89)Y(2879.23)U(-105.071)V(502.495)W(2419.1) + +&1;cpx abs linear;X(-10.000000)Y(200.000000)U(3.00000)V(4.00000)W(5.00000) + + +&1;cpx abs linear;X(0.000000)Y(0.000000)U(0.00000)V(0.00000)W(0.00000) +&1;cpx abs linear;X(-10.000000)Y(200.000000)U(3.00000)V(4.00000)W(5.00000) + + + + +#1..5p + +&1p +pmatch + +fwd_inp(0) 0 0 0 0 0 +fwd_inp(0) 0 0 0 0 0 +fwd_res 0 0 0 0 0 +inv_inp(0) 0 0 0 0 0 +inv_res 0 0 0 0 0 + +fwd_inp(0) 10000 20000 30000 40000 50000 +fwd_inp(0) 613.939 1209.22 1767.77 2272.6 2708.38 +fwd_res 1365.89 2879.23 -105.071 502.495 2419.1 + +fwd_res 1365.89 2879.23 -105.071 502.495 2419.1 +inv_inp(0) 1365.89 2879.23 -105.071 502.495 2419.1 +inv_res 60621.7 38843.4 20130.6 -10620.2 4072.1 + + +``` + diff --git a/SAR-EXPMX3.subs b/SAR-EXPMX3.subs index bba0df0..e142c43 100644 --- a/SAR-EXPMX3.subs +++ b/SAR-EXPMX3.subs @@ -13,19 +13,19 @@ #caget SAROP21-OAPU092:ASYN.TINP #caput SAROP21-OAPU092:ASYN.AOUT '&1;cpx abs;X(-900)Y(10)A(5200)B(5100)' -file stream.template {{P="$(P_M)3", PORT=$(PORT_M)}} +file stream.template {{P="$(P_M)",Q="MOT_GIR_",PORT=$(PORT_M)}} file PPMACMotor.template { pattern { DESC , P , M , PORT , ADDR, DIR, VELO, MRES , PREC, EGU } -{ "Girder 1", "$(P_M)", "MOT_GIR_1", "$(PORT_M)", 1 , 0 , 40 , -0.001, 3 , "deg" } -{ "Girder 2", "$(P_M)", "MOT_GIR_2", "$(PORT_M)", 2 , 0 , 40 , -0.001, 3 , "deg" } -{ "Girder 3", "$(P_M)", "MOT_GIR_3", "$(PORT_M)", 3 , 0 , 40 , -0.001, 3 , "deg" } -{ "Girder 4", "$(P_M)", "MOT_GIR_4", "$(PORT_M)", 4 , 0 , 40 , -0.001, 3 , "deg" } -{ "Girder 5", "$(P_M)", "MOT_GIR_5", "$(PORT_M)", 5 , 0 , 40 , -0.001, 3 , "deg" } -{ "Girder X", "$(P_M)", "MOT_GIR_X", "$(PORT_M)", 9 , 0 , 40 , -0.001, 3 , "mm" } -{ "Girder Y", "$(P_M)", "MOT_GIR_Y", "$(PORT_M)", 10 , 0 , 40 , -0.001, 3 , "mm" } -{ "Girder U", "$(P_M)", "MOT_GIR_U", "$(PORT_M)", 11 , 0 , 40 , -0.001, 3 , "mm" } -{ "Girder V", "$(P_M)", "MOT_GIR_V", "$(PORT_M)", 12 , 0 , 40 , -0.001, 3 , "mm" } -{ "Girder W", "$(P_M)", "MOT_GIR_W", "$(PORT_M)", 13 , 0 , 40 , -0.001, 3 , "mm" } +{ "Girder 1", "$(P_M)", "MOT_GIR_1", "$(PORT_M)", 1 , 0 , 40 , 0.001, 3 , "deg" } +{ "Girder 2", "$(P_M)", "MOT_GIR_2", "$(PORT_M)", 2 , 0 , 40 , 0.001, 3 , "deg" } +{ "Girder 3", "$(P_M)", "MOT_GIR_3", "$(PORT_M)", 3 , 0 , 40 , 0.001, 3 , "deg" } +{ "Girder 4", "$(P_M)", "MOT_GIR_4", "$(PORT_M)", 4 , 0 , 40 , 0.001, 3 , "deg" } +{ "Girder 5", "$(P_M)", "MOT_GIR_5", "$(PORT_M)", 5 , 0 , 40 , 0.001, 3 , "deg" } +{ "Girder X", "$(P_M)", "MOT_GIR_X", "$(PORT_M)", 9 , 0 , 40 , 0.001, 3 , "mm" } +{ "Girder Y", "$(P_M)", "MOT_GIR_Y", "$(PORT_M)", 10 , 0 , 40 , 0.001, 3 , "mm" } +{ "Girder U", "$(P_M)", "MOT_GIR_U", "$(PORT_M)", 11 , 0 , 40 , 0.001, 3 , "mrad" } +{ "Girder V", "$(P_M)", "MOT_GIR_V", "$(PORT_M)", 12 , 0 , 40 , 0.001, 3 , "mrad" } +{ "Girder W", "$(P_M)", "MOT_GIR_W", "$(PORT_M)", 13 , 0 , 40 , 0.001, 3 , "mrad" } } diff --git a/TestTrf.py b/TestTrf.py new file mode 100755 index 0000000..c973739 --- /dev/null +++ b/TestTrf.py @@ -0,0 +1,104 @@ +#!/usr/bin/env python +import os, sys, json +from numpy import sin +from numpy import arcsin as asin +import numpy as np + +def forward(D0,L1,L2,L3,L4,L5): + #define(AA1='L1',AA2='L2',AA3='L3',AA4='L4',AA5='L5') + #define(r='L6',scl='L7') + #define(S1='L11',S2='L12',S3='L13',S4='L14',S5='L15') + #define(X='C6',Y='C7',U='C3',V='C4',W='C5') + L6=2000./500000 + L7=5000/1.41421356237 + L11=L7*sin(L1*1.74532925199e-05) + L12=L7*sin(L2*1.74532925199e-05) + L13=L7*sin(L3*1.74532925199e-05) + L14=L7*sin(L4*1.74532925199e-05) + L15=L7*sin(L5*1.74532925199e-05) + + print("fwd_inp(%f) %f %f %f %f %f"%(D0,L1,L2,L3,L4,L5)) + print("fwd_inp(%f) %f %f %f %f %f"%(D0,L11,L12,L13,L14,L15)) + + + #//C6=D^-1*S + C6=+.5*L11 -.5*L12 +(L6+.25)*L13 +(L6-.75)*L14 +(.25-L6)*1.41421356237*L15 + C7=+.5*L11 +.5*L12 +.25*L13 +.25*L14 +.25*1.41421356237*L15 + C3= +1.*L13 +1.*L14 -1.*1.41421356237*L15 + C4=-1.*L11 +1.*L12 +1.5*L13 -.5*L14 -.5*1.41421356237*L15 + C5=-1.*L11 -1.*L12 +.5*L13 +.5*L14 +.5*1.41421356237*L15 + + print("fwd_res %f %f %f %f %f"%(C6,C7,C3,C4,C5)) + + #Dinv=[[+.5, -.5, +(L6+.25), +(L6-.75), +(.25-L6)*1.41421356237], + # [+.5, +.5, +.25, +.25, +.25*1.41421356237], + # [ 0, 0, +1., +1., -1.*1.41421356237], + # [-1., +1., +1.5, -.5, -.5*1.41421356237], + # [-1., -1., +.5, +.5, +.5*1.41421356237]] + #Dinv=np.matrix(Dinv) + #print(Dinv) + #print(Dinv**-1) + + + #D0=$000000f8; //C3=$8 C4=$10 C5=$20 C6=$40 C7=$80 hex(8+int('10',16)+int('20',16)+int('40',16)+int('80',16)) -> '0xf8' + #close + return (D0,C6,C7,C3,C4,C5) + +def inverse(D0,C6,C7,C3,C4,C5): +#// define(AA1='L1',AA2='L2',AA3='L3',AA4='L4',AA5='L5') +#// define(r='L6',scl='L7') +#// define(S1='L11',S2='L12',S3='L13',S4='L14',S5='L15') +#// define(X='C6',Y='C7',U='C3',V='C4',W='C5') + + #//if(D0>0) + #// send 1"Velocity calculation NOT SUPPORTED\n" + + print("inv_inp(%f) %f %f %f %f %f"%(D0,C6,C7,C3,C4,C5)) + + L6=2000./500000 + + L11=+.5*C6 +.5*C7 +(.25-.5*L6)*C3 -.25*C4 -.25*C5 + L12=-.5*C6 +.5*C7 +(.5*L6-.25)*C3 +.25*C4 -.25*C5 + L13=+.5*C6 +.5*C7 +(.25-.5*L6)*C3 +.25*C4 +.25*C5 + L14=-.5*C6 +.5*C7 +(.25+.5*L6)*C3 -.25*C4 +.25*C5 + L15= .5*1.41421356237*C7 -.25*1.41421356237*C3 +.25*1.41421356237*C5 + + L7=1.41421356237/5000 + L1=asin(L11*L7)/1.74532925199e-05 + L2=asin(L12*L7)/1.74532925199e-05 + L3=asin(L13*L7)/1.74532925199e-05 + L4=asin(L14*L7)/1.74532925199e-05 + L5=asin(L15*L7)/1.74532925199e-05 + + print("inv_res %f %f %f %f %f"%(L1,L2,L3,L4,L5)) + + #D=[[+.5, +.5, +(.25-.5*L6), -.25, -.25], + # [-.5, +.5, +(.5*L6-.25), +.25, -.25], + # [+.5, +.5, +(.25-.5*L6), +.25, +.25], + # [-.5, +.5, +(.25+.5*L6), -.25, +.25], + # [ 0, .5*1.41421356237, -.25*1.41421356237, 0, +.25*1.41421356237]] + + #D=np.matrix(D) + #print(D) + #print(D**-1) + + + return (D0,L1,L2,L3,L4,L5) + +#close + + + +f=forward(0,0,0,0,0,0) +print('') +i=inverse(*f) +print('\n') +f=forward(0,10000,20000,30000,40000,50000) +print('') +i=inverse(*f) + +#SOMETHING IS WRONG IN THE COORD TRF !!! + + + +#inverse(0,0,0,0,0,0) diff --git a/add_EXPMX3.cmd b/add_EXPMX3.cmd index 3fe4106..28f141c 100644 --- a/add_EXPMX3.cmd +++ b/add_EXPMX3.cmd @@ -40,8 +40,11 @@ powerPmacSetCustomMotion $(PORT) 13 1 # Load databse dbLoadTemplate("$(ESB_MX_TEMPLATES)/$(P)3.subs", "PORT_M=$(PORT),P_M=$(P)") -var streamError 1 -#var streamDebug 1 epicsEnvSet STREAM_PROTOCOL_PATH, $(STREAM_PROTOCOL_PATH):$(ESB_MX_DIR) +#asynSetTraceMask("$(PORT)", -1, 0x6) +#asynSetTraceIOMask("$(PORT)", -1, 0x2) +var streamError 1 +#var streamDebug 1 + diff --git a/cfg/MX3_coordTrf.py b/cfg/MX3_coordTrf.py index a8ee034..be5638b 100644 --- a/cfg/MX3_coordTrf.py +++ b/cfg/MX3_coordTrf.py @@ -73,11 +73,11 @@ open forward //X=D^-1*S - X=+.5*S1 -.5*S2 +(r+.5)*S3 +(r-.5)*S4 +(.5-r)*$sqrt2*S5 - Y=+.5*S1 +.5*S2 +.25*S3 +.25*S4 +.25*$sqrt2*S5 - U= -.5*S3 -.5*S4 +.5*$sqrt2*S5 - V=-.5*S1 +1.*S2 +1.5*S3 -.5*S4 -.5*$sqrt2*S5 - W=-.5*S1 -1.*S2 +.5*S3 +.5*S4 +.5*$sqrt2*S5 + X=+.5*S1 -.5*S2 +(r+.25)*S3 +(r-.75)*S4 +(.25-r)*$sqrt2*S5 + Y=+.5*S1 +.5*S2 +.25*S3 +.25*S4 +.25*$sqrt2*S5 + U= +1.*S3 +1.*S4 -1.*$sqrt2*S5 + V=-1.*S1 +1.*S2 +1.5*S3 -.5*S4 -.5*$sqrt2*S5 + W=-1.*S1 -1.*S2 +.5*S3 +.5*S4 +.5*$sqrt2*S5 send 1"fwd_res %f %f %f %f %f\\n",X,Y,U,V,W @@ -97,11 +97,11 @@ open inverse r=$height/$width - S1=+.5*X +.5*Y +(0) *U -.5*V +.5*W - S2=-.5*X +.5*Y +(0) *U +.5*V +.5*W - S3=+.5*X +.5*Y -(.5) *U +.5*V -.5*W - S4=-.5*X +.5*Y -(.5) *U -.5*V -.5*W - S5= .5*$sqrt2*Y +.5*$sqrt2*U -.5*$sqrt2*W + S1=+.5*X +.5*Y +(.25-.5*r)*U -.25*V -.25*W + S2=-.5*X +.5*Y +(.5*r-.25)*U +.25*V -.25*W + S3=+.5*X +.5*Y +(.25-.5*r)*U +.25*V +.25*W + S4=-.5*X +.5*Y +(.25+.5*r)*U -.25*V +.25*W + S5= .5*$sqrt2*Y -.25*$sqrt2*U +.25*$sqrt2*W scl=$sqrt2/$exc AA1=asin(S1*scl)/$camSf diff --git a/cfg/SAR-EXPMX3.cfg b/cfg/SAR-EXPMX3.cfg index cc0a7e3..5fc3e29 100644 --- a/cfg/SAR-EXPMX3.cfg +++ b/cfg/SAR-EXPMX3.cfg @@ -1,6 +1,6 @@ -!MX3_setup() -//!MX3_setup_sim() // comment out !MX3_setup() when this is active +X3_setup() +!MX3_setup_sim() // comment out !MX3_setup() when this is active //!MX3_home() //using 360000 for 1 rev. -> 1.7453292519943296e-05=np.pi/180000 //excentricity= 5mm @@ -17,16 +17,16 @@ Coord[1].Tm=-10000 //1000um/FeedTime -> 1mm/sec Coord[1].FeedTime=1000 //default value 1000um -Motor[1].InPosBand=10 -Motor[2].InPosBand=10 -Motor[3].InPosBand=10 -Motor[4].InPosBand=10 -Motor[5].InPosBand=10 + + //motor current off (as cpxcall 16) +Motor[1].IdCmd=0;Motor[1].InPosBand=10 +Motor[2].IdCmd=0;Motor[2].InPosBand=10 +Motor[3].IdCmd=0;Motor[3].InPosBand=10 +Motor[4].IdCmd=0;Motor[4].InPosBand=10 +Motor[5].IdCmd=0;Motor[5].InPosBand=10 #1..5hmz #1..5j/ &1 -cpx call 16 //lock brakes, motor current off - diff --git a/cfg/stream.cfg b/cfg/stream.cfg new file mode 100644 index 0000000..59b243d --- /dev/null +++ b/cfg/stream.cfg @@ -0,0 +1,26 @@ +# Author : zamofing_t + +#Terminator = CR; +#ExtraInput = Ignore; +WaitDelay = 40; +WriteTimeout = 500; +ReplyTimeout = 4000; +#ReadTimeout = 500; + +# ---------------- debug DEBUG debug DEBUG----------- # + +debug { + out "%s";wait $WaitDelay; in "%#s" +} + +#same as debug but without readback +debug0 { + out "%s"; +} +# end + +moveXYUVW { + out "cpx abs linear;call 15; X(%(\$1X.VAL)f)Y(%(\$1Y.VAL)f)U(%(\$1U.VAL)f)V(%(\$1V.VAL)f)W(%(\$1W.VAL)f);call 16"; + wait $WaitDelay; + in "%#s" +} \ No newline at end of file diff --git a/qt/ESB_MX_5cam.ui b/qt/ESB_MX_5cam.ui index 91a51f0..ff36a1c 100644 --- a/qt/ESB_MX_5cam.ui +++ b/qt/ESB_MX_5cam.ui @@ -3571,6 +3571,45 @@ P=$(P),M=MOT_GIR_W + + + + 610 + 350 + 120 + 31 + + + + EPushButton::WidthAndHeight + + + $(P):MOVE_XYUVW + + + MOVE XYUVW + + + + 88 + 52 + 15 + + + + + 187 + 187 + 187 + + + + 1 + + + caMessageButton::Alarm + + diff --git a/stream.template b/stream.template new file mode 100644 index 0000000..abfa942 --- /dev/null +++ b/stream.template @@ -0,0 +1,88 @@ +#! Generated by VisualDCT v2.6 +#! DBDSTART +#! DBD("/home/zamofing_t/Documents/prj/SwissFEL/test_ioc/MasterDBD/dbd/test.dbd") +#! DBDEND + + +#record(motor, "$(P):$(Q)X") {} +#record(motor, "$(P):$(Q)Y") {} +#record(motor, "$(P):$(Q)U") {} +#record(motor, "$(P):$(Q)V") {} +#record(motor, "$(P):$(Q)W") {} + +record(calc, $(P):5CAM_X) { + field(CALC, "A/B") + field(INPA, "$(P):$(Q)X.VAL") + field(INPB, "$(P):$(Q)X.MRES") +} + +record(calc, $(P):5CAM_Y) { + field(CALC, "A/B") + field(INPA, "$(P):$(Q)Y.VAL") + field(INPB, "$(P):$(Q)Y.MRES") +} + +record(calc, $(P):5CAM_U) { + field(CALC, "A/B") + field(INPA, "$(P):$(Q)U.VAL") + field(INPB, "$(P):$(Q)U.MRES") +} + +record(calc, $(P):5CAM_V) { + field(CALC, "A/B") + field(INPA, "$(P):$(Q)V.VAL") + field(INPB, "$(P):$(Q)V.MRES") +} + +record(calc, $(P):5CAM_W) { + field(CALC, "A/B") + field(INPA, "$(P):$(Q)W.VAL") + field(INPB, "$(P):$(Q)W.MRES") +} + +# record(asyn, "$(P):asyn") { +# field(DESC, "asyn record") +# field(PORT, "$(PORT)") +# } + +#record (stringout, "$(P):debug") is limited to 40 characters therefore use waveform record +record(waveform, "$(P):debug") { + field(DESC, "debug") + field(FTVL, "CHAR") + field(NELM, "256") + field(DTYP, "stream") + field(INP, "@stream.cfg debug $(PORT)") +} + +# # debug0 does not expect a response +# record(waveform, "$(P):debug0") { +# field(FTVL, "CHAR") +# field(NELM, "256") +# field(DESC, "debug") +# field(DTYP, "stream") +# field(INP, "@stream.cfg debug0 $(PORT)") +# } + +record(bo, "$(P):MOVE_XYUVW") { + field(DESC, "move complex") + field(DTYP, "stream") + field(OUT, "@stream.cfg moveXYUVW($(P):5CAM_) $(PORT)") +} + + +#! Further lines contain data used by VisualDCT +#! View(0,0,1.0) +#! Record("$(P):MOT_GIR1",20,23,0,0,"$(P):MOT_GIR1") +#! Field("$(P):MOT_GIR1.VAL",16777215,1,"$(P):MOT_GIR1.VAL") +#! Field("$(P):MOT_GIR1.MRES",16777215,1,"$(P):MOT_GIR1.MRES") +#! Record("$(P):MOT_GIR2",260,23,0,0,"$(P):MOT_GIR2") +#! Record("$(P):MOT_GIR3",500,23,0,0,"$(P):MOT_GIR3") +#! Record("$(P):MOT_GIR4",740,23,0,0,"$(P):MOT_GIR4") +#! Record("$(P):MOT_GIR5",980,23,0,0,"$(P):MOT_GIR5") +#! Record("$(P):debug",1220,14,0,0,"$(P):debug") +#! Record("$(P):MOVE_XYUVW",1460,22,0,0,"$(P):MOVE_XYUVW") +#! Record(M1,300,202,0,1,"M1") +#! Field("M1.INPA",16777215,0,"M1.INPA") +#! Link("M1.INPA","$(P):MOT_GIR1.VAL") +#! Field("M1.INPB",16777215,0,"M1.INPB") +#! Link("M1.INPB","$(P):MOT_GIR1.MRES")