Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents


Page properties


Document status

Status
colourGreenYellow
titleFINALIN PROGRESS

Document owner
DesignerAlessandro Stecchi
DevelopersAlessandro Stecchi
QAAlessandro Stecchi


...

The DAFNE orbit is acquired by 4 front-end legacy Apple DEVILs (364, 365, 366, 367) and post processed by the DEVIL204DEVIL704.
The basic system elements created by the 4 front-end DEVILs are:

  • ORBRAK063 (364)
  • ORBRAK071 (365)
  • ORBRAK070 (366)
  • ORBRAK066 (367)

and the final system element created by the DEVIL204 DEVIL704 is:

  • GOD**001002

The DEVIL204DEVIL704, besides the two conventional GOD**001002_STA and GOD**001002_DYN forks, builds also a circular buffer some live buffers of data (containing the actual real-time X and Y orbit projections) accessible in the VME address space. To have this data also available on non-VME processors, a dedicated proxy constantly reads the GOD**001_STA and GOD**001_DYN forks, as well as the circular buffer from VME, and transfers them to memcached.

Source

[DEVIL364, 365, 366, 367] > [DEVIL204] > [Orbit_Proxy]

memcached.

Source

[DEVIL364, 365, 366, 367] > [DEVIL704]

Keys

...

Key nameSource

Write freq. [Hz]

Data size [byte]

Throughput
[kbyte/s]

FomatNotes
GOD**
001
002_STA
Orbit_ProxyLV cluster [
DEVIL704-2624-
typeDef
LV cluster flattened to str
]


GOD**

001

002_DYN

Orbit_Proxy
DEVIL7045.5
10
460.
45typeDef
25LV cluster
LV cluster [
flattened to str
]ORBP*DAT_BUFOrbit_Proxy10102420

2D [DBL]

2 rows of 64 DBL (row 0: hor, row 1: ver) [flattened to str]

ORBE*DAT_BUFOrbit_Proxy10102420

2D [DBL]

2 rows of 64 DBL (row 0: hor, row 1: ver) [flattened to str]

ORBP*AVG_BUFOrbit_Proxy10102420

2D [DBL]

2 rows of 64 DBL (row 0: hor, row 1: ver) [flattened to str]

ORBE*AVG_BUFOrbit_Proxy10102420

2D [DBL]

2 rows of 64 DBL (row 0: hor, row 1: ver) [flattened to str]

ORBP*VAR_BUFOrbit_Proxy10102420

2D [DBL]

2 rows of 64 DBL (row 0: hor, row 1: ver) [flattened to str]

ORBE*VAR_BUFOrbit_Proxy10102420

2D [DBL]


ORB-E_INFO
ORB-P_INFO

DEVIL704-~2500
~2500
-

Json document

Static description of the orbit with name, abscissa and index of each element.

  • name: name of the BPM [8-characters srting];
  • s: curvilinear abscissa (along the ring) [m];
  • i: index of element in the 64-DBL arrays. An example of the Json document is:
Expand
titleDetailed description
[
   {
      "name":"BPBEL101",
      "s":2.531,
      "i":0
   },
  {
    "name":"BPBEL102",
    "s":6.205,
    "i":1
  },

... etc ...

  {
    "name":"BPBEL209",
    “s":96.228,
    "i":59
  }
]



ORBE*NOD_BUF
It will be ORB-E_BUF
DEVIL7045.510245.5LV 2D-array flattened to str (see description below)

Electrons: average(N) of the orbit (hor + ver)
2 rows of

2 rows of ORB-E-_INFO
ORB-P-64_INFO

Static description of the orbit with name, ascissa and index of each element.

  • name: name of the BPM;
  • s (curvilinear abscissa), position along the ring [m];
  • i: index of the component corresponding to the element "name" in the 64-DBL array. Should index be equal "-1", that element must be ignored. This happens when:
    1. that BPM has been excluded (by a mask);
    2. there is no BPM connected to that channel. In that case "name" is "BPMDUMMY" and the curvilinear abscissa "s" is 0) 
[
   {
      "name":"BPBEL101",
      "s":2.531,
      "i":0
   },
  {
    "name":"BPBEL102",
    "s":6.205,
    "i":1
  },

...
  {
    "name":"BPBEL209",
    “s":96.228,
    "i":59
  }
]ORBP*STD_BUF
ORBE*USR_BUF
ORB-E-MEAN8_BUF

64 DBL (row 0: hor, row 1: ver) [flattened to str]

Key nameSource

