{From: 29543::graham "David Graham" 28-OCT-1991 13:11:16.15} {***************************************************************} procedure SetModeVLBI(mode:string;sampl:word); {inserted for PV} {mode is 'A' 'B'or 'C', sampl in khz e.g. 4000} var isamp,iloop,csampl:word; function bsbc(bbc,sb:word):word; {bbc 1-14,sb=0forL,1 for U, get code for Interferometrics} const bbcc:array[1..28] of word=($07,$03,$06,$02,$05,$01,$04,$00,$17,$13, $16,$12,$15,$11,$14,$10,$0F,$0B,$0E,$0A, $0D,$09,$1F,$1B,$1E,$1A,$1D,$19); begin bsbc:=$8000+bbcc[(bbc-1)*2+1+sb]; end; {*************************************************************************} function rec2fmt(rec:word):word; {rec=recorder track number, get number of corresponding fmtr 'track'} const tks:array[1..36] of word=(35,33,17,1,18,2,19,3,20,4,21,5,22,6,23,7, 24,8,25,9,26,10,27,11,28,12,29,13,30,14, 31,15,32,16,36,34); begin rec2fmt:=tks[rec]; end; {*************************************************************************} procedure SelectFmtInput(mode:string); {table for tracks numbered 1..28,which BBC: 101=U1,001=L1,114=U14 etc.} const modea:array[1..28] of word=(101,102,103,104,105,106,107,108,109,110, 111,112,113,114,001,002,003,004,005,006, 007,008,009,010,011,012,013,014); const modeb:array[1..28] of word=(101,101,103,103,105,105,107,107,109,109, 111,111,113,113,001,001,003,003,005,005, 007,007,009,009,011,011,013,013); const modeb8:array[1..28] of word=(101,101,102,102,103,103,104,104,105,105, 106,106,107,107,001,001,002,002,003,003, 004,004,005,005,006,006,007,007); const modec:array[1..28] of word=(102,102,104,104,106,106,108,108,110,110, 112,112,114,114,101,101,103,103,105,105, 107,107,109,109,111,111,113,113); var i,j,k,l:integer; begin for i:=1 to 28 do begin j:=rec2fmt(i+2); if mode = 'A' then k:=modea[i]; if mode = 'B' then k:=modeb8[i]; if mode = 'C' then k:=modec[i]; if mode = 'B' then if GreenBankRack then k:=modeb[i]; l:=k div 100; k:=k-l*100; send($D1,j); send($D2,bsbc(k,l)); end; end; {****************************************************************************} begin connect(mcb,$2c,$2300,$100); {ConnFM} SelectFmtInput(mode); {track allocation for Mode A/B/C} send($8d,$ffff); send($8e,$ffff); {enable all formatter channels} csampl:=200; for iloop:=1 to 8 do begin if csampl < sampl then isamp:=iloop-1; csampl:=csampl*2 end; send($91,$8000+isamp); {Formatter sample rate} isamp:=isamp+2; if isamp > 7 then isamp:=7; {max tape rate with 1:1 tracks} send($AD,8+isamp); {tape rate} send ($82,$8001); {reconfigure formatter} {at this point,should do a loop for 5-7 secs waiting for formatter to finish reconfiguring!} end; {********************************************************************}