Detailed descriptions of the actual Charge Shuffling operation and higher level control software is given in the following references:
CCD Controller Charge Shuffling Specification, J R Barton CCD Controller Command Summary, L G Waller Instrument Sequencer Command Summary, L G Waller Taurus and Observer Control Tasks, T J FarrellThe purpose of charge shuffling is to move regions of charge on the CCD into and out of an ëxposed" area (which is defined by a mask), synchronised with the switching of a optical filter (i.e. the TTF).
The shuffling of the charge is done entirely by the CCD controller. The triggering and timing of the charge shuffling is controlled by the microprocessor and the timer/counters in the CCD Controller. The switching of the TTF however, is done by the Taurus microprocessor.
To summarise:
The only ëxternal world" output which the CCD Controller has, is a synchronisation output which it can pulse. So, to save time and reduce effort, it was decided to use the Instrument Sequencer once again, to send step numbers to Taurus, on receipt of an external synchronisation signal from the CCD Controller. All this scheme required, was the addition of a differential to single ended signal interface in the Instrument Sequencer, and the connection of this signal to an interrupt input on a parallel I/O register port.
The problem then became one of developing a method by which the sync interrupts from the CCD Controller could be associated with Taurus step numbers. Prior to running charge shuffling mode, a user created table defining the CCD Controller operation during shuffling is downloaded to the CCD Controller. This is called the "Phase Table" and contains a number of items of information. Each movement of charge during the shuffle operation is defined by a phase entry in the phase table. When charge shuffle runs, the CCD Controller microprocessor steps through the phase table executing each phase entry according to the information in the various control fields in the phase entry. The operation supports repeating one or more phase entries and repeating the entire phase table sequence. Thus, quite complicated sequences can be defined for a charge shuffle, with many operations.
One of the fields in a phase table entry is a Taurus step number. This is ignored by the CCD Controller, but a copy of the Phase Table is also downloaded to the Instrument Sequencer. The Instrument Sequencer is also programmed with the same phase table execution algorithm used by the CCD Controller (with some slight modifications). When a charge shuffling run is started by the CCD Controller, the Instrument Sequencer steps through the phase table in response to external sync interrupts from the CCD Controller. The Instrument Sequencer ignores all the fields in the phase table entries other than those related to phase table execution, and the Taurus step number. If, while executing the phase table on receipt of external syncs from the CCD Controller, a non zero Taurus step number is found, the Instrument Sequencer transmits that step number to Taurus. When the charge shuffling run completes, as determined by the Phase table, the Instrument Sequencer sends a zero step number to Taurus, which causes Taurus to terminate.
In this manner, the TTF Z-steps are triggered from the CCD Controller.
To summarise:
+------------+ | Vax | | Observer | | Taurus | +------------+ ^ ^ ^ RS232 Links Phase Table (incl Step Nos.) | | | Step Nos. - Etalon Positions Table "Shuffle" command | | | "Run" command +-----------------------+ | +---------------------+ | | Phase Table | | | (incl. Step Nos.) | | | "Shuffle" command | v v v +----------+ +----------------------+ +--------+ | CCD Ctlr |----/---->| Instrument Sequencer |----/---->| Taurus | +----------+ 1 +----------------------+ 2 +--------+ Sync Clock+Data
Total X Phases = Sigma (((1 + X Phase i Repeats) x (1 + X Phase i Offset)) - X Phase i Offset)) i = 1 to Number of X Phase Entries X = Start, Run, EndOn Receipt of 'cs' command (which specifies Cycles), determine:
Total Phases to Execute = Total Start Phases to Execute + Total Run Phases to Execute x Cycles + Total End Phases to ExecuteThe following pseudo code describes execution of the Running Sequence in Charge Shuffling Exposure Mode.
Set Running Status (xs == 2)
if cs_Start_Phase_Trigger = TINCR then
Kick Start TINCR
Wait for Phase Sync Interrupt
Cycle Count = Cycles
Next Phase = First Phase Entry
Offset Phase Count = 0
Phase Repeat Count = Next Phase Repeat Count
if Next Phase == Last Run Phase and Cycle Count > 1 then
begin
Future Phase = First Run Phase
Cycle Count = Cycle Count - 1
end
else
begin
Future Phase = Next Phase + 1
end
Wait for First Phase Sync Interrupt
while Total Phases to Execute > 0 and Abort Flag False
begin
Current Phase = Next Phase
Next Phase = Future Phase
Execute Current Phase
Setup Next Phase
if Phase Repeat Count == 0 then
begin
if Next Phase Offset > 0 then
begin
Offset Phase Count = Next Phase Offset + 1
Phase Repeat Count = Next Phase Repeat Count
Future Phase = Next Phase - Next Phase Offset
end
else {Next Phase Offset == 0}
begin
if Next Phase Repeat Count > 0 then
begin
Phase Repeat Count = Next Phase Repeat Count
Offset Phase Count = 0
Future Phase = Next Phase
end
else
begin
Phase Repeat Count = 0
Offset Phase Count = 0
if Next Phase == Last Run Phase and
Cycle Count > 1 then
begin
Future Phase = First Run Phase
Cycle Count = Cycle Count - 1
end
else
begin
Future Phase = Next Phase + 1
end
end
end
end
else {Phase Repeat Count > 0}
begin
if Offset Phase Count > 0 then
begin
Offset Phase Count = Offset Phase Count - 1
if Offset Phase Count == 0 then
begin
Phase Repeat Count = Phase Repeat Count - 1
if Phase Repeat Count == 0 then
begin
if Next Phase == Last Run Phase and Cycle Count > 1 then
begin
Future Phase = First Run Phase
Cycle Count = Cycle Count - 1
end
else
begin
Future Phase = Next Phase + 1
end
end
else
begin
Future Phase = Next Phase -
Next Phase Offset
Phase Count = Next Phase Offset + 1
end
end
else
begin
if Next Phase == Last Run Phase and
Cycle Count > 1 then
begin
Future Phase = First Run Phase
Cycle Count = Cycle Count - 1
end
else
begin
Future Phase = Next Phase + 1
end
end
end
else
begin
Phase Repeat Count = Phase Repeat Count - 1
if Phase Repeat Count == 0 then
begin
if Next Phase == Last Run Phase and
Cycle Count > 1 then
begin
Future Phase = First Run Phase
Cycle Count = Cycle Count - 1
end
else
begin
Future Phase = Next Phase + 1
end
end
else
begin
Future Phase = Next Phase
end
end
end
Total Phases To Execute = Total Phases To Execute - 1
Test External Sync Input
if Stop At End of Cycle Flag True then
begin
Reset Stop At End of Cycle Flag
if Cycle Count > 1 then
begin
if Total Phases to Execute > (Total Run Phases to
Execute x Cycles + Total End Phases To Execute) then
begin
Total Phases To Execute = Total End Phases to
Execute - Total Run Phases To Execute x
(Cycles - 1)
Cycle Count = 1
end
else if Total Phases To Execute > Total End Phases To
Execute then
begin
Total Phases To Execute = Total End Phases to
Execute - Total Run Phases To Execute x
(Cycle Count - 1)
Cycle Count = 1
end
end
end
Wait for Next Phase Sync Interrupt
end