Write freq. [Hz]

Data size [byte]

Throughput
[kbyte/s]

FomatNotes
GOD**002_STADEVIL704-2624-typeDef

LV cluster [flattened to str]

64-components array with moving average calculated on the last N samples.

The N number is set by the operators via the orbit control window and can vary continuously. If you want to deal with an orbit averaged over a fixed number of samples, use the "ORB-E-USER_BUF" key instead.


ORBP*NOD_BUF
It will be ORB-P_BUF
DEVIL7045.510245.5LV 2D-array flattened to str

Positrons: average(N) of the orbit (hor + ver)
2 rows of 64 DBL (row 0: hor, row 1: ver)

GOD**002_DYN

DEVIL7045.5460.25typeDefLV cluster 

[flattened to str]

64

-components array with moving average calculated on the last N samples.

The N number is set by the operators via the orbit control window and can vary continuously. If you want to deal with an orbit averaged over a fixed number of samples, use the "ORB-E-USER_BUF" key instead.

ORB-E-STDDEV_BUFDEVIL7045.510245.5LV 2D-array flattened to strElectrons: Std. Dev. of the orbit (hor + ver)
2 rows of 64 DBL (row 0: hor, row 1: ver) [flattened to str]
64-components array with standard deviation calculated on the last N samples.
ORB-P-STDDEV_BUF

DEVIL7045.510245.5LV 2D-array flattened to strPositrons: Std. Dev. of the orbit (hor + ver)
2 rows of 64 DBL (row 0: hor, row 1: ver) [flattened to str]
64-components array with standard deviation calculated on the last N samples.
ORB-E-USERDEVIL704-~2500-

Json document

Expand
titleDetailed description
ORBE*NOD_BUF
ORB-E64-MEAN_BUF

DEVIL7045.51024~7005.53.9LV 2D-array flattened to strElectrons: average(N8) of the orbit for users (hor + ver)
2 rows of 64 DBL (row 0: hor, row 1: ver) [flattened to str]
64-components array with moving average calculated on the last N 8 samples.
ORBP*NODORB-P-USER_BUFDEVIL7045.51024~7005.53.9LV 2D-array flattened to strPositrons: average(N8) of the orbit for users (hor + ver)
2 rows of 64 DBL (row 0: hor, row 1: ver) [flattened to str]
64-components array with moving average calculated on the last N 8 samples.ORBE*STD_BUF
DEVIL7045.510245.5Electrons: Std. Dev. of the average(N) orbit (hor + ver)
2 rows of 64 DBL (row 0: hor, row 1: ver) [flattened to str]
64-components array with standard deviation calculated on the last N samples.
DEVIL7045.510245.5Positrons: Std. Dev. of the average(N) orbit (hor + ver)
2 rows of 64 DBL (row 0: hor, row 1: ver) [flattened to str]
64-components array with standard deviation calculated on the last N samples.
DEVIL7045.5~7003.9Electrons: average(8) of the orbit ready for users (hor + ver)
2 rows of m DBL (row 0: hor, row 1: ver) [flattened to str]
m-components array with moving average calculated on the last 8 samples. The number of components "m" (typ. 44) depends on the current BPMs setup and the hardware and user masks. The array is ready for viewing.
ORBP*USR_BUFDEVIL7045.5~7003.9Positrons: average(8) of the orbit ready for users (hor + ver)
2 rows of m DBL (row 0: hor, row 1: ver) [flattened to str]
m-components array with moving average calculated on the last 8 samples. The number of components "m" (typ. 44) depends on the current BPMs setup and the hardware and user masks. The array is ready for viewing.

Total throughput

...


kbyte/sMbit/s
~30~0.23

Keys usage

Example of LabVIEW code to use at level 1 to unflatten and extract from the 2D-array the two projections of the orbit:

Image Added

When using languages different from LabVIEW, the "unflatten from string" operator is not available; in these cases, you have to decode the 2D-array.
The 2D-array is written in memcached as two I32 numbers – that report the number of rows and the number o columns of the 2D-array – followed by a series of DBL numbers (ordered row by row). The following example, reports the representation of a 2-rows, 3-cols array with the values: row 0 = [0,1,2], row 1 = [10,11,12]

Code Block
languagetext
titleExample of 2D array (3 columns, 2 rows)
|< #rows >|< #cols >|        a00        |        a01        |        a02        |        a10        |        a11        |        a12        |
                    |                          first row                        |                          last row                         | 
