changeset 2:bd7501b65f56

Implement reference selection (microwave or Hg cavity) for slope cancelling
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Tue, 03 Jul 2012 13:11:40 +0200
parents a6fb5d3d0ec0
children adc9e2a67547
files FXAnalyse.c FXAnalyse.h FXAnalyse.uir
diffstat 3 files changed, 202 insertions(+), 176 deletions(-) [+]
line wrap: on
line diff
--- a/FXAnalyse.c	Tue Jul 03 12:27:45 2012 +0200
+++ b/FXAnalyse.c	Tue Jul 03 13:11:40 2012 +0200
@@ -160,8 +160,12 @@
 
 double limitotakoff=70.0;
 
+enum {
+	SLOPE_REFERENCE_MICROWAVE = 0,
+	SLOPE_REFERENCE_HG_CAVITY = 1,
+};
 
-
+int slopeReference = SLOPE_REFERENCE_MICROWAVE;
 
 //////////////////////////////////
 //  Keep Centered Variables
@@ -634,7 +638,7 @@
 					
 					if (LogFileSize > OldLogFilePtr+2*FXLINELENGTH-2) {  // if a complete newline has been written
 						
-						SuspendTimerCallbacks ; 
+						SuspendTimerCallbacks() ; 
 						
 						// Open Log file and get to the beginning of newly completed line
 						LogFile = OpenFile(LogFileName, VAL_READ_ONLY, VAL_OPEN_AS_IS, VAL_ASCII) ;
@@ -1296,6 +1300,18 @@
 						
 						if (SlopeMeasuring == TRUE)
 						{
+							double currentFreq;
+							
+							/* select reference */
+							switch (slopeReference) {
+								case SLOPE_REFERENCE_MICROWAVE:
+									currentFreq = Math2;
+									break;
+								case SLOPE_REFERENCE_HG_CAVITY:
+									currentFreq = Math3;
+									break;
+							}
+							
 							if  (utc-SlopeMeasuringTimeBegin > TimetoSlope)
 							{
 								Nratio = Nratio + 1;
@@ -1343,14 +1359,14 @@
 								if (nstabilisationSlopeMeasuring < 5)
 								{
 									nstabilisationSlopeMeasuring = nstabilisationSlopeMeasuring + 1;
-									Math2_slope = Math2; 
+									Math2_slope = currentFreq; 
 								}
 								else
 								{
-									if ((Math2-Math2_slope) < limitotakoff && (Math2-Math2_slope) > -limitotakoff)
+									if ((currentFreq-Math2_slope) < limitotakoff && (currentFreq-Math2_slope) > -limitotakoff)
 									{
 										N_Math2slope = N_Math2slope + 1;
-										Math2_slope = Math2;
+										Math2_slope = currentFreq;
 										Moy_Math2slope = ((N_Math2slope-1)*Moy_Math2slope + Math2_slope)/N_Math2slope;
 										Slope_Math2slope = (Slope_Math2slope*(N_Math2slope-2) + 6*(Math2_slope-Moy_Math2slope)/N_Math2slope)/(N_Math2slope+1) ;
 									}
@@ -1540,7 +1556,7 @@
 							OldLogFilePtr = 2;
 							}
 						
-						ResumeTimerCallbacks ; 
+						ResumeTimerCallbacks() ; 
 						
 						} ;
 					
@@ -2870,3 +2886,15 @@
 		}
 	return 0;
 }
+
+int CVICALLBACK SlopeReference_cb (int panel, int control, int event,
+		void *callbackData, int eventData1, int eventData2)
+{
+	switch (event)
+	{
+		case EVENT_COMMIT:
+			GetCtrlVal(MainPanel, PANEL_SLOPE_REFERENCE, &slopeReference);
+			break;
+	}
+	return 0;
+}
--- a/FXAnalyse.h	Tue Jul 03 12:27:45 2012 +0200
+++ b/FXAnalyse.h	Tue Jul 03 13:11:40 2012 +0200
@@ -1,6 +1,6 @@
 /**************************************************************************/
 /* LabWindows/CVI User Interface Resource (UIR) Include File              */
-/* Copyright (c) National Instruments 2011. All Rights Reserved.          */
+/* Copyright (c) National Instruments 2012. All Rights Reserved.          */
 /*                                                                        */
 /* WARNING: Do not add to, delete from, or otherwise modify the contents  */
 /*          of this include file.                                         */
@@ -17,180 +17,177 @@
 #define  CALC3                            1
 
 #define  CALCN1                           2
