CAMAC C460 Ramp Controller
A. Franck, J. Gomilar, B. Hendricks
January 12, 2010
I. Purpose
This module is a programmable ramp controllers whose
functionality mirrors that of the C46x family and is
capable of generating an analog waveform which is based on:
Time into cycle
Current (MDAT value)
Change in current (MDAT value)
The time portion of the waveform is updated at a 1 KHz rate,
and the MDAT portion is updated at a 720 Hz rate.
The C460 also contains digital control capabilities to turn
on (TTL), turn off (TTL), and reset (TTL) a power supply.
It can also return sixteen status bits from the power supply.
Note: The current firmware version number for 460 modules at
the time of this writing is 0.2.
II. Device Descriptions
The ACNET device descriptions for this module are contained
in a separate document.
III. Features
A) Output Function
The output waveform has the form:
output = sf1*m1*f(t) + sf2*m2*g(M1) + sf3*m3*h(M2)
where:
sf1, sf2, sf3 are constant scale factors having a range of
-128.0 to +127.9
m1, m2, m3 are raw MDAT readings divided by 256
f(t) is an interpolated function of time which is initiated
by the 'or' of up to 8 TCLK events
g(M1) and h(M2) are interpolated functions of selected MDAT
parameters
B) MDAT
MDAT parameters are decoded and stored in hardware
registers where software can then access the data. All
currently defined MDAT parameters plus new parameters up to
a total of 64 are supported.
Parameters represented by bipolar, signed, 2's
complement numbers (typecodes 1-7,11-17,21-27,31-37,41-47,
61-67) are used directly in calculations and range in value
from -32768 to 32767. Parameters represented in unipolar,
unsigned form (typecodes 00,10,20,30,40,50-57,60,70-77) are
shifted down by one bit (divided by two) before they are
used in calculations, and they range from 0 to 32767 in
value.
C) Scale Factors
Scale factors are 16 bits long. The upper byte is
interpreted as the whole number part and the lower byte is
interpreted as the fractional part of the scale factor.
The largest negative scale factor is -128.000, and the
largest positive scale factor is approximately 127.996.
Sixteen scale factors are presently supported with an
additional special 'null' scale factor. Any scale factor
can be applied to any of the terms, and any scale factor can
be used any number of times.
Changes to active scale factors are updated at the
start of the next ramp.
Scale factor pointer changes are also updated at the
start of the next ramp.
D) Overflow Errors
The firmware checks for overflow errors following each
calculation and maintains the previously calculated value if
one is detected. An overflow error counter is also
incremented.
E) Ramp Output
The outputs are provided in analog format.
(16 bits, +/- 10.0V)
F) Tables
Each term in the output function will have fifteen
possible tables with a maximum of 64 entries each.
Additionally, there is a table for each term which is
defined as a zero or null function.
Table selection is effected by an interrupt. Thirty
two interrupt levels are available, each is asserted by the
'or' of up to 8 programmed TCLK events. No one given TCLK
event can trigger multiple interrupt levels at the same
time. Interrupt levels can also be asserted via an
F(17)A(10) CAMAC command. The complete list of TCLK events
can be found in the TCLK Event Definitions document.
Upon assertion of an interrupt, the module will begin
using three user specified tables (one for each term in the
output function). The null function should be specified for
unwanted terms.
The g(i) and h(i) values are all directly individually
accessible. For the f(t) table the value entries are also
directly accessible, but the delta t values must be accessed
by first accessing its accompanying value entry.
It is important to note that the maximum valid delta t
value in a time table is 32767 clock ticks. This means that
the high order bit for delta t values is not used. If it is
set, the card will automatically clear it.
Tables are selected via pointers with values of 1 to 15
indicating ramp numbers 1 through 15. A value of zero
indicates the 'null' ramp.
Any changes to an active table are implemented
immediately. However, changes to table pointers are updated
at the start of the next ramp.
G) MDAT Multipliers
MDAT multipliers presently consist of the raw 16 bit
MDAT readings taken from the link divided by 256. They are
updated at a 720 Hz rate. They are accessed via pointers
with a value of 8 indicating MDAT code 10 and a value of 48
indicating MDAT code 60. The range of valid pointer values
is from 1 to 64. A pointer value of zero indicates that no
MDAT multiplier is desired, and a constant multiplier of 1
is inserted. The MDAT pointers are updated at the start of
a ramp.
H) STOP/CONTINUE Mode
This module can be configured in such a way that the
STOP ($62) and CONTINUE ($63) TCLK events can be used to
freeze and unfreeze the output waveform. When in this mode
the thirty first interrupt level is redefined to function as
a 'stop' interrupt, and the thirty second interrupt level
becomes the 'continue' interrupt. When this mode is
selected an event $62 is loaded into the clock event array
for the thirty first level, and an event $63 is loaded in
for the thirty second level. These events can be
subsequently replaced by any other TCLK events if so
desired. The 'stop' and 'continue' interrupts can also be
performed via CAMAC.
I) Power Supply Turn Off Mode
The C460 can be placed in a mode which will cause it to
send an off command to its associated power supply as a
result of a clock event. If this mode is selected, event
$4E is loaded into the thirtieth clock interrupt level.
This event can be replaced by any other TCLK events if so
desired. Any clock event which triggers the thirtieth
interrupt level will then result in a power supply off
command being sent.
J) Copy Time Table to G(I) Table Mode
There are situations under which one might want to
switch modes from time dependency to MDAT. This can be
automatically done by the C460 by setting it up for copy
time to G(I) mode. Under this mode, any TCLK event which
triggers interrupt level twenty nine will cause the time
component of the present waveform to be copied into the
presently playing G(I) value table at the slots surrounding
the most recently decoded MDAT value. This copying will not
take place if the time table is still playing or there is no
active G(I) table. In any case, the original time table
will remain unaffected. The G(I) table, however, has been
permanently changed. The original G(I) values can be
restored via an F(26)A(10) CAMAC command. This mechanism
stores only the first change made to any G(I) table since
the most recent restore.
K) Copy Time Table to H(I) Table Mode
This mode works in exactly the same way as the copy
time to G(I) table described above. The only difference is
that this mode operates on interrupt level twenty six and
that the original H(I) table values can be restored by an
F(26)A(11) CAMAC command.
L) Ramp Down Mode
When a C460 module is following an MDAT table it
produces a specific output for a specific MDAT value.
Therefore, if the MDAT signal happens to be the energy of a
given accelerator, the module will produce the same output
for the upward portion of a ramp as on the downward portion
except that it is reversed in time. Since there are usually
no particles in the accelerator during the downward portion
of the ramp, this behavior is not always useful and is
sometimes harmful to power supplies. The ramp down mode,
when selected, reassigns interrupt level twenty eight to
trigger it. If one of the events for interrupt level twenty
eight is then detected, the C460 will calculate new MDAT and
MDAT value tables to bring the output of the card back to
the value of slot zero in the presently playing MDAT tables.
The newly calculated tables will overwrite G(I) and H(I)
tables number fifteen. Do not use these tables for normal
output functions when this mode is in effect. This mode
will not take effect if the MDAT tables are already at slot
zero or if G(I) and H(I) null tables are presently playing.
In these cases, the command is ignored.
M) Archive data mode
When this mode is activated interrupt level twenty
seven is reassigned to trigger it. If one of the eight
events for that level is subsequently detected, the module
will automatically store away pertinent information
concerning its present output and the values used in
calculating that output. This buffer of data can then be
read out via an F(3)A(3) CAMAC command. A complete listing
of the archival data structure can be found in section VI.
N) Copy table mode
When this mode is activated, interrupt level twenty
five is activated to trigger it. If one of the eight
events for that level is subsequently detected, the module
automatically copy the entire F(T), G(I), and H(I) tables
which were selected by earlier F(20)A(4) CAMAC commands.
Choosing a table number of zero disables copying for the
corresponding table type. Copies can be set up to occur
only once or until a change in the copy table setup is made.
Table copies can also be manually triggered via an
F(25)A(4) command.
O) Add table mode
When this mode is activated, interrupt level twenty
four is activated to trigger it. If one of the eight
events for that level is subsequently detected, the module
automatically adds the entire F(T), G(I), and H(I) tables
which were selected by earlier F(21)A(4) CAMAC commands.
Choosing a table number of zero disables adding for the
corresponding table type. Adds can be set up to occur
only once or until a change in the add table setup is made.
Table adds can also be manually triggered via an
F(25)A(5) command. Note that the tables which are being
added from are not modified.
P) Special LAM Status
Bit #8 of the LAM status is set whenever the end of an
MDAT I table is reached without finding an appropriate I
value. The previous MDAT component to the waveform is
maintained in this event. Bit #14 indicates that an
overflow error has occurred during a calculation. The LAM
register also contains two bits (0 and 2) which indicate
ramp enable/disable status. They always contain values
opposite to one another in order to facilitate digital
alarms for either an enabled or disabled state. Bit #15
being set indicates that a CAMAC command has been received
by the module containing erroneous data. The CAMAC command
is discarded in this event. Bits 12 and 13 indicate the
absence of TCLK and MDAT signals respectively. Finally, bit
9 being set indicates a power supply tracking error.
Q) Initialized State
When the module is powered up or reset all scale factor
pointers will be set to the null scale factor and all scale
factor values will be set to 0.0. Also, all table pointers
will be set to the null table and all table values will be
set to zero. The clock event table will be filled with NOOP
(FE) clock events, and all special operating modes will be
deselected.
R) Power supply tracking
This module has the capability of comparing an external
analog input to its own DAC output to monitor how well a
power supply is tracking its reference. The tolerance for
this comparison can be set via an F(20)A(3) CAMAC command.
This comparison is made at a 1 Hz rate, and if the
difference between the two signals is greater than the
tolerance LAM bit number nine will be set.
S) Clock Interrupt Disable
The module can be made to ignore clock event interrupts
by sending it an F(24)A(5) command. Clock interrupts can be
reenabled with an F(26)A(5) command or by resetting the
module.
IV. CAMAC Functions
A) Read Functions
(1) F0A0 - return f(t) table data (f(t), t order)
(1) F0A1 - return g(i) table data
(1) F0A2 - return h(i) table data
(1) F0A3 - return g(i) i data
(1) F0A4 - return h(i) i data
(2) F0A5 - return ramp table map data
(nibble #2=f(t) table (0-15), nibble #3=g(i) table (0-15),
hi nibble=h(i) table (0-15))
(2) F0A6 - return MDAT multiplier map data (0-64)
(2) F0A7 - return scale factor map data (0-16)
(2) F0A8 - return scale factor data
(3) F0A9 - return clock event data (0-255)
F0A10 - return the f(t) end of table flag
(0 --> time ramp in progress, 1 --> end of table reached)
F0A11 - return the current f(t) segment # (0-63)
F0A12 - return the current g(i) segment # (0-63)
F0A13 - return the current h(i) segment # (0-63)
F0A14 - return the current calculation error (overflow) count
F0A15 - return the # of MDAT interrupts
F1A0 - return power supply status
F1A2 - return most recent DAC setting
F1A3 - return main MDAT selections
(g(i) pointer in high byte (0-63), h(i) in low byte (0-63))
(4) F1A4 - return raw MDAT readings
F1A5 - return power supply status nominal
F1A6 - return power supply status mask
F1A9 - return LAM mask
F1A10 - read and clear PS status error
F1A12 - read and clear LAM
(bit 15=invalid CAMAC function, bit 14=calculation error,
bit 13=MDAT is missing, bit 12=TCLK is missing,
bit 11=PS status error, bit 09=power supply tracking error,
bit 08=MDAT table search error,
bit 02=not ramp enable, bit 00=ramp enable)
F1A13 - return the last CAMAC command received
(low byte --> subaddress, hi byte --> function) (read in hex)
F1A14 - return the last TCLK event detected (0-255)
F1A15 - return the # of TCLK interrupts
(5) F2A0 - return TCLK interrupt level count
F2A1 - return front panel LED status
(bit 00=heartbeat status, bit 01=PS ramp enable,
bit 02=unused, bit 03=unused,
bit 04=unused, bit 05=external permit status,
bit 06=MDAT present status, bit 07=TCLK present status)
F2A2 - return current ramp table set
(nibble #2 = f(t) ramp table, nibble #3 = g(i) ramp table,
hi nibble = h(i) ramp table)
F2A3 - return current scale factor set
(8) F2A4 - return current MDAT multiplier set
F2A5 - return the special configuration word
(bit 0 set --> stop/continue mode enabled,
bit 1 set --> power supply off mode enabled,
bit 2 set --> copy time to g(i) mode enabled,
bit 3 set --> ramp down mode enabled,
bit 4 set --> data archival mode enabled,
bit 5 set --> copy time to h(i) mode,
bit 6 set --> copy table(s) mode,
bit 7 set --> add table(s) mode)
F2A6 - return the stop/continue word
(0 = continue, FFFF = stop)
F2A7 - return the time component of the output value
F2A8 - return the MDAT component of the output value
F2A9 - return the time remaining in the current segment
F2A10 - return the remainder from the last f(t) interpolation
F2A11 - return the last g(i) MDAT value
F2A12 - return the last h(i) MDAT value
F2A13 - return the last f(t) MDAT multiplier
F2A14 - return the last g(i) MDAT multiplier
F2A15 - return the last h(i) MDAT multiplier
F3A0 - return the last interpolated f(t) table value
F3A1 - return the last interpolated g(i) table value
F3A2 - return the last interpolated h(i) table value
(9) F3A3 - return archived data (21 word buffer)
F3A8 - return ramp enable request status
F3A10 - return the active MDAT table number
(0 --> normal MDAT table, 1 --> ramp down MDAT table)
F3A11 - return the # of TCLK interrupt errors
F3A13 - return the # of MDAT table search errors
F3A14 - return the # of 1 Hz interrupts
F3A15 - return the # of CAMAC interrupts
F4A2 - return currently active interrupt level
F4A3 - return current power supply tracking tolerance
(8) F4A4 - return current copy table information
(11) F4A5 - return clock interrupt timestamp data
F4A6 - return last invalid TCLK event detected
F4A7 - return last ignored TCLK event detected
F4A8 - return last invalid CAMAC function code detected
F4A9 - return TCLK FIFO buffer
(12) F4A10 - return TCLK event mask data
(12) F4A11 - return TCLK event image table data
F4A12 - read (but do not clear) LAM
(bit 15=invalid CAMAC function, bit 14=calculation error,
bit 13=MDAT is missing, bit 12=TCLK is missing,
bit 11=PS status error, bit 09=power supply tracking error,
bit 08=MDAT table search error,
bit 02=not ramp enable, bit 00=ramp enable)
F4A14 - return the table copy error (overflow) count
F4A15 - return clock event interrupt disable flag
(0 --> clock interrupts enabled, 1 --> clock interrupts disabled)
F5A0 - return most recent DAC ADC reading
F5A1 - return most recent power supply ADC reading
(8) F5A4 - return current add table information
(13) F5A5 - return reset time
(13) F5A6 - return current time
F5A7 - return maximum output value
F5A8 - return maximum output increment
F5A13 - return the current f(t) scale factor
F5A14 - return the current g(i) scale factor
F5A15 - return the current h(i) scale factor
F6A0 - return module ID number
F6A1 - return firmware version number
(low byte --> minor version, hi byte --> major) (read in hex)
(6) F6A2 - return a word in memory
(6) F6A3 - return a block of memory
(7) F6A4 - return diagnostic counter data
F6A5 - return background count high word
F6A7 - CAMAC I/O diagnostic read
F8A0 - return LAM status (handled by hardware)
F9A0 - reset the module (handled by hardware)
B) Write Functions
(1) F16A0 - write f(t) table data (f(t), t order)
(1) F16A1 - write g(i) table data
(1) F16A2 - write h(i) table data
(1) F16A3 - write g(i) i data
(1) F16A4 - write h(i) i data
(2) F16A5 - write ramp table map data
(2nd nibble=f(t) table # (0-15), 3rd nibble=g(i) table # (0-15),
hi nibble=h(i) table # (0-15))
(2) F16A6 - write MDAT multiplier map data (0-64)
(2) F16A7 - write scale factor map data (0-16)
(2) F16A8 - write scale factor data
(3) F16A9 - write clock event data (0-255)
F16A10 - write table type pointer (0-2)
F16A11 - write clock event table pointer (0-127)
F16A12 - set up pointer for ramp data read/write
(16 bits - 0-1 (unused), 2-4 (table type), 5-9 (table #),
10-15 (table entry #))
(table types - 0 = f(t), 1 = g(i), 2 = h(i), 3 = g(i)(I),
4 = h(i)(I))
F16A13 - set up pointer for map and scale factor data read/write
(16 bits - 0-1 (unused), 2-4 (table type), 5-11 (table entry #))
(table types - 0 = ramp table map, 1 = MDAT multiplier map,
2 = scale factor map, 3 = scale factor table)
F16A14 - set diagnostic memory pointer
F16A15 - set up CAMAC I/O diagnostic values
F17A0 - write TCLK interrupt level counter pointer (0-31)
F17A2 - write directly to DAC
F17A3 - write main MDAT selections
(g(i) pointer in high byte (0-63), h(i) in low byte (0-63))
F17A4 - write diagnostic MDAT pointer (0-63)
F17A5 - write PS nominal status value
F17A6 - write PS status mask value
F17A9 - write LAM mask value
F17A10 - trigger a new output waveform (0-31)
(4) F17A11 - write an MDAT frame (diagnostics only)
F17A12 - write term-wise data pointer (0-2)
F17A13 - write longword pointer (0-1)
F18A5 - write special configuration word
(bit 0 set --> stop/continue mode enabled,
bit 1 set --> power supply off mode enabled,
bit 2 set --> copy time to g(i) mode enabled,
bit 3 set --> ramp down mode enabled,
bit 4 set --> data archival mode enabled,
bit 5 set --> copy time to h(i) mode,
bit 6 set --> copy table(s) mode,
bit 7 set --> add table(s) mode)
F18A6 - write stop/continue word
(0 --> continue, FFFF --> stop)
F19A0 - turn on/off front panel LEDs
F19A2 - write diagnostic counter pointer (0-25)
(0=reserved fault cnt, 1=trace fault cnt, 2=operation fault cnt,
3=arithmetic fault cnt, 4=floating fault cnt,
5=constraint fault cnt, 6=protection fault cnt,
7=machine fault cnt, 8=type fault cnt, 9=spurious interrupt cnt,
10=background cnt, 11=undefined CAMAC interrupt cnt,
12=CAMAC interrupt count, 13=TCLK interrupt count,
14=MDAT interrupt count, 15=time (1 KHz) interrupt count,
16=periodic (1 Hz) interrupt, 17=TCLK error count,
18=MDAT search table error count, 19=copy table overflow count,
20=ignored TCLK event count, 21=default interrupt count,
22=read DAC ADC interrupt count, 23=read PS ADC interrupt count,
24=clear interrupt failure count, 25=watchdog interrupt count)
F19A3 - set archived data pointer (0-20)
F20A3 - write power supply tracking tolerance value
(8) F20A4 - write copy table information
F20A5 - write clock interrupt timestamp pointer (0-31)
F20A11 - write generic clock event table diagnostic pointer (0-255)
(8) F21A4 - write add table information
F24A0 - disable LAM
F24A1 - turn off power supply
F24A2 - disable the ramp
F24A5 - disable clock event interrupts
F25A0 - decrement the DAC
F25A1 - increment the DAC
F25A3 - trigger a module data archive
F25A4 - trigger a table copy
F25A5 - trigger a table add
F26A0 - enable LAM
F26A1 - turn on power supply
F26A2 - enable the ramp
F26A5 - enable clock event interrupts
F26A7 - reset power supply
F26A9 - reset pointer for loading diagnostic memory address
F26A10 - restore g(i) table after copy from f(t) table
F26A11 - restore h(i) table after copy from f(t) table
F26A12 - clear clock event table (This takes ~1 sec.)
F26A13 - clear all diagnostic counters
F26A14 - create a time table update interrupt
F26A15 - create an MDAT table update interrupt
1 --> should be preceded by F16A12
2 --> should be preceded by F16A13
3 --> should be preceded by F16A11
4 --> should be preceded by F17A4
5 --> should be preceded by F17A0
6 --> should be preceded by F16A14
7 --> should be preceded by F19A2
8 --> should be preceded by F17A12
9 --> should be preceded by F19A3
10 --> should be preceded by F16A10
11 --> should be preceded by F20A5
12 --> should be preceded by F20A11
13 --> should be preceded by F17A13
V. MDAT Mapping
MDAT Frame MDAT Multiplier Code Main MDAT Code
---------- -------------------- --------------
00 1 0 U
01 2 1 B
02 3 2 B
03 Time of day (low) 4 3 B
04 Time of day (high) 5 4 B
05 6 5 B
06 7 6 B
07 8 7 B
10 Prog Tev I 9 8 U
11 Prog Tev I dot 10 9 B
12 Tevatron state 11 10 B
13 LB squeeze sequence 12 11 B
14 13 12 B
15 14 13 B
16 15 14 B
17 16 15 B
20 Meas Tev I 17 16 U
21 Meas Tev I dot 18 17 B
22 19 18 B
23 20 19 B
24 21 20 B
25 22 21 B
26 23 22 B
27 24 23 B
30 Prog MI P 25 24 U
31 Prog MI P dot 26 25 B
32 27 26 B
33 28 27 B
34 29 28 B
35 30 29 B
36 31 30 B
37 32 31 B
MDAT Frame MDAT Multiplier Code Main MDAT Code
---------- -------------------- --------------
40 Meas MI I 33 32 U
41 Meas MI I dot 34 33 B
42 35 34 B
43 36 35 B
44 37 36 B
45 38 37 B
46 39 38 B
47 40 39 B
50 Tev intensity 41 40 U
51 Tev intensity 42 41 U
52 Tev time at 150 GeV 43 42 U
53 Tev RF anode program 44 43 U
54 Prog MI P dot (MSW) 45 44 U
55 Prog MI P dot (LSW) 46 45 U
56 MI cycle ID 47 46 U
57 48 47 U
60 MI intensity 49 48 U
61 MI FT intensity 50 49 B
62 MI quad diff I 51 50 B
63 52 51 B
64 53 52 B
65 54 53 B
66 55 54 B
67 56 55 B
70 57 56 U
71 58 57 U
72 59 58 U
73 60 59 U
74 61 60 U
75 62 61 U
76 63 62 U
77 64 63 U
(The complete list of MDAT signals can be found in the BD Controls - MDAT
document.)
VI. Archived Data Buffer
Position Value Description
________ _________________
1 DAC value
2 time (f(t)) component of DAC value
3 MDAT (g(i) + h(i)) component of DAC value
4 set of active table numbers
5 g(i) MDAT index (0-63)
6 h(i) MDAT index (0-63)
7 MDAT value used to interpolate g(i) table
8 MDAT value used to interpolate h(i) table
9 f(t) term MDAT multiplier index (-1-63)
10 g(i) term MDAT multiplier index (-1-63)
11 h(i) term MDAT multiplier index (-1-63)
12 f(t) term MDAT multiplier
13 g(i) term MDAT multiplier
14 h(i) term MDAT multiplier
15 f(t) term scale factor
16 g(i) term scale factor
17 h(i) term scale factor
18 f(t) interpolated table value
19 g(i) interpolated table value
20 h(i) interpolated table value
21 interrupt level
VII. References
Schematic Number 0812 - ED - 218803
Front Panel xxxx - MC - xxxxxx
VIII. I/O Connections
Viking Connector
1L - analog output (high)
1R - analog output (low) (ground)
2L - readback in (high)
2R - readback in (low)
3L - power supply reset
3R - ground
4L - power supply on/off
4R - LAM request (status bit 7 input)
5L - status bit 6 input
5R - status bit 5 input
6L - status bit 4 input
6R - status bit 3 input
7L - status bit 2 input
7R - status bit 1 input
8L - status bit 0 input
8R - status current return
9L - ground
9R - status bit 9 input
10L - status bit 8 input
10R - ground
11L - analog out (high)
11R - analog out (low) (ground)
12L - ground
12R - ground
13L - ground
13R - ground
14L - ground
14R - ground
15L - ground
15R - ground
16L - status bit 10 input
16R - status bit 11 input
17L - status bit 12 input
17R - status bit 13 input
18L - status bit 14 input
18R - status bit 15 input
Security, Privacy, Legal