The power converters are driven by a C program. This used libfesl to address register in the Accu thereby drive the device. This program can open on a TCP network port a server. Here, various parameters can be set, which will allow:
  • to parameterize the power supply unit
  • setting ramp rates
  • set to be reached values (plateaus) and
  • start the operation
The program is "single threaded".

Starting the Server
The server is launched with the option -P port on the command line. On this port the program opens a server serving a single client. Once the server has opened the port, it sends a status message with the last internal state (see protocoll).


The commands are sent as "strings" and the server responds with "strings". ."> All commands have the format <\ S * />. ';"> The server responds to each request with <status value = "0x% 2x" /> ; that is, it sends an integer value hex encoded back, which displays the status. Typical values ​​are:
  • 0: Everything understood
  • 2: "parse error": command not understood
  • 7: "value too high": higher value to be set as allowed
  • 8: "Value too small": small value to be set as allowed
  • 16: "bad userinput": user specified value is not allowed
The standard answer is <status value = "0x00" /> and means: everything fine! Negative status values ​​are warnings or similar e.g:
  • -5: No action needed to be carried out. One example is that the set current values ​​in the cycle are so close together that they make no difference at the output of the power supply.
The server expects two kinds of requests:
  • parameter queries or
  • values ​​that are to be set.
Parameters are set as follows: The client sends a command:
<cmd value = "TOP:PC:RAMP_RATE_UP" set = "1000.0" />

It consists of the name of the parameter, here TOP: PC: RAMP_RATE_UP and a value to be set. This is here 1000.0 (A/s) Note that the space must be adhered to exactly!

The server then responds with the status. The value is zero if all went well.
If values ​​shall be read, so the client sends a command of the type:
<cmd value = "TOP:PC:RAMP_RATE_UP" />

The server then responds
  • with the status (<status value = "0x00" />).
  • Only if the status is 0, so the command was executed successfully, the server responds with a second text.
In this example, the answer is
<ans size = "0x002c" value = " +1.0000000000000000e+03" />

This is read as follows:
  • First 19 bytes are read. This contains the text up to <ans size = "0x% 3x" ; This parameter specifies the length of the remaining strings.
  • After value = the set value is then shown. Currently, only integer or floating-point values ​​are returned.

Parameter space

The parameters are hierarchically organizes and reflect the internal structure. All parameters begin with


The different levels are separated by ':' .

The most important parameters are displayed. All parameters are passed in SI units.

Checking actual status

  • The current the power converter actually measures is checked by FMT:PC:CURRENT:VALUE
  • The internal status (set value) the power converter has curretly is available at the variable FMT:PC:CURRENT:SET_VALUE

Model of the load

The load is modelled as a current-dependent inductance and a constant resistance. It is believed that up to a certain current, the inductance is constant. Thereafter, the decrease of inductivity is represented by a polynomial. The details are given in reference (Annex).

The following parameters are describing the load:
  • TOP:PC:LOAD:INDUCTANCE corresponds to the constant value of inductance. With magnets to match this part, in which the iron does not saturate.
  • TOP:PC:LOAD:RESISTANCE enstpricht the constant resistance of the load. This is not only the resistance of the magnet but also the supply line cable.
  • TOP:PC:LOAD:MAXIMUM_CURRENT maximum current at which the load must be energized. This serves to trap only to an operating error. This is not a safety function.
  • The following two parameters are needed to inductance variation to model. These are
    • TOP:PC:LOAD:NOMINAL_CURRENT the nominal current and
    • TOP:PC:LOAD:THRESHOLD_CURRENT the stream to which the inductance is constant.
Between these two, a value λ is internally linearly interpolated, which is 1 for TOP:PC:LOAD:NOMINAL_CURRENT and 0 for TOP:PC:LOAD:THRESHOLD_CURRENT 0 . Thus λ is given by
λ = (I - Ith) / (Inom - Ith)

with Ith the threshold current (THRESHOLD_CURRENT), Inom the nominal current (NOMINAL_CURRENT) and I the currently to be output by the power converter.

The current-dependent inductance is then calculated by
ind(I) = ind0 * (1 + c1 λ + c2 λ^2 + c3 λ^3)

The polynomial coefficients are set by:
For the SIS100 dipole be its (approximately) the following parameters:

# To be measured on the power converter
# Correction factor applied to INDUCTANCE

Parameters of the current cycle

The parameters of the cycle are handed over to the power converter. These consist of
  • the expected current the power converter should be at
  • the current the power converter should ramp to
  • delays that are to be waited before the next current value is to be approached
  • the number of cycles to execute.
  • the values ​​of the current ramps for the ramps up and down .
    • TOP:PC:RAMP:RATE_UP designates the parameters for the up-ramps
    • TOP:PC:RAMP:RATE_DOWN designates the parameters for the down-ramps