|---------|---------|-------------------|-------------------|-------------------|-------------------|-------------------|-------------------|
 0000 0002 0000 0003 0000 0000 0000 0000 3FF0 0000 0000 0000 4000 0000 0000 0000 4024 0000 0000 0000 4026 0000 0000 0000 4028 0000 0000 0000 


Map BPM Arrays

electrons

Code Block
languagejs
titleELECTRON ORBIT
[
   {
      "name":"BPBEL101",
      "s":2.531,
      "i":0
   },
   {
      "name":"BPBEL102",
      "s":6.205,
      "i":1
   },
   {
      "name":"BPBEL103",
      "s":8.808,
      "i":2
   },
   {
      "name":"BPBEL104",
      "s":9.803,
      "i":3
   },
   {
      "name":"BPBEL105",
      "s":12.135,
      "i":4
   },
   {
      "name":"BPBEL106",
      "s":13.920,
      "i":5
   },
   {
      "name":"BPBEL107",
      "s":16.293,
      "i":6
   },
   {
      "name":"BPBEL108",
      "s":17.184,
      "i":7
   },
   {
      "name":"BPBEL109",
      "s":21.095,
      "i":8
   },
   {
      "name":"BPBEL110",
      "s":24.308,
      "i":9
   },
   {
      "name":"BPBEL111",
      "s":24.885,
      "i":10
   },
   {
      "name":"BPBI1001",
      "s":25.455,
      "i":12
   },
   {
      "name":"BPBI1002",
      "s":25.926,
      "i":16
   },
   {
      "name":"BPBES199",
      "s":27.503,
      "i":18
   },
   {
      "name":"BPBES100",
      "s":30.283,
      "i":19
   },
   {
      "name":"BPBES101",
      "s":33.761,
      "i":20
   },
   {
      "name":"BPBES102",
      "s":34.919,
      "i":21
   },
   {
      "name":"BPBES103",
      "s":37.258,
      "i":22
   },
   {
      "name":"BPBES104",
      "s":39.043,
      "i":23
   },
   {
      "name":"BPBES105",
      "s":41.375,
      "i":24
   },
   {
      "name":"BPBES106",
      "s":42.370,
      "i":25
   },
   {
      "name":"BPBES107",
      "s":44.912,
      "i":26
   },
   {
      "name":"BPBES108",
      "s":48.140,
      "i":27
   },
   {
      "name":"BPBES201",
      "s":49.041,
      "i":32
   },
   {
      "name":"BPBES202",
      "s":49.997,
      "i":33
   },
   {
      "name":"BPBES203",
      "s":52.677,
      "i":34
   },
   {
      "name":"BPBES204",
      "s":55.219,
      "i":35
   },
   {
      "name":"BPBES205",
      "s":56.214,
      "i":36
   },
   {
      "name":"BPBES206",
      "s":58.546,
      "i":37
   },
   {
      "name":"BPBES207",
      "s":60.331,
      "i":38
   },
   {
      "name":"BPBES208",
      "s":63.455,
      "i":39
   },
   {
      "name":"BPBES209",
      "s":65.658,
      "i":40
   },
   {
      "name":"BPBES210",
      "s":69.515,
      "i":41
   },
   {
      "name":"BPBEL299",
      "s":74.283,
      "i":49
   },
   {
      "name":"BPBEL200",
      "s":78.185,
      "i":50
   },
   {
      "name":"BPBEL201",
      "s":79.361,
      "i":51
   },
   {
      "name":"BPBEL202",
      "s":80.703,
      "i":52
   },
   {
      "name":"BPBEL203",
      "s":83.668,
      "i":53
   },
   {
      "name":"BPBEL204",
      "s":85.453,
      "i":54
   },
   {
      "name":"BPBEL205",
      "s":87.786,
      "i":55
   },
   {
      "name":"BPBEL206",
      "s":88.781,
      "i":56
   },
   {
      "name":"BPBEL207",
      "s":91.338,
      "i":57
   },
   {
      "name":"BPBEL208",
      "s":94.561,
      "i":58
   },
   {
      "name":"BPBEL209",
      "s":96.228,
      "i":59
   }
]


Positrons

