KEPCO TMA VXI-27 User Manual

Page 74

Advertising
background image

TMA VXI-27 101602

F-3

if (found == 1){

FmtOut(“\n**** Starting the Test Program for TMA VXI-27”);

adr_tst = bb[0];

fit = 1;

}

while( fit == 0 ){

adr_tst = 0;

FmtOut(“\n\rGive the Address of the TMA VXI-27 you want to test? “);

ScanIn(“%s>%i”,&adr_tst);

for(i=0;i<found;i++)

if (adr_tst == bb[i])

fit = 1;

}

/* found bitbus interface at logical address adr_tst

The TEST PROGRAM will do the following actions:

-reset using bit 0 of register 4 the VXI interface

-verify fail inhibit bit - bit 1 of register 4

-free reset line, wait 10 seconds and test register 04 for PASSED BIT

-verify protocol register - offset 08 for 0xFFF0 value

-verify response register - offset 0A for 0x4BFF value

-send Read Protocol command and test result 0x8623

-send again Read Protocol command without taking the result simulating a

multiple querry error - used Read Protocol Error to verify the ERROR

-send Read Interrupters

*/

vxi_adr = 0xc000L + adr_tst*64 + 4;

/* do soft reset - SET RESET BIT (bit 0) in control register */

ret_value = VXIout(0x1,vxi_adr,2,0x1);

ret_value = VXIinReg(adr_tst,04,&value);

/* FmtOut(“%s<\n Value with high level function = %x[w4]”,value); */

if (value != 0x7f03){

FmtOut(“\n **ERROR 05** SYSreset do not function”);

TestOk = 0;

}

ret = GetVXIbusStatusInd (-2, 2, &value);

if (value == 0){

FmtOut(“\n **ERROR 06** SYSFAIL line on P1-C10 not active after RESET”);

TestOk = 0;

}

/* Deactivate reset line */

ret_value = VXIout(0x1,vxi_adr,2,0x0);

/* wait 10 seconds */

delay(10);

ret_value = VXIin(0x1,vxi_adr,2,&value);

if (value != 0x7F07){

FmtOut(“\n **ERROR 08** the PASSED bit (U36B) is not set”);

TestOk = 0;

}

if(TestOk){

/* read protocol register at offset 08 */

vxi_adr = vxi_adr + 4;

ret_value = VXIin(0x1,vxi_adr,2,&value);

Advertising