You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 44 Next »

Target releasealpha 1.0
Epic
Document status
DRAFT
Document owner
Designer
Developers
QA

Goals

  • improve the stability of the DAFNE orbit acquisition system.

Overall strategy

  • develop and debug the new DEVIL204 along with the regular run of the legacy system;
  • get rid of the phisical DEVIL204 by moving its code to a virtual machine;
  • get rid of the 4 LEXTEL couples by employing the SIS3153 VME Ethernet controllers.

Repository

TypeDetails

Type

git

Link / Path

https://baltig.infn.it/lnf-da-control/lv-dcs-new204
NOTE: the only file included in the git repo is GOD.lvproj . No VIs are included in the git repo at this moment.

Branch

main

Hardware description

TypeDescription
ProcessorStandard DANTE virtual machine vldantedevxxx
VME controllers

Nr. 4 VME controller SIS3153 USB-0 USB3.0-VME Interface with 1 Gbps SFP Tranceiver

VME hardwareStandard Apple DEVILs (364-5-6-7), HP DVM+MUX
HardwareBergotz modules for BPM signal acquisition

Programming languages

LanguageRequired Add ons/Plugins/Extensions/Libraries
LabVIEW 12.0.1f5 (32-bit)

liblv2vmechaos.lvlib (for SIS3153 usage)
git repo: https://baltig.infn.it/chaos-lnf-control/lv-vme-chaos-driver.git

Description

Due to safety reasons, the development of the new DEVIL204 takes place on the virtual machine vldantedev038 that temporarily mounts a copy of the dcs_lv12/source_linux actual directory.
Any VIs and data files created/modified/removed concern the directories:

/u2/dcs/source_linux/0_classes/GOD/
/u2/dcs/source_linux/devils/DISARMED/DEVIL204-NEW/
/u2/dcs/source_linux/lib/lv-vme-chaos-driver/

Any derogation from this assumption will be highlighted.

Repo git della librearia di accesso alla SIS3153, clonato in: /u2/dcs/source_linux/lib/lv-vme-chaos-driver
(dovrebbe stare nella /usr/local/natinst/LabVIEW-2012/user.lib/ ma questo andrebbe poi fatto su tutte le macchine. Messo invece nella .../source_linux/lib/ , di modo che valga per tutti).

Repo git del progetto LabVIEW GOD.lvprog del nuovo DEVIL204, clonato in .../u2/dcs/source_linux//0_classes/GOD/

Warnings and Fixes to be done

GGODSta.vi and GGODDyn.vi have the "append" and "write" cases DISABLED to avoid memcached real write operations

To be done

I DBFiles dei DEVILs 364, 365, 366, 367 sono sbagliati (il DEVIL365 ha 24 componenti e NON 23 come scritto nel DBFile Solaris). 

The VIs .../0_classes/GOD/library/fetchORB[Sta|Dyn].vi and their SubVIs .../0_classes/GOD/library/bundleORB[Sta|Dyn].vi must be optimized by moving the code that parses the descriptors in the "init" frame so that it is executed only once.

Al momento la difficoltà maggiore è quella di riottenere una tabella di ordinamento tramite i VIs:
precompileORB.vi
precompileORB_IR.vi
I suddetti VIs sono stati modificati per quanto riguarda il recupero degli indirizzi ma ci sono degli errori.


GGODSta.vi

This global is initialized with data from the DBSta file. The DBSta file contains dummy data (all zeros) and is only used to correctly size the arrays.
The filling of the global with actual data is done via the foo program GODStartup.vi using the file:

/u2/dcs/source_linux/0_classes/GOD/configuration/<file name>.lst
/*MRe+

i      Name     azimuth[m] allHOffset[mm] allVOffset[mm] IROffset [mm] refOrbH[mm] refOrbV[mm] rotationAngle[rd] IP1/IP2 azimuth [m]*/


0         BPBPL101         2.531090         -1.000000         0.000000         0.000000         0.000000         0.000000         0.000000         0.000000