Code Block
languagejs
titlePOSITRON ORBIT
[
   {
      "name":"BPBPL101",
      "s":2.531,
      "i":0
   },
   {
      "name":"BPBPL102",
      "s":6.205,
      "i":1
   },
   {
      "name":"BPBPL103",
      "s":8.808,
      "i":2
   },
   {
      "name":"BPBPL104",
      "s":9.803,
      "i":3
   },
   {
      "name":"BPBPL105",
      "s":12.135,
      "i":4
   },
   {
      "name":"BPBPL106",
      "s":13.920,
      "i":5
   },
   {
      "name":"BPBPL107",
      "s":16.293,
      "i":6
   },
   {
      "name":"BPBPL108",
      "s":17.184,
      "i":7
   },
   {
      "name":"BPBPL109",
      "s":21.095,
      "i":8
   },
   {
      "name":"BPBPL110",
      "s":24.308,
      "i":9
   },
   {
      "name":"BPBPL111",
      "s":24.885,
      "i":10
   },
   {
      "name":"BPBI1002",
      "s":25.455,
      "i":12
   },
   {
      "name":"BPBI1001",
      "s":25.926,
      "i":16
   },
   {
      "name":"BPBPS199",
      "s":27.503,
      "i":18
   },
   {
      "name":"BPBPS100",
      "s":30.283,
      "i":19
   },
   {
      "name":"BPBPS101",
      "s":33.761,
      "i":20
   },
   {
      "name":"BPBPS102",
      "s":34.919,
      "i":21
   },
   {
      "name":"BPBPS103",
      "s":37.258,
      "i":22
   },
   {
      "name":"BPBPS104",
      "s":39.043,
      "i":23
   },
   {
      "name":"BPBPS105",
      "s":41.375,
      "i":24
   },
   {
      "name":"BPBPS106",
      "s":42.370,
      "i":25
   },
   {
      "name":"BPBPS107",
      "s":44.912,
      "i":26
   },
   {
      "name":"BPBPS108",
      "s":48.140,
      "i":27
   },
   {
      "name":"BPBPS201",
      "s":49.041,
      "i":32
   },
   {
      "name":"BPBPS202",
      "s":49.997,
      "i":33
   },
   {
      "name":"BPBPS203",
      "s":52.677,
      "i":34
   },
   {
      "name":"BPBPS204",
      "s":55.219,
      "i":35
   },
   {
      "name":"BPBPS205",
      "s":56.214,
      "i":36
   },
   {
      "name":"BPBPS206",
      "s":58.546,
      "i":37
   },
   {
      "name":"BPBPS207",
      "s":60.331,
      "i":38
   },
   {
      "name":"BPBPS208",
      "s":63.455,
      "i":39
   },
   {
      "name":"BPBPS209",
      "s":65.658,
      "i":40
   },
   {
      "name":"BPBPS210",
      "s":69.515,
      "i":41
   },
   {
      "name":"BPBPL299",
      "s":74.283,
      "i":49
   },
   {
      "name":"BPBPL200",
      "s":78.185,
      "i":50
   },
   {
      "name":"BPBPL201",
      "s":79.361,
      "i":51
   },
   {
      "name":"BPBPL202",
      "s":80.703,
      "i":52
   },
   {
      "name":"BPBPL203",
      "s":83.668,
      "i":53
   },
   {
      "name":"BPBPL204",
      "s":85.453,
      "i":54
   },
   {
      "name":"BPBPL205",
      "s":87.786,
      "i":55
   },
   {
      "name":"BPBPL206",
      "s":88.781,
      "i":56
   },
   {
      "name":"BPBPL207",
      "s":91.338,
      "i":57
   },
   {
      "name":"BPBPL208",
      "s":94.561,
      "i":58
   },
   {
      "name":"BPBPL209",
      "s":96.228,
      "i":59
   }
]

Keys usage

Example of LabVIEW code to use at level 1 to unflatten and extract from the 2D-array the two projections of the orbit:

Image Removed

When using other languages, the "unflatten from string" operator is not available; in these cases, you can decode the 2D-array fo
The 2D-array is written in memcached as two I32 numbers that report the number of rows and the number o columns of the 2D-array, followed by a series of DBL numbers (ordered line by line). The following example, reports the 2D representation of a 2-rows, 3-cols array with the values: line 0 = [0,1,2], line 1 = [10,11,12]

Code Block
languagetext
titleExample of 2D array (3 columns, 2 rows)
|< #rows >|< #cols >|        a00        |        a01        |        a02        |        a10        |        a11        |        a12        |
                    |                          first row                        |                          last row                         | 
|---------|---------|-------------------|-------------------|-------------------|-------------------|-------------------|-------------------|
 0000 0002 0000 0003 0000 0000 0000 0000 3FF0 0000 0000 0000 4000 0000 0000 0000 4024 0000 0000 0000 4026 0000 0000 0000 4028 0000 0000 0000