Subversion Repositories f9daq

Compare Revisions

Regard whitespace Rev 162 → Rev 163

/HVtest/HVtest.c
1,4 → 1,5
#include "MPOD.h"
#include <utility.h>
#include "HVtest_ui.h"
 
#define HVSLOT 3
14,7 → 15,7
int __stdcall WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpszCmdLine, int nCmdShow) {
 
const int mo=3;
const int mo=HVSLOT;
const int ch0=100*mo;
int mainonoff,HVonoffall;
71,6 → 72,7
SetCtrlVal (p1h, P1_HVvset, HVvset[0]);
HVcset[0]=1e+6*getOutputCurrent(crate1,ch0);
SetCtrlVal (p1h, P1_HVcset, HVcset[0]);
SetAxisScalingMode (p1h, P1_G1, VAL_LEFT_YAXIS, VAL_MANUAL, -(HVcset[0]+1), 1.);
HVvrise=getModuleRampSpeedVoltage(crate1,mo);
SetCtrlVal (p1h, P1_HVvrise, HVvrise);
// vfall[0]=abs(getOutputFallRate(crate1,ch));
94,6 → 96,7
SetCtrlVal (p1h, HVvdis_rID[i], HVvdis[i]);
HVcdis[i]=1e+6*getCurrentMeasurement(crate1, ch0+i);
SetCtrlVal (p1h, HVcdis_rID[i], HVcdis[i]);
}
PlotStripChart (p1h, P1_G1, HVcdis, 4, 0, 0, VAL_DOUBLE);
break;
case P1_MSW:
115,6 → 118,7
SetCtrlVal (p1h, P1_HVvset, HVvset[0]);
HVcset[0]=1e+6*getOutputCurrent(crate1,ch0);
SetCtrlVal (p1h, P1_HVcset, HVcset[0]);
SetAxisScalingMode (p1h, P1_G1, VAL_LEFT_YAXIS, VAL_MANUAL, -(HVcset[0]+1), 1.);
HVvrise=getModuleRampSpeedVoltage(crate1,mo);
SetCtrlVal (p1h, P1_HVvrise, HVvrise);
}
122,24 → 126,31
}
if (!mainonoff) continue;
switch (rID) {
case P1_HVonoff:
GetCtrlVal (p1h, P1_HVonoff, &HVonoffall);
for (i=0;i<4;isetChannelSwitch(crate1, ch, onoff[0]);
case P1_HVonoffall:
GetCtrlVal (p1h, P1_HVonoffall, &HVonoffall);
for (i=0;i<4;i++) {
GetCtrlVal (p1h, HVonoff_rID[i], &HVonoff[i]);
if (HVonoff[i])
setChannelSwitch(crate1, ch0+i, HVonoffall);
}
break;
case P1_V0:
GetCtrlVal (p1h, P1_V0, &vset[0]);
setOutputVoltage(crate1, ch, vset[0]);
case P1_HVvset:
GetCtrlVal (p1h, P1_HVvset, &HVvset[0]);
for (i=0;i<4;i++)
setOutputVoltage(crate1, ch0+i, HVvset[0]);
break;
case P1_C0:
GetCtrlVal (p1h, P1_C0, &cset[0]);
cset[0]/=1e+6; //[uA]
setOutputCurrent(crate1, ch, cset[0]);
case P1_HVcset:
GetCtrlVal (p1h, P1_HVcset, &HVcset[0]);
SetAxisScalingMode (p1h, P1_G1, VAL_LEFT_YAXIS, VAL_MANUAL, -(HVcset[0]+1), 1.);
HVcset[0]/=1e+6; //[uA]
for (i=0;i<4;i++)
setOutputCurrent(crate1, ch0+i, HVcset[0]);
break;
case P1_VRI0:
GetCtrlVal (p1h, P1_VRI0, &ret);
setModuleRampSpeedVoltage(crate1, mo, ret);
vrise[0]=getModuleRampSpeedVoltage(crate1,mo);
SetCtrlVal (p1h, P1_VRI0, vrise[0]);
case P1_HVvrise:
GetCtrlVal (p1h, P1_HVvrise, &HVvrise);
setModuleRampSpeedVoltage(crate1, mo, HVvrise);
HVvrise=getModuleRampSpeedVoltage(crate1,mo);
SetCtrlVal (p1h, P1_HVvrise, HVvrise);
break;
// case P1_VFA0:
// GetCtrlVal (p1h, P1_VFA0, &ret);
/HVtest/HVtest_ui.h
18,19 → 18,19
#define P1_EXIT 3 /* control type: command, callback function: (none) */
#define P1_HVcset 4 /* control type: numeric, callback function: (none) */
#define P1_HVvrise 5 /* control type: numeric, callback function: (none) */
#define P1_HVcdis3 6 /* control type: numeric, callback function: (none) */
#define P1_HVvdis3 7 /* control type: numeric, callback function: (none) */
#define P1_HVcdis2 8 /* control type: numeric, callback function: (none) */
#define P1_HVvdis2 9 /* control type: numeric, callback function: (none) */
#define P1_HVcdis1 10 /* control type: numeric, callback function: (none) */
#define P1_HVvdis1 11 /* control type: numeric, callback function: (none) */
#define P1_HVcdis0 12 /* control type: numeric, callback function: (none) */
#define P1_HVvdis0 13 /* control type: numeric, callback function: (none) */
#define P1_HVcdis_3 6 /* control type: numeric, callback function: (none) */
#define P1_HVvdis_3 7 /* control type: numeric, callback function: (none) */
#define P1_HVcdis_2 8 /* control type: numeric, callback function: (none) */
#define P1_HVvdis_2 9 /* control type: numeric, callback function: (none) */
#define P1_HVcdis_1 10 /* control type: numeric, callback function: (none) */
#define P1_HVvdis_1 11 /* control type: numeric, callback function: (none) */
#define P1_HVcdis_0 12 /* control type: numeric, callback function: (none) */
#define P1_HVvdis_0 13 /* control type: numeric, callback function: (none) */
#define P1_HVvset 14 /* control type: numeric, callback function: (none) */
#define P1_HVonoff3 15 /* control type: radioButton, callback function: (none) */
#define P1_HVonoff2 16 /* control type: radioButton, callback function: (none) */
#define P1_HVonoff1 17 /* control type: radioButton, callback function: (none) */
#define P1_HVonoff0 18 /* control type: radioButton, callback function: (none) */
#define P1_HVonoff_3 15 /* control type: radioButton, callback function: (none) */
#define P1_HVonoff_2 16 /* control type: radioButton, callback function: (none) */
#define P1_HVonoff_1 17 /* control type: radioButton, callback function: (none) */
#define P1_HVonoff_0 18 /* control type: radioButton, callback function: (none) */
#define P1_HVonoffall 19 /* control type: radioButton, callback function: (none) */
#define P1_REFRESHTIMER 20 /* control type: timer, callback function: refreshTimer */
#define P1_MSW 21 /* control type: binary, callback function: (none) */
/HVtest/HVtest_ui.uir
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream