AMETEK SLD Series User Manual
Page 81

Sorensen SLD-Series DC Load
Appendix B
M540075-01 Rev C
B-3
intbuf[cnt] = '\r';
cnt = cnt++;
count = count++;
intbuf[cnt] = '\n';
t = strcspn(intbuf," ");
if (t >count)
t = count-1;
for (cnt = 0;cnt < t;cnt++)
{
tempbuf[cnt] = intbuf[cnt];
}
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] = '';
}