Uploaded by H. Alian

11 chapter 5

advertisement
CHAPTER 5
DESIGN AND DEVELOPMENT OF
LARGE FORMAT PHOTO WRITE SYSTEM:
SOFTWARE FEATURES
62
SECTION 5.1
PHOTOWRITING SOFTWARE
The software was designed using C and Assembly languages. The role of the
software is to control the following functions of the photowrite.
1. Load data into disk from the peripheral devices such as CDROM, CCT
and DAT.
2. Read the header file of the data.
3. Format the data
4. Load film gamma lookup tables.
5. Read number of pixels, scan lines, resolution, Image filename, x zoom
and y zoom factors
6. Expose pixel by pixel and scan line by scan line on photographic paper.
The above functions are indicated in flow chart as shown in
Figure 5.1.
As described in chapter 3 the photowriting software also performs the
functions similar to film recorder software. The header routine reads number
of records and number bytes for each record, also reads at what photowrite
resolution the image is to be written. The format routine converts data into
photowrite compatible format.
During the expose instruction, one scan line ( rgb records ) of the
image data is written into the photowrite buffers at the instance of the index
pulse which is connected to computer interface through device interface. The
START
P»o#» 1 nfR
Paw» 9 of 8
P»o#» ^ of 8
Pact#* 4 nf 8
Color
Filming
Open Image File
I
Raid Thro; records
from Image file
Expose first record with
Red light by considering
Xzoom factor
Yes
Paor#*
f>
of 8
Pao«»7nf8
Close
filmine
i
Clear control
registers of the
interface
r
Reset redirected
interrupts
r
( STOP )
FIG 5.1: FLOW CHART OF THE PROGRAM
R of R
63
device interface writes byte by byte on the drum as single scan line of image
in synchronous with the pixel clock. After completing one line, another line
is transferred into photowrite buffers and expose on the photographic paper
as second line. In this fashion entire data file is written on the photowrite.
The index pulse indicates start of every scan line at the same place on the
photographic paper for getting required registration of line to line.
-0-
64
SECTION 5.2
SOFTWARE DRIVER ROUTINES AND UTILITIES
The software driver is designed using C and Assembly languages, it
provides control and status signals required for the functioning of
photowrite. These are callable routines. The user can call these routines in to
his software, which simplifies the design of application software. Following
are the functions of the Software driver.
• Reading data from computer system and writing to photowrite buffer.
• Providing controls for operating various sub-systems and also monitoring
status of these systems, such as
Annotate - Generates image of annotation
Clear memory - clears the photowrite line buffer.
Film Band - Writes a band of a BIL format image on to the paper.
Film Img - Writes Color or B/W image on to the paper.
Film Pattern - Films test pattern from RAM drive.
Get Status - Get the status of photowrite system.
Home - Moves the optics carriage to the home position
Initialize - Initializes the photowrite.
LeftStep - Moves the optics carriage away from the home position
from the current position
Right Step - Moves the optics carriage towards home position form
the current position.
Set Position - moves the optics carriage to the desired position.
65
• Parameters:
npix - number of pixels to be filmed
nlines - number of lines to be filmed.
xzoom - zoom factor along cross scan direction.
xzoom - zoom factor along along scan direction.
bandno - band sequence ( 1 / 2 / 3 ) required to be filmed.
color(rgb) - in which specified bands of the image to be filmed.
resolution - resolution ( 1 - 50,2 - 100).
film type - type of film 0-color, 1-black and white
• look up tables
Clear LUT - loads zeros into Look up tables
LoadLut - loads lookup tables from the user specified lut file.
ReadLut - Displays lookup tables on the monitor
SOFTWARE UTILITIES
Software utilities are additional programs which are used for smooth and fast
operations. Some of the utilities are
1. Generation of reverse lookup table.
2. Histo lut generations programme.
3. Image Display software.
4. Preparing data for specific format along with annotation.
5. Edit the AIM densities.
6. Tools for developing new programs.
0-
-
66
SECTION 5.3
APPLICATION SOFTWARE
Application software is for writing user data on photographic paper by
reading parameter file stored in the disk. For example, writing IRS -1C,
PAN sub-scene, programme reads number of scan lines and pixels of the
scene and the resolution of the paper output from parameter file and
generates paper output as per user required scale.
Application software
contains programmes for writing image obtained from different applications
such as remote sensing, etc.
Application software generates test outputs for daily calibration and
periodic calibration of photowrite.
Application software contains programs for creating user passwords
and also for changing user passwords.
Application software is designed with user friendliness to allow to
include software utilities developed by them.
Apart from software utilities some of the driver functions, which are
directly required by the operator, like step home, etc, are also incorporated in
application software as menu item.
The detailed software program developed on these lines follows.
/ft*********************************************************
Project
File name
Function
Large Format fotorite 1040C
Film.c
routine to film images from hard disk using
lfpw production, double buffer card
i.e. main card + piggy back card.
#include<stdio.h>
#include<stdlib. h>
#include<bios.h>
#include<string.h>
#inc!ude<io.h>
#include<dos.h>
#include"addl.h''
#include’,soft.h"
#define ctrl_brkno Ox lb
#define ctrl_cno 0x23
#define int_req_9 0x71
//#define FI 190
//#define F2 255
//#defineF3 10
union REGS inregs, outregs;
struct SREGS segregs;
void interrupt ctrl_brk(void);
void (interrupt *oldfuncX);
void interrupt intr_9(void);
void (interrupt *oldfuncl)();
void interrupt ctrl_c(void);
void (interrupt *oldfunc2)();
void rtime(void);
double rtimel(void);
int oopen(char *);
void ospecial_read(int, char far *, int);
void oclose(int);
void eend(void);
void set_buf(char);
68
void param_load(void);
void poke(unsigned int long, int);
void norm_exit(void);
void set_resolution(int, int);
int ocreate(char *);
void oread(int ,char *,int);
void owrite(int, char *, int);
char getramdrive(void);
void oseek(int in, long skipix)
{
unsigned long int n_bytes=0;
inregs.x.bx = in;
inregs.x.cx = n_bytes;
inregs.x.dx = skipix; /* no of bites to be seeked*/
inregs.h.al = 1;
inregs.h.ah = 0x42;
intdos(&inregs,&outregs);
if(outregs.x.cf1ag != 0)
{
print_error("Unable to seek File!");
eend();
}
unsigned char ♦bufl 10];
unsigned char far buffer[21000];
int fd,fp,fv;
int intflag,breakl ,color=0,count 1 ,J,rgbbuf[256][3];
char datfile[6][50],b;
long linebuf;
int dcw=66,scw=0x64,scwl=l,srb2=0xl0,exposure;
/* 0,1,2 = red,green,blue */
int steps,plldiv,count=l,indes=0,m=l,no_of_drives,soft,LTimes,Times;
float t,ii,perc=0;
int HOME,g_step,b_step,F 1=190,F2=255,F3=10;
int LOG=31, WHT= 119,RED=68,GRN=35,BLU= 17,DIB=58,MB 1 =67,MB2=36,
ERl=76,ER2=92,TOP=87,BOT=83,MNU= 122,BCK= 17,WPRINT=0;
unsigned *a;
char print[100];
int sp_lcount =0,sp_count=0,xzoom,yzoom,nls,npix,exp_c;
float datal,data2,data3,data4;
double test 1 =0,test2,diff,timel [ 101 ],average=0;
char om[ 15],om 1 [30],rgb[3],infile[50];
int len,film_type,lf=0,resolution,i,per,bandno,rgb_s;
void oflush(void)
{
whiie(_bios_keybrd(_KEYBRD_READY) != 0) getch();
}
unsigned char pokeout(unsigned int iong add)
{
unsigned char num;
char far *buff= (char far *)add;
num = *bufF,
retum(num);
}
int readstat(void)
{
unsigned char a;
scwl |= 2;
poke(LAT15, scwl);
dew = dcw|2;
poke(DATA_CTRL_REG,dcw);
dew = dcw&253;
poke(DATA_CTRL_REG,dcw);
a = pokeout(SRBl);
dew = dcw|2;
poke(DATA_CTRL_REG,dcw);
scwl &= 253;
poke(LAT 15, sew 1);
retum((int)a);
}
void type(int attaint color)
{
inregs.h.ah = 0x09;
inregs.h.bh = 0;
inregs.hal = attr;
inregs.h.bl = color;
inregs.h.ci = 01;
inregs.h.ch = 00;
int86(0x 10,&inregs,&outregs);
)
void oprintf(int row,int col,char *temp,int color)
{
int t,i;
t = strlen(temp);
for(i=0;i<t;i++)
{
70
ocurpo$(row,col+i);
type(temp[i], color);
}
main(int argc, char *argv[])
{
FILE *oram;
ift(argc!= 13)&&(argc!=14))
{
printf("\nFILMI (R) Filming Routine for Images Ver 1.40.");
printf("\nCopyright (c) Speck Systems. All rights reserved.Vn");
printf("\nUsage: FILMICOM <file> <nls> <npix> <xz> <yz> <res>
<clrxband> <per> <soft> <L Skip> <Times> \n");
printf("\nUsage : FILMICOM <file> <nls> <npix> <xz> <yz> <res>
<clr> <band> <per> <soft> <L Skip> <TimesXl for rgbtest> \n");
exit(0);
}
strcpy(infile,argv[ 1 ]);
nls= atoi(argv[2]);
npix = atoi(argv[3]);
xzoom = atoi(argv[4]);
yzoom = atoi(argv[5]);
resolution = atoi(argv[6]);
strcpy(rgb,argv[7]);
bandno = atoi(argv[8]);
per = atoi(argv[9]);
soft = atoi(argv[10]);
LTimes = atoi(argv[l 1]);
Times = atoi(argv[12]);
rgb_s=2;
if(argc==14) exp_c= 1;
switch(resolution)
{
case 1: steps=50; break;
case 2: steps=100; break;
case 3: steps=200; break;
}
if((oram = fopen("\\lfpw\\data\\custom.cor,Hr"))!=NULL)
{
fscanf(oram, "%d %d %d %d %d %d %d %d %d",
&DEB,&MB 1 ,&MB2,&ER1 ,&ER2,&TOP,&BOT,&MNU,&BCK);
fclose(oram);
}
71
if((oram = fopen("\\lfpw\\data\Vgbdelay.dat","r,,))!=NULL)
{
fscanfforam, "%d %d %d %d %d
%d",&F 1 ,&F2,&F3,&HOME,&g_step,&b_step);
fclose(oram);
}
len = strlen(rgb);
if (len — 3) film_type = 1 j* color image*/
else if (len == 2) filmtype = 3;/* for single band (sb)pseudo color*/
else film type = 2; /* black & white image */
oldfiinc = _dos_getvect(ctrl_brkno); /* redirecting the interrupts */
_dos_setvect(ctrl_brkno,ctrl_brk); /* Ctrl_Break,
*/
oldfimcl = _dos^getvect(int_req_9); /*
*/
_dos_setvect(int_req_9,intr_9);
/* IRQ-9,
*/
oldfimc2 = _dos_getvect(ctrl_cno); /*
and
*/
_dos_setvect(ctrl_cno,ctrl_c);
/* Ctrl c
*/
nls = (nls * yzoom);
_dosjgetdrive(a);
b = getramdriveO;
_dos_setdrive(*a,&no_of_drives);
for(i=0;i<4;i++)
/* to fill datfile buffer with file names*/
sprintf(datfile[i],"%c:\\temp%d.dat",b,i);
/*
ldexpo(film_type);*/
linebuf = Qx7ffF-npix;
fine_buf = (long) (SEGMENT|line_buf);
line_buf++;
set_resolution( steps,per);
param_load();
set_buf('n');
t = nls/60.0;
retrieve^,0,24,79);
ii=count*t;
print_screen();
rgb_home(l);
i^m != 0) srb2 = srb2 | 128 ;
72
else srb2 = srb2 & 127;
srb2 = srb2132;
poke(STATUS_CTRL_REG,srb2);
if (film_type — 1)
filmColImageO;
else if (film_type = 3)
filmTbndO;
else filmBwImageO;
ocurpos(24,l);
normexitO;
filmColImageO
{
int zoom=0,z,ram=0,zz;
intflag - 0;
swapO;
fd = oopen(infile);
do{
zoom=0;color=0;
for(;color < 3;)
{
oread(fd,buffer,npix);
fv = ocreate(datfile[color]);
owrite(fv,buffer,npix);
oclose(fv);
fp = oopen(datfile[color]);
ospecial_read(fp, (char far *)line_buf, npix);
oclose(fp);
wait();
if((color<3)&&(color>0)){ set bufCn'); rgbstep(rgb[color]);|
set_buf(rgb[(color++)]);
swapQ;
}
pmt();
z=l,zz=0;
do
{
if(zz=0) { ram=l;zz=l;}
else ram=0;
for(;ram<Times;)
73
color = 0;
set_buf(’n');*/
/*
rgb_homc(l);
for(;color<3;)
fp = oopen(datfile[co!or]),
ospecial_read(fp, (char far *)line_buf, npix);
oclo$e(fp);
waitO;
if((color<3)&&(color>0)) (set_buf('n'); rgbstep(rgb[color]);}
set_buf(rgb[(colorH-)]);
swapO;
}
ram++;
pmtO; z=0;
}
waitO;
set_buf('n');
stepO; rgb_home(I);
swap();
zoom++;
for(z=0; z<LTimes; z++)
{
waitQ;
swap();
set_buf('n');
}
} while(zoom<yzoom);
}while(lf < nls);
oclose(fd);
}
filmTbndQ
{
int zoom=0,z,ram=0,zz;
intflag = 0;
strcpy(rgb,"rgbM);
swapO;
fd = oopen(infile);
do
{
zoom=0;color=0;
oread(fd,buffer,npix); /* read one line and write 3 times */
74
for(;color < 3;)
{
fv = ocreate(datfile[color]);
owrite(fv,buffer,npix);
oclose(fV);
fp = oopen(datfile[color]);
ospecial_read(fp, (char far *)line_bu£ npix);
oclose(fp);
waitO;
if((color<3)&&(color>0)) {setJbufCn’); rgbstep(rgb[color]);}
set_buf(rgb[(color-H-)]);
swapO;
}
pmtO;
z=l,zz=0;
do
{
if(zz=0) (ram=l;zz=l;}
else ram=0;
for(;ram<Times;)
{
color = 0;
f*
set_buf('n');*/
rgb_home(l);
for(;color<3;)
{
fp = oopen(datfile[color]);
ospecial_read(fp, (char far *)line_buf, npix);
oclose(fp);
wait();
if((color<3)&&(color>0)){ set_buf('n'); rgbstep(rgb[color]);}
set_buf(rgb[(color++)]);
swapO;
}
ram++;
pmtO; z=0;
}
waitO;
set_buf('n');
step();
rgb_home(l);
swapO;
zoom++;
for(z=0; z<LTimes; z++)
{
waitO;
swapO;
set_buf('n');
>
} while(zoom<yzoom);
}while(lf < nls);
oclose(fd);
filmBwImageO
{
int z,zz;
intflag = 0;
color = 0;
if(exp_c=l)
{
switch(rgb[0])
{
case'g':
rgbstep('g');
break;
caseV:
rgbstepCg');
rgbstep('g');
break;
}
}
else
{
rgbstepCg');
rgbstepCg1);
rgbstepCg’);
rgbstep('g');
rgbstepCg');
rgbstepCg');
rgbstepCg');
fd = oopen(infile);
if^bandno) oseek(fd,(long)((bandno-1 )*npix));
swapO;
do
{
oread(fd,buffer,npix);
fv = ocreate(datfile[l]);
owrite(fv,buffer,npix);
oclose(fv);
for(zz= 1 ;zz<=yzoorn;zz++)
{
for(i=l ;i<=Times;i++)
{
color = 0;
fp = oopen(datfile[l]);
ospecial_read(fp, (char far *)line_buf, npix);
oclose(fp);
wait();
swap();
set_buf(rgb[color++]);
prnt();
}
wait();
set_buf('n');
step();
swap();
for(z=0; z<LTimes; z++)
{
wait();
swapO;
setbufCn');
}
}
iffbandno) oseek(fd,(long)npix*2);
}while(lf<nls);
oclose(fd);
}
print_screen()
{
scrollup(6,8,21,74,DIB);
oprintf(7,27,"Filming from Harddisk",DIB);
oprintf(8,27,"-------- --------------------------- ",DIB);
77
sprintf(print,"No. of pixels
oprintf( 10,25,print,DIB);
sprintf^print,"No. of lines
oprintf^l 1,25,print,DIB);
: %d x %d - %d",npix,xzoom,npix*xzoom);
: %d x %d = %d",nls/yzoom,yzoom,nls);
sprintf(print,"Pixels Resolution : %d",steps);
oprintf( 12,25,print,DIB);
oprintfl[13,25,"Film Type
:",DIB);
if^film_type=2) oprintf(13,45,"B/W",DIB);
else oprintf(l 3,45,"COLOR",DIB);
sprintf(print,"File Name
: %s",infile);
oprintf( 14,25,print,DIB);
sprintf(print,"Dynamic Sequence : %s",rgb);
oprintf( 15,25,print,DIB);
oprintf(16,25,"Speed Rev/Min :",DIB);
oprintf(18,10,"Filming Line :",DIB);
oprintf( 18,53,"Percentage :",DIB);
sprintf(print,"%3 0f%%",perc);
oprintf( 18,66,print,DIB);
sprintf(print, "%cH, 176);
for(i=l 1 ;i<=70;i++)
oprintf(20,i, print,DIB);
}
void set_resolution(int steps,int per)
{
dump_cmd(attncmd);
delay2();
if(soft=0)
{
dump_cmd("R\r");
delay2();
}
switch(steps)
{
/*
case 50:
plldiv = Oxae;
exposure = 127-((43.29* per)/125);
exposure = 67;*/
break;
case 100:
plldiv =0xac;
exposure = 127-((86.58*per)/125);
exposure = 47;*/
break;
case 200:
plldiv = 0xa8;
exposure3 127-((173.2*per)/125);
exposure = 0;*/
break;
/*
/*
}
}
ldexpo(int ftype)
{
FILE*fpl;
int i;
switch(ftype)
{
caseO:
if((fp 1 =fopen(H\\lfpw\\data\\expbw.datM,"r"))== NULL)
{
retrieve(24,0,24,75);
ocurpos(24,l); putch(7);
printf(" Unable to open file \\lfpwWdataWexpbw.dat
getch();
restore(24,0,24,75);
eend();
}
break;
}
for(i=0; i<256; i++) fscanf(fpl,"%d,',&rgbbuf[i][0]);
/*if(ftype != 2) {
for(i=0; i<256; i++) fscanfl[fpl,H%dH,&rgbbufIi][ 1]);
for(i=0; i<256; i++) fscanfffpl,"%d",&rgbbuf[i][2]),
}*/
fcloseffpl);
}
retrieve(int tr,int lc.int br.int rc)
{
int i,j,m=0,wid=rc-lc+l, ht=br-trH;
if ((buftindes] = (char *)ma!ioc(wid*ht*2))==NULL)
{
print_error("Merriory Allocation Error! Cannot go further..");
getchO; oflushQ;
exit(-l);
for(i=tr;i<=br;i++)
for(j:=lcj<=rcj++)
{
ocurpos(y);
inregs.h.ah=0x08;
inregs.h.bh=0;
int86x(OxlO,&inregs,&outregs,&segregs);
*(buf[indes]+m)=outregs.h.al; m++;
*{buflindes]+m)=outregs.h.ah; m++;
}
indes++;
restore(int tr,int lc.int br,int rc)
{
int ij,m=0,wid=rc-lc+l, ht=br-tr+l;
-indes;
for(i=tr;i<=br;i++)
for(j=lcj<=rcj++)
{
ocurposCij);
inregs.h.ah=9;
inregs.h.bh=0;
inregs.h,al=*(buf{indes]+m); m++;
inregs.h.bl=*(buf[indes]+m); m++;
inregs.x.cx=0x01;
int86x(0x 10,&inregs,&outregs,&segregs);
}
free(buf[indes]);
scrollup(int tr,int lc,int br,int rc.int attr)
{
inregs.h.ah = 0x06;
inregs.h.al = (br-tr)+l,
inregs.h.ch = tr;
inregs.hcl = lc;
inregs.hdh = br;
inregs.h.dl = rc;
inregs.h.bh = attr;
int86x(0x 10,&inregs,&outregs,&segregs);
void param_load(void){
int temp;
temp = 256-xzoom;
poke(X_ZOOM_REG,temp);
temp = Oxffff - npix;
temp++;
poke(PIX_COUNT_REGLOW,temp);
temp = temp » 8;
poke(PIX_COUNT_REGHIGH,temp);
poke(OP_DATA_BUFFER,plldiv);
poke(PLL_DrVIDER_REG,pHdiv);
temp = Oxffff - steps;
poke(OP_DATA_BUFFER,temp);
poke(STEP_DIVIDER_REG,temp);
temp = temp»8;
poke(OPJDATA_BUFFER>temp);
poke(LAT 14,temp);
poke(STATUS_CTRL_REG,srb2);
if(soft)
{
dump_cmd(attncmd);
delay20;
dumpcmd(dnldcmd);
delay2();
sprintf(print,HX F5000 D-%d*%cH,steps,13);
dumpcmd(print);
delay20;
dump_cmd(movecmd2);
delay2();
dump_cmd(movecmd3);
delay2();
dumpcmd(runcmd);
}
caic()
{
if^spl count < 100)
{
rtime();
timel [sp_l count]=<doubleX(doubleXdatal *60*60)+(data2*60)+
(data3>Kdata4/100));
sp_lcount++;
return(O);
}
rtimeO;
test 1 =(doubieX(doubleXdata1 *60*60)+(daia2*60)+(data3 )+(data4/100));
diff = testl-timel[sp_eount];
timel[sp_count] = testl;
sp_count++;
if(sp_count > 99) sp_count = 0;
if(WPRINT <tf)
{
average = (6000/diff);
sprintf(print,"%3,0T,average);
oprintf( 16,45,print,DIB);
WPRINT++;
}
ocurpos(int row,int col)
{
inregs.h.ah = 0x02;
inregs.h.dh * row;
inregs.h.dl = col;
inregs.hbh = 0x00;
int86x(0x!0,&inregs,&outregs,&segregs);
void rtime(void)
{
inregs.h.ah = 0x2c;
intdos(&inregs,&outregs);
datal = outregs.h.ch;
data2 = outregs.h.cl;
data3 = outregs.h.dh;
data4 = outregs.h.dl;
}
void interrupt intr_9(void)
{
intflag= 1;
outp(0xa0,0x20);
82
outp(0x20,0x20);
}
void interrupt ctri_brk(void)
{
break 1 - 1;
outp(0xa0,0x20);
outp(0x20,0x20);
void interrupt ctrl_c(void)
{
break 1 = 1;
outp(0xa0,0x20);
outp(0x20,0x20);
}
void set_buf(char dyn)
{
/*
srb2 = srt>2 13;
poke(STATUS_CTRL_REG,srb2);*/
switch(dyn)
{
case'r':
caseH':
setrO;
break;
case'g':
case'G';
setg();
break;
case'b':
case'B':
setb();
break;
case'n':
setnc();
break;
default:
break;
I
}
dew = dew & 243; /*11110011*/
poke(DATA_CTRL_REG,dcw); /* RED */
poke(OP_DATABUFFER, exposure);
poke(EXPO_CTRL_REG,exposure);
}
setgO
{
/*
srb2 = srb2 & 253;
poke(STATUS_CTRL_REG,srb2);*/
dew = (dew & 247)|4; 1*11110111 00000100*/
poke(DATA_CTRL_REG,dcw); /* GREEN */
poke(OP_D ATABUFFER, exposure);
poke(EXPO_CTRL_REG,exposure);
}
setb()
{
dew = (dew & 251)|8; /*11111011 00001000*/
poke(DATA_CTRL_REG,dcw); /* BLUE */
poke(OP_DATA_BUFFER, exposure);
poke(EXPO_CTRL_REG,exposure);
}
setncO
{
/*
/*
srb2 = srb2 & 254;
poke(STATUS_CTRL_REG,srb2);*/
dew = dew 112;
poke(DATA_CTRL_REG,dcw);
poke(OP_DATA_BUFFER, 127);
poke(EXPO_CTRL_REG, 127);*/
}
void poke(unsigned int long add, int num)
{
char far *bufT= (char far *)add;
*buff = num;
)
void ospecial_read(int fdd, char far *buffer, int npix)
{
inregs.x.bx = fdd;
inregs.xdx = FP_OFF(buffer);
segregs.ds = FP_SEG(bufFer);
inregs.x.cx = npix;
inregs.h.ah = Ox3f;
/* Read file record */
int86x(0x21 ,&inregs,&outregs,&segregs);
if(outregs.x.cflag!=0)
{
print_error("Unable to read File!");
eendO;
}
if(outregs.x.ax=0)
{
print_error("Unable to read File!"); eend();
}
else
buffer[outregs.x.ax]= 0;
void eend(void)
{
rgb_home(0);
dump_cmd("D\r");
delay20;
if(soft)
{
dump_cmd(remcmd);
delay20;
}
srb2 &= 223;
srb2 |= 16;
poke(STATUS_CTRL_REG, srb2);
_dos_setvect(int_req_9,oldfiinc 1);
_dos_setvect(ctrl_brkno,oldfunc);
_dos_setvect(ctrl_cno,oldfunc2);
restore(0,0,24,79);
exit(23);
void norm exit(void)
{
rgb_home(0);
if(soft==0)
{
step();
delay2();
delay2();
deiay2();
deiay20;
dump_cmd("D\rH);
delay20;
} else
{
dumpcmd(remcmd);
delay20;
}
setbuf^'n');
srb2 &= 223;
srb2 1= 16;
poke(STATUS_CTRL_REG,srb2);
_dos_setvect(int_req_9,oldfiinc 1);
_dos_setvect(ctrl_brkno,oldfunc);
_dos_setvect(ctrl cno,oldfunc2);
restored,0,24,79);
exit(0);
void oclose(int in)
{
inregs.x.bx = in;
inregs.h.ah = 0x3e; /* Close file*/
int86x(0x21 ,&inregs,&outregs,&segregs);
}
int oopen(char infile[50])
{
int fdd;
inregs.x.dx = FP_OFF(infile);
segregs.ds = FP_SEG(infile);
inregs.h.al= 0x00; /* asm mov al,0*/
inregs.h.ah = 0x3d;
/* Open a input file */
fdd = int86x(0x21,&inregs, &outregs, &segregs);
if (outregs.x.cflag != 0)
{
print_error("Error in opening File!");
eend();
}
retum(fdd);
86
delay(long count)
{
union REGS rin,rout;
rin.h.ah = 0x86;
rin.x.cx = 0;
rin.x.dx = count;
int86(0xl 5,&rin,&rout);
>
stepO
{
lf++;
if(soft)
{
sprintf(print, "%cH, 13);
dump_cmd(print);
} else {
dew = dcw| 16; /* 0001 0000*/ /*00110000 48*/
dew = dcw&223/* 1101 1111*/
poke(DATA_CTRL_REG,dcw);
dew = dcw&239/* 1110 1111*/ /*11101111 239*/
poke(D ATA_CTRL_REG,dcw);
}
}
/*wait()
{
int tt,i;
tt = OxfffF;
for(i=0;i<93;i++) delay(tt);
}*/
wait()
{
while (lintflag)
if(breakl — 1) {
eend();
}
intflag = 0;
calc();
}
swap()
{
m = !m;
if(m != 0) srb2 = srb21128;
else srb2 = srt>2 & 127;
poke(STATUS_CTRL_REG,srb2);
}
pmtO
{
/*
lf++;*/
if(lf >= ii){
sprintf(print,’'%c,’,219);
do {
count++; ii=count*t;
oprintf(20,count+9,print,DIB);
}while(lC>=ii);
}
sprintf(print, "%4d",lf);
oprintf( 18,30,print,DEB);
if(nls > 100) {
if(lf%(nls/100) = 0)
perc = ((float)ltf(float)nls)* 100.0;
}
else
perc = ((float)lf7(float)nls)* 100.0;
sprintf(print,"%3 .Of%%",perc);
oprintf( 18,66,print,DIB);
int ocreate(char file[50])
{
int outl;
inregs.x.dx = FP_OFF(file);
segregs.ds= FP_SEG(file);
inregs.x.cx = 0;
inregs.h.ah = 0x3c;
/* Create file */
int86x(Ox21,&inregs, &outregs, &segregs);
outl = outregsx.ax;
if(outregs.x.cflag !=0)
{
}
print_error(MUnable to create File!");
eend();
retum(outl);
}
void owrite(int outl, char buffer[20005],int npix)
{
inregs.x.cx = npix;
inregs.x.bx = outl;
inregs.x.dx = FP_OFF(buffer);
segregs.ds = FP_SEG(bufFer);
/♦inregs.x.dx = (int) &buffer[0];*/
inregs.h.ah = 0x40;
/* Writer a record */
int86x(0x21 ,&inregs,&outregs,&segregs),
void oread(int fdd, char buffer[20005], int npix)
{
inregs.x.bx = fdd;
inregs.x.dx = FP_OFF(buffer);
segregs.ds = FP_SEG(bufFer);
/♦inregs.x.dx = (int) &buffer[0];*/
inregs.x.cx = npix;
inregs.h.ah = 0x3f;
/* Read file record */
int86x(0x21 ,&inregs,&outregs,&segregs);
if(outregs.x.cflag!=0)
{
print_error(MUnabIe to read File!");
eend();
}
if(outregs.x. ax=0)
{
print_error("Unable to read File!"); eend();
}
else
buffer[outregs.x.axJ= 0;
}
char getramdrive(void)
{
int i=l;
int no_of_drives;
_dos_setdrive(4,&no_of_drives);
retum('A'+no_of_dri ves-1);
}
print_error(char ♦test)
89
{
int a;
retrieve(7, IS, 11,65);
putch(7);
scrollup(7,15,11,65 JER1);
a=strlen(test);
a = (50-strlen(test))/2 +17;
oprintf(9,a,test,ER 1);
wait_keyO;
restore(7,15,11,65);
}
wait_key(){
retrieve(24,0,24,79);
ocurpos(24,0);
putch(7);
oprintf(24,0,'' Press Enter to Continue...
getchO; oflushO;
restore(24,0,24,79);
}
rgbstep(char test)
{
int a,b,c;
switch(test)
{
case 'g':
rgb_s=g_step;
break;
caseV:
rgb_s=b_step;
break;
}
for(c=0; c<rgb_s; C++)
{
srb2 &= Oxfe;
srb2 |= 0x01;
poke(STATUS_CTRL_REG,srb2);
srb2 &= Oxfe;
poke(STATUS_CTRL_REG,srb2);
srb21= 0x01; for(a=0; a<F3; a++);
poke(STATUS_CTRL_REG, srb2);
for(a=0; a<Fl;a++)
",ER2);
90
forCb=0; b<F2;b++);
}
}
rgb_home(int home)
{int a,b,c,t,ram=l,val,r;
for(;l;)
{
/* inbreak 1 — 1) {
fclose(vil);
eendO;
}*/
val = readstatQ;
r = val&0x02;
if(r=2) break;
srb21= 0x03;
poke(STATUS_CTRL_REG,srb2);
srb2 &= Oxfe;
poke(STATUS_CTRL_REG, srb2);
srb2 |= 0x03; for(a=0; a<F3; a++);
poke(STATU S_CTRL_REG,srb2);
for(a=0; a<Fl;a++)
for(b=0; b<F2;b++);
}
if(home) {
for(t=0; t<HOME; t++) {
srb2 &= Oxfe;
srb2 |=0x01;
poke(ST ATUS_CTRL_REG,srb2);
srb2 &= Oxfe;
poke(STATU SCTRLREG, srb2),
srb21= 0x01; for(a=0; a<F3; a++);
poke(STATU S_CTRL_REG,srb2);
for(a=0; a<Fl;a++)
for(b=0; b<F2;b++);
}
}
}
0-
-
SECTION 5.4
CALIBRATION AND MEASUREMENT PROCEDURES
The output of power supplies are measured and adjusted to get specified
voltages. The Fiber cable is adjusted in x, y, z direction till maximum light is
impinged on the tip of the fiber. The video gain and offset of the amplifier
inputting DAC outputs to RF modulator drivers are adjusted to achieve
required densities and to avoid leakage density in the output when zero
signal is presented to modulator drivers. Modulator driver frequencies are
adjusted to get proper R, G, B outputs after the spatial filter.
Synthesizer frequency is adjusted for spacing along scan pixels at
required intervals on the photographic paper. Similar adjustment is done for
cross scanner stepper movement. Dwell time is adjusted to get proper
exposure for getting correct pixel size on the photographic paper. Drive
motor controller is adjusted to run the drum at 650 rpm.
Test targets such as grayscales, color bars and MTF patterns are
exposed on the photographic paper. The outputs of these targets are
measured
using
scanning
microdensitometer
and
spot
measuring
densitometer. Wherever measurements are deviating from specifications of
photowrite system corresponding sub-systems are adjusted. The reproduced
output is also measured for checking geometric accuracy. The specifications
of the Photo Write system are shown in Table 5.1.
The system is calibrated and the same is working satisfactorily. The
system is tested extensively and the same is being productionised.
92
TABLE 5.1
SPECIFICATIONS OF PHOTOWRITE
1. Media Type
Photographic paper (Kodak2976)
2. Maximum image size
40"x 40"
3. Spot size
100 Microns
4. Pixel Format
Programmable in multiples of above
resolution with independent X & Y
multiplication factors.
5. Dynamic Density Range
^ 2.0D
6. Uniformity
±0.05 D@ 0.9 D
7. Data input
8 bits per color
8. Light source
Xenon Arc Lamp for green and blue
channels, Laser diode for red channel.
9. Look up tables
10 bits per color
10.Dimensional accuracy
±200 microns (max) or ± Vs Pixel
Whichever is greater
11.Configuration
Pentium PC, 32MB RAM, 9.1 GB
hard disk, CD-ROM drive, 1.44" FDD
12.Power
230V± 5 V AC single phase, 50 Hz,
5 KVA approx
13. Environment
:
20°C ±2°C, dust free
14.Size
a) Writing Engine Rack :
2100(L)x930 (W) x 1045(H)mm
b) Electronics Rack
1250(L)x600(W)x760(H)mm
15. Throughput
:
Better than 4 prints/hour
Download