//Simple Program to check the communication with the v560-modules listed in the file 'v560_base.dat'. #include #include //#include "rcc_error/rcc_error.h" //#include "vme_rcc/vme_rcc.h" #include "v560.h" int main(void) { //return values //0: programm run successful //1: VME open not successful //2: v560 open not successful //3: v560 print info not successful //4: v560 close not successful //5: VME close not succesful VME_ErrorCode_t error_code; printf("This program checks the communication with the v560-modules\nlisted in the file 'v560_base.dat'.\nThe programm should print the manufacturer's information\nstored in each module.\n\n"); /* if(error_code = VME_Open()) { VME_ErrorPrint(error_code); printf("VME open not successful.\n"); return 1; }*/ V560_Open(); V560_Print_Info(); //now send an increment and read the counter: int cc; V560_Clear_Scales(1); while(1) { V560_Clear_Scales(1); sleep(1); printf("rate: %i kHz (C0), %i kHz (C1) \n",(int)(V560_Read_Counter(1,0)/1000.),(int)(V560_Read_Counter(1,1)/1000.)); } V560_Close(); // return 0; }