Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 156 → Rev 157

/cvi/instr/MPOD/MPOD.c
161,9 → 161,9
double ret;
// double voltage;
double vSet=0;
int ch=0;
int ch=200;
int iret;
// int i, j;
int i, j;
char cret[2000];
 
HSNMP crate1;
172,12 → 172,20
return -1; /* out of memory */
 
MPOD_Start();
MPOD_Open(0,"arich-mpod1.kek.jp");
// MPOD_Open(0,"arich-mpod1.kek.jp");
MPOD_Open(0,"f9mpod.ijs.si");
crate1 = crateHsnmp[0];
printf("-----------------------------------------------------------------\n");
 
strcpy(cret, MPOD_GetString(0,"moduleDescription.ma0"));
/*
for (i=0;i<8;i++) {
setChannelSwitch(crate1, i, 0);
setOutputVoltage(crate1, i, 0.);
setChannelSwitch(crate1, 100+i, 0);
setOutputVoltage(crate1, 100+i, 0.);
}
*/
strcpy(cret, MPOD_GetString(0,"moduleDescription.ma2"));
printf("Module type: %s\n",cret);
iret=getMainSwitch(crate1);
190,9 → 198,10
iret=MPOD_GetIntCh(0,"fanNominalSpeed",0);
printf("Fan nominal speed = %i\n", iret);
 
ret=MPOD_GetDouble(0,"outputVoltage.1");
ret=MPOD_GetDouble(0,"outputVoltage.201");
printf("Output Voltage = %f.\n", ret);
 
setOutputVoltage(crate1, ch, 9000.);
// vSet = getOutputVoltage(crate1, ch);
vSet = MPOD_GetDoubleCh(0, "outputVoltage", ch+1);
printf("Output Voltage %i = %f.\n", ch, vSet);