beautypg.com

AMETEK SLM-4 User Manual

Page 63

background image

Sorensen SLM-4 Chassis

Appendix B

strupr(tempbuf);
strupr(intbuf);
cnt = 0;
do
{
comerr = strncmp(tempbuf,combuf[cnt],t);
cnt = cnt++;
}while(( cnt != COMPTR) && (comerr != 0));
if ( comerr == 0)
{
result = SUCCESS;

for (cnt = 0;cnt < count+1;cnt++)

{ while(inportb(ACE_LINE_STAT_REG) & THRE == 0);

ch = intbuf[cnt];

delay(20);

outportb(ACE_DATA_REG, ch);
}
timeout = 0;
for (cnt = 0; cnt <= count;cnt++)
{
ch = intbuf[cnt];

if(ch == '?')

{

do

{

read_buf();

}while((rd_result == 0)&&(timeout == 0));

rd_result

=

0;

}

}

for (cnt = 0;cnt<= count;cnt++)

{

intbuf[cnt] = '';

tempbuf[cnt] = '';

}
return(result);
}
return(OPER_ERR);
}
int pd_rd(char *buf,int count)
{
char ch;
int cnt = 0;
do
{
ch = queue[cnt];
*buf = ch;
cnt = cnt++;
buf = buf++;
}while((ch != '\n') && (cnt != count));
*buf = '\0';

M540069-01 Rev B

B-3