Note that the power converter generates "round ramps" internally. Therefore, the current ramps are the maximum values ​​that can not be achieved if the current increase is small. Internally, the values ​​are stored in an array. Each line is composed by a delay value and a current value. The lowest value is with index zero. It is filled with the following parameters:
  • TOP:PC:RAMP_DATA:SIZEThis the number of current values ​​will be announced. This value can
    • be set up to 127
    • must be at least 2 (a start value, an end value).
    • A value larger than 3 required that the first and the last value to be ident. This is not checked in advance by the network device. When they are different, the power supply will determine at the start of the next cycle, it is not at the right current and pass into the fault mode.
  • TOP:PC:RAMP_DATA:INDEX Here first the index must be set. Typically this is set to zero.
  • TOP:PC:RAMP_DATA:DELAY This parameter sets the delay is set. This determines how long it should wait until the next value is approached.
  • TOP:PC:RAMP_DATA:NEXT_CURRENT With this parameter, the current is set and at the same time increases the index to. 1 This parameter can only be set.
  • TOP:PC:RAMP_DATA:CURRENT This parameter defines the currents can be set or read.
  • TOP:PC:RAMP_DATA:NUMBER_OF_CYCLESThis parameter determines how often a cycle is repeated. Valid values ​​are:
    • 1: one cycles. Although only two current values ​​must be set N_CYCLES be set to 1
    • a positive number. Then, the cycle for the given number is repeated.
    • -1: For an infinite number of repetitions.
Typically a ramp is set as follows:
  • The index is set to 0.
  • The delay value is set. This is typically 0th
  • With NEXT_CURRENT the next current value is passed.
  • At the end of the index must be set to 0 again!
  • The number of cycles is set.
Thereafter, the power supply unit can be activated.

Power Supply Activation

The parameter TOP:SERVER:REALTIME activates the cycle execution. This can be considered as a "state engine".

This can take the following values:
  • 0: not active or cycle finished
  • 1: device should start executing the cycle
  • 2: Power Supply has completed the cycle.
  • 3: power supply unit is carrying out from the cycle.
The client can only set the following values:
  • If the value is to 0, it can be set to 1. Then, the power supply is active
  • If the value is 2, it can be set to 0. It can not be set directly to 1.

Further server commands

All following commands are considered as set commands.
  • TOP:SERVER:INIT the power converter will initialise itself. Call it after you have configured it. Call it in particular after changing the gain! Set value is ignored
  • TOP:SERVER:READY check if the power converter is ready. The power converter will check if it is initialsed and report it
  • TOP:SERVER:LAST_STATUS get back the last status value
  • TOP:SERVER:EXIT the server will acknowledge the command and then quit the program

Parameters for Internal checks of the cycle

These parameters are automatically set at the start of the power supply.

# Which current jump is accepted when a ramp is started (difference between
# requested and actual current)
# The current and voltage is read back. Now which error is to be tolerated on
# the ramp?
# Currently no reading on the ramp
# This value is multiplied with the ramp rate (in Amps per second. Which error
# is to be acceptable then.
# 1e-3 means: 1 Ampere / 1 Volt per kA ramp rate

Parameters and limits of the power supply

These parameters are set at the start of the power supply. Here is an excerpt of the configuration of the 20 kA device.

If the GAIN value is changed, all limits must be reset. The GAIN value is used internally for converting the physical values to register content and should therefore only be changed if the internals of the network device control are known. The limits are converted internally into register values. If read back, one obtains the converted (physical) value.

# Models an old anlog converter: 1 V corresponds to which Ampere value


# The maximum current in A

# Minimum Current

# The maximum ramp rate up kA/s
TOP:PC:CURRENT:RAMP_RATE_POSITIVE_LIMIT=30e3 # The maximum ramp rate down kA/s

# The voltage channel
# the gain of the power converter in V / V
# thus describes how many Volts the power converter will take as a feed forward
# for one volt output on the DAC

# The maximum voltage in V

# The minimum voltage in V

# The maximum positive ramp voltage V/s

# The maximum negative ramp voltage V/s

Changing the gain

If the gain is changed, it could be considered best practise to
  • first set all limits to zero
  • set the gain to a new value
  • then all limits must be set again!
If you do not set the limits to zero before, it can happen, that the power converter realises that the given limit can not be represented by the internal registers. This it will consider as an severe error and stop operation.

Command Line Interface

The power converter unit can be operated from the command line. The most important option is the Help option. It is invoked by:
$ ./power_converter.sh -h

The main options are listed here:
  • -F Drive in error mode to 0 power
  • -t target value (target value)
  • -d delay (delay)
  • -c (Must be explicitly set to 1) number of cycles:
  • -A Ramp rate that is selected at startup. This must be positive.
  • -a Ramp Rate that is chosen when exiting. Thee must be negative.

A typical command looks like this
$ ./power_converter.sh -c10 -t 0 -d 0.05 -t 3e2 -d 0.25 -t 0 -A 2 -a -1

This means:
  • drive 10 cycles
  • the start value should be 0
  • wait 50 ms before the next value is approached
  • ascend 300 A
  • wait 25 ms before the next value is approached
  • go to 0
  • Ramp up to 2 A / s
  • Off ramp with -1 A / s

-- PierreSchnizer - 10 Mar 2016
Topic attachments
I Attachment Action Size Date Who Comment
send_command_test.py.txttxt send_command_test.py.txt manage 13 K 2016-03-10 - 17:05 UnknownUser Client example implemented in python
Topic revision: r9 - 2017-05-17, AlexanderWarth - This page was cached on 2021-07-31 - 05:04.

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback | Imprint (german) | Privacy Policy (german)