1         BPBPL102         6.250090         -1.000000         -3.000000        0.000000         0.000000         0.000000         0.000000         0.000000

2         BPBPL103         8.807590         -2.540000         0.000000         0.000000         0.000000         0.000000         0.000000         0.000000

3         BPBPL104         9.802590         -2.070000         0.000000         0.000000         0.000000         0.000000         0.000000         0.000000

4         BPBPL105         12.129270         -0.950000         0.000000         0.000000         0.000000         0.000000         0.000000         0.000000

5         BPBPL106         13.914280         -0.100000         0.000000         0.000000         0.000000         0.000000         0.000000         0.000000

6         BPBPL107         16.701270         0.000000         -1.000000         0.000000         0.000000         0.000000         0.000000         0.000000

7         BPBPL108         18.301270         0.000000         -0.500000         0.000000         0.000000         0.000000         0.000000         0.000000

8         BPBPI102         20.667590         0.500000         0.200000         61.000000         61.40000         0.046340         0.000000         5.050000

9         BPBI1K06         23.984310         0.000000         0.280000         0.000000            27.5298           7.83531         1.000000         1.740000

10         BPBI1K05         24.404320         0.000000         0.510000         0.000000         18.754500         4.11136         1.000000         1.320000

11         BPBI1K04         25.004340         0.000000         0.830000         0.000000          8.19334            0.941478         1.000000         0.720000

12         BPBI1K03         26.444370         0.000000         -0.530000         0.000000         -8.19334         0.941478         1.000000         -0.720000

13         BPBI1K02         27.044380         0.000000         -0.500000         0.000000         -18.754500      4.11136          1.000000         -1.320000

14         BPBI1K01         27.464390         0.000000         -0.480000         0.000000         -27.5298           7.83531         1.000000         -1.740000

15         BPBPI101         30.767590         0.300000         0.200000         -61.000000      -61.40000         0.046340         0.000000         -5.050000

16         BPBPS101         33.148430         0.000000         -0.500000         0.000000         0.000000         0.000000         0.000000         0.000000

17         BPBPS102         34.748430         1.000000         -1.000000         0.000000         0.000000         0.000000         0.000000         0.000000

18         BPBPS103         37.314430         -0.080000         0.000000         0.000000         0.000000         0.000000         0.000000         0.000000

19         BPBPS104         39.099430         -0.720000         0.000000         0.000000         0.000000         0.000000         0.000000         0.000000

20         BPBPS105         41.426120         -1.630000         0.000000         0.000000         0.000000         0.000000         0.000000         0.000000

21         BPBPS106         42.421130         -2.010000         0.000000         0.000000         0.000000         0.000000         0.000000         0.000000

22         BPBPS107         44.957630         0.080000         -0.540000         0.000000         0.000000         0.000000         0.000000         0.000000

23         BPBPS108         48.190630         0.000000         0.510000         0.000000         0.000000         0.000000         0.000000         0.000000

24         BPBPS201         49.091830         -0.700000         0.360000         0.000000         0.000000         0.000000         0.000000         0.000000

25         BPBPS202         50.036020         0.510000         1.130000         0.000000         0.000000         0.000000         0.000000         0.000000

26         BPBPS203         52.733020         -0.620000         -1.390000         0.000000         0.000000         0.000000         0.000000         0.000000

27         BPBPS204         55.269520         -1.730000         0.000000         0.000000         0.000000         0.000000         0.000000         0.000000

28         BPBPS205         56.264530         -1.680000         0.000000         0.000000         0.000000         0.000000         0.000000         0.000000

29         BPBPS206         58.591220         -1.580000         0.000000         0.000000         0.000000         0.000000         0.000000         0.000000

30         BPBPS207         60.376220         -1.500000         0.000000         0.000000         0.000000         0.000000         0.000000         0.000000

31         BPBPS208         62.942230         -1.500000         1.500000         0.000000         0.000000         0.000000         0.000000         0.000000