-#define  CALCN1_TARGET_2                  2
-#define  CALCN1_COMMANDBUTTON_3           3
-#define  CALCN1_COMMANDBUTTON_4           4
-#define  CALCN1_NUMERIC_4                 5
-#define  CALCN1_NUMERIC_5                 6
-#define  CALCN1_N_1                       7
-#define  CALCN1_NUMERIC_6                 8
-#define  CALCN1_ACCEPTN1                  9       /* callback function: OnAcceptN */
-#define  CALCN1_CHECKBOX_2                10
-#define  CALCN1_TEXTMSG_2                 11
-#define  CALCN1_SLOPE                     12
-#define  CALCN1_TEXTMSG_8                 13
-#define  CALCN1_DELTAFREQ                 14      /* callback function: CB_OnDeltaFreq */
-#define  CALCN1_SLOPETIME                 15      /* callback function: CB_OnSlopeTime */
-#define  CALCN1_INTEGRATIONTIME           16      /* callback function: CB_OnIntegrationTime */
-#define  CALCN1_COMMANDBUTTON_2           17      /* callback function: CB_OnNStop */
-#define  CALCN1_COMMANDBUTTON             18      /* callback function: CB_OnStartNCalculus */
+#define  CALCN1_TARGET_2                  2       /* control type: numeric, callback function: (none) */
+#define  CALCN1_COMMANDBUTTON_3           3       /* control type: command, callback function: (none) */
+#define  CALCN1_COMMANDBUTTON_4           4       /* control type: command, callback function: (none) */
+#define  CALCN1_NUMERIC_4                 5       /* control type: numeric, callback function: (none) */
+#define  CALCN1_NUMERIC_5                 6       /* control type: numeric, callback function: (none) */
+#define  CALCN1_N_1                       7       /* control type: numeric, callback function: (none) */
+#define  CALCN1_NUMERIC_6                 8       /* control type: numeric, callback function: (none) */
+#define  CALCN1_ACCEPTN1                  9       /* control type: command, callback function: OnAcceptN */
+#define  CALCN1_CHECKBOX_2                10      /* control type: radioButton, callback function: (none) */
+#define  CALCN1_TEXTMSG_2                 11      /* control type: textMsg, callback function: (none) */
+#define  CALCN1_SLOPE                     12      /* control type: numeric, callback function: (none) */
+#define  CALCN1_TEXTMSG_8                 13      /* control type: textMsg, callback function: (none) */
+#define  CALCN1_DELTAFREQ                 14      /* control type: numeric, callback function: CB_OnDeltaFreq */
+#define  CALCN1_SLOPETIME                 15      /* control type: numeric, callback function: CB_OnSlopeTime */
+#define  CALCN1_INTEGRATIONTIME           16      /* control type: numeric, callback function: CB_OnIntegrationTime */
+#define  CALCN1_COMMANDBUTTON_2           17      /* control type: command, callback function: CB_OnNStop */
+#define  CALCN1_COMMANDBUTTON             18      /* control type: command, callback function: CB_OnStartNCalculus */
 
 #define  CALCN2                           3
-#define  CALCN2_SLOPE                     2
-#define  CALCN2_TEXTMSG_8                 3
-#define  CALCN2_DELTAFREQ                 4       /* callback function: CB_OnDeltaFreq */
-#define  CALCN2_INTEGRATIONTIME           5       /* callback function: CB_OnIntegrationTime */
-#define  CALCN2_N_2                       6
-#define  CALCN2_STOP2                     7       /* callback function: CB_OnNStop */
-#define  CALCN2_COMMANDBUTTON             8       /* callback function: CB_OnStartNCalculus */
-#define  CALCN2_ACCEPTN1                  9       /* callback function: OnAcceptN */
-#define  CALCN2_SLOPETIME                 10      /* callback function: CB_OnSlopeTime */
+#define  CALCN2_SLOPE                     2       /* control type: numeric, callback function: (none) */
+#define  CALCN2_TEXTMSG_8                 3       /* control type: textMsg, callback function: (none) */
+#define  CALCN2_DELTAFREQ                 4       /* control type: numeric, callback function: CB_OnDeltaFreq */
+#define  CALCN2_INTEGRATIONTIME           5       /* control type: numeric, callback function: CB_OnIntegrationTime */
+#define  CALCN2_N_2                       6       /* control type: numeric, callback function: (none) */
+#define  CALCN2_STOP2                     7       /* control type: command, callback function: CB_OnNStop */
+#define  CALCN2_COMMANDBUTTON             8       /* control type: command, callback function: CB_OnStartNCalculus */
+#define  CALCN2_ACCEPTN1                  9       /* control type: command, callback function: OnAcceptN */
+#define  CALCN2_SLOPETIME                 10      /* control type: numeric, callback function: CB_OnSlopeTime */
 
 #define  CALCN3                           4
