/HVtest/HVtest.c |
---|
14,12 → 14,18 |
int __stdcall WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, |
LPSTR lpszCmdLine, int nCmdShow) { |
int mainonoff,onoff[4]; |
int ch=100*HVSLOT,mo=HVSLOT; |
const int mo=3; |
const int ch0=100*mo; |
int mainonoff,HVonoffall; |
int HVonoff[4],HVonoff_rID[4]={P1_HVonoff_0,P1_HVonoff_1,P1_HVonoff_2,P1_HVonoff_3}; |
int HVvdis_rID[4]={P1_HVvdis_0,P1_HVvdis_1,P1_HVvdis_2,P1_HVvdis_3}; |
int HVcdis_rID[4]={P1_HVcdis_0,P1_HVcdis_1,P1_HVcdis_2,P1_HVcdis_3}; |
int iret; |
int i, j; |
double ret; |
double vset[4],cset[4],vrise[4],vfall[4]; |
double HVvset[4],HVcset[4],HVvrise,HVvfall; |
double HVvdis[4],HVcdis[4]; |
char cret[2000]; |
char cMainSwitch[2][30]= {"Turn system OFF?","Turn system ON?"}; |
29,20 → 35,17 |
return -1; /* out of memory */ |
MPOD_Start(); |
// MPOD_Open(0,"f9mpod.ijs.si"); |
MPOD_Open(0,"arich-mpod1.kek.jp"); |
// MPOD_Open(0,"f9mpod.ijs.si"); |
crate1 = crateHsnmp[0]; |
iret=MPOD_GetInt(0,"moduleNumber.0"); |
printf("Module Number = %i\n", iret); |
// iret=MPOD_GetInt(0,"moduleNumber.0"); |
// printf("Module Number = %i\n", iret); |
// strcpy(cret, MPOD_GetString(0,"moduleDescription.ma2")); |
// printf("Module type: %s\n",cret); |
// iret=MPOD_GetIntCh(0,"fanNominalSpeed",0); |
// printf("Fan nominal speed = %i\n", iret); |
strcpy(cret, MPOD_GetString(0,"moduleDescription.ma2")); |
printf("Module type: %s\n",cret); |
iret=MPOD_GetIntCh(0,"fanNominalSpeed",0); |
printf("Fan nominal speed = %i\n", iret); |
if ((p1h = LoadPanel (0, "HVtest_ui.uir", P1)) < 0) return -1; |
DisplayPanel (p1h); |
54,16 → 57,22 |
SetCtrlVal (p1h, P1_MST, iret); |
iret=getFanNominalSpeed(crate1); |
SetCtrlVal (p1h, P1_MFS, iret); |
if (mainonoff) { |
onoff[0]=getChannelSwitch(crate1, ch); |
SetCtrlVal (p1h, P1_ONOFF0, onoff[0]); |
vset[0]=getOutputVoltage(crate1,ch); |
SetCtrlVal (p1h, P1_V0, vset[0]); |
cset[0]=1e+6*getOutputCurrent(crate1,ch); |
SetCtrlVal (p1h, P1_C0, cset[0]); |
vrise[0]=getModuleRampSpeedVoltage(crate1,mo); |
SetCtrlVal (p1h, P1_VRI0, vrise[0]); |
HVonoffall=0; |
for (i=0;i<4;i++) { |
HVonoff[i]=getChannelSwitch(crate1, ch0+i); |
if (HVonoff[i]) HVonoffall=1; |
} |
for (i=0;i<4;i++) { |
if (!HVonoffall) HVonoff[i]=1; |
SetCtrlVal (p1h, HVonoff_rID[i], HVonoff[i]); |
} |
HVvset[0]=getOutputVoltage(crate1,ch0); |
SetCtrlVal (p1h, P1_HVvset, HVvset[0]); |
HVcset[0]=1e+6*getOutputCurrent(crate1,ch0); |
SetCtrlVal (p1h, P1_HVcset, HVcset[0]); |
HVvrise=getModuleRampSpeedVoltage(crate1,mo); |
SetCtrlVal (p1h, P1_HVvrise, HVvrise); |
// vfall[0]=abs(getOutputFallRate(crate1,ch)); |
// SetCtrlVal (p1h, P1_VFA0, vfall[0]); |
} |
80,36 → 89,42 |
iret=getMainStatus(crate1); |
SetCtrlVal (p1h, P1_MST, iret); |
// ret=getOutputSenseMeasurement(crate1, ch); |
ret=getOutputTerminalMeasurement(crate1, ch); |
SetCtrlVal (p1h, P1_VD0, ret); |
ret=1e+6*getCurrentMeasurement(crate1, ch); |
SetCtrlVal (p1h, P1_CD0, ret); |
PlotStripChartPoint (p1h, P1_G1, ret); |
for (i=0;i<4;i++) { |
HVvdis[i]=getOutputTerminalMeasurement(crate1, ch0+i); |
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: |
GetCtrlVal (p1h, P1_MSW, &mainonoff); |
if (ConfirmPopup("Main switch!!!", cMainSwitch[mainonoff])) |
setMainSwitch(crate1, mainonoff); |
if (!mainonoff) break; |
// Delay(1); |
onoff[0]=getChannelSwitch(crate1, ch); |
SetCtrlVal (p1h, P1_ONOFF0, onoff[0]); |
vset[0]=getOutputVoltage(crate1,ch); |
SetCtrlVal (p1h, P1_V0, vset[0]); |
cset[0]=1e+6*getOutputCurrent(crate1,ch); |
SetCtrlVal (p1h, P1_C0, cset[0]); |
vrise[0]=getModuleRampSpeedVoltage(crate1,mo); |
SetCtrlVal (p1h, P1_VRI0, vrise[0]); |
// vfall[0]=abs(getOutputFallRate(crate1,ch)); |
// SetCtrlVal (p1h, P1_VFA0, vfall[0]); |
if (mainonoff) { |
Delay(5); |
HVonoffall=0; |
for (i=0; i<4; i++) { |
HVonoff[i]=getChannelSwitch(crate1, ch0+i); |
if (HVonoff[i]) HVonoffall=1; |
} |
for (i=0; i<4; i++) { |
if (!HVonoffall) HVonoff[i]=1; |
SetCtrlVal (p1h, HVonoff_rID[i], HVonoff[i]); |
} |
HVvset[0]=getOutputVoltage(crate1,ch0); |
SetCtrlVal (p1h, P1_HVvset, HVvset[0]); |
HVcset[0]=1e+6*getOutputCurrent(crate1,ch0); |
SetCtrlVal (p1h, P1_HVcset, HVcset[0]); |
HVvrise=getModuleRampSpeedVoltage(crate1,mo); |
SetCtrlVal (p1h, P1_HVvrise, HVvrise); |
} |
break; |
} |
if (!mainonoff) continue; |
switch (rID) { |
case P1_ONOFF0: |
GetCtrlVal (p1h, P1_ONOFF0, &onoff[0]); |
setChannelSwitch(crate1, ch, onoff[0]); |
// Delay(1); |
case P1_HVonoff: |
GetCtrlVal (p1h, P1_HVonoff, &HVonoffall); |
for (i=0;i<4;isetChannelSwitch(crate1, ch, onoff[0]); |
break; |
case P1_V0: |
GetCtrlVal (p1h, P1_V0, &vset[0]); |
/HVtest/HVtest.ico |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
## -0,0 +1 ## |
+application/octet-stream |
\ No newline at end of property |
Index: HVtest/HVtest.prj |
=================================================================== |
--- HVtest/HVtest.prj (revision 161) |
+++ HVtest/HVtest.prj (revision 162) |
@@ -1,6 +1,6 @@ |
[Project Header] |
Version = 1302 |
-Pathname = "/c/SAMO/Programi/NI/cvi/HVtest/HVtest.prj" |
+Pathname = "/c/home/samo/cvi/HVtest/HVtest.prj" |
CVI Dir = "/c/program files (x86)/national instruments/cvi2013" |
CVI Shared Dir = "/C/Program Files (x86)/National Instruments/Shared/CVI" |
CVI Pub Local Dir = "/C/ProgramData/National Instruments/CVI2013" |
@@ -35,7 +35,7 @@ |
Path Is Rel = True |
Path Rel To = "Project" |
Path Rel Path = "HVtest.c" |
-Path = "/c/SAMO/Programi/NI/cvi/HVtest/HVtest.c" |
+Path = "/c/home/samo/cvi/HVtest/HVtest.c" |
Exclude = False |
Compile Into Object File = False |
Project Flags = 0 |
@@ -47,8 +47,8 @@ |
Res Id = 2 |
Path Is Rel = True |
Path Rel To = "Project" |
-Path Rel Path = "../instr/MPOD/MPOD.fp" |
-Path = "/c/SAMO/Programi/NI/cvi/instr/MPOD/MPOD.fp" |
+Path Rel Path = "../../../cvi/instr/MPOD/MPOD.fp" |
+Path = "/c/home/cvi/instr/MPOD/MPOD.fp" |
Exclude = False |
Project Flags = 0 |
Folder = "Instrument Files" |
@@ -60,7 +60,7 @@ |
Path Is Rel = True |
Path Rel To = "Project" |
Path Rel Path = "HVtest_ui.h" |
-Path = "/c/SAMO/Programi/NI/cvi/HVtest/HVtest_ui.h" |
+Path = "/c/home/samo/cvi/HVtest/HVtest_ui.h" |
Exclude = False |
Project Flags = 0 |
Folder = "Include Files" |
@@ -72,7 +72,7 @@ |
Path Is Rel = True |
Path Rel To = "Project" |
Path Rel Path = "HVtest_ui.uir" |
-Path = "/c/SAMO/Programi/NI/cvi/HVtest/HVtest_ui.uir" |
+Path = "/c/home/samo/cvi/HVtest/HVtest_ui.uir" |
Exclude = False |
Project Flags = 0 |
Folder = "User Interface Files" |
@@ -83,7 +83,7 @@ |
Res Id = 5 |
Path Is Rel = True |
Path Rel To = "Project" |
-Path Rel Path = "../../../../../usr/lib/netsnmp.lib" |
+Path Rel Path = "../../../../usr/lib/netsnmp.lib" |
Path = "/c/usr/lib/netsnmp.lib" |
Exclude = False |
Project Flags = 0 |
@@ -127,8 +127,10 @@ |
Sign Timestamp URL = "" |
Sign URL = "" |
Manifest Embed = False |
-Icon File Is Rel = False |
-Icon File = "" |
+Icon File Is Rel = True |
+Icon File Rel To = "Project" |
+Icon File Rel Path = "HVtest.ico" |
+Icon File = "/c/home/samo/cvi/HVtest/HVtest.ico" |
Application Title = "" |
Use IVI Subdirectories for Import Libraries = False |
Use VXIPNP Subdirectories for Import Libraries = False |
@@ -139,7 +141,7 @@ |
Generate Source Documentation = "None" |
Runtime Support = "Full Runtime Support" |
Runtime Binding = "Shared" |
-Embed Project .UIRs = False |
+Embed Project .UIRs = True |
Generate Map File = False |
Embed Timestamp = True |
Create Console Application = False |
@@ -150,7 +152,7 @@ |
Numeric Prod Version = "1,0,0,0" |
Comments = "" |
Comments Ex = "" |
-Company Name = "" |
+Company Name = "Jozef Stefan Institute" |
Company Name Ex = "%company" |
File Description = "HVtest (Debug x86)" |
File Description Ex = "%application (%rel_dbg %arch)" |
@@ -158,7 +160,7 @@ |
File Version Ex = "%f1.%f2" |
Internal Name = "HVtest" |
Internal Name Ex = "%basename" |
-Legal Copyright = "Copyright © 2016" |
+Legal Copyright = "Copyright © Jozef Stefan Institute 2016" |
Legal Copyright Ex = "Copyright © %company %Y" |
Legal Trademarks = "" |
Legal Trademarks Ex = "" |
@@ -166,7 +168,7 @@ |
Original Filename Ex = "%filename" |
Private Build = "" |
Private Build Ex = "" |
-Product Name = " HVtest" |
+Product Name = "Jozef Stefan Institute HVtest" |
Product Name Ex = "%company %application" |
Product Version = "1.0" |
Product Version Ex = "%p1.%p2" |
@@ -212,8 +214,10 @@ |
Sign Timestamp URL = "" |
Sign URL = "" |
Manifest Embed = False |
-Icon File Is Rel = False |
-Icon File = "" |
+Icon File Is Rel = True |
+Icon File Rel To = "Project" |
+Icon File Rel Path = "HVtest.ico" |
+Icon File = "/c/home/samo/cvi/HVtest/HVtest.ico" |
Application Title = "" |
Use IVI Subdirectories for Import Libraries = False |
Use VXIPNP Subdirectories for Import Libraries = False |
@@ -271,8 +275,10 @@ |
Sign Timestamp URL = "" |
Sign URL = "" |
Manifest Embed = False |
-Icon File Is Rel = False |
-Icon File = "" |
+Icon File Is Rel = True |
+Icon File Rel To = "Project" |
+Icon File Rel Path = "HVtest.ico" |
+Icon File = "/c/home/samo/cvi/HVtest/HVtest.ico" |
Application Title = "" |
Use IVI Subdirectories for Import Libraries = False |
Use VXIPNP Subdirectories for Import Libraries = False |
@@ -330,8 +336,10 @@ |
Sign Timestamp URL = "" |
Sign URL = "" |
Manifest Embed = False |
-Icon File Is Rel = False |
-Icon File = "" |
+Icon File Is Rel = True |
+Icon File Rel To = "Project" |
+Icon File Rel Path = "HVtest.ico" |
+Icon File = "/c/home/samo/cvi/HVtest/HVtest.ico" |
Application Title = "" |
Use IVI Subdirectories for Import Libraries = False |
Use VXIPNP Subdirectories for Import Libraries = False |
@@ -381,11 +389,11 @@ |
[Include Paths] |
Include Path 1 Is Rel = True |
Include Path 1 Rel To = "Project" |
-Include Path 1 Rel Path = "../instr/MPOD/include" |
-Include Path 1 = "/c/SAMO/Programi/NI/cvi/instr/MPOD/include" |
+Include Path 1 Rel Path = "../../../cvi/instr/MPOD/include" |
+Include Path 1 = "/c/home/cvi/instr/MPOD/include" |
Include Path 2 Is Rel = True |
Include Path 2 Rel To = "Project" |
-Include Path 2 Rel Path = "../../../../../usr/include" |
+Include Path 2 Rel Path = "../../../../usr/include" |
Include Path 2 = "/c/usr/include" |
[Create Executable] |
@@ -392,21 +400,23 @@ |
Executable File_Debug Is Rel = True |
Executable File_Debug Rel To = "Project" |
Executable File_Debug Rel Path = "HVtest.exe" |
-Executable File_Debug = "/c/SAMO/Programi/NI/cvi/HVtest/HVtest.exe" |
+Executable File_Debug = "/c/home/samo/cvi/HVtest/HVtest.exe" |
Executable File_Release Is Rel = True |
Executable File_Release Rel To = "Project" |
Executable File_Release Rel Path = "HVtest.exe" |
-Executable File_Release = "/c/SAMO/Programi/NI/cvi/HVtest/HVtest.exe" |
+Executable File_Release = "/c/home/samo/cvi/HVtest/HVtest.exe" |
Executable File_Debug64 Is Rel = True |
Executable File_Debug64 Rel To = "Project" |
Executable File_Debug64 Rel Path = "HVtest.exe" |
-Executable File_Debug64 = "/c/SAMO/Programi/NI/cvi/HVtest/HVtest.exe" |
+Executable File_Debug64 = "/c/home/samo/cvi/HVtest/HVtest.exe" |
Executable File_Release64 Is Rel = True |
Executable File_Release64 Rel To = "Project" |
Executable File_Release64 Rel Path = "HVtest.exe" |
-Executable File_Release64 = "/c/SAMO/Programi/NI/cvi/HVtest/HVtest.exe" |
-Icon File Is Rel = False |
-Icon File = "" |
+Executable File_Release64 = "/c/home/samo/cvi/HVtest/HVtest.exe" |
+Icon File Is Rel = True |
+Icon File Rel To = "Project" |
+Icon File Rel Path = "HVtest.ico" |
+Icon File = "/c/home/samo/cvi/HVtest/HVtest.ico" |
Application Title = "" |
DLL Exports = "Include File Symbols" |
Use IVI Subdirectories for Import Libraries = False |
/HVtest/HVtest_ui.h |
---|
14,28 → 14,36 |
/* Panels and Controls: */ |
#define P1 1 |
#define P1_SET0 2 /* control type: command, callback function: (none) */ |
#define P1_HVset 2 /* control type: command, callback function: (none) */ |
#define P1_EXIT 3 /* control type: command, callback function: (none) */ |
#define P1_C0 4 /* control type: numeric, callback function: (none) */ |
#define P1_VFA0 5 /* control type: numeric, callback function: (none) */ |
#define P1_VRI0 6 /* control type: numeric, callback function: (none) */ |
#define P1_CD0 7 /* control type: numeric, callback function: (none) */ |
#define P1_VD0 8 /* control type: numeric, callback function: (none) */ |
#define P1_V0 9 /* control type: numeric, callback function: (none) */ |
#define P1_ONOFF0 10 /* control type: radioButton, callback function: (none) */ |
#define P1_REFRESHTIMER 11 /* control type: timer, callback function: refreshTimer */ |
#define P1_MSW 12 /* control type: binary, callback function: (none) */ |
#define P1_G1 13 /* control type: strip, callback function: (none) */ |
#define P1_MSWLED 14 /* control type: LED, callback function: (none) */ |
#define P1_MFS 15 /* control type: numeric, callback function: (none) */ |
#define P1_MST 16 /* control type: numeric, 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_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_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) */ |
#define P1_G1 22 /* control type: strip, callback function: (none) */ |
#define P1_MSWLED 23 /* control type: LED, callback function: (none) */ |
#define P1_MST 24 /* control type: numeric, callback function: (none) */ |
#define P1_MFS 25 /* control type: numeric, callback function: (none) */ |
/* Control Arrays: */ |
/* (no control arrays in the resource file) */ |
#define CTRLARRAY 1 |
/* Menu Bars, Menus, and Menu Items: */ |
/* (no menu bars in the resource file) */ |
/HVtest/HVtest_ui.uir |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |