diff --git a/bin/linux-x86_64/eib b/bin/linux-x86_64/eib index 501ca72..87ae090 100755 Binary files a/bin/linux-x86_64/eib and b/bin/linux-x86_64/eib differ diff --git a/db/CHANNEL.template b/db/CHANNEL.template index cea0366..4558208 100644 --- a/db/CHANNEL.template +++ b/db/CHANNEL.template @@ -61,6 +61,15 @@ record(longin, "EIB:CH_$(CH)_REFACTIVE") field(INP, "@CH_$(CH)_REFACTIVE") field(PINI, "1") } +record(longin, "EIB:CH_$(CH)_heycomp") +{ + field(DESC, "channel 0 homed") + field(SCAN, "Event") + field(EVNT, "81") + field(DTYP, "EIB li") + field(INP, "@CH_$(CH)_HEYCOMP") + field(PINI, "1") +} #............... mbbi .................. @@ -71,6 +80,16 @@ record(mbbi,"EIB:CH_$(CH)_REFACTIVES") field(ZRST, "") field(ONST, "WaitforRef") } +#............... mbbo .................. + +record(mbbo,"EIB:CH_$(CH)_HEYCOMPS") +{ + field(DTYP, "Soft Channel") + field(OUT, "EIB:CH_$(CH)_HEYCOMP CPP") + field(ZRST, "Off") + field(ONST, "On") +# field(FLNK, "EIB:CH_$(CH)_HEYCOMP") +} #............... longout .................. @@ -95,6 +114,13 @@ record(longout, "EIB:CH_$(CH)_ADDPOINTS") field(OUT, "@CH_$(CH)_ADDPOINTS") field(PINI, "1") } +record(longout, "EIB:CH_$(CH)_HEYCOMP") +{ + field(DESC, "channel 0 homed") + field(DTYP, "EIB lo") + field(OUT, "@CH_$(CH)_HEYCOMP") + field(PINI, "1") +} #............... string .................. record(stringin, "EIB:CH_$(CH)_NAME") @@ -133,4 +159,13 @@ record(seq, "EIB:CH_$(CH)_SETSCAN") field(DOL1, "EIB:CH_$(CH)_ADC00.SCAN CP") field(LNK1, "EIB:CH_$(CH)_ADC90.SCAN") } +record(waveform, "EIB:CH_$(CH)_CORRECTION") +{ + field(SCAN, "Passive") + field(DTYP, "EIB wf") + field(INP, "@CH_$(CH)_CORRECTION") + field(FTVL, "LONG") + field(NELM, "1024") + field(PREC, "0") +} diff --git a/eibApp/Db/CHANNEL.template b/eibApp/Db/CHANNEL.template index cea0366..4558208 100644 --- a/eibApp/Db/CHANNEL.template +++ b/eibApp/Db/CHANNEL.template @@ -61,6 +61,15 @@ record(longin, "EIB:CH_$(CH)_REFACTIVE") field(INP, "@CH_$(CH)_REFACTIVE") field(PINI, "1") } +record(longin, "EIB:CH_$(CH)_heycomp") +{ + field(DESC, "channel 0 homed") + field(SCAN, "Event") + field(EVNT, "81") + field(DTYP, "EIB li") + field(INP, "@CH_$(CH)_HEYCOMP") + field(PINI, "1") +} #............... mbbi .................. @@ -71,6 +80,16 @@ record(mbbi,"EIB:CH_$(CH)_REFACTIVES") field(ZRST, "") field(ONST, "WaitforRef") } +#............... mbbo .................. + +record(mbbo,"EIB:CH_$(CH)_HEYCOMPS") +{ + field(DTYP, "Soft Channel") + field(OUT, "EIB:CH_$(CH)_HEYCOMP CPP") + field(ZRST, "Off") + field(ONST, "On") +# field(FLNK, "EIB:CH_$(CH)_HEYCOMP") +} #............... longout .................. @@ -95,6 +114,13 @@ record(longout, "EIB:CH_$(CH)_ADDPOINTS") field(OUT, "@CH_$(CH)_ADDPOINTS") field(PINI, "1") } +record(longout, "EIB:CH_$(CH)_HEYCOMP") +{ + field(DESC, "channel 0 homed") + field(DTYP, "EIB lo") + field(OUT, "@CH_$(CH)_HEYCOMP") + field(PINI, "1") +} #............... string .................. record(stringin, "EIB:CH_$(CH)_NAME") @@ -133,4 +159,13 @@ record(seq, "EIB:CH_$(CH)_SETSCAN") field(DOL1, "EIB:CH_$(CH)_ADC00.SCAN CP") field(LNK1, "EIB:CH_$(CH)_ADC90.SCAN") } +record(waveform, "EIB:CH_$(CH)_CORRECTION") +{ + field(SCAN, "Passive") + field(DTYP, "EIB wf") + field(INP, "@CH_$(CH)_CORRECTION") + field(FTVL, "LONG") + field(NELM, "1024") + field(PREC, "0") +} diff --git a/eibApp/adl/EIB.adl b/eibApp/adl/EIB.adl index 7742c99..5c1d99e 100644 --- a/eibApp/adl/EIB.adl +++ b/eibApp/adl/EIB.adl @@ -5,10 +5,10 @@ file { } display { object { - x=2266 - y=88 + x=1273 + y=169 width=1130 - height=799 + height=1000 } clr=14 bclr=4 @@ -233,117 +233,6 @@ text { limits { } } -polyline { - object { - x=0 - y=739 - width=1128 - height=2 - } - "basic attribute" { - clr=14 - width=2 - } - points { - (1,740) - (1127,740) - } -} -text { - object { - x=210 - y=749 - width=90 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Connect" -} -"text update" { - object { - x=291 - y=749 - width=10 - height=20 - } - monitor { - chan="EIB:connect" - clr=14 - bclr=4 - } - limits { - } -} -"text update" { - object { - x=210 - y=774 - width=100 - height=20 - } - monitor { - chan="EIB:connectS" - clr=14 - bclr=4 - } - limits { - } -} -composite { - object { - x=10 - y=749 - width=80 - height=45 - } - "composite name"="" - children { - "text update" { - object { - x=67 - y=749 - width=10 - height=20 - } - monitor { - chan="EIB:cdbg" - clr=14 - bclr=4 - } - limits { - } - } - text { - object { - x=10 - y=749 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="cdbg" - align="horiz. centered" - } - "choice button" { - object { - x=10 - y=774 - width=80 - height=20 - } - control { - chan="EIB:CDBG" - clr=14 - bclr=4 - } - stacking="column" - } - } -} text { object { x=33 @@ -356,105 +245,6 @@ text { } textix="EIB741" } -text { - object { - x=110 - y=749 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="rdbg" - align="horiz. centered" -} -"text update" { - object { - x=167 - y=749 - width=10 - height=20 - } - monitor { - chan="EIB:rdbg" - clr=14 - bclr=4 - } - limits { - } -} -"choice button" { - object { - x=110 - y=774 - width=80 - height=20 - } - control { - chan="EIB:RDBG" - clr=14 - bclr=4 - } - stacking="column" -} -text { - object { - x=325 - y=749 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="verbose" - align="horiz. centered" -} -"text update" { - object { - x=387 - y=749 - width=10 - height=20 - } - monitor { - chan="EIB:verbose" - clr=14 - bclr=4 - } - limits { - } -} -"choice button" { - object { - x=325 - y=774 - width=80 - height=20 - } - control { - chan="EIB:VERBOSE" - clr=14 - bclr=4 - } - stacking="column" -} -"message button" { - object { - x=10 - y=660 - width=100 - height=25 - } - control { - chan="EIB:CLEARERROR" - clr=14 - bclr=5 - } - label="ClearMsg" - press_msg="1" -} text { object { x=795 @@ -978,160 +768,6 @@ composite { bclr=4 label="-STATUS" } -composite { - object { - x=870 - y=194 - width=201 - height=23 - } - "composite name"="" - children { - "related display" { - object { - x=870 - y=194 - width=67 - height=20 - } - display[0] { - label="STATUS" - name="STATUS.adl" - args="CH=1" - } - clr=14 - bclr=4 - label="-STATUS" - } - text { - object { - x=970 - y=197 - width=101 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="calc" - calc="(A >>1)&0x1" - chan="EIB:CH_1_STATUS" - } - textix="No signal" - } - } -} -"related display" { - object { - x=870 - y=234 - width=67 - height=20 - } - display[0] { - label="STATUS" - name="STATUS.adl" - args="CH=2" - } - clr=14 - bclr=4 - label="-STATUS" -} -text { - object { - x=970 - y=237 - width=101 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="calc" - calc="(A >>1)&0x1" - chan="EIB:CH_2_STATUS" - } - textix="No signal" -} -"related display" { - object { - x=870 - y=274 - width=67 - height=20 - } - display[0] { - label="STATUS" - name="STATUS.adl" - args="CH=3" - } - clr=14 - bclr=4 - label="-STATUS" -} -text { - object { - x=970 - y=277 - width=101 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="calc" - calc="(A >>1)&0x1" - chan="EIB:CH_3_STATUS" - } - textix="No signal" -} -composite { - object { - x=870 - y=154 - width=201 - height=21 - } - "composite name"="" - children { - text { - object { - x=970 - y=155 - width=101 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="calc" - calc="(A >>1)&0x1" - chan="EIB:CH_0_STATUS" - } - textix="No signal" - } - "related display" { - object { - x=870 - y=154 - width=67 - height=20 - } - display[0] { - label="STATUS" - name="STATUS.adl" - args="CH=0" - } - clr=14 - bclr=4 - label="-STATUS" - } - } -} "cartesian plot" { object { x=10 @@ -1816,93 +1452,6 @@ text { limits { } } -"shell command" { - object { - x=1010 - y=710 - width=110 - height=25 - } - command[0] { - label="Start SoftIOC" - name="xterm -fa 'Monospace' -fs 10 -bg darkblue -fg white -T EIBapp -e" - args="'cd /afs/psi.ch/user/f/follath_r/progs/eib/eibApp/adl; ./start'&" - } - clr=14 - bclr=4 - label="- StartSoftIOC" -} -"message button" { - object { - x=1011 - y=680 - width=110 - height=25 - } - control { - chan="EIB:AKTION" - clr=14 - bclr=4 - } - label="StopSoftIOC" - press_msg="99" -} -composite { - object { - x=120 - y=661 - width=450 - height=55 - } - "composite name"="" - children { - "text update" { - object { - x=120 - y=701 - width=450 - height=15 - } - monitor { - chan="EIB:errortext2" - clr=20 - bclr=4 - } - limits { - } - } - "text update" { - object { - x=120 - y=661 - width=450 - height=15 - } - monitor { - chan="EIB:errortext0" - clr=20 - bclr=4 - } - limits { - } - } - "text update" { - object { - x=120 - y=681 - width=450 - height=15 - } - monitor { - chan="EIB:errortext1" - clr=20 - bclr=4 - } - limits { - } - } - } -} composite { object { x=810 @@ -2362,3 +1911,710 @@ text { textix="Update" align="horiz. centered" } +composite { + object { + x=0 + y=860 + width=1128 + height=134 + } + "composite name"="" + children { + text { + object { + x=210 + y=949 + width=90 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Connect" + } + "text update" { + object { + x=291 + y=949 + width=10 + height=20 + } + monitor { + chan="EIB:connect" + clr=14 + bclr=4 + } + limits { + } + } + "text update" { + object { + x=210 + y=974 + width=100 + height=20 + } + monitor { + chan="EIB:connectS" + clr=14 + bclr=4 + } + limits { + } + } + composite { + object { + x=10 + y=949 + width=80 + height=45 + } + "composite name"="" + children { + "text update" { + object { + x=67 + y=949 + width=10 + height=20 + } + monitor { + chan="EIB:cdbg" + clr=14 + bclr=4 + } + limits { + } + } + text { + object { + x=10 + y=949 + width=50 + height=20 + } + "basic attribute" { + clr=14 + } + textix="cdbg" + align="horiz. centered" + } + "choice button" { + object { + x=10 + y=974 + width=80 + height=20 + } + control { + chan="EIB:CDBG" + clr=14 + bclr=4 + } + stacking="column" + } + } + } + text { + object { + x=110 + y=949 + width=50 + height=20 + } + "basic attribute" { + clr=14 + } + textix="rdbg" + align="horiz. centered" + } + "text update" { + object { + x=167 + y=949 + width=10 + height=20 + } + monitor { + chan="EIB:rdbg" + clr=14 + bclr=4 + } + limits { + } + } + "choice button" { + object { + x=110 + y=974 + width=80 + height=20 + } + control { + chan="EIB:RDBG" + clr=14 + bclr=4 + } + stacking="column" + } + text { + object { + x=325 + y=949 + width=50 + height=20 + } + "basic attribute" { + clr=14 + } + textix="verbose" + align="horiz. centered" + } + "text update" { + object { + x=387 + y=949 + width=10 + height=20 + } + monitor { + chan="EIB:verbose" + clr=14 + bclr=4 + } + limits { + } + } + "choice button" { + object { + x=325 + y=974 + width=80 + height=20 + } + control { + chan="EIB:VERBOSE" + clr=14 + bclr=4 + } + stacking="column" + } + "message button" { + object { + x=10 + y=860 + width=100 + height=25 + } + control { + chan="EIB:CLEARERROR" + clr=14 + bclr=5 + } + label="ClearMsg" + press_msg="1" + } + "shell command" { + object { + x=1010 + y=910 + width=110 + height=25 + } + command[0] { + label="Start SoftIOC" + name="xterm -fa 'Monospace' -fs 10 -bg darkblue -fg white -T EIBapp -e" + args="'cd /afs/psi.ch/user/f/follath_r/progs/eib/eibApp/adl; ./start'&" + } + clr=14 + bclr=4 + label="- StartSoftIOC" + } + "message button" { + object { + x=1011 + y=880 + width=110 + height=25 + } + control { + chan="EIB:AKTION" + clr=14 + bclr=4 + } + label="StopSoftIOC" + press_msg="99" + } + composite { + object { + x=120 + y=861 + width=450 + height=55 + } + "composite name"="" + children { + "text update" { + object { + x=120 + y=901 + width=450 + height=15 + } + monitor { + chan="EIB:errortext2" + clr=20 + bclr=4 + } + limits { + } + } + "text update" { + object { + x=120 + y=861 + width=450 + height=15 + } + monitor { + chan="EIB:errortext0" + clr=20 + bclr=4 + } + limits { + } + } + "text update" { + object { + x=120 + y=881 + width=450 + height=15 + } + monitor { + chan="EIB:errortext1" + clr=20 + bclr=4 + } + limits { + } + } + } + } + polyline { + object { + x=0 + y=939 + width=1128 + height=2 + } + "basic attribute" { + clr=14 + width=2 + } + points { + (1,940) + (1127,940) + } + } + } +} +"cartesian plot" { + object { + x=570 + y=650 + width=270 + height=200 + } + plotcom { + xlabel="index" + ylabel="correction" + clr=14 + bclr=4 + } + trace[0] { + ydata="EIB:CH_2_CORRECTION" + data_clr=53 + yaxis=0 + yside=0 + } + x_axis { + rangeStyle="user-specified" + maxRange=1024.000000 + } + y1_axis { + minRange=-100.000000 + maxRange=100.000000 + } +} +"cartesian plot" { + object { + x=290 + y=650 + width=270 + height=200 + } + plotcom { + xlabel="index" + ylabel="correction" + clr=14 + bclr=4 + } + trace[0] { + ydata="EIB:CH_1_CORRECTION" + data_clr=53 + yaxis=0 + yside=0 + } + x_axis { + rangeStyle="user-specified" + maxRange=1024.000000 + } + y1_axis { + minRange=-100.000000 + maxRange=100.000000 + } +} +"cartesian plot" { + object { + x=10 + y=650 + width=270 + height=200 + } + plotcom { + xlabel="index" + ylabel="correction" + clr=14 + bclr=4 + } + trace[0] { + ydata="EIB:CH_0_CORRECTION" + data_clr=53 + yaxis=0 + yside=0 + } + x_axis { + rangeStyle="user-specified" + maxRange=1024.000000 + } + y1_axis { + minRange=-100.000000 + maxRange=100.000000 + } +} +"cartesian plot" { + object { + x=850 + y=650 + width=270 + height=200 + } + plotcom { + xlabel="index" + ylabel="correction" + clr=14 + bclr=4 + } + trace[0] { + ydata="EIB:CH_3_CORRECTION" + data_clr=53 + yaxis=0 + yside=0 + } + x_axis { + rangeStyle="user-specified" + maxRange=1024.000000 + } + y1_axis { + minRange=-100.000000 + maxRange=100.000000 + } +} +text { + object { + x=940 + y=120 + width=60 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Compensation" + align="horiz. centered" +} +composite { + object { + x=1020 + y=155 + width=101 + height=142 + } + "composite name"="" + children { + text { + object { + x=1020 + y=155 + width=101 + height=20 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="calc" + calc="(A >>1)&0x1" + chan="EIB:CH_0_STATUS" + } + textix="No signal" + } + text { + object { + x=1020 + y=197 + width=101 + height=20 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="calc" + calc="(A >>1)&0x1" + chan="EIB:CH_1_STATUS" + } + textix="No signal" + } + text { + object { + x=1020 + y=237 + width=101 + height=20 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="calc" + calc="(A >>1)&0x1" + chan="EIB:CH_2_STATUS" + } + textix="No signal" + } + text { + object { + x=1020 + y=277 + width=101 + height=20 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="calc" + calc="(A >>1)&0x1" + chan="EIB:CH_3_STATUS" + } + textix="No signal" + } + } +} +"related display" { + object { + x=860 + y=192 + width=67 + height=20 + } + display[0] { + label="STATUS" + name="STATUS.adl" + args="CH=1" + } + clr=14 + bclr=4 + label="-STATUS" +} +"related display" { + object { + x=860 + y=152 + width=67 + height=20 + } + display[0] { + label="STATUS" + name="STATUS.adl" + args="CH=0" + } + clr=14 + bclr=4 + label="-STATUS" +} +"related display" { + object { + x=860 + y=232 + width=67 + height=20 + } + display[0] { + label="STATUS" + name="STATUS.adl" + args="CH=2" + } + clr=14 + bclr=4 + label="-STATUS" +} +"related display" { + object { + x=860 + y=272 + width=67 + height=20 + } + display[0] { + label="STATUS" + name="STATUS.adl" + args="CH=3" + } + clr=14 + bclr=4 + label="-STATUS" +} +composite { + object { + x=940 + y=152 + width=66 + height=23 + } + "composite name"="" + children { + "choice button" { + object { + x=940 + y=152 + width=50 + height=20 + } + control { + chan="EIB:CH_0_HEYCOMPS" + clr=14 + bclr=4 + } + stacking="column" + } + "text update" { + object { + x=996 + y=155 + width=10 + height=20 + } + monitor { + chan="EIB:CH_0_heycomp" + clr=14 + bclr=4 + } + align="horiz. centered" + limits { + } + } + } +} +"choice button" { + object { + x=940 + y=192 + width=50 + height=20 + } + control { + chan="EIB:CH_1_HEYCOMPS" + clr=14 + bclr=4 + } + stacking="column" +} +"text update" { + object { + x=996 + y=195 + width=10 + height=20 + } + monitor { + chan="EIB:CH_1_heycomp" + clr=14 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"choice button" { + object { + x=940 + y=232 + width=50 + height=20 + } + control { + chan="EIB:CH_2_HEYCOMPS" + clr=14 + bclr=4 + } + stacking="column" +} +"text update" { + object { + x=996 + y=235 + width=10 + height=20 + } + monitor { + chan="EIB:CH_2_heycomp" + clr=14 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"choice button" { + object { + x=940 + y=272 + width=50 + height=20 + } + control { + chan="EIB:CH_3_HEYCOMPS" + clr=14 + bclr=4 + } + stacking="column" +} +"text update" { + object { + x=996 + y=275 + width=10 + height=20 + } + monitor { + chan="EIB:CH_3_heycomp" + clr=14 + bclr=4 + } + align="horiz. centered" + limits { + } +} diff --git a/eibApp/adl/EIB_BAK.adl b/eibApp/adl/EIB_BAK.adl index 1e643dd..5c1d99e 100644 --- a/eibApp/adl/EIB_BAK.adl +++ b/eibApp/adl/EIB_BAK.adl @@ -5,10 +5,10 @@ file { } display { object { - x=2266 - y=88 + x=1273 + y=169 width=1130 - height=799 + height=1000 } clr=14 bclr=4 @@ -233,117 +233,6 @@ text { limits { } } -polyline { - object { - x=0 - y=739 - width=1128 - height=2 - } - "basic attribute" { - clr=14 - width=2 - } - points { - (1,740) - (1127,740) - } -} -text { - object { - x=210 - y=749 - width=90 - height=20 - } - "basic attribute" { - clr=14 - } - textix="Connect" -} -"text update" { - object { - x=291 - y=749 - width=10 - height=20 - } - monitor { - chan="EIB:connect" - clr=14 - bclr=4 - } - limits { - } -} -"text update" { - object { - x=210 - y=774 - width=100 - height=20 - } - monitor { - chan="EIB:connectS" - clr=14 - bclr=4 - } - limits { - } -} -composite { - object { - x=10 - y=749 - width=80 - height=45 - } - "composite name"="" - children { - "text update" { - object { - x=67 - y=749 - width=10 - height=20 - } - monitor { - chan="EIB:cdbg" - clr=14 - bclr=4 - } - limits { - } - } - text { - object { - x=10 - y=749 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="cdbg" - align="horiz. centered" - } - "choice button" { - object { - x=10 - y=774 - width=80 - height=20 - } - control { - chan="EIB:CDBG" - clr=14 - bclr=4 - } - stacking="column" - } - } -} text { object { x=33 @@ -356,105 +245,6 @@ text { } textix="EIB741" } -text { - object { - x=110 - y=749 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="rdbg" - align="horiz. centered" -} -"text update" { - object { - x=167 - y=749 - width=10 - height=20 - } - monitor { - chan="EIB:rdbg" - clr=14 - bclr=4 - } - limits { - } -} -"choice button" { - object { - x=110 - y=774 - width=80 - height=20 - } - control { - chan="EIB:RDBG" - clr=14 - bclr=4 - } - stacking="column" -} -text { - object { - x=325 - y=749 - width=50 - height=20 - } - "basic attribute" { - clr=14 - } - textix="verbose" - align="horiz. centered" -} -"text update" { - object { - x=387 - y=749 - width=10 - height=20 - } - monitor { - chan="EIB:verbose" - clr=14 - bclr=4 - } - limits { - } -} -"choice button" { - object { - x=325 - y=774 - width=80 - height=20 - } - control { - chan="EIB:VERBOSE" - clr=14 - bclr=4 - } - stacking="column" -} -"message button" { - object { - x=10 - y=660 - width=100 - height=25 - } - control { - chan="EIB:CLEARERROR" - clr=14 - bclr=5 - } - label="ClearErrors" - press_msg="1" -} text { object { x=795 @@ -978,160 +768,6 @@ composite { bclr=4 label="-STATUS" } -composite { - object { - x=870 - y=194 - width=201 - height=23 - } - "composite name"="" - children { - "related display" { - object { - x=870 - y=194 - width=67 - height=20 - } - display[0] { - label="STATUS" - name="STATUS.adl" - args="CH=1" - } - clr=14 - bclr=4 - label="-STATUS" - } - text { - object { - x=970 - y=197 - width=101 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="calc" - calc="(A >>1)&0x1" - chan="EIB:CH_1_STATUS" - } - textix="No signal" - } - } -} -"related display" { - object { - x=870 - y=234 - width=67 - height=20 - } - display[0] { - label="STATUS" - name="STATUS.adl" - args="CH=2" - } - clr=14 - bclr=4 - label="-STATUS" -} -text { - object { - x=970 - y=237 - width=101 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="calc" - calc="(A >>1)&0x1" - chan="EIB:CH_2_STATUS" - } - textix="No signal" -} -"related display" { - object { - x=870 - y=274 - width=67 - height=20 - } - display[0] { - label="STATUS" - name="STATUS.adl" - args="CH=3" - } - clr=14 - bclr=4 - label="-STATUS" -} -text { - object { - x=970 - y=277 - width=101 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="calc" - calc="(A >>1)&0x1" - chan="EIB:CH_3_STATUS" - } - textix="No signal" -} -composite { - object { - x=870 - y=154 - width=201 - height=21 - } - "composite name"="" - children { - text { - object { - x=970 - y=155 - width=101 - height=20 - } - "basic attribute" { - clr=20 - } - "dynamic attribute" { - vis="calc" - calc="(A >>1)&0x1" - chan="EIB:CH_0_STATUS" - } - textix="No signal" - } - "related display" { - object { - x=870 - y=154 - width=67 - height=20 - } - display[0] { - label="STATUS" - name="STATUS.adl" - args="CH=0" - } - clr=14 - bclr=4 - label="-STATUS" - } - } -} "cartesian plot" { object { x=10 @@ -1816,93 +1452,6 @@ text { limits { } } -"shell command" { - object { - x=1010 - y=710 - width=110 - height=25 - } - command[0] { - label="Start SoftIOC" - name="xterm -fa 'Monospace' -fs 10 -bg darkblue -fg white -T EIBapp -e" - args="'cd /afs/psi.ch/user/f/follath_r/progs/eib/eibApp/adl; ./start'&" - } - clr=14 - bclr=4 - label="- StartSoftIOC" -} -"message button" { - object { - x=1011 - y=680 - width=110 - height=25 - } - control { - chan="EIB:AKTION" - clr=14 - bclr=4 - } - label="StopSoftIOC" - press_msg="99" -} -composite { - object { - x=120 - y=661 - width=450 - height=55 - } - "composite name"="" - children { - "text update" { - object { - x=120 - y=701 - width=450 - height=15 - } - monitor { - chan="EIB:errortext2" - clr=20 - bclr=4 - } - limits { - } - } - "text update" { - object { - x=120 - y=661 - width=450 - height=15 - } - monitor { - chan="EIB:errortext0" - clr=20 - bclr=4 - } - limits { - } - } - "text update" { - object { - x=120 - y=681 - width=450 - height=15 - } - monitor { - chan="EIB:errortext1" - clr=20 - bclr=4 - } - limits { - } - } - } -} composite { object { x=810 @@ -2362,3 +1911,710 @@ text { textix="Update" align="horiz. centered" } +composite { + object { + x=0 + y=860 + width=1128 + height=134 + } + "composite name"="" + children { + text { + object { + x=210 + y=949 + width=90 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Connect" + } + "text update" { + object { + x=291 + y=949 + width=10 + height=20 + } + monitor { + chan="EIB:connect" + clr=14 + bclr=4 + } + limits { + } + } + "text update" { + object { + x=210 + y=974 + width=100 + height=20 + } + monitor { + chan="EIB:connectS" + clr=14 + bclr=4 + } + limits { + } + } + composite { + object { + x=10 + y=949 + width=80 + height=45 + } + "composite name"="" + children { + "text update" { + object { + x=67 + y=949 + width=10 + height=20 + } + monitor { + chan="EIB:cdbg" + clr=14 + bclr=4 + } + limits { + } + } + text { + object { + x=10 + y=949 + width=50 + height=20 + } + "basic attribute" { + clr=14 + } + textix="cdbg" + align="horiz. centered" + } + "choice button" { + object { + x=10 + y=974 + width=80 + height=20 + } + control { + chan="EIB:CDBG" + clr=14 + bclr=4 + } + stacking="column" + } + } + } + text { + object { + x=110 + y=949 + width=50 + height=20 + } + "basic attribute" { + clr=14 + } + textix="rdbg" + align="horiz. centered" + } + "text update" { + object { + x=167 + y=949 + width=10 + height=20 + } + monitor { + chan="EIB:rdbg" + clr=14 + bclr=4 + } + limits { + } + } + "choice button" { + object { + x=110 + y=974 + width=80 + height=20 + } + control { + chan="EIB:RDBG" + clr=14 + bclr=4 + } + stacking="column" + } + text { + object { + x=325 + y=949 + width=50 + height=20 + } + "basic attribute" { + clr=14 + } + textix="verbose" + align="horiz. centered" + } + "text update" { + object { + x=387 + y=949 + width=10 + height=20 + } + monitor { + chan="EIB:verbose" + clr=14 + bclr=4 + } + limits { + } + } + "choice button" { + object { + x=325 + y=974 + width=80 + height=20 + } + control { + chan="EIB:VERBOSE" + clr=14 + bclr=4 + } + stacking="column" + } + "message button" { + object { + x=10 + y=860 + width=100 + height=25 + } + control { + chan="EIB:CLEARERROR" + clr=14 + bclr=5 + } + label="ClearMsg" + press_msg="1" + } + "shell command" { + object { + x=1010 + y=910 + width=110 + height=25 + } + command[0] { + label="Start SoftIOC" + name="xterm -fa 'Monospace' -fs 10 -bg darkblue -fg white -T EIBapp -e" + args="'cd /afs/psi.ch/user/f/follath_r/progs/eib/eibApp/adl; ./start'&" + } + clr=14 + bclr=4 + label="- StartSoftIOC" + } + "message button" { + object { + x=1011 + y=880 + width=110 + height=25 + } + control { + chan="EIB:AKTION" + clr=14 + bclr=4 + } + label="StopSoftIOC" + press_msg="99" + } + composite { + object { + x=120 + y=861 + width=450 + height=55 + } + "composite name"="" + children { + "text update" { + object { + x=120 + y=901 + width=450 + height=15 + } + monitor { + chan="EIB:errortext2" + clr=20 + bclr=4 + } + limits { + } + } + "text update" { + object { + x=120 + y=861 + width=450 + height=15 + } + monitor { + chan="EIB:errortext0" + clr=20 + bclr=4 + } + limits { + } + } + "text update" { + object { + x=120 + y=881 + width=450 + height=15 + } + monitor { + chan="EIB:errortext1" + clr=20 + bclr=4 + } + limits { + } + } + } + } + polyline { + object { + x=0 + y=939 + width=1128 + height=2 + } + "basic attribute" { + clr=14 + width=2 + } + points { + (1,940) + (1127,940) + } + } + } +} +"cartesian plot" { + object { + x=570 + y=650 + width=270 + height=200 + } + plotcom { + xlabel="index" + ylabel="correction" + clr=14 + bclr=4 + } + trace[0] { + ydata="EIB:CH_2_CORRECTION" + data_clr=53 + yaxis=0 + yside=0 + } + x_axis { + rangeStyle="user-specified" + maxRange=1024.000000 + } + y1_axis { + minRange=-100.000000 + maxRange=100.000000 + } +} +"cartesian plot" { + object { + x=290 + y=650 + width=270 + height=200 + } + plotcom { + xlabel="index" + ylabel="correction" + clr=14 + bclr=4 + } + trace[0] { + ydata="EIB:CH_1_CORRECTION" + data_clr=53 + yaxis=0 + yside=0 + } + x_axis { + rangeStyle="user-specified" + maxRange=1024.000000 + } + y1_axis { + minRange=-100.000000 + maxRange=100.000000 + } +} +"cartesian plot" { + object { + x=10 + y=650 + width=270 + height=200 + } + plotcom { + xlabel="index" + ylabel="correction" + clr=14 + bclr=4 + } + trace[0] { + ydata="EIB:CH_0_CORRECTION" + data_clr=53 + yaxis=0 + yside=0 + } + x_axis { + rangeStyle="user-specified" + maxRange=1024.000000 + } + y1_axis { + minRange=-100.000000 + maxRange=100.000000 + } +} +"cartesian plot" { + object { + x=850 + y=650 + width=270 + height=200 + } + plotcom { + xlabel="index" + ylabel="correction" + clr=14 + bclr=4 + } + trace[0] { + ydata="EIB:CH_3_CORRECTION" + data_clr=53 + yaxis=0 + yside=0 + } + x_axis { + rangeStyle="user-specified" + maxRange=1024.000000 + } + y1_axis { + minRange=-100.000000 + maxRange=100.000000 + } +} +text { + object { + x=940 + y=120 + width=60 + height=20 + } + "basic attribute" { + clr=14 + } + textix="Compensation" + align="horiz. centered" +} +composite { + object { + x=1020 + y=155 + width=101 + height=142 + } + "composite name"="" + children { + text { + object { + x=1020 + y=155 + width=101 + height=20 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="calc" + calc="(A >>1)&0x1" + chan="EIB:CH_0_STATUS" + } + textix="No signal" + } + text { + object { + x=1020 + y=197 + width=101 + height=20 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="calc" + calc="(A >>1)&0x1" + chan="EIB:CH_1_STATUS" + } + textix="No signal" + } + text { + object { + x=1020 + y=237 + width=101 + height=20 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="calc" + calc="(A >>1)&0x1" + chan="EIB:CH_2_STATUS" + } + textix="No signal" + } + text { + object { + x=1020 + y=277 + width=101 + height=20 + } + "basic attribute" { + clr=20 + } + "dynamic attribute" { + vis="calc" + calc="(A >>1)&0x1" + chan="EIB:CH_3_STATUS" + } + textix="No signal" + } + } +} +"related display" { + object { + x=860 + y=192 + width=67 + height=20 + } + display[0] { + label="STATUS" + name="STATUS.adl" + args="CH=1" + } + clr=14 + bclr=4 + label="-STATUS" +} +"related display" { + object { + x=860 + y=152 + width=67 + height=20 + } + display[0] { + label="STATUS" + name="STATUS.adl" + args="CH=0" + } + clr=14 + bclr=4 + label="-STATUS" +} +"related display" { + object { + x=860 + y=232 + width=67 + height=20 + } + display[0] { + label="STATUS" + name="STATUS.adl" + args="CH=2" + } + clr=14 + bclr=4 + label="-STATUS" +} +"related display" { + object { + x=860 + y=272 + width=67 + height=20 + } + display[0] { + label="STATUS" + name="STATUS.adl" + args="CH=3" + } + clr=14 + bclr=4 + label="-STATUS" +} +composite { + object { + x=940 + y=152 + width=66 + height=23 + } + "composite name"="" + children { + "choice button" { + object { + x=940 + y=152 + width=50 + height=20 + } + control { + chan="EIB:CH_0_HEYCOMPS" + clr=14 + bclr=4 + } + stacking="column" + } + "text update" { + object { + x=996 + y=155 + width=10 + height=20 + } + monitor { + chan="EIB:CH_0_heycomp" + clr=14 + bclr=4 + } + align="horiz. centered" + limits { + } + } + } +} +"choice button" { + object { + x=940 + y=192 + width=50 + height=20 + } + control { + chan="EIB:CH_1_HEYCOMPS" + clr=14 + bclr=4 + } + stacking="column" +} +"text update" { + object { + x=996 + y=195 + width=10 + height=20 + } + monitor { + chan="EIB:CH_1_heycomp" + clr=14 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"choice button" { + object { + x=940 + y=232 + width=50 + height=20 + } + control { + chan="EIB:CH_2_HEYCOMPS" + clr=14 + bclr=4 + } + stacking="column" +} +"text update" { + object { + x=996 + y=235 + width=10 + height=20 + } + monitor { + chan="EIB:CH_2_heycomp" + clr=14 + bclr=4 + } + align="horiz. centered" + limits { + } +} +"choice button" { + object { + x=940 + y=272 + width=50 + height=20 + } + control { + chan="EIB:CH_3_HEYCOMPS" + clr=14 + bclr=4 + } + stacking="column" +} +"text update" { + object { + x=996 + y=275 + width=10 + height=20 + } + monitor { + chan="EIB:CH_3_heycomp" + clr=14 + bclr=4 + } + align="horiz. centered" + limits { + } +} diff --git a/eibApp/src/DienstagAbend.tar.gz b/eibApp/src/DienstagAbend.tar.gz deleted file mode 100644 index 11b30dd..0000000 Binary files a/eibApp/src/DienstagAbend.tar.gz and /dev/null differ diff --git a/eibApp/src/EIB.c b/eibApp/src/EIB.c index 0124019..28306ad 100644 --- a/eibApp/src/EIB.c +++ b/eibApp/src/EIB.c @@ -754,6 +754,18 @@ static long EIBwf_parse(struct waveformRecord *pwf) pwf->nelm = NUMPOINTS; return(MON_NO_ERROR); } + if (!contain(name,"CH_","_CORRECTION",&num)) + { + if ( EIB_ValidEncoder(num) ) + { + printf("EIB_wf_parse : <%s>, num = %li not available\n",name,num); + return(MON_ERROR); + } + pwf->bptr =(void *) (eib.enc[num].Correction); + pwf->nord = NUMHEY; /* number of data points to be store, e.g. for Heydemann-correction */ + pwf->nelm = NUMHEY; + return(MON_NO_ERROR); + } return(MON_NO_ERROR); diff --git a/eibApp/src/O.linux-x86_64/EIB.o b/eibApp/src/O.linux-x86_64/EIB.o index 8486023..19ef05e 100644 Binary files a/eibApp/src/O.linux-x86_64/EIB.o and b/eibApp/src/O.linux-x86_64/EIB.o differ diff --git a/eibApp/src/O.linux-x86_64/eib b/eibApp/src/O.linux-x86_64/eib index 501ca72..87ae090 100755 Binary files a/eibApp/src/O.linux-x86_64/eib and b/eibApp/src/O.linux-x86_64/eib differ diff --git a/eibApp/src/O.linux-x86_64/myEIB.o b/eibApp/src/O.linux-x86_64/myEIB.o index d02c9b1..c89d476 100644 Binary files a/eibApp/src/O.linux-x86_64/myEIB.o and b/eibApp/src/O.linux-x86_64/myEIB.o differ diff --git a/eibApp/src/myEIB.c b/eibApp/src/myEIB.c index 94ac331..1b48588 100644 --- a/eibApp/src/myEIB.c +++ b/eibApp/src/myEIB.c @@ -98,6 +98,7 @@ Feb. 2025 envc_nr = 0,1,2,3 #include #include #include +#include #include "epicsExit.h" #include "epicsThread.h" @@ -161,6 +162,76 @@ int EIB_Init_Enc(int enc_nr); /* initialize selected encoder */ void EIB_StopRef( int enc_nr); void EIB_Clear_RingBuffer(int enc_nr); +/****************************************************************************/ +void ReadHeyFile(char *filename, HEYARRAY *h) +{ + FILE *ein = NULL; + char buffer[BUFLEN]; + char *Inhalt; + char *done; + int Wertanzahl = 0; + int index, corr; + + + for (index=0;index\n",Inhalt); + goto WEITER; + } + + + + Inhalt = strtok(NULL, delimList); + if (Inhalt == NULL) goto WEITER; + if (Inhalt[0] == '#' ) goto WEITER; + errno=0; + corr = strtol(Inhalt,&done,0); + if (errno) + { + printf("cannot convert <%s>\n",Inhalt); + goto WEITER; + } + + + + + if ((index =0)) + (*h)[index]= corr; + + printf("%5i %i\n",index, corr); + + Wertanzahl++; + +WEITER: + (void)0; /* dummy statement damit der compiler nicht meckert */ + } + + printf("ReadHeyFile: read %i entries from File %s\n",Wertanzahl, filename); +} /*****************************************************************************/ double arctan(double x, double y) @@ -231,6 +302,15 @@ int EIB_SpaL(char *s, int val) if (val==2) EIB_Clear_RingBuffer(num); else eib.enc[num].AddPoints = val; } + else if (!contain(s,"CH_","_HEYCOMP",&num)) + { + if ( EIB_ValidEncoder(num) ) + { + printf("SPAL: <%s>, num = %li not available\n",s,num); + return(MON_ERROR); + } + else eib.enc[num].HeyComp = val; + } else { printf("EIB_SpaL: Unkown parameter <%s>\n",s); @@ -308,6 +388,15 @@ else if (!contain(s,"CH_","_lines",&num)) } *val= eib.enc[num].RefActive; } + else if (!contain(s,"CH_","_HEYCOMP",&num)) + { + if ( EIB_ValidEncoder(num) ) + { + printf("GPAL: <%s>, num = %li not available\n",s,num); + return(MON_ERROR); + } + *val= eib.enc[num].HeyComp; + } else { printf("EIB_GpaL: Unkown parameter <%s>\n",s); @@ -377,7 +466,7 @@ void CheckError(EIB7_ERR error) EIB7GetErrorInfo(error, mnemonic, 32, message, 256); - printf("\nError %08X (%s): %s\n", error, mnemonic, message); +// printf("\nError %08X (%s): %s\n", error, mnemonic, message); switch(error) { @@ -483,7 +572,7 @@ void EIB_Clear_RingBuffer(int enc_nr) /* Initialize variables. They are updated in the EIB_Start() */ void EIB_Init() { -int i; +int i,j; InitError(); @@ -509,6 +598,9 @@ int i; eib.enc [i].RefActive = 0; eib.enc [i].Interpolation = 4096; EIB_Clear_RingBuffer(i); + + for (j=0;j0)&& (index<1024)) corr = eib.enc[enc_nr].Correction[index]; else corr = 0; + + if (verbose==1) printf(" Pos(%i) = %lli fraction %i index = %i correction = %i \n",enc_nr, data.pos, data.interpolate,index, corr ); + + } + // position = data.pos - data.refc; position = data.pos - lref; @@ -1781,7 +1931,9 @@ void EIB_ShowEncoder(ENC enc) printf(" RefActive = %i\n", enc.RefActive); printf(" LastRef = %li\n", enc.LastRef); printf(" RefcPos = %5.3f\n", enc.RefPos); - printf(" Comp = %i\n", enc.Comp); + printf(" Comp = %i\n", enc.Comp); + printf(" HeyComp = %i\n", enc.HeyComp); + printf(" HeyFile = <%s>\n", enc.HeyFileName); printf(" NextHist = %i\n", enc.NextHist); printf(" AddPoints = %i\n", enc.AddPoints); printf(" Interpolation= %i\n", enc.Interpolation); @@ -1827,13 +1979,13 @@ void EIB_ShowEib() printf(" Handle : %i\n", eib.handle); printf(" Connected : %i\n", eib.connected); printf(" Firmware ver. : %s\n", eib.fw_version); - printf(" Encoders : %li\n", eib.num); + printf(" Encoders : %li\n", eib.num); printf(" Connect : %i\n", Connect); printf(" CONNECTING : %i\n", CONNECTING); - printf(" configFile : %s\n",CfgFileName ); - printf(" cdbg : %i\n",cdbg ); - printf(" rdbg : %i\n",rdbg ); - printf(" verbose : %i\n",verbose ); + printf(" configFile : %s\n", CfgFileName ); + printf(" cdbg : %i\n", cdbg ); + printf(" rdbg : %i\n", rdbg ); + printf(" verbose : %i\n", verbose ); for (i=0;i