KEPCO TMA VXI-27 User Manual
Page 75

F-4
TMA VXI-27 101602
if (value != 0xFFF0){
FmtOut(“%s<\n **ERR 09** The protocol reg. is %x instead of fff0”
,value);
TestOk = 0;
}
}
if(TestOk){
/* read response register at offset 0A */
vxi_adr = vxi_adr + 2;
prot_adr = vxi_adr;
ret_value = VXIin(0x1,prot_adr,2,&value);
if (value != 0x4BFF){
FmtOut(“%s<\n **ERR 10** The protocol reg. is %x instead of 4bff”
,value);
TestOk = 0;
}
}
/* begin writing commands and reading back results */
vxi_adr = vxi_adr + 4;
if(TestOk){
/* now execute READ INTERRUPTERS command */
ret_value = WScmd(adr_tst,0xcaff,1,&value);
if (value != 0xfff9){
FmtOut(“%s<\n **ERR 15** result of RD_INT. cmmd %x instead of fff9”
,value);
TestOk = 0;
}
}
if(TestOk){
/* do BEGIN NORMAL OPERATION command */
ret_value = WScmd(adr_tst,0xfcff,1,&value);
if (value != 0xfffe){
FmtOut(
“%s<\n **ERR 17** BEG_NORMAL_OPER. result is %x instead of fffe”
,value);
TestOk = 0;
}
/* test READY BIT SET in response register after BEGIN NORMAL OPERATION */
delay(1);
ret_value = VXIinReg(adr_tst,04,&value);
/* FmtOut(“%s<\n Value with high level function = %x[w4]”,value); */
if (value != 0x7f0f){
FmtOut(
“%s<\n **ERR 18 ** NOT READY after BEG_NORMAL_OPER. %x[w4]”
,value);
TestOk = 0;
}
}
/* prepare *idn? command in idn_buf */
CopyString (idn_buf, 0, “*idn?”, 0, 5);
if(TestOk){
/* write *idn? */
ret_value = WSwrt(adr_tst,idn_buf,5L,3,&retcount);
if (ret_value < 0){