32         BPBPS209         64.542220         -1.000000         2.000000         0.000000         0.000000         0.000000         0.000000         0.000000

33         BPBPI202         66.916210         0.800000         0.000000         -61.000000         -60.949300         0.000000         0.000000         5.050000

34         BPBI2009         69.626210         -1.500000         -3.000000         0.000000         -40.455900         0.000000         0.000000         2.340000

35         BPBI2008         70.406210         -1.250000         -2.750000         0.000000         -21.296100         0.000000         0.000000         1.500000

36         BPBI2007         71.051210         -0.500000         -2.250000         0.000000         -10.461900         0.000000         0.000000         0.915000

37         BPBI2003         72.881230         -0.500000         -1.750000         0.000000         10.461900         0.000000         0.000000         -0.915000

38         BPBI2002         73.526220         0.000000         -2.250000         0.000000         21.296100         0.000000         0.000000         -1.500000

39         BPBI2001         74.306220         1.000000         -2.500000         0.000000         40.455900         0.000000         0.000000         -2.340000

40         BPBPI201         77.016220         -0.100000         0.400000         61.000000         60.949300         0.000000         0.000000         -5.050000

41         BPBPL201         79.389210         -0.500000         0.000000         0.000000         0.000000         0.000000         0.000000         0.000000

42         BPBPL202         80.989220         -3.000000         0.000000         0.000000         0.000000         0.000000         0.000000         0.000000

43         BPBPL203         83.776220         -0.440000         0.000000         0.000000         0.000000         0.000000         0.000000         0.000000

44         BPBPL204         85.561230         -0.640000         0.000000         0.000000         0.000000         0.000000         0.000000         0.000000

45         BPBPL205         87.887910         -0.890000         0.000000         0.000000         0.000000         0.000000         0.000000         0.000000

46         BPBPL206         88.882910         -1.000000         0.000000         0.000000         0.000000         0.000000         0.000000         0.000000

47         BPBPL207         91.440410         -2.5000000         0.000000        0.000000         0.000000         0.000000         0.000000         0.000000

48         BPBPL208         95.159410         -0.500000         0.000000         0.000000         0.000000         0.000000         0.000000         0.000000


Static fork descriptor
%GOD
#GOD**001
@HCI(S) [(I32),(DBL),DU32,DU32,DU32,DU32,DU32,DU32,HI32,HI32,HI32,HI32,HI32,HI32,HI32,HI32,HI32:4,HI32:64,HI32:64,DU16:4,DU16:4,DU16:4,DU16:4,(DBL):64,DBL:64,DBL:64,DBL:64,(DBL):64,DBL:64,DBL:64,DBL:64,(DBL):64,(DBL):64,DBL:64,DBL:64,DBL:64,DBL:64,DBL:64,DBL:64,DBL:64,DBL:64,DBL:64]



GGODDyn.vi

Dynamic fork descriptor
%GOD
#GOD**001
@HCI(S) [(DBL),DI32,DU32,DU32,DI32,TF,TF,TF,TF,DI32,DU16:32,TF,TF,TF,TF,DI32,DI32,DI32,DI32,DI32,DI32,DI32,DU16:4,DU16:4,DU16:4,DU16:4]



initHWGOD.vi

Open the IP connections with the four VME SIS3153 controllers and return the connection handles.
The VME access is A32, D32 and "block transfer" is enabled.
The VME mapped size is 4 MByte (that is the whole Apple DEVIL memory).
The vme_base_address is set to E0000000 (which is the DEVIL extended base address).

Controls

Data type

Name

Description

BoolddInLegacy data-dependency input

Indicators

Data type

Name

Description

BoolddOut

Legacy data-dependency output.
The connector pane pattern for all initHWXXX VIs is fixed and mandatory and – for (wrong) historical reasons – it has no indicator returning the error.
The error is returned in ddOut as a boolean obtained from the status element of the output error cluster of the vme_open SubVI.

ddOut = True indicates that an error occourred in the vme_open