-#define  CALCN3_SLOPE                     2
-#define  CALCN3_TEXTMSG_8                 3
-#define  CALCN3_DELTAFREQ                 4       /* callback function: CB_OnDeltaFreq */
-#define  CALCN3_INTEGRATIONTIME           5       /* callback function: CB_OnIntegrationTime */
-#define  CALCN3_N_3                       6
-#define  CALCN3_COMMANDBUTTON_2           7       /* callback function: CB_OnN3Stop */
-#define  CALCN3_COMMANDBUTTON             8       /* callback function: CB_OnStartN3Calculus */
-#define  CALCN3_ACCEPTN1                  9       /* callback function: OnAcceptN */
+#define  CALCN3_SLOPE                     2       /* control type: numeric, callback function: (none) */
+#define  CALCN3_TEXTMSG_8                 3       /* control type: textMsg, callback function: (none) */
+#define  CALCN3_DELTAFREQ                 4       /* control type: numeric, callback function: CB_OnDeltaFreq */
+#define  CALCN3_INTEGRATIONTIME           5       /* control type: numeric, callback function: CB_OnIntegrationTime */
+#define  CALCN3_N_3                       6       /* control type: numeric, callback function: (none) */
+#define  CALCN3_COMMANDBUTTON_2           7       /* control type: command, callback function: CB_OnN3Stop */
+#define  CALCN3_COMMANDBUTTON             8       /* control type: command, callback function: CB_OnStartN3Calculus */
+#define  CALCN3_ACCEPTN1                  9       /* control type: command, callback function: OnAcceptN */
 
 #define  PANEL                            5       /* callback function: CB_OnEventMain */
