beautypg.com

AMETEK SLM Series Rev B User Manual

Page 82

background image

SLM-Series AC/DC Electronic Load

Appendix B

B-6

M540072-01 Rev B

}
strupr(measbuf);
cnt = 0;
do
{
measerr = strncmp(measbuf,wrtbuf[cnt],6);
cnt = cnt++;
}while((cnt != 10) && (measerr != 0));
if(measerr == 0)
{

result = SUCCESS;

if (strncmp(measbuf,"CURR", 4) == 0)
{
ch = measbuf[5];
switch(ch)
{
case '1':
pd_wrt("chan 1",6);
pd_wrt("meas:curr?",10);
pd_rd(rdmbuf,rdmcnt);
strncat(tmpbuf,chanbuf,1);
pd_wrt(tmpbuf,6);
break;
case '2':
pd_wrt("chan 2",6);
pd_wrt("meas:curr?",10);
pd_rd(rdmbuf,rdmcnt);
strncat(tmpbuf,chanbuf,1);
pd_wrt(tmpbuf,6);
break;
case '3':
pd_wrt("chan 3",6);
pd_wrt("meas:curr?",10);
pd_rd(rdmbuf,rdmcnt);
strncat(tmpbuf,chanbuf,1);
pd_wrt(tmpbuf,6);
break;
case '4':
pd_wrt("chan 4",6);
pd_wrt("meas:curr?",10);
pd_rd(rdmbuf,rdmcnt);
strncat(tmpbuf,chanbuf,1);
pd_wrt(tmpbuf,6);
break;
}
}

else if(strncmp(measbuf,"VOLT",4) == 0)

{
ch = measbuf[5];
switch(ch)
{