Details

The connector pane pattern for all initHWXXX VIs is fixed and mandatory and – for (wrong) historical reasons – does not return any errors.

Examples

---


GODStartup.vi

This is the real data loader of the GODSta.vi 

Controls

Data type

Name

Description




Indicators

Data type

Name

Description




Details

---

Examples

---


closeGOD.vi

Close the IP connections with the four VME SIS3153 controllers and dispose the connection handles.

Controls

Data type

Name

Description

BoolddInLegacy data-dependency input
errorClustererrorIn


Indicators

Data type

Name

Description

BoolddOutLegacy data-dependency output
errorClustererrorOut

Details

---

Examples

---

GGODConnection.vi

Array of cluster. Some variables are constants saved as default values

Variables

Data type

Name

Type

Description

abcDEVILconstant[ 364, 365 ,366, 367 ] (see fig. 1-a, 1-b)
abcelementconstant

[ ORBRAK63, ORBRAK71, ORBRAK70, ORBRAK66 ]
The sequence is sorted according to the direction of the beam for the electronic mode: clockwise, starting from rack 063 (DEVIL364)

abccontrollerIPconstant[ 192.168.192.91, 192.168.192.92, 192.168.192.93, 192.168.192.94 ]
The sequence is sorted according to the direction of the beam for the electronic mode: clockwise, starting from rack 063 (DEVIL364)
U32vme handle
Written at startup by the initHWGOD.vi
U32DEVILBaseAddressconstant0xE0000000 for all 4 DEVILs
U32DEVILBufferOffsetconstant0x200000 (2 MB) for all 4 DEVILs
abcHCIDynDescriptorconstant

It varies depending on the DEVIL36X.DBDyn content

In order to fill the ORBHCIDyn cluster with data read from the SIS3153 interface, we read "HCIDynNumOfLongwords" longwords starting from "HCIDynOffset. Data are then passed to the VI
.../0_classes/GOD/library/VMEMemToORBDyn.vi
that reconstructs the ORBHCIDyn cluster by using the "HCIDynDescriptor".

U32HCIDynOffsetconstantPosition of the dynamic fork in the DEVIL memory. It varies depending on the lenght of other data written before in memory
U32HCIDynNumOfLongwordsconstantThe 4 HCIDyn have different length but we use a safe value to fetch any of them without missing any piece of data. The value is set to 64 longwords.
abcHCIStaDescriptorconstant

 It varies depending on the DEVIL36X.DBSta content

In order to fill the ORBHCISta cluster with data read from the SIS3153 interface, we read "HCIStaNumOfLongwords" longwords starting from "HCIStaOffset. Data are then passed to the VI
.../0_classes/GOD/library/VMEMemToORBSta.vi
that reconstructs the ORBHCISta cluster by using the "HCIStaDescriptor".

U32HCIStaOffsetconstantPosition of the static fork in the DEVIL memory. It varies depending on the lenght of other data written before in memory.
U32HCIStaNumOfLongwordsconstantThe 4 HCISta have different length but we use a safe value to fetch any of them without missing any piece of data. The value is set to 240 longwords.


Turn for electronsTurn for positrons



Figure 1-a: The sequence [0,1,2,3] is sorted according to the direction of the electrons beam: starting from rack 063 (DEVIL364 > 365 > 366 > 367)

Figure 1-b: The sequence [1,0,3,2] is sorted according to the direction of the positrons beam:, starting from rack 071 (DEVIL365 > 364 > 367 > 366)





Details

---

Examples

---

readDEVILBufferLine.vi

This VI reads and returns the last data acquired from the 4 DEVILs. It doesn't perform any data reordering.

Controls

Data type

Name

Description

booleaninit

T = initialize, F = regular run
init = T: some constant values are loaded into the VI shift registers.

init = F: reads the socket "socketNumber" from the VME memory of the DEVIL "DEVILIndex" and returns the two parts 

I32DEVILIndex

Index in the range [0, 1, 2, 3] corresponding to:

