Skip to content

Commit 2a3397d

Browse files
author
github-actions
committed
Auto-update from Github Actions Workflow
Deployed from commit 17a5f68 (refs/heads/master) Deployed from commit 964d341 (refs/heads/master)
1 parent 1a2c300 commit 2a3397d

7 files changed

+85
-23
lines changed

master/_sources/lcls-twincat-pmps_PMPS_source.rst.txt

+39-8
Original file line numberDiff line numberDiff line change
@@ -9199,6 +9199,9 @@ FB_SXU
91999199
VAR
92009200
// From lcls-srv01: grep -e KDes /u1/lcls/epics/ioc/data/sioc-unds-uc*/iocInfo/IOC.pvlist |sort
92019201

9202+
{attribute 'pytmc' := 'pv: 21; link: 2150:'}
9203+
fbSegment_21 : FB_UndulatorSegment;
9204+
92029205
{attribute 'pytmc' := 'pv: 22; link: 2250:'}
92039206
fbSegment_22 : FB_UndulatorSegment;
92049207

@@ -9289,7 +9292,7 @@ FB_SXU
92899292
{attribute 'pytmc' := '
92909293
pv: FirstSegment
92919294
io: i'}
9292-
iLowBound : UDINT := 22;
9295+
iLowBound : UDINT := 21;
92939296
{attribute 'pytmc' := '
92949297
pv: LastSegment
92959298
io: i'}
@@ -9333,6 +9336,7 @@ FB_SXU
93339336
IF fbSegment[iIndex] <> 0 THEN
93349337
fbCurrentSegment REF= fbSegment[iIndex]^;
93359338
fbCurrentSegment(fbElectronEnergy:=fbElectronEnergy);
9339+
fbCurrentSegment.fPeriod_mm := fbCurrentSegment.fLambda_U*1000;
93369340

93379341
//Mark the seed undulator, first undulator operating within K bounds
93389342
IF fbCurrentSegment.xActive AND nSeedUndulator = 0 THEN
@@ -9365,15 +9369,17 @@ FB_SXU
93659369
fbCurrentSegment REF= fbSegment[iIndex]^;
93669370
fbCurrentSegment.fLowK := fLowK;
93679371
fbCurrentSegment.fHiK := fHiK;
9368-
IF (iIndex >= 26) THEN fbCurrentSegment.fPeriod_mm := fPeriod_39_mm;
9369-
ELSE fbCurrentSegment.fPeriod_mm := fPeriod_56_mm;
9370-
END_IF
93719372
END_IF
93729373
END_FOR
93739374
bInitialized := TRUE;
93749375
END_ACTION
93759376

93769377
ACTION UndAdrUpdate:
9378+
fbSegment[21] := 0;
9379+
fbSegment[22] := ADR(fbSegment_22);
9380+
fbSegment[23] := ADR(fbSegment_23);
9381+
fbSegment[24] := ADR(fbSegment_24);
9382+
fbSegment[25] := ADR(fbSegment_25);
93779383
fbSegment[26] := ADR(fbSegment_26);
93789384
fbSegment[27] := ADR(fbSegment_27);
93799385
fbSegment[28] := ADR(fbSegment_28);
@@ -9516,8 +9522,9 @@ FB_UndulatorSegment
95169522

95179523
FUNCTION_BLOCK FB_UndulatorSegment
95189524
VAR_INPUT
9519-
(* Undulator period in millimeters, to be set by subclasses *)
9525+
(* Undulator period in millimeters, to be set by subclasses for HXR, read by pv for SXR, left here for backward compatability *)
95209526
fPeriod_mm : LREAL := 1.0;
9527+
95219528
fbElectronEnergy : REFERENCE TO FB_LREALFromEPICS;
95229529

95239530
fLowK : LREAL := 0;
@@ -9570,7 +9577,14 @@ FB_UndulatorSegment
95709577
'}
95719578
fKDes : LREAL;
95729579

9573-
{attribute 'pytmc' := '
9580+
{attribute 'pytmc' := '
9581+
pv: Lambda_U
9582+
io: i
9583+
field: DESC Period in m
9584+
'}
9585+
fLambda_U : LREAL;
9586+
9587+
{attribute 'pytmc' := '
95749588
pv: KActValid
95759589
io: i
95769590
field: DESC Current K Readback Valid
@@ -9584,6 +9598,14 @@ FB_UndulatorSegment
95849598
'}
95859599
bKDesValid : BOOL;
95869600

9601+
{attribute 'pytmc' := '
9602+
pv: lambdaValid
9603+
io: i
9604+
field: DESC lambda_U Readback Valid
9605+
'}
9606+
blambdaValid : BOOL;
9607+
9608+
95879609
END_VAR
95889610

95899611
VAR
@@ -9599,18 +9621,27 @@ FB_UndulatorSegment
95999621
'}
96009622
fbKActual : FB_LREALFromEPICS;
96019623

9624+
{attribute 'pytmc' := '
9625+
pv: lambda_U
9626+
link: lambda_U
9627+
'}
9628+
fblambda_U : FB_LREALFromEPICS;
9629+
96029630
END_VAR
96039631
fbKDesired();
96049632
fbKActual();
9633+
fblambda_U();
96059634

96069635
fKAct := fbKActual.fValue;
96079636
bKActValid := fbKActual.bValid;
96089637
fKDes := fbKDesired.fValue;
96099638
bKDesValid := fbKDesired.bvalid;
9639+
fLambda_U := fblambda_U.fValue;
9640+
blambdaValid:= fblambda_U.bValid;
96109641

96119642
IF __ISVALIDREF(fbElectronEnergy) THEN
96129643

9613-
IF fbKActual.bValid AND fbElectronEnergy.bValid THEN
9644+
IF fbKActual.bValid AND fblambda_U.bValid AND fbElectronEnergy.bValid THEN
96149645
fPhotonEnergyAct := F_CalculatePhotonEnergy(
96159646
fElectronEnergy_GeV:=fbElectronEnergy.fValue,
96169647
fUndulatorPeriod_mm:=fPeriod_mm,
@@ -9630,7 +9661,7 @@ FB_UndulatorSegment
96309661
(NOT fbKDesired.bValid OR NOT fbKDesired.bValid);
96319662
END_IF
96329663

9633-
IF fbKDesired.bValid AND fbElectronEnergy.bValid THEN
9664+
IF fbKDesired.bValid AND fblambda_U.bValid AND fbElectronEnergy.bValid THEN
96349665
fPhotonEnergyDes := F_CalculatePhotonEnergy(
96359666
fElectronEnergy_GeV:=fbElectronEnergy.fValue,
96369667
fUndulatorPeriod_mm:=fPeriod_mm,

master/_sources/lcls-twincat-pmps_PMPS_summary.rst.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Settings
2424
Pragmas
2525
-------
2626

27-
Total pragmas found: 279
27+
Total pragmas found: 283
2828
Total linter errors: 0
2929

3030

master/_sources/lcls-twincat-pmps_pragmas.rst.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Pragmas
66
:header: PLC Name, Total Pragmas, Errors
77
:align: center
88

9-
:ref:`PMPS <PMPS_overview_pragmas>`, 279, 0
9+
:ref:`PMPS <PMPS_overview_pragmas>`, 283, 0
1010

1111

1212
.. _PMPS_overview_pragmas:
@@ -15,7 +15,7 @@ Pragmas
1515
PMPS
1616
^^^^
1717

18-
Total pragmas found: 279
18+
Total pragmas found: 283
1919
Total linter errors: 0
2020

2121

0 commit comments

Comments
 (0)