Skip to content

Commit db89535

Browse files
committed
DEV: Additional UND on SXU
1 parent 8dba453 commit db89535

File tree

2 files changed

+174
-31198
lines changed

2 files changed

+174
-31198
lines changed

Diff for: lcls-twincat-pmps/PMPS/MajorComponents/PhotonEnergyInterface/FB_SXU.TcPOU

+24-6
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,15 @@ END_VAR
4242
VAR
4343
// From lcls-srv01: grep -e KDes /u1/lcls/epics/ioc/data/sioc-unds-uc*/iocInfo/IOC.pvlist |sort
4444
45-
45+
{attribute 'pytmc' := 'pv: 23; link: 2350:'}
46+
fbSegment_23 : FB_UndulatorSegment;
47+
48+
{attribute 'pytmc' := 'pv: 24; link: 2450:'}
49+
fbSegment_24 : FB_UndulatorSegment;
50+
51+
{attribute 'pytmc' := 'pv: 25; link: 2550:'}
52+
fbSegment_25 : FB_UndulatorSegment;
53+
4654
{attribute 'pytmc' := 'pv: 26; link: 2650:'}
4755
fbSegment_26 : FB_UndulatorSegment;
4856
@@ -121,22 +129,30 @@ VAR CONSTANT
121129
{attribute 'pytmc' := '
122130
pv: FirstSegment
123131
io: i'}
124-
iLowBound : UDINT := 26;
132+
iLowBound : UDINT := 23;
125133
{attribute 'pytmc' := '
126134
pv: LastSegment
127135
io: i'}
128136
iHighBound : UDINT := 47;
129137
{attribute 'pytmc' := '
130-
pv: Period
138+
pv: Period_Short
139+
io: i
140+
field: EGU mm
141+
'}
142+
fPeriod_39_mm : LREAL := 39.0;
143+
144+
{attribute 'pytmc' := '
145+
pv: Period_Long
131146
io: i
132147
field: EGU mm
133148
'}
134-
fPeriod_mm : LREAL := 39.0;
149+
fPeriod_56_mm : LREAL := 56.0;
150+
135151
{attribute 'pytmc' := '
136152
pv: LowK
137153
io: i
138154
'}
139-
fLowK : LREAL := 1.5;
155+
fLowK : LREAL := 0.8;
140156
141157
{attribute 'pytmc' := '
142158
pv: HiK
@@ -191,9 +207,11 @@ UndAdrUpdate();
191207
FOR iIndex := iLowBound TO iHighBound DO
192208
IF fbSegment[iIndex] <> 0 THEN
193209
fbCurrentSegment REF= fbSegment[iIndex]^;
194-
fbCurrentSegment.fPeriod_mm := fPeriod_mm;
195210
fbCurrentSegment.fLowK := fLowK;
196211
fbCurrentSegment.fHiK := fHiK;
212+
IF (iIndex >= 26) THEN fbCurrentSegment.fPeriod_mm := fPeriod_39_mm;
213+
ELSE fbCurrentSegment.fPeriod_mm := fPeriod_56_mm;
214+
END_IF
197215
END_IF
198216
END_FOR
199217
bInitialized := TRUE;]]></ST>

0 commit comments

Comments
 (0)