-#define  PANEL_QUITBUTTON                 2       /* callback function: QuitCallback */
-#define  PANEL_STARTBUTTON                3       /* callback function: CB_OnStart */
-#define  PANEL_STOPBUTTON                 4       /* callback function: CB_OnStop */
-#define  PANEL_FREQ4                      5
-#define  PANEL_FREQ3                      6
-#define  PANEL_FREQ2                      7
-#define  PANEL_FREQ1                      8
-#define  PANEL_CHECKBOX_DDSSRALLAN        9
-#define  PANEL_CHECKBOX_DDSHGALLAN        10
-#define  PANEL_CHECKBOX_DDSFREPALLAN      11
-#define  PANEL_CHECKBOX_DDSSRPLOT         12
-#define  PANEL_CHECKBOX_MATH1ALLAN        13      /* callback function: CB_OnAllanPlot */
-#define  PANEL_CHECKBOX_DDSHGPLOT         14
-#define  PANEL_CHECKBOX_FREQ4ALLAN        15      /* callback function: CB_OnAllanPlot */
-#define  PANEL_CHECKBOX_DDSFREPPLOT       16
-#define  PANEL_CHECKBOX_FREQ3ALLAN        17      /* callback function: CB_OnAllanPlot */
-#define  PANEL_CHECKBOX_FREQ4PLOT         18      /* callback function: CB_OnFreqPlot */
-#define  PANEL_CHECKBOX_FREQ2ALLAN        19      /* callback function: CB_OnAllanPlot */
-#define  PANEL_CHECKBOX_FREQ3PLOT         20      /* callback function: CB_OnFreqPlot */
-#define  PANEL_CHECKBOX_CORRFREQU         21      /* callback function: CB_OnCROX */
-#define  PANEL_CHECKBOX_FREQ1ALLAN        22      /* callback function: CB_OnAllanPlot */
-#define  PANEL_CHECKBOX_FREQ2PLOT         23      /* callback function: CB_OnFreqPlot */
-#define  PANEL_CHECKBOX_MATH1PLOT         24      /* callback function: CB_OnFreqPlot */
-#define  PANEL_CHECKBOX_FREQ1PLOT         25      /* callback function: CB_OnFreqPlot */
-#define  PANEL_TIMER                      26      /* callback function: CB_OnTimer */
-#define  PANEL_DDS2                       27      /* callback function: CB_ChangeDDSOut */
-#define  PANEL_TEXTMSG                    28
-#define  PANEL_TEXTMSG_2                  29
-#define  PANEL_SLOPETIME                  30      /* callback function: CB_ChangeSlopeTime */
-#define  PANEL_DDS1                       31      /* callback function: CB_ChangeDDSOut */
-#define  PANEL_SPLITTER_4                 32
-#define  PANEL_SPLITTER                   33
-#define  PANEL_CHANGENDIV                 34      /* callback function: CB_OnChangeNdiv */
-#define  PANEL_DDSFREPOUT                 35      /* callback function: CB_ChangeDDSOut */
-#define  PANEL_N3CHOICE                   36      /* callback function: CB_ChangeN */
-#define  PANEL_N3CALCULUS                 37      /* callback function: CB_OnNCalculus */
-#define  PANEL_N1CHOICE                   38      /* callback function: CB_ChangeN */
-#define  PANEL_N2CHOICE                   39      /* callback function: CB_ChangeN */
-#define  PANEL_N2CALCULUS                 40      /* callback function: CB_OnNCalculus */
-#define  PANEL_TEXTMSG_14                 41
-#define  PANEL_TEXTMSG_3                  42
-#define  PANEL_TEXTMSG_4                  43
-#define  PANEL_TEXTMSG_5                  44
-#define  PANEL_DDS4STEP                   45      /* callback function: CB_ChangeDDSStep */
-#define  PANEL_DDS3STEP                   46      /* callback function: CB_ChangeDDSStep */
-#define  PANEL_DDS2STEP                   47      /* callback function: CB_ChangeDDSStep */
-#define  PANEL_CENTERFREQUENCY            48
-#define  PANEL_SLOPETOCANCEL              49
-#define  PANEL_MATH4                      50
-#define  PANEL_MATH5                      51
-#define  PANEL_MATH3                      52
-#define  PANEL_CHECKBOX_MATH5PLOT         53      /* callback function: CB_OnFreqPlot */
-#define  PANEL_CHECKBOX_MATH4PLOT         54      /* callback function: CB_OnFreqPlot */
-#define  PANEL_CHECKBOX_MATH4ALLAN        55      /* callback function: CB_OnAllanPlot */
-#define  PANEL_DDS1STEP                   56      /* callback function: CB_ChangeDDSStep */
-#define  PANEL_TEXTMSG_15                 57
-#define  PANEL_CHECKBOX_MATH5ALLAN        58      /* callback function: CB_OnAllanPlot */
-#define  PANEL_CHECKBOX_MATH3PLOT         59      /* callback function: CB_OnFreqPlot */
-#define  PANEL_CHECKBOX_MATH5SAVE         60
-#define  PANEL_CHECKBOX_MATH3SAVE_2       61      /* callback function: CB_OnSaveSr */
-#define  PANEL_CHECKBOX_MATH3ALLAN        62      /* callback function: CB_OnAllanPlot */
-#define  PANEL_DDSFREPSTEP                63      /* callback function: CB_ChangeDDSStep */
-#define  PANEL_DDSFREPAMP                 64      /* callback function: CB_ChangeDDSAmpli */
-#define  PANEL_MATHSTRING4                65      /* callback function: CB_ChangeMath */
-#define  PANEL_TEXTMSG_17                 66
-#define  PANEL_MATH2                      67
-#define  PANEL_SPLITTER_15                68
-#define  PANEL_SPLITTER_12                69
-#define  PANEL_CHECKBOX_MATH2PLOT         70      /* callback function: CB_OnFreqPlot */
-#define  PANEL_CHECKBOX_MATH3SAVE         71      /* callback function: CB_OnSaveHg */
-#define  PANEL_CHECKBOX_MATH2SAVE         72      /* callback function: CB_OnSaveOpt */
-#define  PANEL_CHECKBOX_MATH2ALLAN        73      /* callback function: CB_OnAllanPlot */
-#define  PANEL_TEXTMSG_7                  74
-#define  PANEL_MATHSTRING3                75      /* callback function: CB_ChangeMath */
-#define  PANEL_MATH1                      76
-#define  PANEL_SPLITTER_7                 77
-#define  PANEL_SPLITTER_6                 78
-#define  PANEL_TEXTMSG_18                 79
-#define  PANEL_TEXTMSG_6                  80
-#define  PANEL_TEXTMSG_8                  81
-#define  PANEL_TEXTMSG_19                 82
-#define  PANEL_MATHSTRING1                83      /* callback function: CB_ChangeMath */
-#define  PANEL_TEXTMSG_9                  84
-#define  PANEL_TEXTMSG_10                 85
-#define  PANEL_MATHSTRING2                86      /* callback function: CB_ChangeMath */
-#define  PANEL_SPLITTER_10                87
-#define  PANEL_TEXTMSG_16                 88
-#define  PANEL_SPLITTER_11                89
-#define  PANEL_SPLITTER_9                 90
-#define  PANEL_SPLITTER_5                 91
-#define  PANEL_SPLITTER_3                 92
-#define  PANEL_MINUS10KDDS1               93      /* callback function: CB_OnMinus10k */
-#define  PANEL_MINUS10KDDS4               94      /* callback function: CB_OnMinus10k */
-#define  PANEL_MINUS10KDDS3               95      /* callback function: CB_OnMinus10k */
-#define  PANEL_MINUS10KDDS2               96      /* callback function: CB_OnMinus10k */
-#define  PANEL_PLUS10KDDS4                97      /* callback function: CB_OnPlus10k */
-#define  PANEL_MINUS275K                  98      /* callback function: CB_OnMinus275k */
-#define  PANEL_PLUS10KDDS3                99      /* callback function: CB_OnPlus10k */
-#define  PANEL_PLUS10KDDS1                100     /* callback function: CB_OnPlus10k */
-#define  PANEL_PLUS10KDDS2                101     /* callback function: CB_OnPlus10k */
-#define  PANEL_PLUS275K                   102     /* callback function: CB_OnPlus275k */
-#define  PANEL_TEXTMSG_11                 103
-#define  PANEL_MATHSTRING5                104     /* callback function: CB_ChangeMath */
-#define  PANEL_SPLITTER_8                 105
-#define  PANEL_MJD                        106
-#define  PANEL_UTC                        107
-#define  PANEL_TIME                       108
-#define  PANEL_DATE                       109
-#define  PANEL_CHECKBOX_MATH3AUTOSAV      110     /* callback function: CB_OnAutoSaveSr */
-#define  PANEL_CHECKBOX_MATH2AUTOSAV      111     /* callback function: CB_OnAutoSaveHg */
-#define  PANEL_CHOOSESAVEFILE             112     /* callback function: OnChooseSaveFile */
-#define  PANEL_SPLITTER_14                113
-#define  PANEL_SPLITTER_13                114
-#define  PANEL_DDS4                       115     /* callback function: CB_ChangeDDSOut */
-#define  PANEL_SPLITTER_2                 116
-#define  PANEL_DDS3                       117     /* callback function: CB_ChangeDDSOut */
-#define  PANEL_N1CALCULUS                 118     /* callback function: CB_OnNCalculus */
-#define  PANEL_FINDSIGN3                  119     /* callback function: CB_OnFindSign */
-#define  PANEL_SIGN3                      120
-#define  PANEL_FINDSIGN2                  121     /* callback function: CB_OnFindSign */
-#define  PANEL_SIGN2                      122
-#define  PANEL_FINDSIGN1                  123     /* callback function: CB_OnFindSign */
-#define  PANEL_SIGN1                      124
-#define  PANEL_FIND10K3                   125     /* callback function: CB_OnFind275K */
-#define  PANEL_FIND275K2                  126     /* callback function: CB_OnFind275K */
-#define  PANEL_RESETSLOPE                 127     /* callback function: CB_OnResetSlope */
-#define  PANEL_CHECKBOX_STOPIFAUTODE      128     /* callback function: CB_OnAutoStopSlopeCancellingIfDelock */
-#define  PANEL_CHECKBOX_RECENTER          129     /* callback function: CB_OnReCentering */
-#define  PANEL_CHECKBOX_KEEPSLOPE         130     /* callback function: CB_OnCROX */
-#define  PANEL_CHECKBOX_KEEP              131     /* callback function: CB_OnCROX */
-#define  PANEL_STARTCANCEL                132     /* callback function: CB_OnStartSlopeCancelling */
-#define  PANEL_LED1                       133
-#define  PANEL_LED2                       134
-#define  PANEL_TEXTMSG_20                 135
+#define  PANEL_QUITBUTTON                 2       /* control type: command, callback function: QuitCallback */
+#define  PANEL_STARTBUTTON                3       /* control type: command, callback function: CB_OnStart */
+#define  PANEL_STOPBUTTON                 4       /* control type: command, callback function: CB_OnStop */
+#define  PANEL_FREQ4                      5       /* control type: numeric, callback function: (none) */
+#define  PANEL_FREQ3                      6       /* control type: numeric, callback function: (none) */
+#define  PANEL_FREQ2                      7       /* control type: numeric, callback function: (none) */
+#define  PANEL_FREQ1                      8       /* control type: numeric, callback function: (none) */
+#define  PANEL_CHECKBOX_DDSSRALLAN        9       /* control type: radioButton, callback function: (none) */
+#define  PANEL_CHECKBOX_DDSHGALLAN        10      /* control type: radioButton, callback function: (none) */
+#define  PANEL_CHECKBOX_DDSFREPALLAN      11      /* control type: radioButton, callback function: (none) */
+#define  PANEL_CHECKBOX_DDSSRPLOT         12      /* control type: radioButton, callback function: (none) */
+#define  PANEL_CHECKBOX_MATH1ALLAN        13      /* control type: radioButton, callback function: CB_OnAllanPlot */
+#define  PANEL_CHECKBOX_DDSHGPLOT         14      /* control type: radioButton, callback function: (none) */
+#define  PANEL_CHECKBOX_FREQ4ALLAN        15      /* control type: radioButton, callback function: CB_OnAllanPlot */
+#define  PANEL_CHECKBOX_DDSFREPPLOT       16      /* control type: radioButton, callback function: (none) */
+#define  PANEL_CHECKBOX_FREQ3ALLAN        17      /* control type: radioButton, callback function: CB_OnAllanPlot */
+#define  PANEL_CHECKBOX_FREQ4PLOT         18      /* control type: radioButton, callback function: CB_OnFreqPlot */
+#define  PANEL_CHECKBOX_FREQ2ALLAN        19      /* control type: radioButton, callback function: CB_OnAllanPlot */
+#define  PANEL_CHECKBOX_FREQ3PLOT         20      /* control type: radioButton, callback function: CB_OnFreqPlot */
+#define  PANEL_CHECKBOX_CORRFREQU         21      /* control type: radioButton, callback function: CB_OnCROX */
+#define  PANEL_CHECKBOX_FREQ1ALLAN        22      /* control type: radioButton, callback function: CB_OnAllanPlot */
+#define  PANEL_CHECKBOX_FREQ2PLOT         23      /* control type: radioButton, callback function: CB_OnFreqPlot */
+#define  PANEL_CHECKBOX_MATH1PLOT         24      /* control type: radioButton, callback function: CB_OnFreqPlot */
+#define  PANEL_CHECKBOX_FREQ1PLOT         25      /* control type: radioButton, callback function: CB_OnFreqPlot */
+#define  PANEL_TIMER                      26      /* control type: timer, callback function: CB_OnTimer */
+#define  PANEL_DDS2                       27      /* control type: numeric, callback function: CB_ChangeDDSOut */
+#define  PANEL_TEXTMSG                    28      /* control type: textMsg, callback function: (none) */
+#define  PANEL_TEXTMSG_2                  29      /* control type: textMsg, callback function: (none) */
+#define  PANEL_SLOPETIME                  30      /* control type: numeric, callback function: CB_ChangeSlopeTime */
+#define  PANEL_DDS1                       31      /* control type: numeric, callback function: CB_ChangeDDSOut */
+#define  PANEL_SPLITTER_4                 32      /* control type: splitter, callback function: (none) */
+#define  PANEL_SPLITTER                   33      /* control type: splitter, callback function: (none) */
+#define  PANEL_CHANGENDIV                 34      /* control type: numeric, callback function: CB_OnChangeNdiv */
+#define  PANEL_DDSFREPOUT                 35      /* control type: numeric, callback function: CB_ChangeDDSOut */
+#define  PANEL_N3CHOICE                   36      /* control type: numeric, callback function: CB_ChangeN */
+#define  PANEL_N3CALCULUS                 37      /* control type: command, callback function: CB_OnNCalculus */
+#define  PANEL_N1CHOICE                   38      /* control type: numeric, callback function: CB_ChangeN */
+#define  PANEL_N2CHOICE                   39      /* control type: numeric, callback function: CB_ChangeN */
+#define  PANEL_N2CALCULUS                 40      /* control type: command, callback function: CB_OnNCalculus */
+#define  PANEL_TEXTMSG_14                 41      /* control type: textMsg, callback function: (none) */
+#define  PANEL_TEXTMSG_3                  42      /* control type: textMsg, callback function: (none) */
+#define  PANEL_TEXTMSG_4                  43      /* control type: textMsg, callback function: (none) */
+#define  PANEL_DDS4STEP                   44      /* control type: ring, callback function: CB_ChangeDDSStep */
+#define  PANEL_DDS3STEP                   45      /* control type: ring, callback function: CB_ChangeDDSStep */
+#define  PANEL_DDS2STEP                   46      /* control type: ring, callback function: CB_ChangeDDSStep */
+#define  PANEL_CENTERFREQUENCY            47      /* control type: numeric, callback function: (none) */
+#define  PANEL_SLOPETOCANCEL              48      /* control type: numeric, callback function: (none) */
+#define  PANEL_MATH4                      49      /* control type: numeric, callback function: (none) */
+#define  PANEL_MATH5                      50      /* control type: numeric, callback function: (none) */
+#define  PANEL_MATH3                      51      /* control type: numeric, callback function: (none) */
+#define  PANEL_CHECKBOX_MATH5PLOT         52      /* control type: radioButton, callback function: CB_OnFreqPlot */
+#define  PANEL_CHECKBOX_MATH4PLOT         53      /* control type: radioButton, callback function: CB_OnFreqPlot */
+#define  PANEL_CHECKBOX_MATH4ALLAN        54      /* control type: radioButton, callback function: CB_OnAllanPlot */
+#define  PANEL_DDS1STEP                   55      /* control type: ring, callback function: CB_ChangeDDSStep */
+#define  PANEL_TEXTMSG_15                 56      /* control type: textMsg, callback function: (none) */
+#define  PANEL_CHECKBOX_MATH5ALLAN        57      /* control type: radioButton, callback function: CB_OnAllanPlot */
+#define  PANEL_CHECKBOX_MATH3PLOT         58      /* control type: radioButton, callback function: CB_OnFreqPlot */
+#define  PANEL_CHECKBOX_MATH5SAVE         59      /* control type: radioButton, callback function: (none) */
+#define  PANEL_CHECKBOX_MATH3SAVE_2       60      /* control type: radioButton, callback function: CB_OnSaveSr */
+#define  PANEL_CHECKBOX_MATH3ALLAN        61      /* control type: radioButton, callback function: CB_OnAllanPlot */
+#define  PANEL_DDSFREPSTEP                62      /* control type: ring, callback function: CB_ChangeDDSStep */
+#define  PANEL_DDSFREPAMP                 63      /* control type: numeric, callback function: CB_ChangeDDSAmpli */
+#define  PANEL_MATHSTRING4                64      /* control type: string, callback function: CB_ChangeMath */
+#define  PANEL_TEXTMSG_17                 65      /* control type: textMsg, callback function: (none) */
+#define  PANEL_MATH2                      66      /* control type: numeric, callback function: (none) */
+#define  PANEL_SPLITTER_15                67      /* control type: splitter, callback function: (none) */
+#define  PANEL_SPLITTER_12                68      /* control type: splitter, callback function: (none) */
+#define  PANEL_CHECKBOX_MATH2PLOT         69      /* control type: radioButton, callback function: CB_OnFreqPlot */
+#define  PANEL_CHECKBOX_MATH3SAVE         70      /* control type: radioButton, callback function: CB_OnSaveHg */
+#define  PANEL_CHECKBOX_MATH2SAVE         71      /* control type: radioButton, callback function: CB_OnSaveOpt */
+#define  PANEL_CHECKBOX_MATH2ALLAN        72      /* control type: radioButton, callback function: CB_OnAllanPlot */
+#define  PANEL_TEXTMSG_7                  73      /* control type: textMsg, callback function: (none) */
+#define  PANEL_MATHSTRING3                74      /* control type: string, callback function: CB_ChangeMath */
+#define  PANEL_MATH1                      75      /* control type: numeric, callback function: (none) */
+#define  PANEL_SPLITTER_6                 76      /* control type: splitter, callback function: (none) */
+#define  PANEL_TEXTMSG_18                 77      /* control type: textMsg, callback function: (none) */
+#define  PANEL_TEXTMSG_6                  78      /* control type: textMsg, callback function: (none) */
+#define  PANEL_TEXTMSG_8                  79      /* control type: textMsg, callback function: (none) */
+#define  PANEL_TEXTMSG_19                 80      /* control type: textMsg, callback function: (none) */
+#define  PANEL_MATHSTRING1                81      /* control type: string, callback function: CB_ChangeMath */
+#define  PANEL_TEXTMSG_9                  82      /* control type: textMsg, callback function: (none) */
+#define  PANEL_TEXTMSG_10                 83      /* control type: textMsg, callback function: (none) */
+#define  PANEL_MATHSTRING2                84      /* control type: string, callback function: CB_ChangeMath */
+#define  PANEL_SPLITTER_10                85      /* control type: splitter, callback function: (none) */
+#define  PANEL_TEXTMSG_16                 86      /* control type: textMsg, callback function: (none) */
+#define  PANEL_SPLITTER_11                87      /* control type: splitter, callback function: (none) */
+#define  PANEL_SPLITTER_9                 88      /* control type: splitter, callback function: (none) */
+#define  PANEL_SPLITTER_3                 89      /* control type: splitter, callback function: (none) */
+#define  PANEL_MINUS10KDDS1               90      /* control type: command, callback function: CB_OnMinus10k */
+#define  PANEL_MINUS10KDDS4               91      /* control type: command, callback function: CB_OnMinus10k */
+#define  PANEL_MINUS10KDDS3               92      /* control type: command, callback function: CB_OnMinus10k */
+#define  PANEL_MINUS10KDDS2               93      /* control type: command, callback function: CB_OnMinus10k */
+#define  PANEL_PLUS10KDDS4                94      /* control type: command, callback function: CB_OnPlus10k */
+#define  PANEL_MINUS275K                  95      /* control type: command, callback function: CB_OnMinus275k */
+#define  PANEL_PLUS10KDDS3                96      /* control type: command, callback function: CB_OnPlus10k */
+#define  PANEL_PLUS10KDDS1                97      /* control type: command, callback function: CB_OnPlus10k */
+#define  PANEL_PLUS10KDDS2                98      /* control type: command, callback function: CB_OnPlus10k */
+#define  PANEL_PLUS275K                   99      /* control type: command, callback function: CB_OnPlus275k */
+#define  PANEL_TEXTMSG_11                 100     /* control type: textMsg, callback function: (none) */
+#define  PANEL_MATHSTRING5                101     /* control type: textBox, callback function: CB_ChangeMath */
+#define  PANEL_SPLITTER_8                 102     /* control type: splitter, callback function: (none) */
+#define  PANEL_MJD                        103     /* control type: numeric, callback function: (none) */
+#define  PANEL_UTC                        104     /* control type: numeric, callback function: (none) */
+#define  PANEL_TIME                       105     /* control type: string, callback function: (none) */
+#define  PANEL_DATE                       106     /* control type: string, callback function: (none) */
+#define  PANEL_CHECKBOX_MATH3AUTOSAV      107     /* control type: radioButton, callback function: CB_OnAutoSaveSr */
+#define  PANEL_CHECKBOX_MATH2AUTOSAV      108     /* control type: radioButton, callback function: CB_OnAutoSaveHg */
+#define  PANEL_CHOOSESAVEFILE             109     /* control type: command, callback function: OnChooseSaveFile */
+#define  PANEL_SPLITTER_14                110     /* control type: splitter, callback function: (none) */
+#define  PANEL_SPLITTER_13                111     /* control type: splitter, callback function: (none) */
+#define  PANEL_DDS4                       112     /* control type: numeric, callback function: CB_ChangeDDSOut */
+#define  PANEL_SPLITTER_2                 113     /* control type: splitter, callback function: (none) */
+#define  PANEL_DDS3                       114     /* control type: numeric, callback function: CB_ChangeDDSOut */
+#define  PANEL_N1CALCULUS                 115     /* control type: command, callback function: CB_OnNCalculus */
+#define  PANEL_FINDSIGN3                  116     /* control type: command, callback function: CB_OnFindSign */
+#define  PANEL_SIGN3                      117     /* control type: numeric, callback function: (none) */
+#define  PANEL_FINDSIGN2                  118     /* control type: command, callback function: CB_OnFindSign */
+#define  PANEL_SIGN2                      119     /* control type: numeric, callback function: (none) */
+#define  PANEL_FINDSIGN1                  120     /* control type: command, callback function: CB_OnFindSign */
+#define  PANEL_SIGN1                      121     /* control type: numeric, callback function: (none) */
+#define  PANEL_FIND10K3                   122     /* control type: command, callback function: CB_OnFind275K */
+#define  PANEL_FIND275K2                  123     /* control type: command, callback function: CB_OnFind275K */
+#define  PANEL_RESETSLOPE                 124     /* control type: command, callback function: CB_OnResetSlope */
+#define  PANEL_CHECKBOX_STOPIFAUTODE      125     /* control type: radioButton, callback function: CB_OnAutoStopSlopeCancellingIfDelock */
+#define  PANEL_CHECKBOX_RECENTER          126     /* control type: radioButton, callback function: CB_OnReCentering */
+#define  PANEL_CHECKBOX_KEEPSLOPE         127     /* control type: radioButton, callback function: CB_OnCROX */
+#define  PANEL_CHECKBOX_KEEP              128     /* control type: radioButton, callback function: CB_OnCROX */
+#define  PANEL_STARTCANCEL                129     /* control type: textButton, callback function: CB_OnStartSlopeCancelling */
+#define  PANEL_LED1                       130     /* control type: LED, callback function: (none) */
+#define  PANEL_LED2                       131     /* control type: LED, callback function: (none) */
+#define  PANEL_SLOPE_REFERENCE            132     /* control type: ring, callback function: SlopeReference_cb */
 
 
      /* Menu Bars, Menus, and Menu Items: */
@@ -198,7 +195,7 @@
           /* (no menu bars in the resource file) */
 
 
-     /* Callback Prototypes: */ 
+     /* Callback Prototypes: */
 
 int  CVICALLBACK CB_ChangeDDSAmpli(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
 int  CVICALLBACK CB_ChangeDDSOut(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
@@ -240,6 +237,7 @@
 int  CVICALLBACK OnAcceptN(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
 int  CVICALLBACK OnChooseSaveFile(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
 int  CVICALLBACK QuitCallback(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
+int  CVICALLBACK SlopeReference_cb(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
 
 
 #ifdef __cplusplus
Binary file FXAnalyse.uir has changed