INDEX   0,   1,   2,   3
DEVIL 364, 365, 366, 367
RACK  63,  71, 70,  66
I32socketNumberPointer to the acquisition buffer in the range [0, 1926]
[DBL]part XArray of 32 DBL components containing the raw values of the X signals coming from both electron and positron BPMs. The components are in the same order of the values in the DEVIL memory locations.
[DBL]part YArray of 32 DBL components containing the raw values of the Y signals coming from both electron and positron BPMs. The components are in the same order of the values in the DEVIL memory locations.
errorClustererrorIn

When true, the VI does nothing and simply passes the error out.

Indicators

Data type

Name

Description

[DBL]part XArray of 32 DBL: see corresponding control description above. The array is returned both for read and write operations.
[DBL]part XArray of 32 DBL: see corresponding control description above. The array is returned both for read and write operations.
errorClustererrorOut

Details

Each one of the 4 DEVILs has a circular buffer of 1927 lines named "sockets". Write operations of the four circular buffers are synchronized via a common stobe so that the four write pointers are always alligned. At each strobe, each DEVIL stores a "socket" composed as:

  • part X

[DBL]   32 values of the BPM X signals from the Bergoz modules read from that DEVIL;

  • part Y

[DBL]   32 values of the BPM Y signals from the Bergoz modules read from that DEVIL.

The 32 components in part X and Y are ordered according to the cabling and do not necessarily follow the sequence of the BPMs along the vacuum chamber. Moreover the 32 values refer to both e- and e+ rings for which the BPMs sequence is obviously different. As a consequence, part X and Y must be considered as raw containers and their content must be further processed in order to reconstruct the real orbit.

  • Header
DBL   ACQNum [0, 1926];
DBL   timestamp (LabVIEW Time Stamp cast to DBL).
    example: 00:00:00.000 PM
             MM/DD/YYYY

The socket header is written twice: at the beginning of the socket (before part X) and again in the middle of the socket (before part Y) the content of the two headers being the same; this is due to historical reasons and – although it is a waste of memory space – it was left in order not to compromise the functioning of other pieces of code that access the same memory area.

Examples

---

GRawBuffer.vi

This VI is a functional global that stores, holds and returns the last X and Y parts acquired from the 4 DEVILs.

Controls

Data type

Name

Description

I32DEVILIndex

Index in the range [0, 1, 2, 3] corresponding to:

INDEX   0,   1,   2,   3
DEVIL 364, 365, 366, 367
RACK  63,  71, 70,  66
enummode

[init, read, write X and Y, write X, write Y] (read)

  • init: the internal shift register are initialized (all zeros);
  • read: returns "part X" and "part Y" from the arrays specified by "DEVILIndex";
  • write X and Y: stores simultaneously"part X" and "part Y" into the arrays specified by DEVILIndex. Both inputs must have 32 components otherwise no one of them will be stored;
  • write X: stores "part X" only to the buffer specified by DEVILIndex. The array must have 32 components otherwise it will not be stored. The "part Y" array is kept unmodified;
  • write Y: stores "part Y" to the buffer specified by DEVILIndex. The array must have 32 components otherwise it will not be stored. The "part X" array is kept unmodified.
[DBL]part XArray of 32 DBL components containing the raw values of the X signals coming from both electron and positron BPMs. The components are in the same order of the values in the DEVIL memory locations.
[DBL]part XArray of 32 DBL components containing the raw values of the Y signals coming from both electron and positron BPMs. The components are in the same order of the values in the DEVIL memory locations.
errorClustererrorIn


Indicators

Data type

Name

Description

[DBL]part XSee corresponding control description above. The X array is returned both for read and write operations.
[DBL]part XSee corresponding control description above. The Y array is returned both for read and write operations.
errorClustererrorOut

Details

This VI stores and returns the last socket acquired from the 4 DEVILs. It doesn't perform any reordering.

Examples

---


LNFDCS-122 - Getting issue details... STATUS

  • No labels